add some unmarshal panics
This commit is contained in:
parent
fb199e293e
commit
9349d95cd9
|
@ -27,6 +27,9 @@ func GetParseAccount(cdc *wire.Codec) sdk.ParseAccount {
|
|||
return func(accBytes []byte) (res sdk.Account, err error) {
|
||||
acct := new(AppAccount)
|
||||
err = cdc.UnmarshalBinary(accBytes, &acct)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return acct, err
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,9 @@ func getParseAccount(cdc *wire.Codec) sdk.ParseAccount {
|
|||
return func(accBytes []byte) (sdk.Account, error) {
|
||||
acct := new(auth.BaseAccount)
|
||||
err := cdc.UnmarshalBinary(accBytes, acct)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return acct, err
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue