FakeTxBuilder: use throwaway key rather than address in createFakeDoubleSpendTxns()

Addresses are expensive to create, as we need to know a network they are created for.
This commit is contained in:
Andreas Schildbach 2023-04-02 17:39:39 +02:00
parent 8a047d48b9
commit a2c242cbfe

View File

@ -218,7 +218,7 @@ public class FakeTxBuilder {
public static DoubleSpends createFakeDoubleSpendTxns(NetworkParameters params, Address to) {
DoubleSpends doubleSpends = new DoubleSpends();
Coin value = COIN;
Address someBadGuy = randomAddress(params);
ECKey someBadGuy = randomKey();
doubleSpends.prevTx = new Transaction(params);
TransactionOutput prevOut = new TransactionOutput(doubleSpends.prevTx, value, someBadGuy);