start mining way more in the past.

This commit is contained in:
Raúl Kripalani 2021-06-14 18:58:12 +01:00
parent 7b00b1828b
commit 6fb31a34b3
2 changed files with 3 additions and 4 deletions

View File

@ -114,8 +114,7 @@ type Ensemble struct {
}
}
// NewEnsemble instantiates a new blank Ensemble. This enables you to
// programmatically
// NewEnsemble instantiates a new blank Ensemble.
func NewEnsemble(t *testing.T, opts ...EnsembleOpt) *Ensemble {
options := DefaultEnsembleOpts
for _, o := range opts {
@ -593,7 +592,7 @@ func (n *Ensemble) generateGenesis() *genesis.Template {
Accounts: n.genesis.accounts,
Miners: n.genesis.miners,
NetworkName: "test",
Timestamp: uint64(time.Now().Unix() - 10000), // some time sufficiently far in the past
Timestamp: uint64(time.Now().Unix() - int64(n.options.pastOffset.Seconds())),
VerifregRootKey: gen.DefaultVerifregRootkeyActor,
RemainderAccount: gen.DefaultRemainderAccountActor,
}

View File

@ -15,7 +15,7 @@ type ensembleOpts struct {
}
var DefaultEnsembleOpts = ensembleOpts{
pastOffset: 10000 * time.Second,
pastOffset: 100000 * time.Second, // time sufficiently in the past to trigger catch-up mining.
proofType: abi.RegisteredSealProof_StackedDrg2KiBV1,
}