dao: serialize state.StorageItem as raw bytes

This commit is contained in:
Evgeniy Stratonikov 2021-03-09 12:09:44 +03:00
parent 55698d0426
commit e551432b30
7 changed files with 8 additions and 84 deletions

View file

@ -862,13 +862,7 @@ func (s *Server) verifyProof(ps request.Params) (interface{}, *response.Error) {
vp := new(result.VerifyProof)
val, ok := mpt.VerifyProof(root, p.Key, p.Proof)
if ok {
var si state.StorageItem
r := io.NewBinReaderFromBuf(val)
si.DecodeBinary(r)
if r.Err != nil {
return nil, response.NewInternalServerError("invalid item in trie", r.Err)
}
vp.Value = si
vp.Value = val
}
return vp, nil
}