aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorCory Fields <[email protected]>2016-04-16 19:13:12 -0400
committerCory Fields <[email protected]>2016-09-08 12:24:06 -0400
commit53347f0cb99e514815e44a56439a4a10012238f8 (patch)
treefc5baefe46ef918143904a299fd8aa5083097eda /src/wallet
parentnet: Add most functions needed for vNodes to CConnman (diff)
downloaddiscoin-53347f0cb99e514815e44a56439a4a10012238f8.tar.xz
discoin-53347f0cb99e514815e44a56439a4a10012238f8.zip
net: create generic functor accessors and move vNodes to CConnman
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 4396c2a2b..fd8b056bf 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;