diff --git a/core/src/test/java/org/bitcoinj/core/FullBlockTestGenerator.java b/core/src/test/java/org/bitcoinj/core/FullBlockTestGenerator.java index 52969ce5..f8e65552 100644 --- a/core/src/test/java/org/bitcoinj/core/FullBlockTestGenerator.java +++ b/core/src/test/java/org/bitcoinj/core/FullBlockTestGenerator.java @@ -1632,7 +1632,7 @@ public class FullBlockTestGenerator { new TransactionOutPoint(params, 0, b1001.getTransactions().get(0).getHash()), b1001.getTransactions().get(0).getOutputs().get(0).getValue(), b1001.getTransactions().get(0).getOutputs().get(0).getScriptPubKey())); - int nextHeight = chainHeadHeight + 31; + int heightAfter1001 = chainHeadHeight + 31; if (runLargeReorgs) { // No way you can fit this test in memory @@ -1641,6 +1641,7 @@ public class FullBlockTestGenerator { Block lastBlock = b1001; TransactionOutPoint lastOutput = new TransactionOutPoint(params, 2, b1001.getTransactions().get(1).getHash()); int blockCountAfter1001; + int nextHeight = heightAfter1001; List hashesToSpend = new LinkedList(); // all index 0 final int TRANSACTION_CREATION_BLOCKS = 100; @@ -1679,7 +1680,7 @@ public class FullBlockTestGenerator { // Reorg back to b1001 + empty blocks Sha256Hash firstHash = lastBlock.getHash(); int height = nextHeight-1; - nextHeight = chainHeadHeight + 26; + nextHeight = heightAfter1001; lastBlock = b1001; for (int i = 0; i < blockCountAfter1001; i++) { Block block = createNextBlock(lastBlock, nextHeight++, null, null);