diff options
author | Matt Corallo <git@bluematt.me> | 2017-11-20 12:18:52 -0800 |
---|---|---|
committer | Matt Corallo <git@bluematt.me> | 2017-11-20 12:18:52 -0800 |
commit | d9340ce9124ecc4c3588a411de6868fd8f995074 (patch) | |
tree | 504c40ffca9e46d412eacbb10572abf30d80d0ed /src/rpc/rawtransaction.cpp | |
parent | 7293d064133aeafd9f0ae0bdbb2ed74a44d91ecc (diff) |
Fix sendrawtransaction hang when sending a tx already in mempool
Diffstat (limited to 'src/rpc/rawtransaction.cpp')
-rw-r--r-- | src/rpc/rawtransaction.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index e65959bf0e..3aff1e9fbf 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -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 |