@@ -31,7 +31,12 @@ using node::fImporting;
3131using node::fReindex ;
3232
3333// Forward declaration to break dependency over node/transaction.h
34- std::pair<CTransactionRef, uint256> GetTransactionBlock (const uint256& hash, const CTxMemPool* const mempool);
34+ namespace node
35+ {
36+ CTransactionRef GetTransaction (const CBlockIndex* const block_index, const CTxMemPool* const mempool,
37+ const uint256& hash, const Consensus::Params& consensusParams, uint256& hashBlock);
38+ } // namespace node
39+ using node::GetTransaction;
3540
3641namespace llmq
3742{
@@ -580,7 +585,8 @@ bool CInstantSendManager::CheckCanLock(const COutPoint& outpoint, bool printDebu
580585 return false ;
581586 }
582587
583- auto [tx, hashBlock] = GetTransactionBlock (outpoint.hash , &mempool);
588+ uint256 hashBlock{};
589+ const auto tx = GetTransaction (nullptr , &mempool, outpoint.hash , params, hashBlock);
584590 // this relies on enabled txindex and won't work if we ever try to remove the requirement for txindex for masternodes
585591 if (!tx) {
586592 if (printDebug) {
@@ -637,7 +643,9 @@ void CInstantSendManager::HandleNewInputLockRecoveredSig(const CRecoveredSig& re
637643 g_txindex->BlockUntilSyncedToCurrentChain ();
638644 }
639645
640- auto [tx, hashBlock] = GetTransactionBlock (txid, &mempool);
646+
647+ uint256 hashBlock{};
648+ const auto tx = GetTransaction (nullptr , &mempool, txid, Params ().GetConsensus (), hashBlock);
641649 if (!tx) {
642650 return ;
643651 }
@@ -1019,7 +1027,8 @@ void CInstantSendManager::ProcessInstantSendLock(NodeId from, PeerManager& peerm
10191027 return ;
10201028 }
10211029
1022- auto [tx, hashBlock] = GetTransactionBlock (islock->txid , &mempool);
1030+ uint256 hashBlock{};
1031+ const auto tx = GetTransaction (nullptr , &mempool, islock->txid , Params ().GetConsensus (), hashBlock);
10231032 const CBlockIndex* pindexMined{nullptr };
10241033 // we ignore failure here as we must be able to propagate the lock even if we don't have the TX locally
10251034 if (tx && !hashBlock.IsNull ()) {
0 commit comments