Remove use of g_connman / PushInventory in wallet code

This commit does not change behavior.
This commit is contained in:
Russell Yanofsky
2017-07-28 19:34:54 -04:00
parent 00dfb2a440
commit 6d6bcc77c0
8 changed files with 26 additions and 21 deletions

View File

@@ -11,6 +11,7 @@
#include <policy/policy.h>
#include <policy/rbf.h>
#include <primitives/block.h>
#include <protocol.h>
#include <sync.h>
#include <threadsafety.h>
#include <txmempool.h>
@@ -199,6 +200,11 @@ public:
auto it_mp = ::mempool.mapTx.find(txid);
return it_mp != ::mempool.mapTx.end() && it_mp->GetCountWithDescendants() > 1;
}
void relayTransaction(const uint256& txid) override
{
CInv inv(MSG_TX, txid);
g_connman->ForEachNode([&inv](CNode* node) { node->PushInventory(inv); });
}
void getTransactionAncestry(const uint256& txid, size_t& ancestors, size_t& descendants) override
{
::mempool.GetTransactionAncestry(txid, ancestors, descendants);