mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-21 08:51:32 +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:
@ -69,7 +69,7 @@ func NewNode() *Node {
|
||||
} else {
|
||||
genDocBytes := stateDB.Get(sm.GenDocKey)
|
||||
err := new(error)
|
||||
binary.ReadJSON(&genDoc, genDocBytes, err)
|
||||
binary.ReadJSONPtr(&genDoc, genDocBytes, err)
|
||||
if *err != nil {
|
||||
panic(Fmt("Unable to read gendoc from db: %v", err))
|
||||
}
|
||||
|
Reference in New Issue
Block a user