-
Notifications
You must be signed in to change notification settings - Fork 238
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
refactor: params/extras (coreth a7f7061) #1430
base: libevm
Are you sure you want to change the base?
Conversation
@@ -15,8 +16,7 @@ import ( | |||
|
|||
func TestVerifyUpgradeConfig(t *testing.T) { | |||
admins := []common.Address{{1}} | |||
chainConfigCpy := Copy(TestChainConfig) | |||
chainConfig := GetExtra(&chainConfigCpy) | |||
chainConfig := &ChainConfig{} |
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.
note I tried to use the empty ChainConfig (former ChainConfigExtra) where possible
We can switch back to TestChainConfig if others prefer.
Less test setup seems preferred to me, but we could keep it to avoid any risk here.
) | ||
|
||
var ( | ||
DefaultFeeConfig = commontype.FeeConfig{ |
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.
I moved this so it can be used in tests, but also put it back in it's original location to avoid having to change all params.DefaultFeeConfig's in the code.
AvalancheContext: AvalancheContext{utils.TestSnowContext()}, | ||
FeeConfig: DefaultFeeConfig, | ||
AllowFeeRecipients: false, | ||
NetworkUpgrades: GetDefaultNetworkUpgrades(upgrade.GetConfig(constants.UnitTestID)), // This can be changed to correct network (local, test) via VM. |
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.
note we could unexport this GetDefaultNetworkUpgrades if we had something like GetDefaultExtras(networkID), but seems mostly the same to me.
Applies the same changes as were applied to coreth here: ava-labs/coreth@a7f7061
I realized we could import most of these types back to params if we wanted, but explicit seems clearer + it's already like this in coreth.