aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatt Corallo <[email protected]>2017-11-20 12:18:52 -0800
committerMatt Corallo <[email protected]>2017-11-20 12:18:52 -0800
commitd9340ce9124ecc4c3588a411de6868fd8f995074 (patch)
tree504c40ffca9e46d412eacbb10572abf30d80d0ed /src
parentMerge #11698: [Docs] [Qt] RPC-Console nested commands documentation (diff)
downloaddiscoin-d9340ce9124ecc4c3588a411de6868fd8f995074.tar.xz
discoin-d9340ce9124ecc4c3588a411de6868fd8f995074.zip
Fix sendrawtransaction hang when sending a tx already in mempool
Diffstat (limited to 'src')
-rw-r--r--src/rpc/rawtransaction.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp
index e65959bf0..3aff1e9fb 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