Skip to content

Commit

Permalink
Switch back to LegacyAddress for fee estimation
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarguindzberg committed Oct 8, 2020
1 parent 1d82c01 commit 694446c
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import org.bitcoinj.core.ECKey;
import org.bitcoinj.core.InsufficientMoneyException;
import org.bitcoinj.core.LegacyAddress;
import org.bitcoinj.core.SegwitAddress;
import org.bitcoinj.core.Transaction;
import org.bitcoinj.core.TransactionConfidence;
import org.bitcoinj.core.TransactionInput;
Expand Down Expand Up @@ -1020,7 +1019,7 @@ private boolean feeEstimationNotSatisfied(int counter, Transaction tx) {
public int getEstimatedFeeTxSize(List<Coin> outputValues, Coin txFee)
throws InsufficientMoneyException, AddressFormatException {
Transaction transaction = new Transaction(params);
Address dummyAddress = SegwitAddress.fromKey(params, new ECKey());
Address dummyAddress = LegacyAddress.fromKey(params, new ECKey());
outputValues.forEach(outputValue -> transaction.addOutput(outputValue, dummyAddress));

SendRequest sendRequest = SendRequest.forTx(transaction);
Expand Down

0 comments on commit 694446c

Please sign in to comment.