mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Additional support for HookDefinition, HookState, ImportVLSequence at fixPreviousTxnID Amendment
This commit is contained in:
@@ -89,6 +89,8 @@ LEDGER_ENTRY(ltHOOK_DEFINITION, 'D', HookDefinition, hook_definition, ({
|
||||
{sfReferenceCount, soeREQUIRED},
|
||||
{sfFee, soeREQUIRED},
|
||||
{sfHookCallbackFee, soeOPTIONAL},
|
||||
{sfPreviousTxnID, soeOPTIONAL},
|
||||
{sfPreviousTxnLgrSeq, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** A ledger object containing a hook-emitted transaction from a previous hook execution.
|
||||
@@ -118,6 +120,8 @@ LEDGER_ENTRY(ltHOOK, 'H', Hook, hook, ({
|
||||
LEDGER_ENTRY(ltIMPORT_VLSEQ, 0x0049, ImportVLSequence, import_vlseq, ({
|
||||
{sfPublicKey, soeREQUIRED},
|
||||
{sfImportSequence, soeREQUIRED},
|
||||
{sfPreviousTxnID, soeOPTIONAL},
|
||||
{sfPreviousTxnLgrSeq, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** The ledger object which tracks the current negative UNL state.
|
||||
@@ -439,6 +443,8 @@ LEDGER_ENTRY(ltHOOK_STATE, 0x0076, HookState, hook_state, ({
|
||||
{sfOwnerNode, soeREQUIRED},
|
||||
{sfHookStateKey, soeREQUIRED},
|
||||
{sfHookStateData, soeREQUIRED},
|
||||
{sfPreviousTxnID, soeOPTIONAL},
|
||||
{sfPreviousTxnLgrSeq, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** A ledger object describing a single unidirectional XRP payment channel.
|
||||
|
||||
@@ -135,8 +135,16 @@ STLedgerEntry::getJson(JsonOptions options) const
|
||||
bool
|
||||
STLedgerEntry::isThreadedType(Rules const& rules) const
|
||||
{
|
||||
static constexpr std::array<LedgerEntryType, 5> newPreviousTxnIDTypes = {
|
||||
ltDIR_NODE, ltAMENDMENTS, ltFEE_SETTINGS, ltNEGATIVE_UNL, ltAMM};
|
||||
static constexpr std::array<LedgerEntryType, 8> newPreviousTxnIDTypes = {
|
||||
ltDIR_NODE,
|
||||
ltAMENDMENTS,
|
||||
ltFEE_SETTINGS,
|
||||
ltNEGATIVE_UNL,
|
||||
ltAMM,
|
||||
ltHOOK_STATE,
|
||||
ltHOOK_DEFINITION,
|
||||
ltIMPORT_VLSEQ,
|
||||
};
|
||||
// Exclude PrevTxnID/PrevTxnLgrSeq if the fixPreviousTxnID amendment is not
|
||||
// enabled and the ledger object type is in the above set
|
||||
bool const excludePrevTxnID = !rules.enabled(fixPreviousTxnID) &&
|
||||
|
||||
Reference in New Issue
Block a user