mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-02 14:11:37 +00:00
BroadcastTx results
This commit is contained in:
@ -30,18 +30,20 @@ func (app *localAppConn) Error() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (app *localAppConn) EchoAsync(msg string) {
|
||||
func (app *localAppConn) EchoAsync(msg string) *tmspcli.ReqRes {
|
||||
app.Callback(
|
||||
tmsp.RequestEcho(msg),
|
||||
tmsp.ResponseEcho(msg),
|
||||
)
|
||||
return nil // TODO maybe create a ReqRes
|
||||
}
|
||||
|
||||
func (app *localAppConn) FlushAsync() {
|
||||
func (app *localAppConn) FlushAsync() *tmspcli.ReqRes {
|
||||
// Do nothing
|
||||
return nil // TODO maybe create a ReqRes
|
||||
}
|
||||
|
||||
func (app *localAppConn) SetOptionAsync(key string, value string) {
|
||||
func (app *localAppConn) SetOptionAsync(key string, value string) *tmspcli.ReqRes {
|
||||
app.mtx.Lock()
|
||||
log := app.Application.SetOption(key, value)
|
||||
app.mtx.Unlock()
|
||||
@ -49,9 +51,10 @@ func (app *localAppConn) SetOptionAsync(key string, value string) {
|
||||
tmsp.RequestSetOption(key, value),
|
||||
tmsp.ResponseSetOption(log),
|
||||
)
|
||||
return nil // TODO maybe create a ReqRes
|
||||
}
|
||||
|
||||
func (app *localAppConn) AppendTxAsync(tx []byte) {
|
||||
func (app *localAppConn) AppendTxAsync(tx []byte) *tmspcli.ReqRes {
|
||||
app.mtx.Lock()
|
||||
code, result, log := app.Application.AppendTx(tx)
|
||||
app.mtx.Unlock()
|
||||
@ -59,9 +62,10 @@ func (app *localAppConn) AppendTxAsync(tx []byte) {
|
||||
tmsp.RequestAppendTx(tx),
|
||||
tmsp.ResponseAppendTx(code, result, log),
|
||||
)
|
||||
return nil // TODO maybe create a ReqRes
|
||||
}
|
||||
|
||||
func (app *localAppConn) CheckTxAsync(tx []byte) {
|
||||
func (app *localAppConn) CheckTxAsync(tx []byte) *tmspcli.ReqRes {
|
||||
app.mtx.Lock()
|
||||
code, result, log := app.Application.CheckTx(tx)
|
||||
app.mtx.Unlock()
|
||||
@ -69,9 +73,10 @@ func (app *localAppConn) CheckTxAsync(tx []byte) {
|
||||
tmsp.RequestCheckTx(tx),
|
||||
tmsp.ResponseCheckTx(code, result, log),
|
||||
)
|
||||
return nil // TODO maybe create a ReqRes
|
||||
}
|
||||
|
||||
func (app *localAppConn) GetHashAsync() {
|
||||
func (app *localAppConn) GetHashAsync() *tmspcli.ReqRes {
|
||||
app.mtx.Lock()
|
||||
hash, log := app.Application.GetHash()
|
||||
app.mtx.Unlock()
|
||||
@ -79,6 +84,7 @@ func (app *localAppConn) GetHashAsync() {
|
||||
tmsp.RequestGetHash(),
|
||||
tmsp.ResponseGetHash(hash, log),
|
||||
)
|
||||
return nil // TODO maybe create a ReqRes
|
||||
}
|
||||
|
||||
func (app *localAppConn) InfoSync() (info string, err error) {
|
||||
|
Reference in New Issue
Block a user