Wallet: Add an assert calculateFee().

This commit is contained in:
Andreas Schildbach
2019-02-17 11:55:35 +01:00
parent b303490fe3
commit 30297af3de

View File

@@ -5072,6 +5072,7 @@ public class Wallet extends BaseTaggableObject
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;