mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-03 11:45:18 +00:00
blockchain: enable v2 to be set (#4597)
* blockchain: enable v2 to be set - enable v2 to be set via config params Signed-off-by: Marko Baricevic <marbar3778@yahoo.com> * replace tab with space * correctly spell usability
This commit is contained in:
@@ -22,6 +22,7 @@ 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"
|
||||
"github.com/tendermint/tendermint/consensus"
|
||||
cs "github.com/tendermint/tendermint/consensus"
|
||||
@@ -366,6 +367,8 @@ func createBlockchainReactor(config *cfg.Config,
|
||||
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:
|
||||
return nil, fmt.Errorf("unknown fastsync version %s", config.FastSync.Version)
|
||||
}
|
||||
@@ -1094,6 +1097,8 @@ func makeNodeInfo(
|
||||
bcChannel = bcv0.BlockchainChannel
|
||||
case "v1":
|
||||
bcChannel = bcv1.BlockchainChannel
|
||||
case "v2":
|
||||
bcChannel = bcv2.BlockchainChannel
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown fastsync version %s", config.FastSync.Version)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user