diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index aa6927d56..2930c476e 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -865,6 +865,9 @@ UniValue sendrawtransaction(const UniValue& params, bool fHelp) bool fHaveChain = existingCoins && existingCoins->nHeight < 1000000000; if (!fHaveMempool && !fHaveChain) { // push to local node and sync with wallets + if (fInstantSend && !instantsend.ProcessTxLockRequest(tx)) { + throw JSONRPCError(RPC_TRANSACTION_ERROR, "Not a valid InstantSend transaction, see debug.log for more info"); + } CValidationState state; bool fMissingInputs; if (!AcceptToMemoryPool(mempool, state, tx, false, &fMissingInputs, false, !fOverrideFees)) { @@ -880,9 +883,6 @@ UniValue sendrawtransaction(const UniValue& params, bool fHelp) } else if (fHaveChain) { throw JSONRPCError(RPC_TRANSACTION_ALREADY_IN_CHAIN, "transaction already in block chain"); } - if (fInstantSend && !instantsend.ProcessTxLockRequest(tx)) { - throw JSONRPCError(RPC_TRANSACTION_ERROR, "Not a valid InstantSend transaction, see debug.log for more info"); - } if(!g_connman) throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled");