mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-15 14:21:22 +00:00
Minor log changes (#2959)
* node: allow state and code to have diff block versions * node: pex is a log module
This commit is contained in:
19
node/node.go
19
node/node.go
@ -210,13 +210,18 @@ func NewNode(config *cfg.Config,
|
|||||||
// what happened during block replay).
|
// what happened during block replay).
|
||||||
state = sm.LoadState(stateDB)
|
state = sm.LoadState(stateDB)
|
||||||
|
|
||||||
// Ensure the state's block version matches that of the software.
|
// Log the version info.
|
||||||
|
logger.Info("Version info",
|
||||||
|
"software", version.TMCoreSemVer,
|
||||||
|
"block", version.BlockProtocol,
|
||||||
|
"p2p", version.P2PProtocol,
|
||||||
|
)
|
||||||
|
|
||||||
|
// If the state and software differ in block version, at least log it.
|
||||||
if state.Version.Consensus.Block != version.BlockProtocol {
|
if state.Version.Consensus.Block != version.BlockProtocol {
|
||||||
return nil, fmt.Errorf(
|
logger.Info("Software and state have different block protocols",
|
||||||
"Block version of the software does not match that of the state.\n"+
|
"software", version.BlockProtocol,
|
||||||
"Got version.BlockProtocol=%v, state.Version.Consensus.Block=%v",
|
"state", state.Version.Consensus.Block,
|
||||||
version.BlockProtocol,
|
|
||||||
state.Version.Consensus.Block,
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -454,7 +459,7 @@ func NewNode(config *cfg.Config,
|
|||||||
Seeds: splitAndTrimEmpty(config.P2P.Seeds, ",", " "),
|
Seeds: splitAndTrimEmpty(config.P2P.Seeds, ",", " "),
|
||||||
SeedMode: config.P2P.SeedMode,
|
SeedMode: config.P2P.SeedMode,
|
||||||
})
|
})
|
||||||
pexReactor.SetLogger(p2pLogger)
|
pexReactor.SetLogger(logger.With("module", "pex"))
|
||||||
sw.AddReactor("PEX", pexReactor)
|
sw.AddReactor("PEX", pexReactor)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user