mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Fix PaymentTransactor for new result codes.
This commit is contained in:
@@ -85,8 +85,7 @@ TER PaymentTransactor::doApply()
|
|||||||
// Another transaction could create the account and then this transaction would succeed.
|
// Another transaction could create the account and then this transaction would succeed.
|
||||||
return tecNO_DST;
|
return tecNO_DST;
|
||||||
}
|
}
|
||||||
else if (isSetBit(mParams, tapOPEN_LEDGER) // Ledger is not final, can vote no.
|
else if (saDstAmount.getNValue() < mEngine->getLedger()->getReserve(0)) // Reserve is not scaled by load.
|
||||||
&& saDstAmount.getNValue() < mEngine->getLedger()->getReserve(0)) // Reserve is not scaled by load.
|
|
||||||
{
|
{
|
||||||
cLog(lsINFO) << "doPayment: Delay transaction: Destination account does not exist. Insufficent payment to create account.";
|
cLog(lsINFO) << "doPayment: Delay transaction: Destination account does not exist. Insufficent payment to create account.";
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ buster.testCase("Sending", {
|
|||||||
'setUp' : testutils.build_setup(), //
|
'setUp' : testutils.build_setup(), //
|
||||||
'tearDown' : testutils.build_teardown(),
|
'tearDown' : testutils.build_teardown(),
|
||||||
|
|
||||||
"send XRP to non-existent account with insufficent fee" : // => to run only that.
|
"send XRP to non-existent account with insufficent fee" :
|
||||||
function (done) {
|
function (done) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var ledgers = 20;
|
var ledgers = 20;
|
||||||
@@ -87,9 +87,9 @@ buster.testCase("Sending", {
|
|||||||
self.remote.ledger_accept(); // Move it along.
|
self.remote.ledger_accept(); // Move it along.
|
||||||
})
|
})
|
||||||
.on('final', function (m) {
|
.on('final', function (m) {
|
||||||
// console.log("final: %s", JSON.stringify(m));
|
// console.log("final: %s", JSON.stringify(m, undefined, 2));
|
||||||
|
|
||||||
buster.assert(false, "Should not have got a final.");
|
buster.assert.equals(m.metadata.TransactionResult, 'tecNO_DST_INSUF_XRP');
|
||||||
done();
|
done();
|
||||||
})
|
})
|
||||||
.on('error', function(m) {
|
.on('error', function(m) {
|
||||||
|
|||||||
Reference in New Issue
Block a user