Skip to content

Commit

Permalink
Relay tx in sendrawtransaction according to its inv.type (#1584)
Browse files Browse the repository at this point in the history
  • Loading branch information
UdjinM6 authored Aug 23, 2017
1 parent 4ed838c commit 510c0a0
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/rpc/rawtransaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -886,10 +886,7 @@ UniValue sendrawtransaction(const UniValue& params, bool fHelp)
if(!g_connman)
throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled");

CInv inv(MSG_TX, hashTx);
g_connman->ForEachNode([&inv](CNode* pnode)
{
pnode->PushInventory(inv);
});
g_connman->RelayTransaction(tx);

return hashTx.GetHex();
}

0 comments on commit 510c0a0

Please sign in to comment.