rename build.PropagationDelay{=>Secs}.
This commit is contained in:
parent
3b826e41f6
commit
1ef490feea
@ -22,7 +22,7 @@ func init() {
|
|||||||
|
|
||||||
const BlockDelaySecs = uint64(2)
|
const BlockDelaySecs = uint64(2)
|
||||||
|
|
||||||
const PropagationDelay = uint64(3)
|
const PropagationDelaySecs = uint64(3)
|
||||||
|
|
||||||
// SlashablePowerDelay is the number of epochs after ElectionPeriodStart, after
|
// SlashablePowerDelay is the number of epochs after ElectionPeriodStart, after
|
||||||
// which the miner is slashed
|
// which the miner is slashed
|
||||||
|
@ -25,7 +25,7 @@ var (
|
|||||||
BlockMessageLimit = 512
|
BlockMessageLimit = 512
|
||||||
BlockGasLimit = int64(100_000_000_000)
|
BlockGasLimit = int64(100_000_000_000)
|
||||||
BlockDelaySecs = uint64(builtin.EpochDurationSeconds)
|
BlockDelaySecs = uint64(builtin.EpochDurationSeconds)
|
||||||
PropagationDelay = uint64(6)
|
PropagationDelaySecs = uint64(6)
|
||||||
|
|
||||||
AllowableClockDriftSecs = uint64(1)
|
AllowableClockDriftSecs = uint64(1)
|
||||||
|
|
||||||
|
@ -22,4 +22,4 @@ func init() {
|
|||||||
|
|
||||||
const BlockDelaySecs = uint64(builtin.EpochDurationSeconds)
|
const BlockDelaySecs = uint64(builtin.EpochDurationSeconds)
|
||||||
|
|
||||||
const PropagationDelay = uint64(6)
|
const PropagationDelaySecs = uint64(6)
|
||||||
|
@ -42,7 +42,7 @@ func NewMiner(api api.FullNode, epp gen.WinningPoStProver, addr address.Address)
|
|||||||
address: addr,
|
address: addr,
|
||||||
waitFunc: func(ctx context.Context, baseTime uint64) (func(bool), error) {
|
waitFunc: func(ctx context.Context, baseTime uint64) (func(bool), error) {
|
||||||
// Wait around for half the block time in case other parents come in
|
// Wait around for half the block time in case other parents come in
|
||||||
deadline := baseTime + build.PropagationDelay
|
deadline := baseTime + build.PropagationDelaySecs
|
||||||
time.Sleep(time.Until(time.Unix(int64(deadline), 0)))
|
time.Sleep(time.Until(time.Unix(int64(deadline), 0)))
|
||||||
|
|
||||||
return func(bool) {}, nil
|
return func(bool) {}, nil
|
||||||
@ -194,7 +194,7 @@ func (m *Miner) mine(ctx context.Context) {
|
|||||||
// has enough time to form.
|
// has enough time to form.
|
||||||
//
|
//
|
||||||
// See: https://github.com/filecoin-project/lotus/issues/1845
|
// See: https://github.com/filecoin-project/lotus/issues/1845
|
||||||
nextRound := time.Unix(int64(base.TipSet.MinTimestamp()+build.BlockDelaySecs*uint64(base.NullRounds))+int64(build.PropagationDelay), 0)
|
nextRound := time.Unix(int64(base.TipSet.MinTimestamp()+build.BlockDelaySecs*uint64(base.NullRounds))+int64(build.PropagationDelaySecs), 0)
|
||||||
|
|
||||||
select {
|
select {
|
||||||
case <-time.After(time.Until(nextRound)):
|
case <-time.After(time.Until(nextRound)):
|
||||||
|
Loading…
Reference in New Issue
Block a user