Relay tx in sendrawtransaction according to its inv.type (#1584)

bug was introduced in #1537 a9d771e497 (diff-01aa7d1d32f1b9e5a836c9c411978918R889)
This commit is contained in:
UdjinM6 2017-08-23 17:26:57 +03:00 committed by GitHub
parent 4ed838cb5d
commit 510c0a06d7

View File

@ -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();
}