Fix : Reject invalid instantsend transaction (#1583)
This commit is contained in:
parent
f786ce6aba
commit
ae909d0a09
@ -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");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user