mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-07-31 20:11:23 +00:00
Make sure payment channels heed Context.isEnsureMinRequiredFee().
This commit is contained in:
@@ -153,7 +153,7 @@ public class PaymentChannelV1ClientState extends PaymentChannelClientState {
|
||||
refundTx = new Transaction(params);
|
||||
refundTx.addInput(multisigOutput).setSequenceNumber(0); // Allow replacement when it's eventually reactivated.
|
||||
refundTx.setLockTime(expiryTime);
|
||||
if (totalValue.compareTo(Coin.CENT) < 0) {
|
||||
if (totalValue.compareTo(Coin.CENT) < 0 && Context.get().isEnsureMinRequiredFee()) {
|
||||
// Must pay min fee.
|
||||
final Coin valueAfterFee = totalValue.subtract(Transaction.REFERENCE_DEFAULT_MIN_TX_FEE);
|
||||
if (Transaction.MIN_NONDUST_OUTPUT.compareTo(valueAfterFee) > 0)
|
||||
|
@@ -127,7 +127,7 @@ public class PaymentChannelV2ClientState extends PaymentChannelClientState {
|
||||
refundTx = new Transaction(params);
|
||||
refundTx.addInput(contract.getOutput(0)).setSequenceNumber(0); // Allow replacement when it's eventually reactivated.
|
||||
refundTx.setLockTime(expiryTime);
|
||||
if (totalValue.compareTo(Coin.CENT) < 0) {
|
||||
if (totalValue.compareTo(Coin.CENT) < 0 && Context.get().isEnsureMinRequiredFee()) {
|
||||
// Must pay min fee.
|
||||
final Coin valueAfterFee = totalValue.subtract(Transaction.REFERENCE_DEFAULT_MIN_TX_FEE);
|
||||
if (Transaction.MIN_NONDUST_OUTPUT.compareTo(valueAfterFee) > 0)
|
||||
|
Reference in New Issue
Block a user