Prep for e=5
This commit is contained in:
parent
a576b72364
commit
16a9ab875c
@ -38,6 +38,9 @@ const AllowableClockDrift = BlockDelay * 2
|
|||||||
// Blocks
|
// Blocks
|
||||||
const ForkLengthThreshold = 100
|
const ForkLengthThreshold = 100
|
||||||
|
|
||||||
|
// Blocks (e)
|
||||||
|
const BlocksPerRound = 1
|
||||||
|
|
||||||
// /////
|
// /////
|
||||||
// Proofs / Mining
|
// Proofs / Mining
|
||||||
|
|
||||||
|
@ -413,7 +413,7 @@ func IsRoundWinner(ctx context.Context, ts *types.TipSet, ticks []*types.Ticket,
|
|||||||
return false, nil, xerrors.Errorf("failed to check power: %w", err)
|
return false, nil, xerrors.Errorf("failed to check power: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return types.PowerCmp(vrfout, pow.MinerPower, pow.TotalPower), vrfout, nil
|
return types.PowerCmp(vrfout, types.BigMul(pow.MinerPower, types.NewInt(build.BlocksPerRound)), pow.TotalPower), vrfout, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type SignFunc func(context.Context, address.Address, []byte) (*types.Signature, error)
|
type SignFunc func(context.Context, address.Address, []byte) (*types.Signature, error)
|
||||||
|
@ -75,6 +75,8 @@ func NewTipSet(blks []*BlockHeader) (*TipSet, error) {
|
|||||||
return nil, fmt.Errorf("cannot create tipset with mismatching heights")
|
return nil, fmt.Errorf("cannot create tipset with mismatching heights")
|
||||||
}
|
}
|
||||||
ts.cids = append(ts.cids, b.Cid())
|
ts.cids = append(ts.cids, b.Cid())
|
||||||
|
|
||||||
|
// TODO: ensure the same parents
|
||||||
}
|
}
|
||||||
ts.height = blks[0].Height
|
ts.height = blks[0].Height
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user