mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-23 09:41:38 +00:00
adapt Tendermint to new abci.Client interface
which was introduced in https://github.com/tendermint/abci/pull/130
This commit is contained in:
@ -12,12 +12,12 @@ type AppConnConsensus interface {
|
||||
SetResponseCallback(abcicli.Callback)
|
||||
Error() error
|
||||
|
||||
InitChainSync(types.RequestInitChain) (err error)
|
||||
InitChainSync(types.RequestInitChain) error
|
||||
|
||||
BeginBlockSync(types.RequestBeginBlock) (err error)
|
||||
BeginBlockSync(types.RequestBeginBlock) error
|
||||
DeliverTxAsync(tx []byte) *abcicli.ReqRes
|
||||
EndBlockSync(height uint64) (types.ResponseEndBlock, error)
|
||||
CommitSync() (res types.Result)
|
||||
EndBlockSync(height uint64) (*types.ResponseEndBlock, error)
|
||||
CommitSync() (*types.ResponseCommit, error)
|
||||
}
|
||||
|
||||
type AppConnMempool interface {
|
||||
@ -33,9 +33,9 @@ type AppConnMempool interface {
|
||||
type AppConnQuery interface {
|
||||
Error() error
|
||||
|
||||
EchoSync(string) (res types.Result)
|
||||
InfoSync(types.RequestInfo) (types.ResponseInfo, error)
|
||||
QuerySync(types.RequestQuery) (types.ResponseQuery, error)
|
||||
EchoSync(string) (*types.ResponseEcho, error)
|
||||
InfoSync(types.RequestInfo) (*types.ResponseInfo, error)
|
||||
QuerySync(types.RequestQuery) (*types.ResponseQuery, error)
|
||||
|
||||
// SetOptionSync(key string, value string) (res types.Result)
|
||||
}
|
||||
@ -61,11 +61,11 @@ func (app *appConnConsensus) Error() error {
|
||||
return app.appConn.Error()
|
||||
}
|
||||
|
||||
func (app *appConnConsensus) InitChainSync(req types.RequestInitChain) (err error) {
|
||||
func (app *appConnConsensus) InitChainSync(req types.RequestInitChain) error {
|
||||
return app.appConn.InitChainSync(req)
|
||||
}
|
||||
|
||||
func (app *appConnConsensus) BeginBlockSync(req types.RequestBeginBlock) (err error) {
|
||||
func (app *appConnConsensus) BeginBlockSync(req types.RequestBeginBlock) error {
|
||||
return app.appConn.BeginBlockSync(req)
|
||||
}
|
||||
|
||||
@ -73,11 +73,11 @@ func (app *appConnConsensus) DeliverTxAsync(tx []byte) *abcicli.ReqRes {
|
||||
return app.appConn.DeliverTxAsync(tx)
|
||||
}
|
||||
|
||||
func (app *appConnConsensus) EndBlockSync(height uint64) (types.ResponseEndBlock, error) {
|
||||
func (app *appConnConsensus) EndBlockSync(height uint64) (*types.ResponseEndBlock, error) {
|
||||
return app.appConn.EndBlockSync(height)
|
||||
}
|
||||
|
||||
func (app *appConnConsensus) CommitSync() (res types.Result) {
|
||||
func (app *appConnConsensus) CommitSync() (*types.ResponseCommit, error) {
|
||||
return app.appConn.CommitSync()
|
||||
}
|
||||
|
||||
@ -131,14 +131,14 @@ func (app *appConnQuery) Error() error {
|
||||
return app.appConn.Error()
|
||||
}
|
||||
|
||||
func (app *appConnQuery) EchoSync(msg string) (res types.Result) {
|
||||
func (app *appConnQuery) EchoSync(msg string) (*types.ResponseEcho, error) {
|
||||
return app.appConn.EchoSync(msg)
|
||||
}
|
||||
|
||||
func (app *appConnQuery) InfoSync(req types.RequestInfo) (types.ResponseInfo, error) {
|
||||
func (app *appConnQuery) InfoSync(req types.RequestInfo) (*types.ResponseInfo, error) {
|
||||
return app.appConn.InfoSync(req)
|
||||
}
|
||||
|
||||
func (app *appConnQuery) QuerySync(reqQuery types.RequestQuery) (types.ResponseQuery, error) {
|
||||
func (app *appConnQuery) QuerySync(reqQuery types.RequestQuery) (*types.ResponseQuery, error) {
|
||||
return app.appConn.QuerySync(reqQuery)
|
||||
}
|
||||
|
Reference in New Issue
Block a user