mining: add getTransactionsByTxID() IPC method

This commit is contained in:
Sjors Provoost
2025-12-05 19:50:58 +01:00
parent 0d5e4d4712
commit d282ae6883
6 changed files with 65 additions and 2 deletions

View File

@@ -180,6 +180,15 @@ public:
*/
virtual bool submitBlock(const CBlock& block, std::string& reason, std::string& debug) = 0;
/**
* Fetch raw transactions from the mempool by txid.
*
* @param[in] txids transaction ids to look up
* @returns one entry per requested txid containing the
* transaction if found, otherwise nullptr
*/
virtual std::vector<CTransactionRef> getTransactionsByTxID(const std::vector<Txid>& txids) = 0;
//! Get internal node context. Useful for RPC and testing,
//! but not accessible across processes.
virtual const node::NodeContext* context() { return nullptr; }