mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-22 17:31:34 +00:00
Warn on proxy hash mismatch, not fail
This commit is contained in:
@ -250,6 +250,7 @@ func getProxyApp(addr string, hash []byte) (proxyAppConn proxy.AppConn) {
|
|||||||
mtx := new(sync.Mutex)
|
mtx := new(sync.Mutex)
|
||||||
proxyAppConn = proxy.NewLocalAppConn(mtx, app)
|
proxyAppConn = proxy.NewLocalAppConn(mtx, app)
|
||||||
default:
|
default:
|
||||||
|
// Run forever in a loop
|
||||||
remoteApp, err := proxy.NewRemoteAppConn(addr)
|
remoteApp, err := proxy.NewRemoteAppConn(addr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Exit(Fmt("Failed to connect to proxy for mempool: %v", err))
|
Exit(Fmt("Failed to connect to proxy for mempool: %v", err))
|
||||||
@ -263,7 +264,7 @@ func getProxyApp(addr string, hash []byte) (proxyAppConn proxy.AppConn) {
|
|||||||
PanicCrisis(Fmt("Error in getting proxyAppConn hash: %v", res))
|
PanicCrisis(Fmt("Error in getting proxyAppConn hash: %v", res))
|
||||||
}
|
}
|
||||||
if !bytes.Equal(hash, res.Data) {
|
if !bytes.Equal(hash, res.Data) {
|
||||||
PanicCrisis(Fmt("ProxyApp hash does not match. Expected %X, got %X", hash, res.Data))
|
log.Warn(Fmt("ProxyApp hash does not match. Expected %X, got %X", hash, res.Data))
|
||||||
}
|
}
|
||||||
|
|
||||||
return proxyAppConn
|
return proxyAppConn
|
||||||
|
@ -12,7 +12,7 @@ type remoteAppConn struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func NewRemoteAppConn(addr string) (*remoteAppConn, error) {
|
func NewRemoteAppConn(addr string) (*remoteAppConn, error) {
|
||||||
client, err := tmspcli.NewClient(addr)
|
client, err := tmspcli.NewClient(addr, false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user