Browse Source

Fix sendrawtransaction hang when sending a tx already in mempool

0.16
Matt Corallo 7 years ago
parent
commit
d9340ce912
  1. 4
      src/rpc/rawtransaction.cpp

4
src/rpc/rawtransaction.cpp

@ -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

Loading…
Cancel
Save