mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Merge #17564: rpc: Use mempool from node context instead of global
fa8e650b52rest: Use mempool from node context instead of global (MarcoFalke)fa660d65d7node: Use mempool from node context instead of global (MarcoFalke)facbaf092frpc: Use mempool from node context instead of global (MarcoFalke) Pull request description: Currently they are identical, but in the future we might want to turn the mempool into a unique_ptr. Replacing the global with the mempool pointer from the node context simplifies this step. ACKs for top commit: jnewbery: Code review ACKfa8e650b5ryanofsky: Code review ACKfa8e650b52, Only the discussed REST server changes since the last review. Tree-SHA512: 0836f3f39cf90306455962918446e5f8612e88c32072b92afc30929aea1f17430bbda0e2b3668d36c9d6b97d63a93cf4903185194571108642b7bf5a39b89125
This commit is contained in:
@@ -263,7 +263,7 @@ public:
|
||||
}
|
||||
return true;
|
||||
}
|
||||
void findCoins(std::map<COutPoint, Coin>& coins) override { return FindCoins(coins); }
|
||||
void findCoins(std::map<COutPoint, Coin>& coins) override { return FindCoins(m_node, coins); }
|
||||
double guessVerificationProgress(const uint256& block_hash) override
|
||||
{
|
||||
LOCK(cs_main);
|
||||
|
||||
@@ -167,8 +167,8 @@ public:
|
||||
}
|
||||
int64_t getTotalBytesRecv() override { return m_context.connman ? m_context.connman->GetTotalBytesRecv() : 0; }
|
||||
int64_t getTotalBytesSent() override { return m_context.connman ? m_context.connman->GetTotalBytesSent() : 0; }
|
||||
size_t getMempoolSize() override { return ::mempool.size(); }
|
||||
size_t getMempoolDynamicUsage() override { return ::mempool.DynamicMemoryUsage(); }
|
||||
size_t getMempoolSize() override { return m_context.mempool ? m_context.mempool->size() : 0; }
|
||||
size_t getMempoolDynamicUsage() override { return m_context.mempool ? m_context.mempool->DynamicMemoryUsage() : 0; }
|
||||
bool getHeaderTip(int& height, int64_t& block_time) override
|
||||
{
|
||||
LOCK(::cs_main);
|
||||
|
||||
Reference in New Issue
Block a user