mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
fix crash bug tn2
This commit is contained in:
@@ -49,7 +49,9 @@ getFeeLevelPaid(ReadView const& view, STTx const& tx)
|
|||||||
return std::pair{baseFee + ref, feePaid + ref};
|
return std::pair{baseFee + ref, feePaid + ref};
|
||||||
}();
|
}();
|
||||||
|
|
||||||
assert(baseFee.signum() > 0);
|
//RH TODO: check if >= 0 is appropriate for hooks / emitted txn
|
||||||
|
//this was previously > 0 and a crash bug in tn2
|
||||||
|
assert(baseFee.signum() >= 0);
|
||||||
if (effectiveFeePaid.signum() <= 0 || baseFee.signum() <= 0)
|
if (effectiveFeePaid.signum() <= 0 || baseFee.signum() <= 0)
|
||||||
{
|
{
|
||||||
return FeeLevel64(0);
|
return FeeLevel64(0);
|
||||||
|
|||||||
@@ -47,6 +47,9 @@
|
|||||||
#define HS_ACC() ctx.tx.getAccountID(sfAccount) << "-" << ctx.tx.getTransactionID()
|
#define HS_ACC() ctx.tx.getAccountID(sfAccount) << "-" << ctx.tx.getTransactionID()
|
||||||
|
|
||||||
namespace ripple {
|
namespace ripple {
|
||||||
|
//RH UPTO: sethook needs to correctly compute and charge fee for creating new hooks, updating existing hooks
|
||||||
|
//and it also needs to account for reserve requirements for namespaces, parameters and grants
|
||||||
|
|
||||||
|
|
||||||
// RH TODO test overflow on leb128 detection
|
// RH TODO test overflow on leb128 detection
|
||||||
// web assembly contains a lot of run length encoding in LEB128 format
|
// web assembly contains a lot of run length encoding in LEB128 format
|
||||||
|
|||||||
Reference in New Issue
Block a user