fix rpc-test action (#402)

This commit is contained in:
noot
2020-07-23 15:38:47 -04:00
committed by GitHub
parent d69aad2016
commit cc6b5d04f2
7 changed files with 136 additions and 122 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ func InitGenesis(ctx sdk.Context, k Keeper, data GenesisState) []abci.ValidatorU
return []abci.ValidatorUpdate{}
}
// ExportGenesis exports genesis state
// ExportGenesis exports genesis state of the EVM module
func ExportGenesis(ctx sdk.Context, k Keeper, ak types.AccountKeeper) GenesisState {
// nolint: prealloc
var ethGenAccounts []types.GenesisAccount
+4 -2
View File
@@ -1,6 +1,7 @@
package keeper
import (
"encoding/json"
"fmt"
"strconv"
@@ -135,7 +136,7 @@ func queryBlockBloom(ctx sdk.Context, path []string, keeper Keeper) ([]byte, err
return nil, fmt.Errorf("could not unmarshal block height: %w", err)
}
bloom, found := keeper.GetBlockBloom(ctx, num)
bloom, found := keeper.GetBlockBloom(ctx.WithBlockHeight(num), num)
if !found {
return nil, fmt.Errorf("block bloom not found for height %d", num)
}
@@ -217,7 +218,8 @@ func queryExportAccount(ctx sdk.Context, path []string, keeper Keeper) ([]byte,
Storage: storage,
}
bz, err := codec.MarshalJSONIndent(keeper.cdc, res)
// TODO: codec.MarshalJSONIndent doesn't call the String() method of types properly
bz, err := json.MarshalIndent(res, "", "\t")
if err != nil {
return nil, sdkerrors.Wrap(sdkerrors.ErrJSONMarshal, err.Error())
}