mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-12 12:51:22 +00:00
Refactor consensus/vote_set_test.go
This commit is contained in:
@ -27,16 +27,16 @@ func GenesisDocFromJSON(jsonBlob []byte) (genState *GenesisDoc) {
|
||||
return
|
||||
}
|
||||
|
||||
func GenesisStateFromFile(db db_.DB, genDocFile string) *State {
|
||||
func MakeGenesisStateFromFile(db db_.DB, genDocFile string) *State {
|
||||
jsonBlob, err := ioutil.ReadFile(genDocFile)
|
||||
if err != nil {
|
||||
Panicf("Couldn't read GenesisDoc file: %v", err)
|
||||
}
|
||||
genDoc := GenesisDocFromJSON(jsonBlob)
|
||||
return GenesisState(db, genDoc)
|
||||
return MakeGenesisState(db, genDoc)
|
||||
}
|
||||
|
||||
func GenesisState(db db_.DB, genDoc *GenesisDoc) *State {
|
||||
func MakeGenesisState(db db_.DB, genDoc *GenesisDoc) *State {
|
||||
if len(genDoc.Validators) == 0 {
|
||||
panic("Must have some validators")
|
||||
}
|
||||
|
Reference in New Issue
Block a user