mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-26 19:42:23 +00:00
rpc: make getproof
work with destroyed contracts
Now it's able to get proof for destroyed contract if the contract wasn't destroyed before the requested stateroot's height.
This commit is contained in:
parent
af9e39ced2
commit
55fb221bbb
1 changed files with 3 additions and 3 deletions
|
@ -991,9 +991,9 @@ func (s *Server) getProof(ps request.Params) (interface{}, *response.Error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, response.ErrInvalidParams
|
return nil, response.ErrInvalidParams
|
||||||
}
|
}
|
||||||
cs := s.chain.GetContractState(sc)
|
cs, respErr := s.getHistoricalContractState(root, sc)
|
||||||
if cs == nil {
|
if respErr != nil {
|
||||||
return nil, response.ErrInvalidParams
|
return nil, respErr
|
||||||
}
|
}
|
||||||
skey := makeStorageKey(cs.ID, key)
|
skey := makeStorageKey(cs.ID, key)
|
||||||
proof, err := s.chain.GetStateModule().GetStateProof(root, skey)
|
proof, err := s.chain.GetStateModule().GetStateProof(root, skey)
|
||||||
|
|
Loading…
Reference in a new issue