mirror of
https://github.com/fluencelabs/tendermint
synced 2025-05-31 07:01:20 +00:00
check tmsp client err and set mustConnect=false
This commit is contained in:
parent
0fd8c98301
commit
c7e578ac0d
@ -68,6 +68,9 @@ func NewNode(config cfg.Config, privValidator *types.PrivValidator, clientCreato
|
|||||||
// Create the proxyApp, which houses three connections:
|
// Create the proxyApp, which houses three connections:
|
||||||
// query, consensus, and mempool
|
// query, consensus, and mempool
|
||||||
proxyApp := proxy.NewAppConns(config, clientCreator, state, blockStore)
|
proxyApp := proxy.NewAppConns(config, clientCreator, state, blockStore)
|
||||||
|
if _, err := proxyApp.Start(); err != nil {
|
||||||
|
Exit(Fmt("Error starting proxy app connections: %v", err))
|
||||||
|
}
|
||||||
|
|
||||||
// add the chainid and number of validators to the global config
|
// add the chainid and number of validators to the global config
|
||||||
config.Set("chain_id", state.ChainID)
|
config.Set("chain_id", state.ChainID)
|
||||||
|
@ -54,7 +54,6 @@ func NewRemoteClientCreator(addr, transport string, mustConnect bool) ClientCrea
|
|||||||
|
|
||||||
func (r *remoteClientCreator) NewTMSPClient() (tmspcli.Client, error) {
|
func (r *remoteClientCreator) NewTMSPClient() (tmspcli.Client, error) {
|
||||||
// Run forever in a loop
|
// Run forever in a loop
|
||||||
fmt.Println("ADDR", r.addr, r.transport)
|
|
||||||
remoteApp, err := tmspcli.NewClient(r.addr, r.transport, r.mustConnect)
|
remoteApp, err := tmspcli.NewClient(r.addr, r.transport, r.mustConnect)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("Failed to connect to proxy: %v", err)
|
return nil, fmt.Errorf("Failed to connect to proxy: %v", err)
|
||||||
@ -75,7 +74,7 @@ func DefaultClientCreator(config cfg.Config) ClientCreator {
|
|||||||
case "nilapp":
|
case "nilapp":
|
||||||
return NewLocalClientCreator(nilapp.NewNilApplication())
|
return NewLocalClientCreator(nilapp.NewNilApplication())
|
||||||
default:
|
default:
|
||||||
mustConnect := true
|
mustConnect := false // loop retrying
|
||||||
return NewRemoteClientCreator(addr, transport, mustConnect)
|
return NewRemoteClientCreator(addr, transport, mustConnect)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,8 @@ import (
|
|||||||
|
|
||||||
// Tendermint's interface to the application consists of multiple connections
|
// Tendermint's interface to the application consists of multiple connections
|
||||||
type AppConns interface {
|
type AppConns interface {
|
||||||
|
Service
|
||||||
|
|
||||||
Mempool() AppConnMempool
|
Mempool() AppConnMempool
|
||||||
Consensus() AppConnConsensus
|
Consensus() AppConnConsensus
|
||||||
Query() AppConnQuery
|
Query() AppConnQuery
|
||||||
@ -42,7 +44,6 @@ func NewMultiAppConn(config cfg.Config, clientCreator ClientCreator, state State
|
|||||||
clientCreator: clientCreator,
|
clientCreator: clientCreator,
|
||||||
}
|
}
|
||||||
multiAppConn.QuitService = *NewQuitService(log, "multiAppConn", multiAppConn)
|
multiAppConn.QuitService = *NewQuitService(log, "multiAppConn", multiAppConn)
|
||||||
multiAppConn.Start()
|
|
||||||
return multiAppConn
|
return multiAppConn
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,6 @@ package version
|
|||||||
|
|
||||||
const Maj = "0"
|
const Maj = "0"
|
||||||
const Min = "7" // tmsp useability (protobuf, unix); optimizations; broadcast_tx_commit
|
const Min = "7" // tmsp useability (protobuf, unix); optimizations; broadcast_tx_commit
|
||||||
const Fix = "1" // query conn, peer filter, fast sync fix
|
const Fix = "2" // query conn, peer filter, fast sync fix (+hot fix to tmsp connecting)
|
||||||
|
|
||||||
const Version = Maj + "." + Min + "." + Fix
|
const Version = Maj + "." + Min + "." + Fix
|
||||||
|
Loading…
x
Reference in New Issue
Block a user