rpc: fix Matches and marshalling for notification events

Close #1494. Marshalling went wrong due to the incorrect pointers usage.
Reproduced and fixed.
This commit is contained in:
Anna Shaleva 2020-10-19 13:44:20 +03:00
parent d58c50fb77
commit 64d1946fbb
3 changed files with 3 additions and 3 deletions

View file

@ -72,7 +72,7 @@ func (f *feed) Matches(r *response.Notification) bool {
return senderOK && signerOK
case response.NotificationEventID:
filt := f.filter.(request.NotificationFilter)
notification := r.Payload[0].(state.NotificationEvent)
notification := r.Payload[0].(*state.NotificationEvent)
hashOk := filt.Contract == nil || notification.ScriptHash.Equals(*filt.Contract)
nameOk := filt.Name == nil || notification.Name == *filt.Name
return hashOk && nameOk