From 178691e37f8f68a58fafc513f6f4b23cec8efa0f Mon Sep 17 00:00:00 2001 From: zgfzgf <1901989065@qq.com> Date: Thu, 3 Dec 2020 09:54:57 +0800 Subject: [PATCH] optimize code use existence var --- miner/miner.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miner/miner.go b/miner/miner.go index d24850d9f..4075c8cc6 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -409,7 +409,7 @@ func (m *Miner) mineOne(ctx context.Context, base *MiningBase) (*types.BlockMsg, return nil, xerrors.Errorf("failed to marshal miner address: %w", err) } - rand, err := store.DrawRandomness(rbase.Data, crypto.DomainSeparationTag_WinningPoStChallengeSeed, base.TipSet.Height()+base.NullRounds+1, buf.Bytes()) + rand, err := store.DrawRandomness(rbase.Data, crypto.DomainSeparationTag_WinningPoStChallengeSeed, round, buf.Bytes()) if err != nil { return nil, xerrors.Errorf("failed to get randomness for winning post: %w", err) }