From fa64b2dc80cae58e930f01669c0ff7353f83318d Mon Sep 17 00:00:00 2001 From: Geoff Stuart Date: Wed, 5 Oct 2022 22:01:37 -0400 Subject: [PATCH] Return beneficiary info from miner state Info() --- chain/actors/builtin/miner/state.go.template | 4 ++++ chain/actors/builtin/miner/v9.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/chain/actors/builtin/miner/state.go.template b/chain/actors/builtin/miner/state.go.template index e24188fa0..011f3da80 100644 --- a/chain/actors/builtin/miner/state.go.template +++ b/chain/actors/builtin/miner/state.go.template @@ -413,6 +413,10 @@ func (s *state{{.v}}) Info() (MinerInfo, error) { SectorSize: info.SectorSize, WindowPoStPartitionSectors: info.WindowPoStPartitionSectors, ConsensusFaultElapsed: {{if (ge .v 2)}}info.ConsensusFaultElapsed{{else}}-1{{end}}, + {{if (ge .v 9)}} + Beneficiary: info.Beneficiary, + BeneficiaryTerm: info.BeneficiaryTerm, + PendingBeneficiaryTerm: info.PendingBeneficiaryTerm,{{end}} } return mi, nil diff --git a/chain/actors/builtin/miner/v9.go b/chain/actors/builtin/miner/v9.go index fe1f626f5..8d797f200 100644 --- a/chain/actors/builtin/miner/v9.go +++ b/chain/actors/builtin/miner/v9.go @@ -382,6 +382,10 @@ func (s *state9) Info() (MinerInfo, error) { SectorSize: info.SectorSize, WindowPoStPartitionSectors: info.WindowPoStPartitionSectors, ConsensusFaultElapsed: info.ConsensusFaultElapsed, + + Beneficiary: info.Beneficiary, + BeneficiaryTerm: info.BeneficiaryTerm, + PendingBeneficiaryTerm: info.PendingBeneficiaryTerm, } return mi, nil