use proper const

This commit is contained in:
whyrusleeping 2019-10-08 09:28:13 +09:00
parent 0182b804a2
commit 684e8e27fc
3 changed files with 3 additions and 4 deletions

View File

@ -36,7 +36,7 @@ const BlockDelay = 6
const AllowableClockDrift = BlockDelay * 2 const AllowableClockDrift = BlockDelay * 2
// Blocks // Blocks
const ForkLengthThreshold = 20 const ForkLengthThreshold = 100
// ///// // /////
// Proofs / Mining // Proofs / Mining

View File

@ -31,7 +31,7 @@ import (
var log = logging.Logger("gen") var log = logging.Logger("gen")
const msgsPerBlock = 5 const msgsPerBlock = 20
type ChainGen struct { type ChainGen struct {
accounts []address.Address accounts []address.Address
@ -141,7 +141,6 @@ func NewGenerator() (*ChainGen, error) {
if err != nil { if err != nil {
return nil, xerrors.Errorf("make genesis block failed: %w", err) return nil, xerrors.Errorf("make genesis block failed: %w", err)
} }
fmt.Println("MINER CFG ADDRESSES: ", minercfg.MinerAddrs)
cs := store.NewChainStore(bs, ds) cs := store.NewChainStore(bs, ds)

View File

@ -643,7 +643,7 @@ loop:
} }
func (syncer *Syncer) syncFork(ctx context.Context, from *types.TipSet, to *types.TipSet) ([]*types.TipSet, error) { func (syncer *Syncer) syncFork(ctx context.Context, from *types.TipSet, to *types.TipSet) ([]*types.TipSet, error) {
tips, err := syncer.Bsync.GetBlocks(ctx, from.Parents(), 100) tips, err := syncer.Bsync.GetBlocks(ctx, from.Parents(), build.ForkLengthThreshold)
if err != nil { if err != nil {
return nil, err return nil, err
} }