blockchain/v1: remove in favor of v2 (#5728)

This commit is contained in:
Anton Kaliaev
2020-12-03 09:35:47 +04:00
committed by GitHub
parent bcb7044d64
commit 243ff4b43d
21 changed files with 18 additions and 4025 deletions

View File

@@ -19,7 +19,6 @@ import (
abci "github.com/tendermint/tendermint/abci/types"
bcv0 "github.com/tendermint/tendermint/blockchain/v0"
bcv1 "github.com/tendermint/tendermint/blockchain/v1"
bcv2 "github.com/tendermint/tendermint/blockchain/v2"
cfg "github.com/tendermint/tendermint/config"
cs "github.com/tendermint/tendermint/consensus"
@@ -128,7 +127,7 @@ func DefaultMetricsProvider(config *cfg.InstrumentationConfig) MetricsProvider {
// Option sets a parameter for the node.
type Option func(*Node)
// Temporary interface for switching to fast sync, we should get rid of v0 and v1 reactors.
// Temporary interface for switching to fast sync, we should get rid of v0.
// See: https://github.com/tendermint/tendermint/issues/4595
type fastSyncReactor interface {
SwitchToFastSync(sm.State) error
@@ -366,8 +365,6 @@ func createBlockchainReactor(config *cfg.Config,
switch config.FastSync.Version {
case "v0":
bcReactor = bcv0.NewBlockchainReactor(state.Copy(), blockExec, blockStore, fastSync)
case "v1":
bcReactor = bcv1.NewBlockchainReactor(state.Copy(), blockExec, blockStore, fastSync)
case "v2":
bcReactor = bcv2.NewBlockchainReactor(state.Copy(), blockExec, blockStore, fastSync)
default:
@@ -1238,8 +1235,6 @@ func makeNodeInfo(
switch config.FastSync.Version {
case "v0":
bcChannel = bcv0.BlockchainChannel
case "v1":
bcChannel = bcv1.BlockchainChannel
case "v2":
bcChannel = bcv2.BlockchainChannel
default: