ensure minimum relay fee rate is always equal or greater than 1 sat/vb

This commit is contained in:
Craig Raw 2022-05-19 08:50:34 +02:00
parent 555e5ecfb8
commit 4b2b8f653a
2 changed files with 2 additions and 1 deletions

View file

@ -927,7 +927,7 @@ public class AppServices {
System.setProperty(Network.BLOCK_HEIGHT_PROPERTY, Integer.toString(currentBlockHeight)); System.setProperty(Network.BLOCK_HEIGHT_PROPERTY, Integer.toString(currentBlockHeight));
targetBlockFeeRates = event.getTargetBlockFeeRates(); targetBlockFeeRates = event.getTargetBlockFeeRates();
addMempoolRateSizes(event.getMempoolRateSizes()); addMempoolRateSizes(event.getMempoolRateSizes());
minimumRelayFeeRate = event.getMinimumRelayFeeRate(); minimumRelayFeeRate = Math.max(event.getMinimumRelayFeeRate(), Transaction.DEFAULT_MIN_RELAY_FEE);
latestBlockHeader = event.getBlockHeader(); latestBlockHeader = event.getBlockHeader();
Config.get().addRecentServer(); Config.get().addRecentServer();
} }

View file

@ -400,6 +400,7 @@ public class SendController extends WalletFormController implements Initializabl
if(userFeeSet.get()) { if(userFeeSet.get()) {
setTargetBlocks(getTargetBlocks(feeRate)); setTargetBlocks(getTargetBlocks(feeRate));
setFeeRangeRate(feeRate); setFeeRangeRate(feeRate);
revalidate(fee, feeListener);
} else { } else {
setFeeValueSats(walletTransaction.getFee()); setFeeValueSats(walletTransaction.getFee());
} }