Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Commit

Permalink
reee
Browse files Browse the repository at this point in the history
  • Loading branch information
itsdevbear committed Sep 24, 2023
1 parent b2284c5 commit 9a6c42f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
10 changes: 3 additions & 7 deletions cosmos/x/evm/plugins/state/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ type Plugin interface {
IterateBalances(fn func(common.Address, *big.Int) bool)
// IterateState iterates over the state of all accounts and calls the given callback function.
IterateState(fn func(addr common.Address, key common.Hash, value common.Hash) bool)
// SetGasConfig sets the gas config for the plugin.
SetGasConfig(storetypes.GasConfig, storetypes.GasConfig)
}

// The StatePlugin is a very fun and interesting part of the EVM implementation. But if you want to
Expand Down Expand Up @@ -165,7 +163,7 @@ func (p *plugin) Reset(ctx context.Context) {
// and is designed to be used in a standalone manner, as each of the EVM's opcodes are priced
// individually. By setting the gas configs to empty structs, we ensure that SLOADS and SSTORES
// in the EVM are not being charged additional gas unknowingly.
p.SetGasConfig(storetypes.GasConfig{}, storetypes.GasConfig{})
p.setGasConfig(storetypes.GasConfig{}, storetypes.GasConfig{})

// We setup a snapshot controller to properly revert the Controllable MultiStore and EventManager.
p.Controller = snapshot.NewController[string, libtypes.Controllable[string]]()
Expand Down Expand Up @@ -540,9 +538,7 @@ func (p *plugin) Clone() ethstate.Plugin {
return sp
}

// SetGasConfig implements Plugin.
func (p *plugin) SetGasConfig(kvGasConfig, transientKVGasConfig storetypes.GasConfig) {
// setGasConfig sets the gas configuration for the kvstore.
func (p *plugin) setGasConfig(kvGasConfig, transientKVGasConfig storetypes.GasConfig) {
p.ctx = p.ctx.WithKVGasConfig(kvGasConfig).WithTransientKVGasConfig(transientKVGasConfig)
}

// IsPlugin implements plugins.Base.
1 change: 0 additions & 1 deletion eth/core/state/journal/selfdestructs.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ func (s *selfDestructs) GetSelfDestructs() []common.Address {
return suicidalAddrs
}

//
func (s *selfDestructs) Snapshot() int {
s.lastSnapshot = s.Size()
return s.baseJournal.Snapshot()
Expand Down

0 comments on commit 9a6c42f

Please sign in to comment.