Fix sendrawtransaction hang when sending a tx already in mempool
This commit is contained in:
parent
7293d06413
commit
d9340ce912
1 changed files with 4 additions and 0 deletions
|
@ -970,6 +970,10 @@ UniValue sendrawtransaction(const JSONRPCRequest& request)
|
|||
}
|
||||
} else if (fHaveChain) {
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue