mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
net: create generic functor accessors and move vNodes to CConnman
This commit is contained in:
@@ -891,8 +891,15 @@ UniValue sendrawtransaction(const UniValue& params, bool fHelp)
|
||||
} else if (fHaveChain) {
|
||||
throw JSONRPCError(RPC_TRANSACTION_ALREADY_IN_CHAIN, "transaction already in block chain");
|
||||
}
|
||||
RelayTransaction(tx);
|
||||
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);
|
||||
return true;
|
||||
});
|
||||
return hashTx.GetHex();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user