This commit is contained in:
jl777
2019-07-06 00:26:28 -11:00
parent 820b9efaeb
commit 3bf999989d
2 changed files with 9 additions and 3 deletions

View File

@@ -1282,6 +1282,8 @@ UniValue signrawtransaction(const UniValue& params, bool fHelp)
return result;
}
extern UniValue NSPV_broadcast(char *hex);
UniValue sendrawtransaction(const UniValue& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 2)
@@ -1340,8 +1342,12 @@ UniValue sendrawtransaction(const UniValue& params, bool fHelp)
} else if (fHaveChain) {
throw JSONRPCError(RPC_TRANSACTION_ALREADY_IN_CHAIN, "transaction already in block chain");
}
RelayTransaction(tx);
}
else
{
NSPV_broadcast((char *)params[0].get_str().c_str());
}
RelayTransaction(tx);
return hashTx.GetHex();
}