use elevated priority for protocol tx fees

This commit is contained in:
woodser 2023-08-19 11:59:45 -04:00
parent 26c95cb61d
commit c0a2fb92ec
4 changed files with 15 additions and 10 deletions

View file

@ -874,6 +874,7 @@ public abstract class DisputeManager<T extends DisputeList<Dispute>> extends Sup
if (winnerPayoutAmount.compareTo(BigInteger.ZERO) > 0) txConfig.addDestination(winnerPayoutAddress, winnerPayoutAmount);
if (loserPayoutAmount.compareTo(BigInteger.ZERO) > 0) txConfig.addDestination(loserPayoutAddress, loserPayoutAmount);
txConfig.setSubtractFeeFrom(loserPayoutAmount.equals(BigInteger.ZERO) ? 0 : txConfig.getDestinations().size() - 1); // winner only pays fee if loser gets 0
txConfig.setPriority(XmrWalletService.PROTOCOL_FEE_PRIORITY);
MoneroTxWallet payoutTx = null;
try {
payoutTx = trade.getWallet().createTx(txConfig);