diff --git a/core/src/main/java/com/google/bitcoin/core/Coin.java b/core/src/main/java/com/google/bitcoin/core/Coin.java index 79966d30..029b766b 100644 --- a/core/src/main/java/com/google/bitcoin/core/Coin.java +++ b/core/src/main/java/com/google/bitcoin/core/Coin.java @@ -118,10 +118,6 @@ public final class Coin implements Comparable, Serializable { return new Coin(LongMath.checkedSubtract(this.value, value.value)); } - public Coin subtract(final long value) { - return new Coin(LongMath.checkedSubtract(this.value, value)); - } - public Coin multiply(final long factor) { return new Coin(LongMath.checkedMultiply(this.value, factor)); } 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 c34fcfbc..03d4f689 100644 --- a/core/src/test/java/com/google/bitcoin/core/FullBlockTestGenerator.java +++ b/core/src/test/java/com/google/bitcoin/core/FullBlockTestGenerator.java @@ -1276,7 +1276,7 @@ public class FullBlockTestGenerator { Block b68 = createNextBlock(b65, chainHeadHeight + 21, null, SATOSHI.multiply(10)); { Transaction tx = new Transaction(params); - tx.addOutput(out20.value.subtract(9), OP_TRUE_SCRIPT); + tx.addOutput(out20.value.subtract(Coin.valueOf(9)), OP_TRUE_SCRIPT); addOnlyInputToTransaction(tx, out20, 0); b68.addTransaction(tx); } @@ -1286,7 +1286,7 @@ public class FullBlockTestGenerator { Block b69 = createNextBlock(b65, chainHeadHeight + 21, null, SATOSHI.multiply(10)); { Transaction tx = new Transaction(params); - tx.addOutput(out20.value.subtract(10), OP_TRUE_SCRIPT); + tx.addOutput(out20.value.subtract(Coin.valueOf(10)), OP_TRUE_SCRIPT); addOnlyInputToTransaction(tx, out20, 0); b69.addTransaction(tx); }