diff --git a/docs/rpc.md b/docs/rpc.md index 5b3e687d8..73b5b0a0b 100644 --- a/docs/rpc.md +++ b/docs/rpc.md @@ -196,6 +196,11 @@ enabled in the server's protocol configuration. ##### `getnep11transfers` and `getnep17transfers` `transfernotifyindex` is not tracked by NeoGo, thus this field is always zero. +##### `verifyProof` + +NeoGo can generate an error in response to an invalid proof, unlike +the error-free C# implementation. + ### Unsupported methods Methods listed below are not going to be supported for various reasons diff --git a/pkg/services/rpcsrv/server.go b/pkg/services/rpcsrv/server.go index cfc5df532..86c4f3dc3 100644 --- a/pkg/services/rpcsrv/server.go +++ b/pkg/services/rpcsrv/server.go @@ -1531,9 +1531,10 @@ func (s *Server) verifyProof(ps params.Params) (any, *neorpc.Error) { } vp := new(result.VerifyProof) val, ok := mpt.VerifyProof(root, p.Key, p.Proof) - if ok { - vp.Value = val + if !ok { + return nil, neorpc.ErrInvalidProof } + vp.Value = val return vp, nil }