mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-22 19:29:39 +00:00
smartcontract: improve invalid notification error text
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
parent
5c6a111d00
commit
60795a899f
1 changed files with 2 additions and 2 deletions
|
@ -66,11 +66,11 @@ func (e *Event) FromStackItem(item stackitem.Item) error {
|
|||
// current event.
|
||||
func (e *Event) CheckCompliance(items []stackitem.Item) error {
|
||||
if len(items) != len(e.Parameters) {
|
||||
return errors.New("mismatch between the number of parameters and items")
|
||||
return fmt.Errorf("mismatch between the number of parameters and items: %d vs %d", len(e.Parameters), len(items))
|
||||
}
|
||||
for i := range items {
|
||||
if !e.Parameters[i].Type.Match(items[i]) {
|
||||
return fmt.Errorf("parameter %d type mismatch: %s vs %s", i, e.Parameters[i].Type.String(), items[i].Type().String())
|
||||
return fmt.Errorf("parameter %d type mismatch: %s (manifest) vs %s (notification)", i, e.Parameters[i].Type.String(), items[i].Type().String())
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
|
Loading…
Reference in a new issue