@@ -21,16 +21,16 @@ import (
2121)
2222
2323const (
24- ERA_ID_BYRON = 0
24+ EraIdByron = 0
2525
26- BLOCK_TYPE_BYRON_EBB = 0
27- BLOCK_TYPE_BYRON_MAIN = 1
26+ BlockTypeByronEbb = 0
27+ BlockTypeByronMain = 1
2828
29- BLOCK_HEADER_TYPE_BYRON = 0
29+ BlockHeaderTypeByron = 0
3030
31- TX_TYPE_BYRON = 0
31+ TxTypeByron = 0
3232
33- BYRON_SLOTS_PER_EPOCH = 21600
33+ ByronSlotsPerEpoch = 21600
3434)
3535
3636type ByronMainBlockHeader struct {
@@ -82,7 +82,7 @@ func (h *ByronMainBlockHeader) Hash() string {
8282 // Prepend bytes for CBOR list wrapper
8383 // The block hash is calculated with these extra bytes, so we have to add them to
8484 // get the correct value
85- h .hash = generateBlockHeaderHash (h .Cbor (), []byte {0x82 , BLOCK_TYPE_BYRON_MAIN })
85+ h .hash = generateBlockHeaderHash (h .Cbor (), []byte {0x82 , BlockTypeByronMain })
8686 }
8787 return h .hash
8888}
@@ -93,11 +93,11 @@ func (h *ByronMainBlockHeader) BlockNumber() uint64 {
9393}
9494
9595func (h * ByronMainBlockHeader ) SlotNumber () uint64 {
96- return uint64 ((h .ConsensusData .SlotId .Epoch * BYRON_SLOTS_PER_EPOCH ) + uint64 (h .ConsensusData .SlotId .Slot ))
96+ return uint64 ((h .ConsensusData .SlotId .Epoch * ByronSlotsPerEpoch ) + uint64 (h .ConsensusData .SlotId .Slot ))
9797}
9898
9999func (h * ByronMainBlockHeader ) Era () Era {
100- return eras [ERA_ID_BYRON ]
100+ return eras [EraIdByron ]
101101}
102102
103103type ByronTransaction struct {
@@ -169,7 +169,7 @@ func (h *ByronEpochBoundaryBlockHeader) Hash() string {
169169 // Prepend bytes for CBOR list wrapper
170170 // The block hash is calculated with these extra bytes, so we have to add them to
171171 // get the correct value
172- h .hash = generateBlockHeaderHash (h .Cbor (), []byte {0x82 , BLOCK_TYPE_BYRON_EBB })
172+ h .hash = generateBlockHeaderHash (h .Cbor (), []byte {0x82 , BlockTypeByronEbb })
173173 }
174174 return h .hash
175175}
@@ -180,11 +180,11 @@ func (h *ByronEpochBoundaryBlockHeader) BlockNumber() uint64 {
180180}
181181
182182func (h * ByronEpochBoundaryBlockHeader ) SlotNumber () uint64 {
183- return uint64 (h .ConsensusData .Epoch * BYRON_SLOTS_PER_EPOCH )
183+ return uint64 (h .ConsensusData .Epoch * ByronSlotsPerEpoch )
184184}
185185
186186func (h * ByronEpochBoundaryBlockHeader ) Era () Era {
187- return eras [ERA_ID_BYRON ]
187+ return eras [EraIdByron ]
188188}
189189
190190type ByronMainBlock struct {
0 commit comments