test: add integration test for the rollback cmd (#1311)

* test the fixed rollback cmd

- check the rollback cmd works in integration tests

* Apply suggestions from code review

* upstream merged

* add changelog

Co-authored-by: Freddy Caceres <facs95@gmail.com>
This commit is contained in:
yihuang
2022-09-01 16:22:25 +02:00
committed by GitHub
co-authored by Freddy Caceres
parent 45fdcaf9b7
commit ca070e21ef
12 changed files with 155 additions and 9 deletions
@@ -0,0 +1,8 @@
{ pkgs ? import ../../../nix { } }:
let ethermintd = (pkgs.callPackage ../../../. { });
in
ethermintd.overrideAttrs (oldAttrs: {
patches = oldAttrs.patches or [ ] ++ [
./broken-ethermintd.patch
];
})
@@ -0,0 +1,15 @@
diff --git a/app/app.go b/app/app.go
index 158bf7a3..a3b5718c 100644
--- a/app/app.go
+++ b/app/app.go
@@ -681,6 +681,10 @@ func (app *EthermintApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBloc
// EndBlocker updates every end block
func (app *EthermintApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock {
+ if ctx.BlockHeight()%10 == 0 {
+ store := ctx.KVStore(app.keys["evm"])
+ store.Set([]byte("hello"), []byte("world"))
+ }
return app.mm.EndBlock(ctx, req)
}
@@ -0,0 +1,9 @@
local config = import 'default.jsonnet';
config {
'ethermint_9000-1'+: {
validators: super.validators + [{
name: 'fullnode',
}],
},
}