Skip to content

Commit d9340ce

Browse files
committed
Fix sendrawtransaction hang when sending a tx already in mempool
1 parent 7293d06 commit d9340ce

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/rpc/rawtransaction.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -970,6 +970,10 @@ UniValue sendrawtransaction(const JSONRPCRequest& request)
970970
}
971971
} else if (fHaveChain) {
972972
throw JSONRPCError(RPC_TRANSACTION_ALREADY_IN_CHAIN, "transaction already in block chain");
973+
} else {
974+
// Make sure we don't block forever if re-sending
975+
// a transaction already in mempool.
976+
promise.set_value();
973977
}
974978

975979
} // cs_main

0 commit comments

Comments
 (0)