mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-19 06:31:57 +00:00
Distinguish between ReadJSON vs ReadJSONPtr. The latter expects a non-nil pointer to write into. The former creates new things intelligently
This commit is contained in:
+1
-1
@@ -58,7 +58,7 @@ type GenesisDoc struct {
|
||||
|
||||
func GenesisDocFromJSON(jsonBlob []byte) (genState *GenesisDoc) {
|
||||
var err error
|
||||
binary.ReadJSON(&genState, jsonBlob, &err)
|
||||
binary.ReadJSONPtr(&genState, jsonBlob, &err)
|
||||
if err != nil {
|
||||
log.Error(Fmt("Couldn't read GenesisDoc: %v", err))
|
||||
os.Exit(1)
|
||||
|
||||
Reference in New Issue
Block a user