mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-30 19:51:58 +00:00
update for a new ABCI API
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package proxy
|
||||
|
||||
import (
|
||||
"github.com/pkg/errors"
|
||||
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
)
|
||||
|
||||
@@ -70,25 +72,34 @@ func (app *multiAppConn) Query() AppConnQuery {
|
||||
func (app *multiAppConn) OnStart() error {
|
||||
// query connection
|
||||
querycli, err := app.clientCreator.NewABCIClient()
|
||||
querycli.SetLogger(app.Logger.With("module", "abci-client", "connection", "query"))
|
||||
if err != nil {
|
||||
return err
|
||||
return errors.Wrap(err, "Error creating ABCI client (query connection)")
|
||||
}
|
||||
querycli.SetLogger(app.Logger.With("module", "abci-client", "connection", "query"))
|
||||
if _, err := querycli.Start(); err != nil {
|
||||
return errors.Wrap(err, "Error starting ABCI client (query connection)")
|
||||
}
|
||||
app.queryConn = NewAppConnQuery(querycli)
|
||||
|
||||
// mempool connection
|
||||
memcli, err := app.clientCreator.NewABCIClient()
|
||||
memcli.SetLogger(app.Logger.With("module", "abci-client", "connection", "mempool"))
|
||||
if err != nil {
|
||||
return err
|
||||
return errors.Wrap(err, "Error creating ABCI client (mempool connection)")
|
||||
}
|
||||
memcli.SetLogger(app.Logger.With("module", "abci-client", "connection", "mempool"))
|
||||
if _, err := memcli.Start(); err != nil {
|
||||
return errors.Wrap(err, "Error starting ABCI client (mempool connection)")
|
||||
}
|
||||
app.mempoolConn = NewAppConnMempool(memcli)
|
||||
|
||||
// consensus connection
|
||||
concli, err := app.clientCreator.NewABCIClient()
|
||||
concli.SetLogger(app.Logger.With("module", "abci-client", "connection", "consensus"))
|
||||
if err != nil {
|
||||
return err
|
||||
return errors.Wrap(err, "Error creating ABCI client (consensus connection)")
|
||||
}
|
||||
concli.SetLogger(app.Logger.With("module", "abci-client", "connection", "consensus"))
|
||||
if _, err := concli.Start(); err != nil {
|
||||
return errors.Wrap(err, "Error starting ABCI client (consensus connection)")
|
||||
}
|
||||
app.consensusConn = NewAppConnConsensus(concli)
|
||||
|
||||
@@ -96,5 +107,6 @@ func (app *multiAppConn) OnStart() error {
|
||||
if app.handshaker != nil {
|
||||
return app.handshaker.Handshake(app)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user