mirror of
https://github.com/luxfi/node.git
synced 2026-07-27 03:39:39 +00:00
platformvm/block: flip codec version prefix to little-endian (LP-023 ZAP-native)
Pairs with the regenerated wire-byte test fixtures shipped in the previous commit.
This commit is contained in:
@@ -33,7 +33,8 @@ func Parse(c pcodecs.Manager, b []byte) (Block, error) {
|
||||
if len(b) < 2 {
|
||||
return nil, ErrShortBytes
|
||||
}
|
||||
version := uint16(b[0])<<8 | uint16(b[1])
|
||||
// Codec version prefix is uint16 LE (LP-023 ZAP-native).
|
||||
version := uint16(b[0]) | uint16(b[1])<<8
|
||||
|
||||
switch version {
|
||||
case CodecVersionV1:
|
||||
|
||||
Reference in New Issue
Block a user