Merge #11738: Fix sendrawtransaction hang when sending a tx already in mempool

d9340ce Fix sendrawtransaction hang when sending a tx already in mempool (Matt Corallo)

Pull request description:

  I assume this is what #11721 actually hit.

Tree-SHA512: 1da4088bbda64c5527233de9ec4d03f9e0c1eacddb2ed3deab3cb99eac0293ee6fb846830f97b5e10e230307b6d7fd18013043173aa4f27ef171d9da626e2c88
This commit is contained in:
Wladimir J. van der Laan 2017-11-21 08:47:35 +01:00
commit d4267a3ab2
No known key found for this signature in database
GPG key ID: 1E4AED62986CD25D

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