Skip to content

Commit

Permalink
Merge pull request #508 from alvasw/fix_unconfirmed_tx_windows
Browse files Browse the repository at this point in the history
UnconfirmedTxTest: Wait until Bitcoin Core updates balance (Windows)
  • Loading branch information
alvasw authored Oct 4, 2022
2 parents fb37f13 + 9d272f9 commit 79637c0
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,17 @@ public void sendBtcAndCheckIfUnconfirmedBalanceIncluded() throws InterruptedExce
throw new IllegalStateException("Didn't receive ZMQ notification after 1 minute.");
}

// Bitcoin Core needs a while until it updates the balance
double balance;
for (int i = 0; i < 10; i++) {
balance = receiverWallet.getBalance();
if (balance == 1) {
break;
}

Thread.sleep(200);
}

assertThat(receiverWallet.getBalance())
.isEqualTo(1);
}
Expand Down

0 comments on commit 79637c0

Please sign in to comment.