diff --git a/include/xrpl/protocol/detail/ledger_entries.macro b/include/xrpl/protocol/detail/ledger_entries.macro index bc96f92d3..f23b39651 100644 --- a/include/xrpl/protocol/detail/ledger_entries.macro +++ b/include/xrpl/protocol/detail/ledger_entries.macro @@ -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. diff --git a/src/libxrpl/protocol/STLedgerEntry.cpp b/src/libxrpl/protocol/STLedgerEntry.cpp index 0350dd883..c4339f042 100644 --- a/src/libxrpl/protocol/STLedgerEntry.cpp +++ b/src/libxrpl/protocol/STLedgerEntry.cpp @@ -135,8 +135,16 @@ STLedgerEntry::getJson(JsonOptions options) const bool STLedgerEntry::isThreadedType(Rules const& rules) const { - static constexpr std::array newPreviousTxnIDTypes = { - ltDIR_NODE, ltAMENDMENTS, ltFEE_SETTINGS, ltNEGATIVE_UNL, ltAMM}; + static constexpr std::array 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) &&