Fix miner tests, push back fork time
This commit is contained in:
parent
c6186a03f1
commit
6ccf24ce6c
@ -1,3 +1,3 @@
|
||||
package build
|
||||
|
||||
const ForkBlizzardHeight = 6250
|
||||
const ForkBlizzardHeight = 6288
|
||||
|
@ -24,7 +24,11 @@ var log = logging.Logger("miner")
|
||||
type waitFunc func(ctx context.Context, baseTime uint64) error
|
||||
|
||||
func NewMiner(api api.FullNode, epp gen.ElectionPoStProver) *Miner {
|
||||
arc, _ := lru.NewARC(10000)
|
||||
arc, err := lru.NewARC(10000)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
return &Miner{
|
||||
api: api,
|
||||
epp: epp,
|
||||
|
@ -6,14 +6,21 @@ import (
|
||||
"github.com/filecoin-project/go-address"
|
||||
"github.com/filecoin-project/lotus/api"
|
||||
"github.com/filecoin-project/lotus/chain/gen"
|
||||
lru "github.com/hashicorp/golang-lru"
|
||||
)
|
||||
|
||||
func NewTestMiner(nextCh <-chan struct{}, addr address.Address) func(api.FullNode, gen.ElectionPoStProver) *Miner {
|
||||
return func(api api.FullNode, epp gen.ElectionPoStProver) *Miner {
|
||||
arc, err := lru.NewARC(10000)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
m := &Miner{
|
||||
api: api,
|
||||
waitFunc: chanWaiter(nextCh),
|
||||
epp: epp,
|
||||
api: api,
|
||||
waitFunc: chanWaiter(nextCh),
|
||||
epp: epp,
|
||||
minedBlockHeights: arc,
|
||||
}
|
||||
|
||||
if err := m.Register(addr); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user