Fix sendrawtransaction hang when sending a tx already in mempool

This commit is contained in:
Matt Corallo 2017-11-20 12:18:52 -08:00
parent 7293d06413
commit d9340ce912

View file

@ -970,6 +970,10 @@ UniValue sendrawtransaction(const JSONRPCRequest& request)
} }
} else if (fHaveChain) { } else if (fHaveChain) {
throw JSONRPCError(RPC_TRANSACTION_ALREADY_IN_CHAIN, "transaction already in block chain"); throw JSONRPCError(RPC_TRANSACTION_ALREADY_IN_CHAIN, "transaction already in block chain");
} else {
// Make sure we don't block forever if re-sending
// a transaction already in mempool.
promise.set_value();
} }
} // cs_main } // cs_main