Skip to content

Commit

Permalink
Wallet: Add an assert calculateFee().
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Schildbach committed Feb 17, 2019
1 parent b303490 commit 30297af
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/src/main/java/org/bitcoinj/wallet/Wallet.java
Original file line number Diff line number Diff line change
Expand Up @@ -5072,6 +5072,7 @@ private FeeCalculation calculateFee(SendRequest req, Coin value, List<Transactio
TransactionInput input = tx.addInput(selectedOutput);
// If the scriptBytes don't default to none, our size calculations will be thrown off.
checkState(input.getScriptBytes().length == 0);
checkState(!input.hasWitness());
}

int size = tx.unsafeBitcoinSerialize().length;
Expand Down

0 comments on commit 30297af

Please sign in to comment.