From 729c716b18ed871609f01605eadedd33f9c8045e Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Sat, 23 Aug 2014 13:11:05 +0200 Subject: [PATCH] WalletTest: pin creation time of wallet key hierarchy in keyRotationHD test to avoid timing race. Should resolve issue 575. --- core/src/test/java/com/google/bitcoin/core/WalletTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/test/java/com/google/bitcoin/core/WalletTest.java b/core/src/test/java/com/google/bitcoin/core/WalletTest.java index f1da6311d..907d72b37 100644 --- a/core/src/test/java/com/google/bitcoin/core/WalletTest.java +++ b/core/src/test/java/com/google/bitcoin/core/WalletTest.java @@ -2352,6 +2352,7 @@ public class WalletTest extends TestWithWallet { public void keyRotationHD() throws Exception { // Test that if we rotate an HD chain, a new one is created and all arrivals on the old keys are moved. Utils.setMockClock(); + wallet = new Wallet(params); ECKey key1 = wallet.freshReceiveKey(); ECKey key2 = wallet.freshReceiveKey(); sendMoneyToWallet(wallet, CENT, key1.toAddress(params), AbstractBlockChain.NewBlockType.BEST_CHAIN);