From 49fb5c08aa2758924245fec183e774d307a2dbd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Fri, 4 Sep 2020 17:47:59 +0200 Subject: [PATCH] Fix chain gen tests --- chain/gen/gen.go | 2 +- chain/gen/genesis/miners.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/chain/gen/gen.go b/chain/gen/gen.go index 551c3703f..10481f39b 100644 --- a/chain/gen/gen.go +++ b/chain/gen/gen.go @@ -281,7 +281,7 @@ func NewGeneratorWithSectors(numSectors int) (*ChainGen, error) { } func NewGenerator() (*ChainGen, error) { - return NewGeneratorWithSectors(1) + return NewGeneratorWithSectors(2) } func (cg *ChainGen) StateManager() *stmgr.StateManager { diff --git a/chain/gen/genesis/miners.go b/chain/gen/genesis/miners.go index 6096cbd68..6ad266b7d 100644 --- a/chain/gen/genesis/miners.go +++ b/chain/gen/genesis/miners.go @@ -258,7 +258,7 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sroot cid.Cid return cid.Undef, xerrors.Errorf("removing fake power: %w", err) } - epochReward, err := currentEpochBlockReward(ctx, vm, minerInfos[i].maddr) + epochReward, err := currentEpochBlockReward(ctx, vm) if err != nil { return cid.Undef, xerrors.Errorf("getting current epoch reward: %w", err) } @@ -387,8 +387,8 @@ func dealWeight(ctx context.Context, vm *vm.VM, maddr address.Address, dealIDs [ return dealWeights, nil } -func currentEpochBlockReward(ctx context.Context, vm *vm.VM, maddr address.Address) (*reward.ThisEpochRewardReturn, error) { - rwret, err := doExecValue(ctx, vm, builtin.RewardActorAddr, maddr, big.Zero(), builtin.MethodsReward.ThisEpochReward, nil) +func currentEpochBlockReward(ctx context.Context, vm *vm.VM) (*reward.ThisEpochRewardReturn, error) { + rwret, err := doExecValue(ctx, vm, builtin.RewardActorAddr, builtin.RewardActorAddr, big.Zero(), builtin.MethodsReward.ThisEpochReward, nil) if err != nil { return nil, err }