fix typo's

This commit is contained in:
Erik van den Brink 2022-04-20 14:00:12 +02:00 committed by GitHub
parent 143b293d20
commit 9fe3a86540
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -141,19 +141,19 @@ func topIterableFromStack(st []stackitem.Item, resultItemType interface{}) ([]in
} }
name, err := rs[0].TryBytes() name, err := rs[0].TryBytes()
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to deocde RecordState from stackitem #%d: %w", i, err) return nil, fmt.Errorf("failed to decode RecordState from stackitem #%d: %w", i, err)
} }
typ, err := rs[1].TryInteger() typ, err := rs[1].TryInteger()
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to deocde RecordState from stackitem #%d: %w", i, err) return nil, fmt.Errorf("failed to decode RecordState from stackitem #%d: %w", i, err)
} }
data, err := rs[2].TryBytes() data, err := rs[2].TryBytes()
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to deocde RecordState from stackitem #%d: %w", i, err) return nil, fmt.Errorf("failed to decode RecordState from stackitem #%d: %w", i, err)
} }
u64Typ := typ.Uint64() u64Typ := typ.Uint64()
if !typ.IsUint64() || u64Typ > 255 { if !typ.IsUint64() || u64Typ > 255 {
return nil, fmt.Errorf("failed to deocde RecordState from stackitem #%d: bad type", i) return nil, fmt.Errorf("failed to decode RecordState from stackitem #%d: bad type", i)
} }
result[i] = nns.RecordState{ result[i] = nns.RecordState{
Name: string(name), Name: string(name),