From f87d325b6fecab5a50bce36dc69d3c8f0e1b09db Mon Sep 17 00:00:00 2001 From: Ian Davis Date: Fri, 9 Oct 2020 17:23:40 +0100 Subject: [PATCH] fix: spec actors 2 reward shim uses correct field for CumsumRealized --- chain/actors/builtin/reward/v0.go | 2 +- chain/actors/builtin/reward/v2.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chain/actors/builtin/reward/v0.go b/chain/actors/builtin/reward/v0.go index 0efd0b482..6a6e6d12e 100644 --- a/chain/actors/builtin/reward/v0.go +++ b/chain/actors/builtin/reward/v0.go @@ -57,7 +57,7 @@ func (s *state0) CumsumBaseline() (abi.StoragePower, error) { } func (s *state0) CumsumRealized() (abi.StoragePower, error) { - return s.State.CumsumBaseline, nil + return s.State.CumsumRealized, nil } func (s *state0) InitialPledgeForPower(sectorWeight abi.StoragePower, networkTotalPledge abi.TokenAmount, networkQAPower *builtin.FilterEstimate, circSupply abi.TokenAmount) (abi.TokenAmount, error) { diff --git a/chain/actors/builtin/reward/v2.go b/chain/actors/builtin/reward/v2.go index ec0709c39..b7cb49102 100644 --- a/chain/actors/builtin/reward/v2.go +++ b/chain/actors/builtin/reward/v2.go @@ -60,7 +60,7 @@ func (s *state2) CumsumBaseline() (abi.StoragePower, error) { } func (s *state2) CumsumRealized() (abi.StoragePower, error) { - return s.State.CumsumBaseline, nil + return s.State.CumsumRealized, nil } func (s *state2) InitialPledgeForPower(qaPower abi.StoragePower, networkTotalPledge abi.TokenAmount, networkQAPower *builtin.FilterEstimate, circSupply abi.TokenAmount) (abi.TokenAmount, error) {