sdk: fix linter warnings

This commit is contained in:
tbjump 2023-05-03 22:33:58 +00:00 committed by tbjump
parent ab1378d744
commit c24fff4d2d
1 changed files with 2 additions and 2 deletions

View File

@ -586,7 +586,7 @@ func UnmarshalBatch(data []byte) (*BatchVAA, error) {
if err != nil {
return nil, fmt.Errorf("failed to read Observation index [%d]: %w", i, err)
}
obsvIndex := uint8(index)
var obsvIndex uint8 = index
obsvLength := uint32(0)
if err := binary.Read(reader, binary.BigEndian, &obsvLength); err != nil {
@ -827,7 +827,7 @@ func (v *BatchVAA) serializeBody() []byte {
MustWrite(buf, binary.BigEndian, uint8(len(v.Observations)))
for _, obsv := range v.Observations {
MustWrite(buf, binary.BigEndian, uint8(obsv.Index))
MustWrite(buf, binary.BigEndian, obsv.Index)
obsvBytes := obsv.Observation.serializeBody()