mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-28 04:01:40 +00:00
golangci fixes
This commit is contained in:
@ -91,7 +91,7 @@ func (msg *bcReactorMessage) String() string {
|
|||||||
case statusResponseEv:
|
case statusResponseEv:
|
||||||
dataStr = fmt.Sprintf("peer=%v height=%v", msg.data.peerID, msg.data.height)
|
dataStr = fmt.Sprintf("peer=%v height=%v", msg.data.peerID, msg.data.height)
|
||||||
case blockResponseEv:
|
case blockResponseEv:
|
||||||
dataStr = fmt.Sprintf("peer=%v block.height=%v lenght=%v",
|
dataStr = fmt.Sprintf("peer=%v block.height=%v length=%v",
|
||||||
msg.data.peerID, msg.data.block.Height, msg.data.length)
|
msg.data.peerID, msg.data.block.Height, msg.data.length)
|
||||||
case processedBlockEv:
|
case processedBlockEv:
|
||||||
dataStr = fmt.Sprintf("error=%v", msg.data.err)
|
dataStr = fmt.Sprintf("error=%v", msg.data.err)
|
||||||
@ -103,10 +103,8 @@ func (msg *bcReactorMessage) String() string {
|
|||||||
dataStr = fmt.Sprintf("peer: %v is being removed by the switch", msg.data.peerID)
|
dataStr = fmt.Sprintf("peer: %v is being removed by the switch", msg.data.peerID)
|
||||||
case stateTimeoutEv:
|
case stateTimeoutEv:
|
||||||
dataStr = fmt.Sprintf("state=%v", msg.data.stateName)
|
dataStr = fmt.Sprintf("state=%v", msg.data.stateName)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
dataStr = fmt.Sprintf("cannot interpret message data")
|
dataStr = fmt.Sprintf("cannot interpret message data")
|
||||||
return "event unknown"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return fmt.Sprintf("%v: %v", msg.event, dataStr)
|
return fmt.Sprintf("%v: %v", msg.event, dataStr)
|
||||||
|
@ -64,7 +64,7 @@ type Config struct {
|
|||||||
RPC *RPCConfig `mapstructure:"rpc"`
|
RPC *RPCConfig `mapstructure:"rpc"`
|
||||||
P2P *P2PConfig `mapstructure:"p2p"`
|
P2P *P2PConfig `mapstructure:"p2p"`
|
||||||
Mempool *MempoolConfig `mapstructure:"mempool"`
|
Mempool *MempoolConfig `mapstructure:"mempool"`
|
||||||
FastSyncParams *FastSyncParamsConfig `mapstructure:"fastsyncp"`
|
FastSyncParams *FastSyncParamsConfig `mapstructure:"fastsync"`
|
||||||
Consensus *ConsensusConfig `mapstructure:"consensus"`
|
Consensus *ConsensusConfig `mapstructure:"consensus"`
|
||||||
TxIndex *TxIndexConfig `mapstructure:"tx_index"`
|
TxIndex *TxIndexConfig `mapstructure:"tx_index"`
|
||||||
Instrumentation *InstrumentationConfig `mapstructure:"instrumentation"`
|
Instrumentation *InstrumentationConfig `mapstructure:"instrumentation"`
|
||||||
|
@ -48,8 +48,7 @@ func EnsureRoot(rootDir string) {
|
|||||||
// XXX: this func should probably be called by cmd/tendermint/commands/init.go
|
// XXX: this func should probably be called by cmd/tendermint/commands/init.go
|
||||||
// alongside the writing of the genesis.json and priv_validator.json
|
// alongside the writing of the genesis.json and priv_validator.json
|
||||||
func writeDefaultConfigFile(configFilePath string) {
|
func writeDefaultConfigFile(configFilePath string) {
|
||||||
config := DefaultConfig()
|
WriteConfigFile(configFilePath, DefaultConfig())
|
||||||
WriteConfigFile(configFilePath, config)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// WriteConfigFile renders config using the template and writes it to configFilePath.
|
// WriteConfigFile renders config using the template and writes it to configFilePath.
|
||||||
|
Reference in New Issue
Block a user