You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: [loadtest] add --max-base-fee-wei flag (#681)
* loadtest: add --max-base-fee-gwei flag
* replace logic to get current base fee
* max-base-fee-gwei is now max-base-fee-wei
* make gen-doc
* log review
Copy file name to clipboardExpand all lines: cmd/loadtest/app.go
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -88,6 +88,7 @@ type (
88
88
WaitForReceipt*bool
89
89
ReceiptRetryMax*uint
90
90
ReceiptRetryInitialDelayMs*uint
91
+
MaxBaseFeeWei*uint64
91
92
92
93
// Computed
93
94
CurrentGasPrice*big.Int
@@ -251,6 +252,7 @@ func initFlags() {
251
252
ltp.PreFundSendingAccounts=LoadtestCmd.Flags().Bool("pre-fund-sending-accounts", false, "If set to true, the sending accounts will be funded at the start of the execution, otherwise all accounts will be funded when used for the first time.")
252
253
ltp.RefundRemainingFunds=LoadtestCmd.Flags().Bool("refund-remaining-funds", false, "If set to true, the funded amount will be refunded to the funding account. Otherwise, the funded amount will remain in the sending accounts.")
253
254
ltp.SendingAccountsFile=LoadtestCmd.Flags().String("sending-accounts-file", "", "The file containing the sending accounts private keys, one per line. This is useful for avoiding pool account queue but also to keep the same sending accounts for different execution cycles.")
255
+
ltp.MaxBaseFeeWei=LoadtestCmd.Flags().Uint64("max-base-fee-wei", 0, "The maximum base fee in wei. If the base fee exceeds this value, sending tx will be paused and while paused, existing in-flight transactions continue to confirmation, but no additional SendTransaction calls occur. This is useful to avoid sending transactions when the network is congested.")
254
256
255
257
// Local flags.
256
258
ltp.Modes=LoadtestCmd.Flags().StringSliceP("mode", "m", []string{"t"}, `The testing mode to use. It can be multiple like: "d,t"
Copy file name to clipboardExpand all lines: doc/polycli_loadtest.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -107,6 +107,7 @@ The codebase has a contract that used for load testing. It's written in Solidity
107
107
--inscription-content string The inscription content that will be encoded as calldata. This must be paired up with --mode inscription (default "data:,{\"p\":\"erc-20\",\"op\":\"mint\",\"tick\":\"TEST\",\"amt\":\"1\"}")
108
108
--legacy Send a legacy transaction instead of an EIP1559 transaction.
109
109
--loadtest-contract-address string The address of a pre-deployed load test contract
110
+
--max-base-fee-wei uint The maximum base fee in wei. If the base fee exceeds this value, sending tx will be paused and while paused, existing in-flight transactions continue to confirmation, but no additional SendTransaction calls occur. This is useful to avoid sending transactions when the network is congested.
110
111
-m, --mode strings The testing mode to use. It can be multiple like: "d,t"
0 commit comments