Skip to content

Commit

Permalink
Fix sendrawtransaction hang when sending a tx already in mempool
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBlueMatt committed Nov 20, 2017
1 parent 7293d06 commit d9340ce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/rpc/rawtransaction.cpp
Expand Up @@ -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
Expand Down

0 comments on commit d9340ce

Please sign in to comment.