-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add custom max gas for block for sim config #16656
Changes from 5 commits
98d8a19
25790ad
00b13c5
741e481
d9337b4
86b7150
e9edb5b
80c1415
63c3b6c
edd55bd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,8 +31,12 @@ func initChain( | |
config simulation.Config, | ||
cdc codec.JSONCodec, | ||
) (mockValidators, time.Time, []simulation.Account, string) { | ||
blockMaxGas := int64(-1) | ||
if config.BlockMaxGas != nil { | ||
blockMaxGas = *config.BlockMaxGas | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The zero value of int64 is 0, but 0 is a valid value for max gas. If we don't use a pointer, we cannot maintain a default behaviour of maxGas with value -1 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why can't the default be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated, but we can't set maxGas as 0 unless pointer |
||
appState, accounts, chainID, genesisTimestamp := appStateFn(r, accounts, config) | ||
consensusParams := randomConsensusParams(r, appState, cdc) | ||
consensusParams := randomConsensusParams(r, appState, cdc, blockMaxGas) | ||
req := abci.RequestInitChain{ | ||
AppStateBytes: appState, | ||
ChainId: chainID, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, can you place the changelog under unreleased?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated, is it possible that we backport to v0.46.x as well