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
4 changes: 2 additions & 2 deletions internal/test/ledger/ledger.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ func (ls MockLedgerState) StakeRegistration(
}

func (ls MockLedgerState) PoolCurrentState(
poolKeyHash []byte,
poolKeyHash common.PoolKeyHash,
) (*common.PoolRegistrationCertificate, *uint64, error) {
for _, cert := range ls.MockPoolRegistration {
if string(
common.Blake2b224(cert.Operator).Bytes(),
) == string(
poolKeyHash,
common.Blake2b224(poolKeyHash).Bytes(),
) {
// pretend latest registration is current; no retirement support in mock
c := cert
Expand Down
2 changes: 1 addition & 1 deletion ledger/alonzo/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ func UtxoValidateValueNotConservedUtxo(
for _, cert := range tx.Certificates() {
switch tmpCert := cert.(type) {
case *common.PoolRegistrationCertificate:
reg, _, err := ls.PoolCurrentState(common.Blake2b224(tmpCert.Operator).Bytes())
reg, _, err := ls.PoolCurrentState(common.Blake2b224(tmpCert.Operator))
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion ledger/babbage/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ func UtxoValidateValueNotConservedUtxo(
for _, cert := range tx.Certificates() {
switch tmpCert := cert.(type) {
case *common.PoolRegistrationCertificate:
reg, _, err := ls.PoolCurrentState(common.Blake2b224(tmpCert.Operator).Bytes())
reg, _, err := ls.PoolCurrentState(common.Blake2b224(tmpCert.Operator))
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion ledger/common/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type PoolState interface {
// PoolCurrentState returns the latest active registration certificate for the given pool key hash.
// It also returns the epoch of a pending retirement certificate, if one exists.
// If the pool is not registered, the registration certificate will be nil.
PoolCurrentState([]byte) (*PoolRegistrationCertificate, *uint64, error)
PoolCurrentState(PoolKeyHash) (*PoolRegistrationCertificate, *uint64, error)
}

// LedgerState defines the interface for querying the ledger
Expand Down
2 changes: 1 addition & 1 deletion ledger/conway/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ func UtxoValidateValueNotConservedUtxo(
for _, cert := range tx.Certificates() {
switch tmpCert := cert.(type) {
case *common.PoolRegistrationCertificate:
reg, _, err := ls.PoolCurrentState(common.Blake2b224(tmpCert.Operator).Bytes())
reg, _, err := ls.PoolCurrentState(common.Blake2b224(tmpCert.Operator))
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion ledger/mary/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func UtxoValidateValueNotConservedUtxo(
for _, cert := range tx.Certificates() {
switch tmpCert := cert.(type) {
case *common.PoolRegistrationCertificate:
reg, _, err := ls.PoolCurrentState(common.Blake2b224(tmpCert.Operator).Bytes())
reg, _, err := ls.PoolCurrentState(common.Blake2b224(tmpCert.Operator))
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion ledger/shelley/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func UtxoValidateValueNotConservedUtxo(
for _, cert := range tx.Certificates() {
switch tmpCert := cert.(type) {
case *common.PoolRegistrationCertificate:
reg, _, err := ls.PoolCurrentState(common.Blake2b224(tmpCert.Operator).Bytes())
reg, _, err := ls.PoolCurrentState(common.Blake2b224(tmpCert.Operator))
if err != nil {
return err
}
Expand Down