remove apphash

This commit is contained in:
Marko Baricevic
2021-03-26 14:12:09 +00:00
parent 19a375aaab
commit b39fdda57b
5 changed files with 1 additions and 7 deletions

View File

@@ -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

View File

@@ -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()

View File

@@ -370,6 +370,6 @@ func MakeGenesisState(genDoc *types.GenesisDoc) (State, error) {
ConsensusParams: *genDoc.ConsensusParams,
LastHeightConsensusParamsChanged: genDoc.InitialHeight,
AppHash: genDoc.AppHash,
AppHash: []byte(""),
}, nil
}

View File

@@ -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"`
}

View File

@@ -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},
}
}