From 61cfb51674e9a6b92cfa80c86746e568e241714c Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Wed, 17 Jan 2024 16:15:58 -0800 Subject: [PATCH] fix: fill in power-base & replaced-day-reward in state getter see #11586 --- chain/actors/builtin/miner/state.go.template | 6 +++++- chain/actors/builtin/miner/v12.go | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/chain/actors/builtin/miner/state.go.template b/chain/actors/builtin/miner/state.go.template index 3c7f05d9a..ac3326828 100644 --- a/chain/actors/builtin/miner/state.go.template +++ b/chain/actors/builtin/miner/state.go.template @@ -583,7 +583,11 @@ func fromV{{.v}}SectorOnChainInfo(v{{.v}} miner{{.v}}.SectorOnChainInfo) SectorO ExpectedStoragePledge: v{{.v}}.ExpectedStoragePledge, {{if (ge .v 7)}} SectorKeyCID: v{{.v}}.SectorKeyCID, - {{end}} + {{end}} + {{if (ge .v 12)}} + PowerBaseEpoch: v{{.v}}.PowerBaseEpoch, + ReplacedDayReward: v{{.v}}.ReplacedDayReward, + {{end}} } return info } diff --git a/chain/actors/builtin/miner/v12.go b/chain/actors/builtin/miner/v12.go index 90ecc97fd..f06d2c431 100644 --- a/chain/actors/builtin/miner/v12.go +++ b/chain/actors/builtin/miner/v12.go @@ -545,6 +545,9 @@ func fromV12SectorOnChainInfo(v12 miner12.SectorOnChainInfo) SectorOnChainInfo { ExpectedStoragePledge: v12.ExpectedStoragePledge, SectorKeyCID: v12.SectorKeyCID, + + PowerBaseEpoch: v12.PowerBaseEpoch, + ReplacedDayReward: v12.ReplacedDayReward, } return info }