Skip to content
This repository was archived by the owner on Jul 15, 2018. It is now read-only.

Commit b1b784c

Browse files
committed
fix tests
1 parent 826603d commit b1b784c

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

example/kvstore/helpers.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func RandVals(cnt int) []types.Validator {
3333
// don't make any tx that modify the validator state
3434
func InitKVStore(app *PersistentKVStoreApplication) {
3535
app.InitChain(types.ParamsInitChain{
36-
Validators: RandVals(1),
37-
GenesisBytes: []byte("[]"),
36+
Validators: RandVals(1),
37+
GenesisFile: types.GenesisFile{},
3838
})
3939
}

tests/server/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ func InitChain(client abcicli.Client) error {
2020
vals[i] = &v
2121
}
2222
_, err := client.InitChainSync(types.RequestInitChain{
23-
Validators: vals,
24-
GenesisBytes: []byte("{}"),
23+
Validators: vals,
24+
GenesisFile: &types.GenesisFile{},
2525
})
2626
if err != nil {
2727
fmt.Printf("Failed test: InitChain - %v\n", err)

types/params.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ func ToParamsSetOption(req RequestSetOption) ParamsSetOption {
3030
}
3131

3232
type ParamsInitChain struct {
33-
Validators []Validator `json:"validators"`
34-
GenesisBytes []byte `json:"genesis_bytes,omitempty"`
33+
Validators []Validator `json:"validators"`
34+
GenesisFile GenesisFile `json:"genesis_bytes,omitempty"`
3535
}
3636

3737
func ToParamsInitChain(req RequestInitChain) ParamsInitChain {
@@ -41,8 +41,8 @@ func ToParamsInitChain(req RequestInitChain) ParamsInitChain {
4141
vals[i] = *v
4242
}
4343
return ParamsInitChain{
44-
Validators: vals,
45-
GenesisBytes: req.GenesisBytes,
44+
Validators: vals,
45+
GenesisFile: *req.GenesisFile,
4646
}
4747
}
4848

0 commit comments

Comments
 (0)