|
|
@ -84,7 +84,7 @@ func TestGenesisGood(t *testing.T) { |
|
|
|
Validators: []GenesisValidator{{pubkey.Address(), pubkey, 10, "myval"}}, |
|
|
|
} |
|
|
|
genDocBytes, err = tmjson.Marshal(baseGenDoc) |
|
|
|
assert.NoError(t, err, "error marshalling genDoc") |
|
|
|
assert.NoError(t, err, "error marshaling genDoc") |
|
|
|
|
|
|
|
// test base gendoc and check consensus params were filled
|
|
|
|
genDoc, err := GenesisDocFromJSON(genDocBytes) |
|
|
@ -96,14 +96,14 @@ func TestGenesisGood(t *testing.T) { |
|
|
|
|
|
|
|
// create json with consensus params filled
|
|
|
|
genDocBytes, err = tmjson.Marshal(genDoc) |
|
|
|
assert.NoError(t, err, "error marshalling genDoc") |
|
|
|
assert.NoError(t, err, "error marshaling genDoc") |
|
|
|
genDoc, err = GenesisDocFromJSON(genDocBytes) |
|
|
|
assert.NoError(t, err, "expected no error for valid genDoc json") |
|
|
|
|
|
|
|
// test with invalid consensus params
|
|
|
|
genDoc.ConsensusParams.Block.MaxBytes = 0 |
|
|
|
genDocBytes, err = tmjson.Marshal(genDoc) |
|
|
|
assert.NoError(t, err, "error marshalling genDoc") |
|
|
|
assert.NoError(t, err, "error marshaling genDoc") |
|
|
|
_, err = GenesisDocFromJSON(genDocBytes) |
|
|
|
assert.Error(t, err, "expected error for genDoc json with block size of 0") |
|
|
|
|
|
|
|