diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2016-04-16 19:13:12 -0400 |
---|---|---|
committer | Cory Fields <cory-nospam-@coryfields.com> | 2016-09-08 12:24:06 -0400 |
commit | 53347f0cb99e514815e44a56439a4a10012238f8 (patch) | |
tree | fc5baefe46ef918143904a299fd8aa5083097eda /src/wallet | |
parent | c0569c7fa1e25599b3f1d6a16b15ec23052021da (diff) |
net: create generic functor accessors and move vNodes to CConnman
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/wallet.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 4396c2a2b0..fd8b056bfc 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1460,8 +1460,15 @@ bool CWalletTx::RelayWalletTransaction(CConnman* connman) { if (GetDepthInMainChain() == 0 && !isAbandoned() && InMempool()) { LogPrintf("Relaying wtx %s\n", GetHash().ToString()); - RelayTransaction((CTransaction)*this); - return true; + if (connman) { + CInv inv(MSG_TX, GetHash()); + connman->ForEachNode([&inv](CNode* pnode) + { + pnode->PushInventory(inv); + return true; + }); + return true; + } } } return false; |