Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ledger/alonzo/pparams.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,12 @@ func (p *AlonzoProtocolParameters) Utxorpc() *cardano.PParams {
},
},
MaxExecutionUnitsPerTransaction: &cardano.ExUnits{
Memory: uint64(p.MaxTxExUnits.Memory),
Steps: uint64(p.MaxTxExUnits.Steps),
Memory: p.MaxTxExUnits.Memory,
Steps: p.MaxTxExUnits.Steps,
},
MaxExecutionUnitsPerBlock: &cardano.ExUnits{
Memory: uint64(p.MaxBlockExUnits.Memory),
Steps: uint64(p.MaxBlockExUnits.Steps),
Memory: p.MaxBlockExUnits.Memory,
Steps: p.MaxBlockExUnits.Steps,
},
}
}
Expand Down
8 changes: 4 additions & 4 deletions ledger/babbage/pparams.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,12 @@ func (p *BabbageProtocolParameters) Utxorpc() *cardano.PParams {
},
},
MaxExecutionUnitsPerTransaction: &cardano.ExUnits{
Memory: uint64(p.MaxTxExUnits.Memory),
Steps: uint64(p.MaxTxExUnits.Steps),
Memory: p.MaxTxExUnits.Memory,
Steps: p.MaxTxExUnits.Steps,
},
MaxExecutionUnitsPerBlock: &cardano.ExUnits{
Memory: uint64(p.MaxBlockExUnits.Memory),
Steps: uint64(p.MaxBlockExUnits.Steps),
Memory: p.MaxBlockExUnits.Memory,
Steps: p.MaxBlockExUnits.Steps,
},
}
}
Expand Down
8 changes: 3 additions & 5 deletions ledger/byron/byron.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,8 @@ func (h *ByronMainBlockHeader) BlockNumber() uint64 {
}

func (h *ByronMainBlockHeader) SlotNumber() uint64 {
return uint64(
(h.ConsensusData.SlotId.Epoch * ByronSlotsPerEpoch) + uint64(
h.ConsensusData.SlotId.Slot,
),
return (h.ConsensusData.SlotId.Epoch * ByronSlotsPerEpoch) + uint64(
h.ConsensusData.SlotId.Slot,
)
}

Expand Down Expand Up @@ -548,7 +546,7 @@ func (h *ByronEpochBoundaryBlockHeader) BlockNumber() uint64 {
}

func (h *ByronEpochBoundaryBlockHeader) SlotNumber() uint64 {
return uint64(h.ConsensusData.Epoch * ByronSlotsPerEpoch)
return h.ConsensusData.Epoch * ByronSlotsPerEpoch
}

func (h *ByronEpochBoundaryBlockHeader) IssuerVkey() common.IssuerVkey {
Expand Down
2 changes: 1 addition & 1 deletion ledger/common/address.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ func (a Address) Bytes() []byte {
ret := []byte{}
ret = append(
ret,
(byte(a.addressType)<<4)|(byte(a.networkId)&AddressHeaderNetworkMask),
(a.addressType<<4)|(a.networkId&AddressHeaderNetworkMask),
)
ret = append(ret, a.paymentAddress...)
ret = append(ret, a.stakingAddress...)
Expand Down
6 changes: 3 additions & 3 deletions ledger/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func NewBlake2b256(data []byte) Blake2b256 {
}

func (b Blake2b256) String() string {
return hex.EncodeToString([]byte(b[:]))
return hex.EncodeToString(b[:])
}

func (b Blake2b256) Bytes() []byte {
Expand Down Expand Up @@ -71,7 +71,7 @@ func NewBlake2b224(data []byte) Blake2b224 {
}

func (b Blake2b224) String() string {
return hex.EncodeToString([]byte(b[:]))
return hex.EncodeToString(b[:])
}

func (b Blake2b224) Bytes() []byte {
Expand Down Expand Up @@ -106,7 +106,7 @@ func NewBlake2b160(data []byte) Blake2b160 {
}

func (b Blake2b160) String() string {
return hex.EncodeToString([]byte(b[:]))
return hex.EncodeToString(b[:])
}

func (b Blake2b160) Bytes() []byte {
Expand Down
8 changes: 4 additions & 4 deletions ledger/conway/pparams.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ func (p *ConwayProtocolParameters) Utxorpc() *cardano.PParams {
},
},
MaxExecutionUnitsPerTransaction: &cardano.ExUnits{
Memory: uint64(p.MaxTxExUnits.Memory),
Steps: uint64(p.MaxTxExUnits.Steps),
Memory: p.MaxTxExUnits.Memory,
Steps: p.MaxTxExUnits.Steps,
},
MaxExecutionUnitsPerBlock: &cardano.ExUnits{
Memory: uint64(p.MaxBlockExUnits.Memory),
Steps: uint64(p.MaxBlockExUnits.Steps),
Memory: p.MaxBlockExUnits.Memory,
Steps: p.MaxBlockExUnits.Steps,
},
}
}
Expand Down
Loading