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/rpc/rawtransaction.cpp | |
parent | c0569c7fa1e25599b3f1d6a16b15ec23052021da (diff) |
net: create generic functor accessors and move vNodes to CConnman
Diffstat (limited to 'src/rpc/rawtransaction.cpp')
-rw-r--r-- | src/rpc/rawtransaction.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index 9461a7280c..3daf1681f3 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -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(); } |