Skip to content

Commit

Permalink
πŸ› Fix optimistic update condition (#941)
Browse files Browse the repository at this point in the history
  • Loading branch information
BertrandD authored Apr 3, 2024
1 parent ad1e271 commit b8a5553
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/src/wallet/bitcoin/BitcoinLikeAccount.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ namespace {
auto prevTxOutputIndex = input->getPreviousOutputIndex().value_or(0);
BitcoinLikeBlockchainExplorerTransaction prevTx;
if (!BitcoinLikeTransactionDatabaseHelper::getTransactionByHash(
sql, prevTxHash, accountUid, prevTx) ||
prevTxOutputIndex >= prevTx.outputs.size()) {
sql, prevTxHash, accountUid, prevTx)) {
throw make_exception(api::ErrorCode::TRANSACTION_NOT_FOUND,
"Transaction {} not found while broadcasting",
prevTxHash);
Expand Down

0 comments on commit b8a5553

Please sign in to comment.