Merge pull request #2441 from ixje/patch-2

(rpc): fix typo's
This commit is contained in:
Roman Khimov 2022-04-20 15:15:10 +03:00 committed by GitHub
commit da8d149fdb
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),