forked from cerc-io/laconicd-deprecated
x/evm: fix EndBlock consensus failure (#334)
* add test for sending tx w/ 21000 gas * improve rpc transfer test * use ctx in EndBlock * UpdateAccounts and ClearStateObjects with passed in context * log ethereum address on error Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
This commit is contained in:
co-authored by
Federico Kunze
Federico Kunze
parent
0921c863e7
commit
28e28f2a7b
@@ -228,6 +228,16 @@ func (k *Keeper) CreateAccount(ctx sdk.Context, addr ethcmn.Address) {
|
||||
k.CommitStateDB.WithContext(ctx).CreateAccount(addr)
|
||||
}
|
||||
|
||||
// UpdateAccounts calls CommitStateDB.UpdateAccounts using the passed in context
|
||||
func (k *Keeper) UpdateAccounts(ctx sdk.Context) {
|
||||
k.CommitStateDB.WithContext(ctx).UpdateAccounts()
|
||||
}
|
||||
|
||||
// ClearStateObjects calls CommitStateDB.ClearStateObjects using the passed in context
|
||||
func (k *Keeper) ClearStateObjects(ctx sdk.Context) {
|
||||
k.CommitStateDB.WithContext(ctx).ClearStateObjects()
|
||||
}
|
||||
|
||||
// Copy calls CommitStateDB.Copy using the passed in context
|
||||
func (k *Keeper) Copy(ctx sdk.Context) ethvm.StateDB {
|
||||
return k.CommitStateDB.WithContext(ctx).Copy()
|
||||
|
||||
Reference in New Issue
Block a user