diff --git a/core/src/test/java/com/google/bitcoin/core/FullBlockTestGenerator.java b/core/src/test/java/com/google/bitcoin/core/FullBlockTestGenerator.java index 3162e253..c0a31100 100644 --- a/core/src/test/java/com/google/bitcoin/core/FullBlockTestGenerator.java +++ b/core/src/test/java/com/google/bitcoin/core/FullBlockTestGenerator.java @@ -1117,16 +1117,9 @@ public class FullBlockTestGenerator { Block b61 = createNextBlock(b60, chainHeadHeight + 19, out18, null); { - final Transaction tx = b61.getTransactions().get(0); - byte[] scriptBytes = tx.getInputs().get(0).getScriptBytes(); - // createNextBlock will increment a uint16 in the first script bytes of each new block. - int tmp = (scriptBytes[0] | (scriptBytes[1] << 8)) - 1; - scriptBytes[0] = (byte) tmp; - scriptBytes[1] = (byte) (tmp >> 8); - tx.getInputs().get(0).setScriptBytes(scriptBytes); + b61.getTransactions().get(0).getInput(0).setScriptBytes(b60.getTransactions().get(0).getInput(0).getScriptBytes()); b61.unCache(); - final Transaction tx2 = b60.getTransactions().get(0); - Preconditions.checkState(tx.equals(tx2)); + Preconditions.checkState(b61.getTransactions().get(0).equals(b60.getTransactions().get(0))); } b61.solve(); blocks.add(new BlockAndValidity(blockToHeightMap, b61, false, true, b60.getHash(), chainHeadHeight + 18, "b61"));