From b39fdda57be10c0bda8e32d1bc3fb24416a5ade9 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Fri, 26 Mar 2021 14:12:09 +0000 Subject: [PATCH] remove apphash --- node/node_test.go | 1 - state/helpers_test.go | 1 - state/state.go | 2 +- types/genesis.go | 2 -- types/genesis_test.go | 2 -- 5 files changed, 1 insertion(+), 7 deletions(-) diff --git a/node/node_test.go b/node/node_test.go index d55a8d280..15554e001 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -559,7 +559,6 @@ func state(nVals int, height int64) (sm.State, dbm.DB, []types.PrivValidator) { s, _ := sm.MakeGenesisState(&types.GenesisDoc{ ChainID: "test-chain", Validators: vals, - AppHash: nil, }) // save validators to db for 2 heights diff --git a/state/helpers_test.go b/state/helpers_test.go index 18dd0011a..7045ab1df 100644 --- a/state/helpers_test.go +++ b/state/helpers_test.go @@ -112,7 +112,6 @@ func makeState(nVals, height int) (sm.State, dbm.DB, map[string]types.PrivValida s, _ := sm.MakeGenesisState(&types.GenesisDoc{ ChainID: chainID, Validators: vals, - AppHash: nil, }) stateDB := dbm.NewMemDB() diff --git a/state/state.go b/state/state.go index 9f5f02c7a..9e8647ef0 100644 --- a/state/state.go +++ b/state/state.go @@ -370,6 +370,6 @@ func MakeGenesisState(genDoc *types.GenesisDoc) (State, error) { ConsensusParams: *genDoc.ConsensusParams, LastHeightConsensusParamsChanged: genDoc.InitialHeight, - AppHash: genDoc.AppHash, + AppHash: []byte(""), }, nil } diff --git a/types/genesis.go b/types/genesis.go index 40e0cf11e..ecedc2ac9 100644 --- a/types/genesis.go +++ b/types/genesis.go @@ -9,7 +9,6 @@ import ( "time" "github.com/tendermint/tendermint/crypto" - tmbytes "github.com/tendermint/tendermint/libs/bytes" tmjson "github.com/tendermint/tendermint/libs/json" tmtime "github.com/tendermint/tendermint/types/time" ) @@ -40,7 +39,6 @@ type GenesisDoc struct { InitialHeight int64 `json:"initial_height"` ConsensusParams *ConsensusParams `json:"consensus_params,omitempty"` Validators []GenesisValidator `json:"validators,omitempty"` - AppHash tmbytes.HexBytes `json:"app_hash"` AppState json.RawMessage `json:"app_state,omitempty"` } diff --git a/types/genesis_test.go b/types/genesis_test.go index bfb122e64..fd5ffd286 100644 --- a/types/genesis_test.go +++ b/types/genesis_test.go @@ -70,7 +70,6 @@ func TestGenesisGood(t *testing.T) { "power":"10", "name":"" }], - "app_hash":"", "app_state":{"account_owner": "Bob"} }`, ) @@ -160,6 +159,5 @@ func randomGenesisDoc() *GenesisDoc { InitialHeight: 1000, Validators: []GenesisValidator{{pubkey.Address(), pubkey, 10, "myval"}}, ConsensusParams: DefaultConsensusParams(), - AppHash: []byte{1, 2, 3}, } }