mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-02-16 01:16:29 +00:00
rpcsrv: check args first, get data from DB then
Signed-off-by: Roman Khimov <roman@nspcc.ru>
This commit is contained in:
parent
d1926e4fb0
commit
93be186685
1 changed files with 5 additions and 5 deletions
|
@ -3213,11 +3213,6 @@ func (s *Server) getBlockNotifications(reqParams params.Params) (any, *neorpc.Er
|
|||
return nil, respErr
|
||||
}
|
||||
|
||||
block, err := s.chain.GetTrimmedBlock(hash)
|
||||
if err != nil {
|
||||
return nil, neorpc.ErrUnknownBlock
|
||||
}
|
||||
|
||||
var filter *neorpc.NotificationFilter
|
||||
if len(reqParams) > 1 {
|
||||
var (
|
||||
|
@ -3236,6 +3231,11 @@ func (s *Server) getBlockNotifications(reqParams params.Params) (any, *neorpc.Er
|
|||
}
|
||||
}
|
||||
|
||||
block, err := s.chain.GetTrimmedBlock(hash)
|
||||
if err != nil {
|
||||
return nil, neorpc.ErrUnknownBlock
|
||||
}
|
||||
|
||||
notifications := &result.BlockNotifications{}
|
||||
|
||||
aers, err := s.chain.GetAppExecResults(block.Hash(), trigger.OnPersist)
|
||||
|
|
Loading…
Add table
Reference in a new issue