build/test

This commit is contained in:
Denis Angell
2024-03-28 21:48:21 +01:00
parent a8ff49739d
commit 1a3376e453
26 changed files with 588 additions and 168 deletions

View File

@@ -241,8 +241,32 @@ XRPNotCreated::finalize(
return drops_ == drops;
}
if (tt == ttBATCH)
return true;
if (tt == ttBATCH && res == tesSUCCESS)
{
drops_ = -fee.drops();
// return true;
// auto const& txns = tx.getFieldArray(sfRawTransactions);
// XRPAmount dropsAdded{beast::zero};
// XRPAmount feeAdded{beast::zero};
// for (auto const& txn : txns)
// {
// dropsAdded += txn.getFieldAmount(sfAmount).xrp();
// feeAdded += txn.getFieldAmount(sfFee).xrp();
// }
// int64_t drops = dropsAdded.drops() - feeAdded.drops();
// std::cout << "fee.drops: " << feeAdded << "\n";
// std::cout << "dropsAdded: " << dropsAdded.drops() << "\n";
// std::cout << "drops: " << drops << "\n";
// std::cout << "drops=: " << drops_ << "\n";
// // catch any overflow or funny business
// if (drops > dropsAdded.drops())
// return false;
// return drops_ == drops;
}
// The net change should never be positive, as this would mean that the
// transaction created XRP out of thin air. That's not possible.