@@ -91,6 +91,9 @@ public class NodeSettings : IDisposable
9191 /// <summary>The minimum fee for a kB of transactions on the node.</summary>
9292 public FeeRate MinTxFeeRate { get ; private set ; }
9393
94+ /// <summary>The optional maximum fee for a kB of transactions on the node.</summary>
95+ public FeeRate MaxTxFeeRate { get ; private set ; }
96+
9497 /// <summary>The default fee for a kB of transactions on the node. This value is used if no fee is specified for
9598 /// a transaction.
9699 /// </summary>
@@ -302,6 +305,7 @@ private void LoadConfiguration()
302305 this . MinTxFeeRate = new FeeRate ( config . GetOrDefault ( "mintxfee" , this . Network . MinTxFee , this . Logger ) ) ;
303306 this . FallbackTxFeeRate = new FeeRate ( config . GetOrDefault ( "fallbackfee" , this . Network . FallbackFee , this . Logger ) ) ;
304307 this . MinRelayTxFeeRate = new FeeRate ( config . GetOrDefault ( "minrelaytxfee" , this . Network . MinRelayTxFee , this . Logger ) ) ;
308+ this . MaxTxFeeRate = new FeeRate ( config . GetOrDefault ( "maxtxfee" , this . Network . MaxTxFee , this . Logger ) ) ;
305309 }
306310
307311 /// <summary>
@@ -400,6 +404,7 @@ public static void BuildDefaultConfigurationFile(StringBuilder builder, Network
400404 builder . AppendLine ( $ "regtest={ ( network . IsRegTest ( ) ? 1 : 0 ) } ") ;
401405 builder . AppendLine ( $ "#Minimum fee rate. Defaults to { network . MinTxFee } .") ;
402406 builder . AppendLine ( $ "#mintxfee={ network . MinTxFee } ") ;
407+ builder . AppendLine ( $ "#maxtxfee={ network . MaxTxFee } ") ;
403408 builder . AppendLine ( $ "#Fallback fee rate. Defaults to { network . FallbackFee } .") ;
404409 builder . AppendLine ( $ "#fallbackfee={ network . FallbackFee } ") ;
405410 builder . AppendLine ( $ "#Minimum relay fee rate. Defaults to { network . MinRelayTxFee } .") ;
0 commit comments