refactor: drop unused param from IsRoundWinner
This commit is contained in:
parent
2c7c4ee845
commit
20e831b9ea
@ -362,7 +362,7 @@ func (cg *ChainGen) nextBlockProof(ctx context.Context, pts *types.TipSet, m add
|
|||||||
rbase = entries[len(entries)-1]
|
rbase = entries[len(entries)-1]
|
||||||
}
|
}
|
||||||
|
|
||||||
eproof, err := IsRoundWinner(ctx, pts, round, m, rbase, mbi, mc)
|
eproof, err := IsRoundWinner(ctx, round, m, rbase, mbi, mc)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, nil, xerrors.Errorf("checking round winner failed: %w", err)
|
return nil, nil, nil, xerrors.Errorf("checking round winner failed: %w", err)
|
||||||
}
|
}
|
||||||
@ -639,7 +639,7 @@ func (wpp *wppProvider) ComputeProof(context.Context, []proof7.ExtendedSectorInf
|
|||||||
return ValidWpostForTesting, nil
|
return ValidWpostForTesting, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func IsRoundWinner(ctx context.Context, ts *types.TipSet, round abi.ChainEpoch,
|
func IsRoundWinner(ctx context.Context, round abi.ChainEpoch,
|
||||||
miner address.Address, brand types.BeaconEntry, mbi *api.MiningBaseInfo, a MiningCheckAPI) (*types.ElectionProof, error) {
|
miner address.Address, brand types.BeaconEntry, mbi *api.MiningBaseInfo, a MiningCheckAPI) (*types.ElectionProof, error) {
|
||||||
|
|
||||||
buf := new(bytes.Buffer)
|
buf := new(bytes.Buffer)
|
||||||
|
@ -219,7 +219,7 @@ func backTestWinner(ctx context.Context, miner address.Address, round abi.ChainE
|
|||||||
brand = bvals[len(bvals)-1]
|
brand = bvals[len(bvals)-1]
|
||||||
}
|
}
|
||||||
|
|
||||||
winner, err := gen.IsRoundWinner(ctx, ts, round, miner, brand, mbi, api)
|
winner, err := gen.IsRoundWinner(ctx, round, miner, brand, mbi, api)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, xerrors.Errorf("failed to check if we win next round: %w", err)
|
return nil, xerrors.Errorf("failed to check if we win next round: %w", err)
|
||||||
}
|
}
|
||||||
|
@ -513,7 +513,7 @@ func (m *Miner) mineOne(ctx context.Context, base *MiningBase) (minedBlock *type
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
winner, err = gen.IsRoundWinner(ctx, base.TipSet, round, m.address, rbase, mbi, m.api)
|
winner, err = gen.IsRoundWinner(ctx, round, m.address, rbase, mbi, m.api)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
err = xerrors.Errorf("failed to check if we win next round: %w", err)
|
err = xerrors.Errorf("failed to check if we win next round: %w", err)
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
Reference in New Issue
Block a user