Skip to content

Commit 3f16ebd

Browse files
laanwjPastaPastaPasta
authored andcommitted
Merge bitcoin#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 bitcoin#11721 actually hit. Tree-SHA512: 1da4088bbda64c5527233de9ec4d03f9e0c1eacddb2ed3deab3cb99eac0293ee6fb846830f97b5e10e230307b6d7fd18013043173aa4f27ef171d9da626e2c88
1 parent 1587728 commit 3f16ebd

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
@@ -1032,6 +1032,10 @@ UniValue sendrawtransaction(const JSONRPCRequest& request)
10321032
}
10331033
} else if (fHaveChain) {
10341034
throw JSONRPCError(RPC_TRANSACTION_ALREADY_IN_CHAIN, "transaction already in block chain");
1035+
} else {
1036+
// Make sure we don't block forever if re-sending
1037+
// a transaction already in mempool.
1038+
promise.set_value();
10351039
}
10361040

10371041
} // cs_main

0 commit comments

Comments
 (0)