From 04406f4d23d39ca46f4b683f50e055495e3e1763 Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Wed, 11 Dec 2024 13:22:03 +0100 Subject: [PATCH] add comment, bump go-state-types Signed-off-by: Jakub Sztandera --- chain/actors/builtin/power/actor.go.template | 3 +++ chain/actors/builtin/power/power.go | 3 +++ go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/chain/actors/builtin/power/actor.go.template b/chain/actors/builtin/power/actor.go.template index 6364630be12..81c2676c065 100644 --- a/chain/actors/builtin/power/actor.go.template +++ b/chain/actors/builtin/power/actor.go.template @@ -99,6 +99,9 @@ type State interface { MinerPower(address.Address) (Claim, bool, error) MinerNominalPowerMeetsConsensusMinimum(address.Address) (bool, error) ListAllMiners() ([]address.Address, error) + // ForEachClaim iterates over claims in the power actor. + // If onlyEligible is true, it applies the MinerNominalPowerMeetsConsensusMinimum check + // before returning the actor. ForEachClaim(cb func(miner address.Address, claim Claim) error, onlyEligible bool) error ClaimsChanged(State) (bool, error) diff --git a/chain/actors/builtin/power/power.go b/chain/actors/builtin/power/power.go index ecc79c6a453..f5a56d1d4be 100644 --- a/chain/actors/builtin/power/power.go +++ b/chain/actors/builtin/power/power.go @@ -183,6 +183,9 @@ type State interface { MinerPower(address.Address) (Claim, bool, error) MinerNominalPowerMeetsConsensusMinimum(address.Address) (bool, error) ListAllMiners() ([]address.Address, error) + // ForEachClaim iterates over claims in the power actor. + // If onlyEligible is true, it applies the MinerNominalPowerMeetsConsensusMinimum check + // before returning the actor. ForEachClaim(cb func(miner address.Address, claim Claim) error, onlyEligible bool) error ClaimsChanged(State) (bool, error) diff --git a/go.mod b/go.mod index 7e4ac796cc3..3719490b333 100644 --- a/go.mod +++ b/go.mod @@ -52,7 +52,7 @@ require ( github.com/filecoin-project/go-jsonrpc v0.7.0 github.com/filecoin-project/go-padreader v0.0.1 github.com/filecoin-project/go-paramfetch v0.0.4 - github.com/filecoin-project/go-state-types v0.16.0-rc1.0.20241210151506-27c2d581aa19 + github.com/filecoin-project/go-state-types v0.16.0-rc2 github.com/filecoin-project/go-statemachine v1.0.3 github.com/filecoin-project/go-statestore v0.2.0 github.com/filecoin-project/go-storedcounter v0.1.0 diff --git a/go.sum b/go.sum index 688913ae836..60a7bf189c8 100644 --- a/go.sum +++ b/go.sum @@ -306,8 +306,8 @@ github.com/filecoin-project/go-state-types v0.0.0-20200928172055-2df22083d8ab/go github.com/filecoin-project/go-state-types v0.0.0-20201102161440-c8033295a1fc/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= github.com/filecoin-project/go-state-types v0.1.0/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= github.com/filecoin-project/go-state-types v0.1.6/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= -github.com/filecoin-project/go-state-types v0.16.0-rc1.0.20241210151506-27c2d581aa19 h1:GQfLAYtHwV0IH1mDKMG8PfaWlq9DoqQdir/6hhYI9Aw= -github.com/filecoin-project/go-state-types v0.16.0-rc1.0.20241210151506-27c2d581aa19/go.mod h1:TwnMxZiLa6wUT4u4KWJ+02VMwIQS/EoDJrAowy3Z6G0= +github.com/filecoin-project/go-state-types v0.16.0-rc2 h1:+R4NzNBaIYZq6GZYHSB7aTuoHPL7gFnB0MmPEq6mYvc= +github.com/filecoin-project/go-state-types v0.16.0-rc2/go.mod h1:TwnMxZiLa6wUT4u4KWJ+02VMwIQS/EoDJrAowy3Z6G0= github.com/filecoin-project/go-statemachine v1.0.3 h1:N07o6alys+V1tNoSTi4WuuoeNC4erS/6jE74+NsgQuk= github.com/filecoin-project/go-statemachine v1.0.3/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54= github.com/filecoin-project/go-statestore v0.1.0/go.mod h1:LFc9hD+fRxPqiHiaqUEZOinUJB4WARkRfNl10O7kTnI=