From 50f26e97219e91356915379ca780a7cd997aa64f Mon Sep 17 00:00:00 2001 From: Geoff Stuart Date: Fri, 20 Jan 2023 13:27:04 -0500 Subject: [PATCH] Fix testground build --- build/params_testground.go | 6 +++--- chain/store/snapshot.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/params_testground.go b/build/params_testground.go index ed818f4a5..17ea5a59b 100644 --- a/build/params_testground.go +++ b/build/params_testground.go @@ -42,9 +42,6 @@ var ( AllowableClockDriftSecs = uint64(1) - Finality = policy.ChainFinality - ForkLengthThreshold = Finality - SlashablePowerDelay = 20 InteractivePoRepConfidence = 6 @@ -130,6 +127,9 @@ var ( GenesisFile = "" ) +const Finality = policy.ChainFinality +const ForkLengthThreshold = Finality + const BootstrapPeerThreshold = 1 // ChainId defines the chain ID used in the Ethereum JSON-RPC endpoint. diff --git a/chain/store/snapshot.go b/chain/store/snapshot.go index 3c264d192..e90a60611 100644 --- a/chain/store/snapshot.go +++ b/chain/store/snapshot.go @@ -22,7 +22,7 @@ import ( "github.com/filecoin-project/lotus/chain/types" ) -const TIPSETKEY_BACKFILL_RANGE = 2 * build.Finality +const TipsetkeyBackfillRange = 2 * build.Finality func (cs *ChainStore) UnionStore() bstore.Blockstore { return bstore.Union(cs.stateBlockstore, cs.chainBlockstore) @@ -116,7 +116,7 @@ func (cs *ChainStore) Import(ctx context.Context, r io.Reader) (*types.TipSet, e } ts := root - for i := 0; i < int(TIPSETKEY_BACKFILL_RANGE); i++ { + for i := 0; i < int(TipsetkeyBackfillRange); i++ { err = cs.PersistTipset(ctx, ts) if err != nil { return nil, err