File tree Expand file tree Collapse file tree 2 files changed +16
-15
lines changed Expand file tree Collapse file tree 2 files changed +16
-15
lines changed Original file line number Diff line number Diff line change @@ -1098,6 +1098,22 @@ bool AppInitParameterInteraction()
1098
1098
dustRelayFee = CFeeRate (n);
1099
1099
}
1100
1100
1101
+ // This is required by both the wallet and node
1102
+ if (gArgs .IsArgSet (" -maxtxfee" ))
1103
+ {
1104
+ CAmount nMaxFee = 0 ;
1105
+ if (!ParseMoney (gArgs .GetArg (" -maxtxfee" , " " ), nMaxFee))
1106
+ return InitError (AmountErrMsg (" maxtxfee" , gArgs .GetArg (" -maxtxfee" , " " )));
1107
+ if (nMaxFee > HIGH_MAX_TX_FEE)
1108
+ InitWarning (_ (" -maxtxfee is set very high! Fees this large could be paid on a single transaction." ));
1109
+ maxTxFee = nMaxFee;
1110
+ if (CFeeRate (maxTxFee, 1000 ) < ::minRelayTxFee)
1111
+ {
1112
+ return InitError (strprintf (_ (" Invalid amount for -maxtxfee=<amount>: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions)" ),
1113
+ gArgs .GetArg (" -maxtxfee" , " " ), ::minRelayTxFee.ToString ()));
1114
+ }
1115
+ }
1116
+
1101
1117
fRequireStandard = !gArgs .GetBoolArg (" -acceptnonstdtxn" , !chainparams.RequireStandard ());
1102
1118
if (chainparams.RequireStandard () && !fRequireStandard )
1103
1119
return InitError (strprintf (" acceptnonstdtxn is not currently supported for %s chain" , chainparams.NetworkIDString ()));
Original file line number Diff line number Diff line change @@ -127,21 +127,6 @@ bool WalletInit::ParameterInteraction() const
127
127
InitWarning (AmountHighWarn (" -minrelaytxfee" ) + " " +
128
128
_ (" The wallet will avoid paying less than the minimum relay fee." ));
129
129
130
- if (gArgs .IsArgSet (" -maxtxfee" ))
131
- {
132
- CAmount nMaxFee = 0 ;
133
- if (!ParseMoney (gArgs .GetArg (" -maxtxfee" , " " ), nMaxFee))
134
- return InitError (AmountErrMsg (" maxtxfee" , gArgs .GetArg (" -maxtxfee" , " " )));
135
- if (nMaxFee > HIGH_MAX_TX_FEE)
136
- InitWarning (_ (" -maxtxfee is set very high! Fees this large could be paid on a single transaction." ));
137
- maxTxFee = nMaxFee;
138
- if (CFeeRate (maxTxFee, 1000 ) < ::minRelayTxFee)
139
- {
140
- return InitError (strprintf (_ (" Invalid amount for -maxtxfee=<amount>: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions)" ),
141
- gArgs .GetArg (" -maxtxfee" , " " ), ::minRelayTxFee.ToString ()));
142
- }
143
- }
144
-
145
130
return true ;
146
131
}
147
132
You can’t perform that action at this time.
0 commit comments