Fix build errors
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
parent
9c250f24fa
commit
9fd1b95fd5
@ -543,6 +543,9 @@ func (syncer *Syncer) ValidateBlock(ctx context.Context, b *types.FullBlock) err
|
||||
return xerrors.Errorf("received block was from slashed or invalid miner")
|
||||
}
|
||||
|
||||
// TODO fix winners
|
||||
/*
|
||||
|
||||
mpow, tpow, err := stmgr.GetPower(ctx, syncer.sm, baseTs, h.Miner)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("failed getting power: %w", err)
|
||||
@ -558,7 +561,6 @@ func (syncer *Syncer) ValidateBlock(ctx context.Context, b *types.FullBlock) err
|
||||
if len(h.EPostProof.Candidates) == 0 {
|
||||
return xerrors.Errorf("no candidates")
|
||||
}
|
||||
|
||||
wins := make(map[uint64]bool)
|
||||
for _, t := range h.EPostProof.Candidates {
|
||||
if wins[t.ChallengeIndex] {
|
||||
@ -570,6 +572,8 @@ func (syncer *Syncer) ValidateBlock(ctx context.Context, b *types.FullBlock) err
|
||||
return xerrors.Errorf("miner created a block but was not a winner")
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
return nil
|
||||
})
|
||||
|
||||
@ -985,7 +989,6 @@ func (syncer *Syncer) collectHeaders(ctx context.Context, from *types.TipSet, to
|
||||
syncer.bad.Add(from.Cids()[0], "wrong order of beacon entires")
|
||||
return nil, xerrors.Errorf("wrong order of beacon entires")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
for _, bh := range from.Blocks()[1:] {
|
||||
|
@ -317,7 +317,7 @@ func (m *Miner) mineOne(ctx context.Context, addr address.Address, base *MiningB
|
||||
return nil, xerrors.Errorf("scratching ticket failed: %w", err)
|
||||
}
|
||||
|
||||
proofin, err := gen.IsRoundWinner(ctx, base.ts, int64(round), addr, m.epp, bvals[len(bvals)-1] m.api)
|
||||
proofin, err := gen.IsRoundWinner(ctx, base.ts, int64(round), addr, m.epp, bvals[len(bvals)-1], m.api)
|
||||
if err != nil {
|
||||
return nil, xerrors.Errorf("failed to check if we win next round: %w", err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user