From 715311ac6f571f33a01d9c11bec9c72e052fb21f Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Mon, 6 May 2024 12:24:31 +1000 Subject: [PATCH] fix: copy Flags field from SectorOnChainInfo Fixes: https://github.com/filecoin-project/lotus/issues/11962 --- chain/actors/builtin/miner/state.go.template | 1 + chain/actors/builtin/miner/v12.go | 1 + chain/actors/builtin/miner/v13.go | 1 + chain/actors/builtin/miner/v14.go | 1 + 4 files changed, 4 insertions(+) diff --git a/chain/actors/builtin/miner/state.go.template b/chain/actors/builtin/miner/state.go.template index ac332682807..a940dd9ea53 100644 --- a/chain/actors/builtin/miner/state.go.template +++ b/chain/actors/builtin/miner/state.go.template @@ -587,6 +587,7 @@ func fromV{{.v}}SectorOnChainInfo(v{{.v}} miner{{.v}}.SectorOnChainInfo) SectorO {{if (ge .v 12)}} PowerBaseEpoch: v{{.v}}.PowerBaseEpoch, ReplacedDayReward: v{{.v}}.ReplacedDayReward, + Flags: SectorOnChainInfoFlags(v{{.v}}.Flags), {{end}} } return info diff --git a/chain/actors/builtin/miner/v12.go b/chain/actors/builtin/miner/v12.go index f06d2c4313e..a26d78d3204 100644 --- a/chain/actors/builtin/miner/v12.go +++ b/chain/actors/builtin/miner/v12.go @@ -548,6 +548,7 @@ func fromV12SectorOnChainInfo(v12 miner12.SectorOnChainInfo) SectorOnChainInfo { PowerBaseEpoch: v12.PowerBaseEpoch, ReplacedDayReward: v12.ReplacedDayReward, + Flags: SectorOnChainInfoFlags(v12.Flags), } return info } diff --git a/chain/actors/builtin/miner/v13.go b/chain/actors/builtin/miner/v13.go index d61c2a9a222..c033a9907c8 100644 --- a/chain/actors/builtin/miner/v13.go +++ b/chain/actors/builtin/miner/v13.go @@ -548,6 +548,7 @@ func fromV13SectorOnChainInfo(v13 miner13.SectorOnChainInfo) SectorOnChainInfo { PowerBaseEpoch: v13.PowerBaseEpoch, ReplacedDayReward: v13.ReplacedDayReward, + Flags: SectorOnChainInfoFlags(v13.Flags), } return info } diff --git a/chain/actors/builtin/miner/v14.go b/chain/actors/builtin/miner/v14.go index 70a5ea63bc7..3153bead3fd 100644 --- a/chain/actors/builtin/miner/v14.go +++ b/chain/actors/builtin/miner/v14.go @@ -548,6 +548,7 @@ func fromV14SectorOnChainInfo(v14 miner14.SectorOnChainInfo) SectorOnChainInfo { PowerBaseEpoch: v14.PowerBaseEpoch, ReplacedDayReward: v14.ReplacedDayReward, + Flags: SectorOnChainInfoFlags(v14.Flags), } return info }