diff --git a/epoch.go b/epoch.go index 4c0701b..12d2633 100644 --- a/epoch.go +++ b/epoch.go @@ -4,7 +4,7 @@ import ( "encoding/binary" ) -type StateEpoch uint64 +type StateEpoch uint16 const ( NumActiveEpochs = 2 @@ -15,5 +15,5 @@ func IsExpired(prev StateEpoch, cur StateEpoch) bool { } func StateEpochFromBytes(b []byte) StateEpoch { - return StateEpoch(binary.BigEndian.Uint64(b)) + return StateEpoch(binary.BigEndian.Uint16(b)) }