mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-16 22:51:22 +00:00
AppendTx -> DeliverTx
This commit is contained in:
10
README.md
10
README.md
@ -50,7 +50,7 @@ Note this prefixing does not apply for grpc.
|
|||||||
|
|
||||||
TMSP requests/responses are simple Protobuf messages. Check out the [schema file](https://github.com/tendermint/tmsp/blob/master/types/types.proto).
|
TMSP requests/responses are simple Protobuf messages. Check out the [schema file](https://github.com/tendermint/tmsp/blob/master/types/types.proto).
|
||||||
|
|
||||||
#### AppendTx
|
#### DeliverTx
|
||||||
* __Arguments__:
|
* __Arguments__:
|
||||||
* `Data ([]byte)`: The request transaction bytes
|
* `Data ([]byte)`: The request transaction bytes
|
||||||
* __Returns__:
|
* __Returns__:
|
||||||
@ -71,7 +71,7 @@ TMSP requests/responses are simple Protobuf messages. Check out the [schema fil
|
|||||||
Validate a mempool transaction, prior to broadcasting or proposing. This message should not mutate the main state, but application
|
Validate a mempool transaction, prior to broadcasting or proposing. This message should not mutate the main state, but application
|
||||||
developers may want to keep a separate CheckTx state that gets reset upon Commit.
|
developers may want to keep a separate CheckTx state that gets reset upon Commit.
|
||||||
|
|
||||||
CheckTx can happen interspersed with AppendTx, but they happen on different connections - CheckTx from the mempool connection, and AppendTx from the consensus connection. During Commit, the mempool is locked, so you can reset the mempool state to the latest state after running all those appendtxs, and then the mempool will re run whatever txs it has against that latest mempool stte
|
CheckTx can happen interspersed with DeliverTx, but they happen on different connections - CheckTx from the mempool connection, and DeliverTx from the consensus connection. During Commit, the mempool is locked, so you can reset the mempool state to the latest state after running all those delivertxs, and then the mempool will re run whatever txs it has against that latest mempool stte
|
||||||
|
|
||||||
Transactions are first run through CheckTx before broadcast to peers in the mempool layer.
|
Transactions are first run through CheckTx before broadcast to peers in the mempool layer.
|
||||||
You can make CheckTx semi-stateful and clear the state upon `Commit` or `BeginBlock`,
|
You can make CheckTx semi-stateful and clear the state upon `Commit` or `BeginBlock`,
|
||||||
@ -122,7 +122,7 @@ TMSP requests/responses are simple Protobuf messages. Check out the [schema fil
|
|||||||
* __Arguments__:
|
* __Arguments__:
|
||||||
* `Height (uint64)`: The block height that is starting
|
* `Height (uint64)`: The block height that is starting
|
||||||
* __Usage__:<br/>
|
* __Usage__:<br/>
|
||||||
Signals the beginning of a new block. Called prior to any AppendTxs.
|
Signals the beginning of a new block. Called prior to any DeliverTxs.
|
||||||
|
|
||||||
#### EndBlock
|
#### EndBlock
|
||||||
* __Arguments__:
|
* __Arguments__:
|
||||||
@ -149,7 +149,7 @@ TMSP requests/responses are simple Protobuf messages. Check out the [schema fil
|
|||||||
##### Jan 23th, 2016
|
##### Jan 23th, 2016
|
||||||
|
|
||||||
* Added CheckTx/Query TMSP message types
|
* Added CheckTx/Query TMSP message types
|
||||||
* Added Result/Log fields to AppendTx/CheckTx/SetOption
|
* Added Result/Log fields to DeliverTx/CheckTx/SetOption
|
||||||
* Removed Listener messages
|
* Removed Listener messages
|
||||||
* Removed Code from ResponseSetOption and ResponseGetHash
|
* Removed Code from ResponseSetOption and ResponseGetHash
|
||||||
* Made examples BigEndian
|
* Made examples BigEndian
|
||||||
@ -160,4 +160,4 @@ TMSP requests/responses are simple Protobuf messages. Check out the [schema fil
|
|||||||
|
|
||||||
##### Jan 8th, 2016
|
##### Jan 8th, 2016
|
||||||
|
|
||||||
* Tendermint/TMSP now comes to consensus on the order first before AppendTx.
|
* Tendermint/TMSP now comes to consensus on the order first before DeliverTx.
|
||||||
|
@ -18,7 +18,7 @@ type Client interface {
|
|||||||
EchoAsync(msg string) *ReqRes
|
EchoAsync(msg string) *ReqRes
|
||||||
InfoAsync() *ReqRes
|
InfoAsync() *ReqRes
|
||||||
SetOptionAsync(key string, value string) *ReqRes
|
SetOptionAsync(key string, value string) *ReqRes
|
||||||
AppendTxAsync(tx []byte) *ReqRes
|
DeliverTxAsync(tx []byte) *ReqRes
|
||||||
CheckTxAsync(tx []byte) *ReqRes
|
CheckTxAsync(tx []byte) *ReqRes
|
||||||
QueryAsync(tx []byte) *ReqRes
|
QueryAsync(tx []byte) *ReqRes
|
||||||
CommitAsync() *ReqRes
|
CommitAsync() *ReqRes
|
||||||
@ -27,7 +27,7 @@ type Client interface {
|
|||||||
EchoSync(msg string) (res types.Result)
|
EchoSync(msg string) (res types.Result)
|
||||||
InfoSync() (resInfo types.ResponseInfo, err error)
|
InfoSync() (resInfo types.ResponseInfo, err error)
|
||||||
SetOptionSync(key string, value string) (res types.Result)
|
SetOptionSync(key string, value string) (res types.Result)
|
||||||
AppendTxSync(tx []byte) (res types.Result)
|
DeliverTxSync(tx []byte) (res types.Result)
|
||||||
CheckTxSync(tx []byte) (res types.Result)
|
CheckTxSync(tx []byte) (res types.Result)
|
||||||
QuerySync(tx []byte) (res types.Result)
|
QuerySync(tx []byte) (res types.Result)
|
||||||
CommitSync() (res types.Result)
|
CommitSync() (res types.Result)
|
||||||
|
@ -155,13 +155,13 @@ func (cli *grpcClient) SetOptionAsync(key string, value string) *ReqRes {
|
|||||||
return cli.finishAsyncCall(req, &types.Response{&types.Response_SetOption{res}})
|
return cli.finishAsyncCall(req, &types.Response{&types.Response_SetOption{res}})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cli *grpcClient) AppendTxAsync(tx []byte) *ReqRes {
|
func (cli *grpcClient) DeliverTxAsync(tx []byte) *ReqRes {
|
||||||
req := types.ToRequestAppendTx(tx)
|
req := types.ToRequestDeliverTx(tx)
|
||||||
res, err := cli.client.AppendTx(context.Background(), req.GetAppendTx(), grpc.FailFast(true))
|
res, err := cli.client.DeliverTx(context.Background(), req.GetDeliverTx(), grpc.FailFast(true))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
cli.StopForError(err)
|
cli.StopForError(err)
|
||||||
}
|
}
|
||||||
return cli.finishAsyncCall(req, &types.Response{&types.Response_AppendTx{res}})
|
return cli.finishAsyncCall(req, &types.Response{&types.Response_DeliverTx{res}})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cli *grpcClient) CheckTxAsync(tx []byte) *ReqRes {
|
func (cli *grpcClient) CheckTxAsync(tx []byte) *ReqRes {
|
||||||
@ -283,12 +283,12 @@ func (cli *grpcClient) SetOptionSync(key string, value string) (res types.Result
|
|||||||
return types.Result{Code: OK, Data: nil, Log: resp.Log}
|
return types.Result{Code: OK, Data: nil, Log: resp.Log}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cli *grpcClient) AppendTxSync(tx []byte) (res types.Result) {
|
func (cli *grpcClient) DeliverTxSync(tx []byte) (res types.Result) {
|
||||||
reqres := cli.AppendTxAsync(tx)
|
reqres := cli.DeliverTxAsync(tx)
|
||||||
if res := cli.checkErrGetResult(); res.IsErr() {
|
if res := cli.checkErrGetResult(); res.IsErr() {
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
resp := reqres.Response.GetAppendTx()
|
resp := reqres.Response.GetDeliverTx()
|
||||||
return types.Result{Code: resp.Code, Data: resp.Data, Log: resp.Log}
|
return types.Result{Code: resp.Code, Data: resp.Data, Log: resp.Log}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,13 +69,13 @@ func (app *localClient) SetOptionAsync(key string, value string) *ReqRes {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (app *localClient) AppendTxAsync(tx []byte) *ReqRes {
|
func (app *localClient) DeliverTxAsync(tx []byte) *ReqRes {
|
||||||
app.mtx.Lock()
|
app.mtx.Lock()
|
||||||
res := app.Application.AppendTx(tx)
|
res := app.Application.DeliverTx(tx)
|
||||||
app.mtx.Unlock()
|
app.mtx.Unlock()
|
||||||
return app.callback(
|
return app.callback(
|
||||||
types.ToRequestAppendTx(tx),
|
types.ToRequestDeliverTx(tx),
|
||||||
types.ToResponseAppendTx(res.Code, res.Data, res.Log),
|
types.ToResponseDeliverTx(res.Code, res.Data, res.Log),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,9 +171,9 @@ func (app *localClient) SetOptionSync(key string, value string) (res types.Resul
|
|||||||
return types.OK.SetLog(log)
|
return types.OK.SetLog(log)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (app *localClient) AppendTxSync(tx []byte) (res types.Result) {
|
func (app *localClient) DeliverTxSync(tx []byte) (res types.Result) {
|
||||||
app.mtx.Lock()
|
app.mtx.Lock()
|
||||||
res = app.Application.AppendTx(tx)
|
res = app.Application.DeliverTx(tx)
|
||||||
app.mtx.Unlock()
|
app.mtx.Unlock()
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
@ -243,8 +243,8 @@ func (cli *socketClient) SetOptionAsync(key string, value string) *ReqRes {
|
|||||||
return cli.queueRequest(types.ToRequestSetOption(key, value))
|
return cli.queueRequest(types.ToRequestSetOption(key, value))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cli *socketClient) AppendTxAsync(tx []byte) *ReqRes {
|
func (cli *socketClient) DeliverTxAsync(tx []byte) *ReqRes {
|
||||||
return cli.queueRequest(types.ToRequestAppendTx(tx))
|
return cli.queueRequest(types.ToRequestDeliverTx(tx))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cli *socketClient) CheckTxAsync(tx []byte) *ReqRes {
|
func (cli *socketClient) CheckTxAsync(tx []byte) *ReqRes {
|
||||||
@ -315,13 +315,13 @@ func (cli *socketClient) SetOptionSync(key string, value string) (res types.Resu
|
|||||||
return types.Result{Code: OK, Data: nil, Log: resp.Log}
|
return types.Result{Code: OK, Data: nil, Log: resp.Log}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cli *socketClient) AppendTxSync(tx []byte) (res types.Result) {
|
func (cli *socketClient) DeliverTxSync(tx []byte) (res types.Result) {
|
||||||
reqres := cli.queueRequest(types.ToRequestAppendTx(tx))
|
reqres := cli.queueRequest(types.ToRequestDeliverTx(tx))
|
||||||
cli.FlushSync()
|
cli.FlushSync()
|
||||||
if err := cli.Error(); err != nil {
|
if err := cli.Error(); err != nil {
|
||||||
return types.ErrInternalError.SetLog(err.Error())
|
return types.ErrInternalError.SetLog(err.Error())
|
||||||
}
|
}
|
||||||
resp := reqres.Response.GetAppendTx()
|
resp := reqres.Response.GetDeliverTx()
|
||||||
return types.Result{Code: resp.Code, Data: resp.Data, Log: resp.Log}
|
return types.Result{Code: resp.Code, Data: resp.Data, Log: resp.Log}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -429,8 +429,8 @@ func resMatchesReq(req *types.Request, res *types.Response) (ok bool) {
|
|||||||
_, ok = res.Value.(*types.Response_Info)
|
_, ok = res.Value.(*types.Response_Info)
|
||||||
case *types.Request_SetOption:
|
case *types.Request_SetOption:
|
||||||
_, ok = res.Value.(*types.Response_SetOption)
|
_, ok = res.Value.(*types.Response_SetOption)
|
||||||
case *types.Request_AppendTx:
|
case *types.Request_DeliverTx:
|
||||||
_, ok = res.Value.(*types.Response_AppendTx)
|
_, ok = res.Value.(*types.Response_DeliverTx)
|
||||||
case *types.Request_CheckTx:
|
case *types.Request_CheckTx:
|
||||||
_, ok = res.Value.(*types.Response_CheckTx)
|
_, ok = res.Value.(*types.Response_CheckTx)
|
||||||
case *types.Request_Commit:
|
case *types.Request_Commit:
|
||||||
|
@ -104,10 +104,10 @@ func main() {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "append_tx",
|
Name: "deliver_tx",
|
||||||
Usage: "Append a new tx to application",
|
Usage: "Deliver a new tx to application",
|
||||||
Action: func(c *cli.Context) error {
|
Action: func(c *cli.Context) error {
|
||||||
return cmdAppendTx(c)
|
return cmdDeliverTx(c)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -250,16 +250,16 @@ func cmdSetOption(c *cli.Context) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Append a new tx to application
|
// Append a new tx to application
|
||||||
func cmdAppendTx(c *cli.Context) error {
|
func cmdDeliverTx(c *cli.Context) error {
|
||||||
args := c.Args()
|
args := c.Args()
|
||||||
if len(args) != 1 {
|
if len(args) != 1 {
|
||||||
return errors.New("Command append_tx takes 1 argument")
|
return errors.New("Command deliver_tx takes 1 argument")
|
||||||
}
|
}
|
||||||
txBytes, err := stringOrHexToBytes(c.Args()[0])
|
txBytes, err := stringOrHexToBytes(c.Args()[0])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
res := client.AppendTxSync(txBytes)
|
res := client.DeliverTxSync(txBytes)
|
||||||
rsp := newResponse(res, string(res.Data), true)
|
rsp := newResponse(res, string(res.Data), true)
|
||||||
printResponse(c, rsp)
|
printResponse(c, rsp)
|
||||||
return nil
|
return nil
|
||||||
|
@ -45,7 +45,7 @@ func (app *ChainAwareApplication) SetOption(key string, value string) (log strin
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (app *ChainAwareApplication) AppendTx(tx []byte) types.Result {
|
func (app *ChainAwareApplication) DeliverTx(tx []byte) types.Result {
|
||||||
return types.NewResultOK(nil, "")
|
return types.NewResultOK(nil, "")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ func (app *CounterApplication) SetOption(key string, value string) (log string)
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (app *CounterApplication) AppendTx(tx []byte) types.Result {
|
func (app *CounterApplication) DeliverTx(tx []byte) types.Result {
|
||||||
if app.serial {
|
if app.serial {
|
||||||
if len(tx) > 8 {
|
if len(tx) > 8 {
|
||||||
return types.ErrEncodingError.SetLog(Fmt("Max tx size is 8 bytes, got %d", len(tx)))
|
return types.ErrEncodingError.SetLog(Fmt("Max tx size is 8 bytes, got %d", len(tx)))
|
||||||
|
@ -28,7 +28,7 @@ func (app *DummyApplication) SetOption(key string, value string) (log string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// tx is either "key=value" or just arbitrary bytes
|
// tx is either "key=value" or just arbitrary bytes
|
||||||
func (app *DummyApplication) AppendTx(tx []byte) types.Result {
|
func (app *DummyApplication) DeliverTx(tx []byte) types.Result {
|
||||||
parts := strings.Split(string(tx), "=")
|
parts := strings.Split(string(tx), "=")
|
||||||
if len(parts) == 2 {
|
if len(parts) == 2 {
|
||||||
app.state.Set([]byte(parts[0]), []byte(parts[1]))
|
app.state.Set([]byte(parts[0]), []byte(parts[1]))
|
||||||
|
@ -13,10 +13,10 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func testDummy(t *testing.T, dummy types.Application, tx []byte, key, value string) {
|
func testDummy(t *testing.T, dummy types.Application, tx []byte, key, value string) {
|
||||||
if r := dummy.AppendTx(tx); r.IsErr() {
|
if r := dummy.DeliverTx(tx); r.IsErr() {
|
||||||
t.Fatal(r)
|
t.Fatal(r)
|
||||||
}
|
}
|
||||||
if r := dummy.AppendTx(tx); r.IsErr() {
|
if r := dummy.DeliverTx(tx); r.IsErr() {
|
||||||
t.Fatal(r)
|
t.Fatal(r)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,7 +175,7 @@ func makeApplyBlock(t *testing.T, dummy types.Application, heightInt int, diff [
|
|||||||
dummyChain := dummy.(types.BlockchainAware) // hmm...
|
dummyChain := dummy.(types.BlockchainAware) // hmm...
|
||||||
dummyChain.BeginBlock(hash, header)
|
dummyChain.BeginBlock(hash, header)
|
||||||
for _, tx := range txs {
|
for _, tx := range txs {
|
||||||
if r := dummy.AppendTx(tx); r.IsErr() {
|
if r := dummy.DeliverTx(tx); r.IsErr() {
|
||||||
t.Fatal(r)
|
t.Fatal(r)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ func (app *PersistentDummyApplication) SetOption(key string, value string) (log
|
|||||||
}
|
}
|
||||||
|
|
||||||
// tx is either "key=value" or just arbitrary bytes
|
// tx is either "key=value" or just arbitrary bytes
|
||||||
func (app *PersistentDummyApplication) AppendTx(tx []byte) types.Result {
|
func (app *PersistentDummyApplication) DeliverTx(tx []byte) types.Result {
|
||||||
// if it starts with "val:", update the validator set
|
// if it starts with "val:", update the validator set
|
||||||
// format is "val:pubkey/power"
|
// format is "val:pubkey/power"
|
||||||
if isValidatorTx(tx) {
|
if isValidatorTx(tx) {
|
||||||
@ -69,7 +69,7 @@ func (app *PersistentDummyApplication) AppendTx(tx []byte) types.Result {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// otherwise, update the key-value store
|
// otherwise, update the key-value store
|
||||||
return app.app.AppendTx(tx)
|
return app.app.DeliverTx(tx)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (app *PersistentDummyApplication) CheckTx(tx []byte) types.Result {
|
func (app *PersistentDummyApplication) CheckTx(tx []byte) types.Result {
|
||||||
|
@ -35,7 +35,7 @@ func TestGRPC(t *testing.T) {
|
|||||||
|
|
||||||
func testStream(t *testing.T, app types.Application) {
|
func testStream(t *testing.T, app types.Application) {
|
||||||
|
|
||||||
numAppendTxs := 200000
|
numDeliverTxs := 200000
|
||||||
|
|
||||||
// Start the listener
|
// Start the listener
|
||||||
server, err := server.NewSocketServer("unix://test.sock", app)
|
server, err := server.NewSocketServer("unix://test.sock", app)
|
||||||
@ -57,15 +57,15 @@ func testStream(t *testing.T, app types.Application) {
|
|||||||
client.SetResponseCallback(func(req *types.Request, res *types.Response) {
|
client.SetResponseCallback(func(req *types.Request, res *types.Response) {
|
||||||
// Process response
|
// Process response
|
||||||
switch r := res.Value.(type) {
|
switch r := res.Value.(type) {
|
||||||
case *types.Response_AppendTx:
|
case *types.Response_DeliverTx:
|
||||||
counter += 1
|
counter += 1
|
||||||
if r.AppendTx.Code != types.CodeType_OK {
|
if r.DeliverTx.Code != types.CodeType_OK {
|
||||||
t.Error("AppendTx failed with ret_code", r.AppendTx.Code)
|
t.Error("DeliverTx failed with ret_code", r.DeliverTx.Code)
|
||||||
}
|
}
|
||||||
if counter > numAppendTxs {
|
if counter > numDeliverTxs {
|
||||||
t.Fatalf("Too many AppendTx responses. Got %d, expected %d", counter, numAppendTxs)
|
t.Fatalf("Too many DeliverTx responses. Got %d, expected %d", counter, numDeliverTxs)
|
||||||
}
|
}
|
||||||
if counter == numAppendTxs {
|
if counter == numDeliverTxs {
|
||||||
go func() {
|
go func() {
|
||||||
time.Sleep(time.Second * 2) // Wait for a bit to allow counter overflow
|
time.Sleep(time.Second * 2) // Wait for a bit to allow counter overflow
|
||||||
close(done)
|
close(done)
|
||||||
@ -80,9 +80,9 @@ func testStream(t *testing.T, app types.Application) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Write requests
|
// Write requests
|
||||||
for counter := 0; counter < numAppendTxs; counter++ {
|
for counter := 0; counter < numDeliverTxs; counter++ {
|
||||||
// Send request
|
// Send request
|
||||||
reqRes := client.AppendTxAsync([]byte("test"))
|
reqRes := client.DeliverTxAsync([]byte("test"))
|
||||||
_ = reqRes
|
_ = reqRes
|
||||||
// check err ?
|
// check err ?
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ func dialerFunc(addr string, timeout time.Duration) (net.Conn, error) {
|
|||||||
|
|
||||||
func testGRPCSync(t *testing.T, app *types.GRPCApplication) {
|
func testGRPCSync(t *testing.T, app *types.GRPCApplication) {
|
||||||
|
|
||||||
numAppendTxs := 2000
|
numDeliverTxs := 2000
|
||||||
|
|
||||||
// Start the listener
|
// Start the listener
|
||||||
server, err := server.NewGRPCServer("unix://test.sock", app)
|
server, err := server.NewGRPCServer("unix://test.sock", app)
|
||||||
@ -127,21 +127,21 @@ func testGRPCSync(t *testing.T, app *types.GRPCApplication) {
|
|||||||
client := types.NewTMSPApplicationClient(conn)
|
client := types.NewTMSPApplicationClient(conn)
|
||||||
|
|
||||||
// Write requests
|
// Write requests
|
||||||
for counter := 0; counter < numAppendTxs; counter++ {
|
for counter := 0; counter < numDeliverTxs; counter++ {
|
||||||
// Send request
|
// Send request
|
||||||
response, err := client.AppendTx(context.Background(), &types.RequestAppendTx{[]byte("test")})
|
response, err := client.DeliverTx(context.Background(), &types.RequestDeliverTx{[]byte("test")})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Error in GRPC AppendTx: %v", err.Error())
|
t.Fatalf("Error in GRPC DeliverTx: %v", err.Error())
|
||||||
}
|
}
|
||||||
counter += 1
|
counter += 1
|
||||||
if response.Code != types.CodeType_OK {
|
if response.Code != types.CodeType_OK {
|
||||||
t.Error("AppendTx failed with ret_code", response.Code)
|
t.Error("DeliverTx failed with ret_code", response.Code)
|
||||||
}
|
}
|
||||||
if counter > numAppendTxs {
|
if counter > numDeliverTxs {
|
||||||
t.Fatal("Too many AppendTx responses")
|
t.Fatal("Too many DeliverTx responses")
|
||||||
}
|
}
|
||||||
t.Log("response", counter)
|
t.Log("response", counter)
|
||||||
if counter == numAppendTxs {
|
if counter == numDeliverTxs {
|
||||||
go func() {
|
go func() {
|
||||||
time.Sleep(time.Second * 2) // Wait for a bit to allow counter overflow
|
time.Sleep(time.Second * 2) // Wait for a bit to allow counter overflow
|
||||||
}()
|
}()
|
||||||
|
@ -19,7 +19,7 @@ func (app *NilApplication) SetOption(key string, value string) (log string) {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (app *NilApplication) AppendTx(tx []byte) types.Result {
|
func (app *NilApplication) DeliverTx(tx []byte) types.Result {
|
||||||
return types.NewResultOK(nil, "")
|
return types.NewResultOK(nil, "")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ class CounterApplication():
|
|||||||
self.serial = True
|
self.serial = True
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def append_tx(self, txBytes):
|
def deliver_tx(self, txBytes):
|
||||||
if self.serial:
|
if self.serial:
|
||||||
txByteArray = bytearray(txBytes)
|
txByteArray = bytearray(txBytes)
|
||||||
if len(txBytes) >= 2 and txBytes[:2] == "0x":
|
if len(txBytes) >= 2 and txBytes[:2] == "0x":
|
||||||
|
@ -6,7 +6,7 @@ message_types = {
|
|||||||
0x02: "flush",
|
0x02: "flush",
|
||||||
0x03: "info",
|
0x03: "info",
|
||||||
0x04: "set_option",
|
0x04: "set_option",
|
||||||
0x21: "append_tx",
|
0x21: "deliver_tx",
|
||||||
0x22: "check_tx",
|
0x22: "check_tx",
|
||||||
0x23: "commit",
|
0x23: "commit",
|
||||||
0x24: "add_listener",
|
0x24: "add_listener",
|
||||||
@ -32,7 +32,7 @@ class RequestDecoder():
|
|||||||
def set_option(self):
|
def set_option(self):
|
||||||
return decode_string(self.reader), decode_string(self.reader)
|
return decode_string(self.reader), decode_string(self.reader)
|
||||||
|
|
||||||
def append_tx(self):
|
def deliver_tx(self):
|
||||||
return decode_string(self.reader)
|
return decode_string(self.reader)
|
||||||
|
|
||||||
def check_tx(self):
|
def check_tx(self):
|
||||||
|
@ -24,7 +24,7 @@ class CounterApplication():
|
|||||||
self.serial = True
|
self.serial = True
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def append_tx(self, txBytes):
|
def deliver_tx(self, txBytes):
|
||||||
if self.serial:
|
if self.serial:
|
||||||
txByteArray = bytearray(txBytes)
|
txByteArray = bytearray(txBytes)
|
||||||
if len(txBytes) >= 2 and txBytes[:2] == "0x":
|
if len(txBytes) >= 2 and txBytes[:2] == "0x":
|
||||||
|
@ -6,7 +6,7 @@ message_types = {
|
|||||||
0x02: "flush",
|
0x02: "flush",
|
||||||
0x03: "info",
|
0x03: "info",
|
||||||
0x04: "set_option",
|
0x04: "set_option",
|
||||||
0x21: "append_tx",
|
0x21: "deliver_tx",
|
||||||
0x22: "check_tx",
|
0x22: "check_tx",
|
||||||
0x23: "commit",
|
0x23: "commit",
|
||||||
0x24: "add_listener",
|
0x24: "add_listener",
|
||||||
@ -32,7 +32,7 @@ class RequestDecoder():
|
|||||||
def set_option(self):
|
def set_option(self):
|
||||||
return decode_string(self.reader), decode_string(self.reader)
|
return decode_string(self.reader), decode_string(self.reader)
|
||||||
|
|
||||||
def append_tx(self):
|
def deliver_tx(self):
|
||||||
return decode_string(self.reader)
|
return decode_string(self.reader)
|
||||||
|
|
||||||
def check_tx(self):
|
def check_tx(self):
|
||||||
|
@ -174,9 +174,9 @@ func (s *SocketServer) handleRequest(req *types.Request, responses chan<- *types
|
|||||||
so := r.SetOption
|
so := r.SetOption
|
||||||
logStr := s.app.SetOption(so.Key, so.Value)
|
logStr := s.app.SetOption(so.Key, so.Value)
|
||||||
responses <- types.ToResponseSetOption(logStr)
|
responses <- types.ToResponseSetOption(logStr)
|
||||||
case *types.Request_AppendTx:
|
case *types.Request_DeliverTx:
|
||||||
res := s.app.AppendTx(r.AppendTx.Tx)
|
res := s.app.DeliverTx(r.DeliverTx.Tx)
|
||||||
responses <- types.ToResponseAppendTx(res.Code, res.Data, res.Log)
|
responses <- types.ToResponseDeliverTx(res.Code, res.Data, res.Log)
|
||||||
case *types.Request_CheckTx:
|
case *types.Request_CheckTx:
|
||||||
res := s.app.CheckTx(r.CheckTx.Tx)
|
res := s.app.CheckTx(r.CheckTx.Tx)
|
||||||
responses <- types.ToResponseCheckTx(res.Code, res.Data, res.Log)
|
responses <- types.ToResponseCheckTx(res.Code, res.Data, res.Log)
|
||||||
|
@ -62,15 +62,15 @@ func Commit(client tmspcli.Client, hashExp []byte) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func AppendTx(client tmspcli.Client, txBytes []byte, codeExp types.CodeType, dataExp []byte) {
|
func DeliverTx(client tmspcli.Client, txBytes []byte, codeExp types.CodeType, dataExp []byte) {
|
||||||
res := client.AppendTxSync(txBytes)
|
res := client.DeliverTxSync(txBytes)
|
||||||
code, data, log := res.Code, res.Data, res.Log
|
code, data, log := res.Code, res.Data, res.Log
|
||||||
if code != codeExp {
|
if code != codeExp {
|
||||||
panic(Fmt("AppendTx response code was unexpected. Got %v expected %v. Log: %v",
|
panic(Fmt("DeliverTx response code was unexpected. Got %v expected %v. Log: %v",
|
||||||
code, codeExp, log))
|
code, codeExp, log))
|
||||||
}
|
}
|
||||||
if !bytes.Equal(data, dataExp) {
|
if !bytes.Equal(data, dataExp) {
|
||||||
panic(Fmt("AppendTx response data was unexpected. Got %X expected %X",
|
panic(Fmt("DeliverTx response data was unexpected. Got %X expected %X",
|
||||||
data, dataExp))
|
data, dataExp))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,15 +34,15 @@ func testCounter() {
|
|||||||
|
|
||||||
SetOption(client, "serial", "on")
|
SetOption(client, "serial", "on")
|
||||||
Commit(client, nil)
|
Commit(client, nil)
|
||||||
AppendTx(client, []byte("abc"), types.CodeType_BadNonce, nil)
|
DeliverTx(client, []byte("abc"), types.CodeType_BadNonce, nil)
|
||||||
Commit(client, nil)
|
Commit(client, nil)
|
||||||
AppendTx(client, []byte{0x00}, types.CodeType_OK, nil)
|
DeliverTx(client, []byte{0x00}, types.CodeType_OK, nil)
|
||||||
Commit(client, []byte{0, 0, 0, 0, 0, 0, 0, 1})
|
Commit(client, []byte{0, 0, 0, 0, 0, 0, 0, 1})
|
||||||
AppendTx(client, []byte{0x00}, types.CodeType_BadNonce, nil)
|
DeliverTx(client, []byte{0x00}, types.CodeType_BadNonce, nil)
|
||||||
AppendTx(client, []byte{0x01}, types.CodeType_OK, nil)
|
DeliverTx(client, []byte{0x01}, types.CodeType_OK, nil)
|
||||||
AppendTx(client, []byte{0x00, 0x02}, types.CodeType_OK, nil)
|
DeliverTx(client, []byte{0x00, 0x02}, types.CodeType_OK, nil)
|
||||||
AppendTx(client, []byte{0x00, 0x03}, types.CodeType_OK, nil)
|
DeliverTx(client, []byte{0x00, 0x03}, types.CodeType_OK, nil)
|
||||||
AppendTx(client, []byte{0x00, 0x00, 0x04}, types.CodeType_OK, nil)
|
DeliverTx(client, []byte{0x00, 0x00, 0x04}, types.CodeType_OK, nil)
|
||||||
AppendTx(client, []byte{0x00, 0x00, 0x06}, types.CodeType_BadNonce, nil)
|
DeliverTx(client, []byte{0x00, 0x00, 0x06}, types.CodeType_BadNonce, nil)
|
||||||
Commit(client, []byte{0, 0, 0, 0, 0, 0, 0, 5})
|
Commit(client, []byte{0, 0, 0, 0, 0, 0, 0, 5})
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
echo hello
|
echo hello
|
||||||
info
|
info
|
||||||
commit
|
commit
|
||||||
append_tx "abc"
|
deliver_tx "abc"
|
||||||
info
|
info
|
||||||
commit
|
commit
|
||||||
query "abc"
|
query "abc"
|
||||||
append_tx "def=xyz"
|
deliver_tx "def=xyz"
|
||||||
commit
|
commit
|
||||||
query "def"
|
query "def"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
> commit
|
> commit
|
||||||
-> data: 0x
|
-> data: 0x
|
||||||
|
|
||||||
> append_tx "abc"
|
> deliver_tx "abc"
|
||||||
-> code: OK
|
-> code: OK
|
||||||
|
|
||||||
> info
|
> info
|
||||||
@ -20,7 +20,7 @@
|
|||||||
-> code: OK
|
-> code: OK
|
||||||
-> data: {"index":0,"value":"abc","valueHex":"616263","exists":true}
|
-> data: {"index":0,"value":"abc","valueHex":"616263","exists":true}
|
||||||
|
|
||||||
> append_tx "def=xyz"
|
> deliver_tx "def=xyz"
|
||||||
-> code: OK
|
-> code: OK
|
||||||
|
|
||||||
> commit
|
> commit
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
set_option serial on
|
set_option serial on
|
||||||
check_tx 0x00
|
check_tx 0x00
|
||||||
check_tx 0xff
|
check_tx 0xff
|
||||||
append_tx 0x00
|
deliver_tx 0x00
|
||||||
check_tx 0x00
|
check_tx 0x00
|
||||||
append_tx 0x01
|
deliver_tx 0x01
|
||||||
append_tx 0x04
|
deliver_tx 0x04
|
||||||
info
|
info
|
||||||
|
@ -7,17 +7,17 @@
|
|||||||
> check_tx 0xff
|
> check_tx 0xff
|
||||||
-> code: OK
|
-> code: OK
|
||||||
|
|
||||||
> append_tx 0x00
|
> deliver_tx 0x00
|
||||||
-> code: OK
|
-> code: OK
|
||||||
|
|
||||||
> check_tx 0x00
|
> check_tx 0x00
|
||||||
-> code: BadNonce
|
-> code: BadNonce
|
||||||
-> log: Invalid nonce. Expected >= 1, got 0
|
-> log: Invalid nonce. Expected >= 1, got 0
|
||||||
|
|
||||||
> append_tx 0x01
|
> deliver_tx 0x01
|
||||||
-> code: OK
|
-> code: OK
|
||||||
|
|
||||||
> append_tx 0x04
|
> deliver_tx 0x04
|
||||||
-> code: BadNonce
|
-> code: BadNonce
|
||||||
-> log: Invalid nonce. Expected 2, got 4
|
-> log: Invalid nonce. Expected 2, got 4
|
||||||
|
|
||||||
|
@ -13,8 +13,8 @@ type Application interface {
|
|||||||
// Set application option (e.g. mode=mempool, mode=consensus)
|
// Set application option (e.g. mode=mempool, mode=consensus)
|
||||||
SetOption(key string, value string) (log string)
|
SetOption(key string, value string) (log string)
|
||||||
|
|
||||||
// Append a tx
|
// Deliver a tx
|
||||||
AppendTx(tx []byte) Result
|
DeliverTx(tx []byte) Result
|
||||||
|
|
||||||
// Validate a tx for the mempool
|
// Validate a tx for the mempool
|
||||||
CheckTx(tx []byte) Result
|
CheckTx(tx []byte) Result
|
||||||
@ -67,9 +67,9 @@ func (app *GRPCApplication) SetOption(ctx context.Context, req *RequestSetOption
|
|||||||
return &ResponseSetOption{app.app.SetOption(req.Key, req.Value)}, nil
|
return &ResponseSetOption{app.app.SetOption(req.Key, req.Value)}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (app *GRPCApplication) AppendTx(ctx context.Context, req *RequestAppendTx) (*ResponseAppendTx, error) {
|
func (app *GRPCApplication) DeliverTx(ctx context.Context, req *RequestDeliverTx) (*ResponseDeliverTx, error) {
|
||||||
r := app.app.AppendTx(req.Tx)
|
r := app.app.DeliverTx(req.Tx)
|
||||||
return &ResponseAppendTx{r.Code, r.Data, r.Log}, nil
|
return &ResponseDeliverTx{r.Code, r.Data, r.Log}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (app *GRPCApplication) CheckTx(ctx context.Context, req *RequestCheckTx) (*ResponseCheckTx, error) {
|
func (app *GRPCApplication) CheckTx(ctx context.Context, req *RequestCheckTx) (*ResponseCheckTx, error) {
|
||||||
|
@ -31,9 +31,9 @@ func ToRequestSetOption(key string, value string) *Request {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func ToRequestAppendTx(txBytes []byte) *Request {
|
func ToRequestDeliverTx(txBytes []byte) *Request {
|
||||||
return &Request{
|
return &Request{
|
||||||
Value: &Request_AppendTx{&RequestAppendTx{txBytes}},
|
Value: &Request_DeliverTx{&RequestDeliverTx{txBytes}},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,9 +105,9 @@ func ToResponseSetOption(log string) *Response {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func ToResponseAppendTx(code CodeType, data []byte, log string) *Response {
|
func ToResponseDeliverTx(code CodeType, data []byte, log string) *Response {
|
||||||
return &Response{
|
return &Response{
|
||||||
Value: &Response_AppendTx{&ResponseAppendTx{code, data, log}},
|
Value: &Response_DeliverTx{&ResponseDeliverTx{code, data, log}},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ It has these top-level messages:
|
|||||||
RequestFlush
|
RequestFlush
|
||||||
RequestInfo
|
RequestInfo
|
||||||
RequestSetOption
|
RequestSetOption
|
||||||
RequestAppendTx
|
RequestDeliverTx
|
||||||
RequestCheckTx
|
RequestCheckTx
|
||||||
RequestQuery
|
RequestQuery
|
||||||
RequestCommit
|
RequestCommit
|
||||||
@ -27,7 +27,7 @@ It has these top-level messages:
|
|||||||
ResponseFlush
|
ResponseFlush
|
||||||
ResponseInfo
|
ResponseInfo
|
||||||
ResponseSetOption
|
ResponseSetOption
|
||||||
ResponseAppendTx
|
ResponseDeliverTx
|
||||||
ResponseCheckTx
|
ResponseCheckTx
|
||||||
ResponseQuery
|
ResponseQuery
|
||||||
ResponseCommit
|
ResponseCommit
|
||||||
@ -74,7 +74,7 @@ const (
|
|||||||
MessageType_Info MessageType = 3
|
MessageType_Info MessageType = 3
|
||||||
MessageType_SetOption MessageType = 4
|
MessageType_SetOption MessageType = 4
|
||||||
MessageType_Exception MessageType = 5
|
MessageType_Exception MessageType = 5
|
||||||
MessageType_AppendTx MessageType = 17
|
MessageType_DeliverTx MessageType = 17
|
||||||
MessageType_CheckTx MessageType = 18
|
MessageType_CheckTx MessageType = 18
|
||||||
MessageType_Commit MessageType = 19
|
MessageType_Commit MessageType = 19
|
||||||
MessageType_Query MessageType = 20
|
MessageType_Query MessageType = 20
|
||||||
@ -90,7 +90,7 @@ var MessageType_name = map[int32]string{
|
|||||||
3: "Info",
|
3: "Info",
|
||||||
4: "SetOption",
|
4: "SetOption",
|
||||||
5: "Exception",
|
5: "Exception",
|
||||||
17: "AppendTx",
|
17: "DeliverTx",
|
||||||
18: "CheckTx",
|
18: "CheckTx",
|
||||||
19: "Commit",
|
19: "Commit",
|
||||||
20: "Query",
|
20: "Query",
|
||||||
@ -105,7 +105,7 @@ var MessageType_value = map[string]int32{
|
|||||||
"Info": 3,
|
"Info": 3,
|
||||||
"SetOption": 4,
|
"SetOption": 4,
|
||||||
"Exception": 5,
|
"Exception": 5,
|
||||||
"AppendTx": 17,
|
"DeliverTx": 17,
|
||||||
"CheckTx": 18,
|
"CheckTx": 18,
|
||||||
"Commit": 19,
|
"Commit": 19,
|
||||||
"Query": 20,
|
"Query": 20,
|
||||||
@ -233,7 +233,7 @@ type Request struct {
|
|||||||
// *Request_Flush
|
// *Request_Flush
|
||||||
// *Request_Info
|
// *Request_Info
|
||||||
// *Request_SetOption
|
// *Request_SetOption
|
||||||
// *Request_AppendTx
|
// *Request_DeliverTx
|
||||||
// *Request_CheckTx
|
// *Request_CheckTx
|
||||||
// *Request_Commit
|
// *Request_Commit
|
||||||
// *Request_Query
|
// *Request_Query
|
||||||
@ -264,8 +264,8 @@ type Request_Info struct {
|
|||||||
type Request_SetOption struct {
|
type Request_SetOption struct {
|
||||||
SetOption *RequestSetOption `protobuf:"bytes,4,opt,name=set_option,json=setOption,oneof"`
|
SetOption *RequestSetOption `protobuf:"bytes,4,opt,name=set_option,json=setOption,oneof"`
|
||||||
}
|
}
|
||||||
type Request_AppendTx struct {
|
type Request_DeliverTx struct {
|
||||||
AppendTx *RequestAppendTx `protobuf:"bytes,5,opt,name=append_tx,json=appendTx,oneof"`
|
DeliverTx *RequestDeliverTx `protobuf:"bytes,5,opt,name=deliver_tx,json=deliverTx,oneof"`
|
||||||
}
|
}
|
||||||
type Request_CheckTx struct {
|
type Request_CheckTx struct {
|
||||||
CheckTx *RequestCheckTx `protobuf:"bytes,6,opt,name=check_tx,json=checkTx,oneof"`
|
CheckTx *RequestCheckTx `protobuf:"bytes,6,opt,name=check_tx,json=checkTx,oneof"`
|
||||||
@ -290,7 +290,7 @@ func (*Request_Echo) isRequest_Value() {}
|
|||||||
func (*Request_Flush) isRequest_Value() {}
|
func (*Request_Flush) isRequest_Value() {}
|
||||||
func (*Request_Info) isRequest_Value() {}
|
func (*Request_Info) isRequest_Value() {}
|
||||||
func (*Request_SetOption) isRequest_Value() {}
|
func (*Request_SetOption) isRequest_Value() {}
|
||||||
func (*Request_AppendTx) isRequest_Value() {}
|
func (*Request_DeliverTx) isRequest_Value() {}
|
||||||
func (*Request_CheckTx) isRequest_Value() {}
|
func (*Request_CheckTx) isRequest_Value() {}
|
||||||
func (*Request_Commit) isRequest_Value() {}
|
func (*Request_Commit) isRequest_Value() {}
|
||||||
func (*Request_Query) isRequest_Value() {}
|
func (*Request_Query) isRequest_Value() {}
|
||||||
@ -333,9 +333,9 @@ func (m *Request) GetSetOption() *RequestSetOption {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Request) GetAppendTx() *RequestAppendTx {
|
func (m *Request) GetDeliverTx() *RequestDeliverTx {
|
||||||
if x, ok := m.GetValue().(*Request_AppendTx); ok {
|
if x, ok := m.GetValue().(*Request_DeliverTx); ok {
|
||||||
return x.AppendTx
|
return x.DeliverTx
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -389,7 +389,7 @@ func (*Request) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error
|
|||||||
(*Request_Flush)(nil),
|
(*Request_Flush)(nil),
|
||||||
(*Request_Info)(nil),
|
(*Request_Info)(nil),
|
||||||
(*Request_SetOption)(nil),
|
(*Request_SetOption)(nil),
|
||||||
(*Request_AppendTx)(nil),
|
(*Request_DeliverTx)(nil),
|
||||||
(*Request_CheckTx)(nil),
|
(*Request_CheckTx)(nil),
|
||||||
(*Request_Commit)(nil),
|
(*Request_Commit)(nil),
|
||||||
(*Request_Query)(nil),
|
(*Request_Query)(nil),
|
||||||
@ -423,9 +423,9 @@ func _Request_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
|
|||||||
if err := b.EncodeMessage(x.SetOption); err != nil {
|
if err := b.EncodeMessage(x.SetOption); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
case *Request_AppendTx:
|
case *Request_DeliverTx:
|
||||||
b.EncodeVarint(5<<3 | proto.WireBytes)
|
b.EncodeVarint(5<<3 | proto.WireBytes)
|
||||||
if err := b.EncodeMessage(x.AppendTx); err != nil {
|
if err := b.EncodeMessage(x.DeliverTx); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
case *Request_CheckTx:
|
case *Request_CheckTx:
|
||||||
@ -500,13 +500,13 @@ func _Request_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer
|
|||||||
err := b.DecodeMessage(msg)
|
err := b.DecodeMessage(msg)
|
||||||
m.Value = &Request_SetOption{msg}
|
m.Value = &Request_SetOption{msg}
|
||||||
return true, err
|
return true, err
|
||||||
case 5: // value.append_tx
|
case 5: // value.deliver_tx
|
||||||
if wire != proto.WireBytes {
|
if wire != proto.WireBytes {
|
||||||
return true, proto.ErrInternalBadWireType
|
return true, proto.ErrInternalBadWireType
|
||||||
}
|
}
|
||||||
msg := new(RequestAppendTx)
|
msg := new(RequestDeliverTx)
|
||||||
err := b.DecodeMessage(msg)
|
err := b.DecodeMessage(msg)
|
||||||
m.Value = &Request_AppendTx{msg}
|
m.Value = &Request_DeliverTx{msg}
|
||||||
return true, err
|
return true, err
|
||||||
case 6: // value.check_tx
|
case 6: // value.check_tx
|
||||||
if wire != proto.WireBytes {
|
if wire != proto.WireBytes {
|
||||||
@ -585,8 +585,8 @@ func _Request_OneofSizer(msg proto.Message) (n int) {
|
|||||||
n += proto.SizeVarint(4<<3 | proto.WireBytes)
|
n += proto.SizeVarint(4<<3 | proto.WireBytes)
|
||||||
n += proto.SizeVarint(uint64(s))
|
n += proto.SizeVarint(uint64(s))
|
||||||
n += s
|
n += s
|
||||||
case *Request_AppendTx:
|
case *Request_DeliverTx:
|
||||||
s := proto.Size(x.AppendTx)
|
s := proto.Size(x.DeliverTx)
|
||||||
n += proto.SizeVarint(5<<3 | proto.WireBytes)
|
n += proto.SizeVarint(5<<3 | proto.WireBytes)
|
||||||
n += proto.SizeVarint(uint64(s))
|
n += proto.SizeVarint(uint64(s))
|
||||||
n += s
|
n += s
|
||||||
@ -683,16 +683,16 @@ func (m *RequestSetOption) GetValue() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
type RequestAppendTx struct {
|
type RequestDeliverTx struct {
|
||||||
Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"`
|
Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *RequestAppendTx) Reset() { *m = RequestAppendTx{} }
|
func (m *RequestDeliverTx) Reset() { *m = RequestDeliverTx{} }
|
||||||
func (m *RequestAppendTx) String() string { return proto.CompactTextString(m) }
|
func (m *RequestDeliverTx) String() string { return proto.CompactTextString(m) }
|
||||||
func (*RequestAppendTx) ProtoMessage() {}
|
func (*RequestDeliverTx) ProtoMessage() {}
|
||||||
func (*RequestAppendTx) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
|
func (*RequestDeliverTx) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
|
||||||
|
|
||||||
func (m *RequestAppendTx) GetTx() []byte {
|
func (m *RequestDeliverTx) GetTx() []byte {
|
||||||
if m != nil {
|
if m != nil {
|
||||||
return m.Tx
|
return m.Tx
|
||||||
}
|
}
|
||||||
@ -802,7 +802,7 @@ type Response struct {
|
|||||||
// *Response_Flush
|
// *Response_Flush
|
||||||
// *Response_Info
|
// *Response_Info
|
||||||
// *Response_SetOption
|
// *Response_SetOption
|
||||||
// *Response_AppendTx
|
// *Response_DeliverTx
|
||||||
// *Response_CheckTx
|
// *Response_CheckTx
|
||||||
// *Response_Commit
|
// *Response_Commit
|
||||||
// *Response_Query
|
// *Response_Query
|
||||||
@ -836,8 +836,8 @@ type Response_Info struct {
|
|||||||
type Response_SetOption struct {
|
type Response_SetOption struct {
|
||||||
SetOption *ResponseSetOption `protobuf:"bytes,5,opt,name=set_option,json=setOption,oneof"`
|
SetOption *ResponseSetOption `protobuf:"bytes,5,opt,name=set_option,json=setOption,oneof"`
|
||||||
}
|
}
|
||||||
type Response_AppendTx struct {
|
type Response_DeliverTx struct {
|
||||||
AppendTx *ResponseAppendTx `protobuf:"bytes,6,opt,name=append_tx,json=appendTx,oneof"`
|
DeliverTx *ResponseDeliverTx `protobuf:"bytes,6,opt,name=deliver_tx,json=deliverTx,oneof"`
|
||||||
}
|
}
|
||||||
type Response_CheckTx struct {
|
type Response_CheckTx struct {
|
||||||
CheckTx *ResponseCheckTx `protobuf:"bytes,7,opt,name=check_tx,json=checkTx,oneof"`
|
CheckTx *ResponseCheckTx `protobuf:"bytes,7,opt,name=check_tx,json=checkTx,oneof"`
|
||||||
@ -863,7 +863,7 @@ func (*Response_Echo) isResponse_Value() {}
|
|||||||
func (*Response_Flush) isResponse_Value() {}
|
func (*Response_Flush) isResponse_Value() {}
|
||||||
func (*Response_Info) isResponse_Value() {}
|
func (*Response_Info) isResponse_Value() {}
|
||||||
func (*Response_SetOption) isResponse_Value() {}
|
func (*Response_SetOption) isResponse_Value() {}
|
||||||
func (*Response_AppendTx) isResponse_Value() {}
|
func (*Response_DeliverTx) isResponse_Value() {}
|
||||||
func (*Response_CheckTx) isResponse_Value() {}
|
func (*Response_CheckTx) isResponse_Value() {}
|
||||||
func (*Response_Commit) isResponse_Value() {}
|
func (*Response_Commit) isResponse_Value() {}
|
||||||
func (*Response_Query) isResponse_Value() {}
|
func (*Response_Query) isResponse_Value() {}
|
||||||
@ -913,9 +913,9 @@ func (m *Response) GetSetOption() *ResponseSetOption {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Response) GetAppendTx() *ResponseAppendTx {
|
func (m *Response) GetDeliverTx() *ResponseDeliverTx {
|
||||||
if x, ok := m.GetValue().(*Response_AppendTx); ok {
|
if x, ok := m.GetValue().(*Response_DeliverTx); ok {
|
||||||
return x.AppendTx
|
return x.DeliverTx
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -970,7 +970,7 @@ func (*Response) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) erro
|
|||||||
(*Response_Flush)(nil),
|
(*Response_Flush)(nil),
|
||||||
(*Response_Info)(nil),
|
(*Response_Info)(nil),
|
||||||
(*Response_SetOption)(nil),
|
(*Response_SetOption)(nil),
|
||||||
(*Response_AppendTx)(nil),
|
(*Response_DeliverTx)(nil),
|
||||||
(*Response_CheckTx)(nil),
|
(*Response_CheckTx)(nil),
|
||||||
(*Response_Commit)(nil),
|
(*Response_Commit)(nil),
|
||||||
(*Response_Query)(nil),
|
(*Response_Query)(nil),
|
||||||
@ -1009,9 +1009,9 @@ func _Response_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
|
|||||||
if err := b.EncodeMessage(x.SetOption); err != nil {
|
if err := b.EncodeMessage(x.SetOption); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
case *Response_AppendTx:
|
case *Response_DeliverTx:
|
||||||
b.EncodeVarint(6<<3 | proto.WireBytes)
|
b.EncodeVarint(6<<3 | proto.WireBytes)
|
||||||
if err := b.EncodeMessage(x.AppendTx); err != nil {
|
if err := b.EncodeMessage(x.DeliverTx); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
case *Response_CheckTx:
|
case *Response_CheckTx:
|
||||||
@ -1094,13 +1094,13 @@ func _Response_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffe
|
|||||||
err := b.DecodeMessage(msg)
|
err := b.DecodeMessage(msg)
|
||||||
m.Value = &Response_SetOption{msg}
|
m.Value = &Response_SetOption{msg}
|
||||||
return true, err
|
return true, err
|
||||||
case 6: // value.append_tx
|
case 6: // value.deliver_tx
|
||||||
if wire != proto.WireBytes {
|
if wire != proto.WireBytes {
|
||||||
return true, proto.ErrInternalBadWireType
|
return true, proto.ErrInternalBadWireType
|
||||||
}
|
}
|
||||||
msg := new(ResponseAppendTx)
|
msg := new(ResponseDeliverTx)
|
||||||
err := b.DecodeMessage(msg)
|
err := b.DecodeMessage(msg)
|
||||||
m.Value = &Response_AppendTx{msg}
|
m.Value = &Response_DeliverTx{msg}
|
||||||
return true, err
|
return true, err
|
||||||
case 7: // value.check_tx
|
case 7: // value.check_tx
|
||||||
if wire != proto.WireBytes {
|
if wire != proto.WireBytes {
|
||||||
@ -1184,8 +1184,8 @@ func _Response_OneofSizer(msg proto.Message) (n int) {
|
|||||||
n += proto.SizeVarint(5<<3 | proto.WireBytes)
|
n += proto.SizeVarint(5<<3 | proto.WireBytes)
|
||||||
n += proto.SizeVarint(uint64(s))
|
n += proto.SizeVarint(uint64(s))
|
||||||
n += s
|
n += s
|
||||||
case *Response_AppendTx:
|
case *Response_DeliverTx:
|
||||||
s := proto.Size(x.AppendTx)
|
s := proto.Size(x.DeliverTx)
|
||||||
n += proto.SizeVarint(6<<3 | proto.WireBytes)
|
n += proto.SizeVarint(6<<3 | proto.WireBytes)
|
||||||
n += proto.SizeVarint(uint64(s))
|
n += proto.SizeVarint(uint64(s))
|
||||||
n += s
|
n += s
|
||||||
@ -1322,32 +1322,32 @@ func (m *ResponseSetOption) GetLog() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
type ResponseAppendTx struct {
|
type ResponseDeliverTx struct {
|
||||||
Code CodeType `protobuf:"varint,1,opt,name=code,enum=types.CodeType" json:"code,omitempty"`
|
Code CodeType `protobuf:"varint,1,opt,name=code,enum=types.CodeType" json:"code,omitempty"`
|
||||||
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
|
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
|
||||||
Log string `protobuf:"bytes,3,opt,name=log" json:"log,omitempty"`
|
Log string `protobuf:"bytes,3,opt,name=log" json:"log,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *ResponseAppendTx) Reset() { *m = ResponseAppendTx{} }
|
func (m *ResponseDeliverTx) Reset() { *m = ResponseDeliverTx{} }
|
||||||
func (m *ResponseAppendTx) String() string { return proto.CompactTextString(m) }
|
func (m *ResponseDeliverTx) String() string { return proto.CompactTextString(m) }
|
||||||
func (*ResponseAppendTx) ProtoMessage() {}
|
func (*ResponseDeliverTx) ProtoMessage() {}
|
||||||
func (*ResponseAppendTx) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} }
|
func (*ResponseDeliverTx) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} }
|
||||||
|
|
||||||
func (m *ResponseAppendTx) GetCode() CodeType {
|
func (m *ResponseDeliverTx) GetCode() CodeType {
|
||||||
if m != nil {
|
if m != nil {
|
||||||
return m.Code
|
return m.Code
|
||||||
}
|
}
|
||||||
return CodeType_OK
|
return CodeType_OK
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *ResponseAppendTx) GetData() []byte {
|
func (m *ResponseDeliverTx) GetData() []byte {
|
||||||
if m != nil {
|
if m != nil {
|
||||||
return m.Data
|
return m.Data
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *ResponseAppendTx) GetLog() string {
|
func (m *ResponseDeliverTx) GetLog() string {
|
||||||
if m != nil {
|
if m != nil {
|
||||||
return m.Log
|
return m.Log
|
||||||
}
|
}
|
||||||
@ -1640,7 +1640,7 @@ func init() {
|
|||||||
proto.RegisterType((*RequestFlush)(nil), "types.RequestFlush")
|
proto.RegisterType((*RequestFlush)(nil), "types.RequestFlush")
|
||||||
proto.RegisterType((*RequestInfo)(nil), "types.RequestInfo")
|
proto.RegisterType((*RequestInfo)(nil), "types.RequestInfo")
|
||||||
proto.RegisterType((*RequestSetOption)(nil), "types.RequestSetOption")
|
proto.RegisterType((*RequestSetOption)(nil), "types.RequestSetOption")
|
||||||
proto.RegisterType((*RequestAppendTx)(nil), "types.RequestAppendTx")
|
proto.RegisterType((*RequestDeliverTx)(nil), "types.RequestDeliverTx")
|
||||||
proto.RegisterType((*RequestCheckTx)(nil), "types.RequestCheckTx")
|
proto.RegisterType((*RequestCheckTx)(nil), "types.RequestCheckTx")
|
||||||
proto.RegisterType((*RequestQuery)(nil), "types.RequestQuery")
|
proto.RegisterType((*RequestQuery)(nil), "types.RequestQuery")
|
||||||
proto.RegisterType((*RequestCommit)(nil), "types.RequestCommit")
|
proto.RegisterType((*RequestCommit)(nil), "types.RequestCommit")
|
||||||
@ -1653,7 +1653,7 @@ func init() {
|
|||||||
proto.RegisterType((*ResponseFlush)(nil), "types.ResponseFlush")
|
proto.RegisterType((*ResponseFlush)(nil), "types.ResponseFlush")
|
||||||
proto.RegisterType((*ResponseInfo)(nil), "types.ResponseInfo")
|
proto.RegisterType((*ResponseInfo)(nil), "types.ResponseInfo")
|
||||||
proto.RegisterType((*ResponseSetOption)(nil), "types.ResponseSetOption")
|
proto.RegisterType((*ResponseSetOption)(nil), "types.ResponseSetOption")
|
||||||
proto.RegisterType((*ResponseAppendTx)(nil), "types.ResponseAppendTx")
|
proto.RegisterType((*ResponseDeliverTx)(nil), "types.ResponseDeliverTx")
|
||||||
proto.RegisterType((*ResponseCheckTx)(nil), "types.ResponseCheckTx")
|
proto.RegisterType((*ResponseCheckTx)(nil), "types.ResponseCheckTx")
|
||||||
proto.RegisterType((*ResponseQuery)(nil), "types.ResponseQuery")
|
proto.RegisterType((*ResponseQuery)(nil), "types.ResponseQuery")
|
||||||
proto.RegisterType((*ResponseCommit)(nil), "types.ResponseCommit")
|
proto.RegisterType((*ResponseCommit)(nil), "types.ResponseCommit")
|
||||||
@ -1683,7 +1683,7 @@ type TMSPApplicationClient interface {
|
|||||||
Flush(ctx context.Context, in *RequestFlush, opts ...grpc.CallOption) (*ResponseFlush, error)
|
Flush(ctx context.Context, in *RequestFlush, opts ...grpc.CallOption) (*ResponseFlush, error)
|
||||||
Info(ctx context.Context, in *RequestInfo, opts ...grpc.CallOption) (*ResponseInfo, error)
|
Info(ctx context.Context, in *RequestInfo, opts ...grpc.CallOption) (*ResponseInfo, error)
|
||||||
SetOption(ctx context.Context, in *RequestSetOption, opts ...grpc.CallOption) (*ResponseSetOption, error)
|
SetOption(ctx context.Context, in *RequestSetOption, opts ...grpc.CallOption) (*ResponseSetOption, error)
|
||||||
AppendTx(ctx context.Context, in *RequestAppendTx, opts ...grpc.CallOption) (*ResponseAppendTx, error)
|
DeliverTx(ctx context.Context, in *RequestDeliverTx, opts ...grpc.CallOption) (*ResponseDeliverTx, error)
|
||||||
CheckTx(ctx context.Context, in *RequestCheckTx, opts ...grpc.CallOption) (*ResponseCheckTx, error)
|
CheckTx(ctx context.Context, in *RequestCheckTx, opts ...grpc.CallOption) (*ResponseCheckTx, error)
|
||||||
Query(ctx context.Context, in *RequestQuery, opts ...grpc.CallOption) (*ResponseQuery, error)
|
Query(ctx context.Context, in *RequestQuery, opts ...grpc.CallOption) (*ResponseQuery, error)
|
||||||
Commit(ctx context.Context, in *RequestCommit, opts ...grpc.CallOption) (*ResponseCommit, error)
|
Commit(ctx context.Context, in *RequestCommit, opts ...grpc.CallOption) (*ResponseCommit, error)
|
||||||
@ -1736,9 +1736,9 @@ func (c *tMSPApplicationClient) SetOption(ctx context.Context, in *RequestSetOpt
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *tMSPApplicationClient) AppendTx(ctx context.Context, in *RequestAppendTx, opts ...grpc.CallOption) (*ResponseAppendTx, error) {
|
func (c *tMSPApplicationClient) DeliverTx(ctx context.Context, in *RequestDeliverTx, opts ...grpc.CallOption) (*ResponseDeliverTx, error) {
|
||||||
out := new(ResponseAppendTx)
|
out := new(ResponseDeliverTx)
|
||||||
err := grpc.Invoke(ctx, "/types.TMSPApplication/AppendTx", in, out, c.cc, opts...)
|
err := grpc.Invoke(ctx, "/types.TMSPApplication/DeliverTx", in, out, c.cc, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -1806,7 +1806,7 @@ type TMSPApplicationServer interface {
|
|||||||
Flush(context.Context, *RequestFlush) (*ResponseFlush, error)
|
Flush(context.Context, *RequestFlush) (*ResponseFlush, error)
|
||||||
Info(context.Context, *RequestInfo) (*ResponseInfo, error)
|
Info(context.Context, *RequestInfo) (*ResponseInfo, error)
|
||||||
SetOption(context.Context, *RequestSetOption) (*ResponseSetOption, error)
|
SetOption(context.Context, *RequestSetOption) (*ResponseSetOption, error)
|
||||||
AppendTx(context.Context, *RequestAppendTx) (*ResponseAppendTx, error)
|
DeliverTx(context.Context, *RequestDeliverTx) (*ResponseDeliverTx, error)
|
||||||
CheckTx(context.Context, *RequestCheckTx) (*ResponseCheckTx, error)
|
CheckTx(context.Context, *RequestCheckTx) (*ResponseCheckTx, error)
|
||||||
Query(context.Context, *RequestQuery) (*ResponseQuery, error)
|
Query(context.Context, *RequestQuery) (*ResponseQuery, error)
|
||||||
Commit(context.Context, *RequestCommit) (*ResponseCommit, error)
|
Commit(context.Context, *RequestCommit) (*ResponseCommit, error)
|
||||||
@ -1891,20 +1891,20 @@ func _TMSPApplication_SetOption_Handler(srv interface{}, ctx context.Context, de
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
func _TMSPApplication_AppendTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
func _TMSPApplication_DeliverTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(RequestAppendTx)
|
in := new(RequestDeliverTx)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if interceptor == nil {
|
if interceptor == nil {
|
||||||
return srv.(TMSPApplicationServer).AppendTx(ctx, in)
|
return srv.(TMSPApplicationServer).DeliverTx(ctx, in)
|
||||||
}
|
}
|
||||||
info := &grpc.UnaryServerInfo{
|
info := &grpc.UnaryServerInfo{
|
||||||
Server: srv,
|
Server: srv,
|
||||||
FullMethod: "/types.TMSPApplication/AppendTx",
|
FullMethod: "/types.TMSPApplication/DeliverTx",
|
||||||
}
|
}
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
return srv.(TMSPApplicationServer).AppendTx(ctx, req.(*RequestAppendTx))
|
return srv.(TMSPApplicationServer).DeliverTx(ctx, req.(*RequestDeliverTx))
|
||||||
}
|
}
|
||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
@ -2038,8 +2038,8 @@ var _TMSPApplication_serviceDesc = grpc.ServiceDesc{
|
|||||||
Handler: _TMSPApplication_SetOption_Handler,
|
Handler: _TMSPApplication_SetOption_Handler,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
MethodName: "AppendTx",
|
MethodName: "DeliverTx",
|
||||||
Handler: _TMSPApplication_AppendTx_Handler,
|
Handler: _TMSPApplication_DeliverTx_Handler,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
MethodName: "CheckTx",
|
MethodName: "CheckTx",
|
||||||
|
@ -18,7 +18,7 @@ enum MessageType {
|
|||||||
Info = 0x03;
|
Info = 0x03;
|
||||||
SetOption = 0x04;
|
SetOption = 0x04;
|
||||||
Exception = 0x05;
|
Exception = 0x05;
|
||||||
AppendTx = 0x11;
|
DeliverTx = 0x11;
|
||||||
CheckTx = 0x12;
|
CheckTx = 0x12;
|
||||||
Commit = 0x13;
|
Commit = 0x13;
|
||||||
Query = 0x14;
|
Query = 0x14;
|
||||||
@ -79,7 +79,7 @@ message Request {
|
|||||||
RequestFlush flush = 2;
|
RequestFlush flush = 2;
|
||||||
RequestInfo info = 3;
|
RequestInfo info = 3;
|
||||||
RequestSetOption set_option = 4;
|
RequestSetOption set_option = 4;
|
||||||
RequestAppendTx append_tx = 5;
|
RequestDeliverTx deliver_tx = 5;
|
||||||
RequestCheckTx check_tx = 6;
|
RequestCheckTx check_tx = 6;
|
||||||
RequestCommit commit = 7;
|
RequestCommit commit = 7;
|
||||||
RequestQuery query = 8;
|
RequestQuery query = 8;
|
||||||
@ -104,7 +104,7 @@ message RequestSetOption{
|
|||||||
string value = 2;
|
string value = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message RequestAppendTx{
|
message RequestDeliverTx{
|
||||||
bytes tx = 1;
|
bytes tx = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,7 +143,7 @@ message Response {
|
|||||||
ResponseFlush flush = 3;
|
ResponseFlush flush = 3;
|
||||||
ResponseInfo info = 4;
|
ResponseInfo info = 4;
|
||||||
ResponseSetOption set_option = 5;
|
ResponseSetOption set_option = 5;
|
||||||
ResponseAppendTx append_tx = 6;
|
ResponseDeliverTx deliver_tx = 6;
|
||||||
ResponseCheckTx check_tx = 7;
|
ResponseCheckTx check_tx = 7;
|
||||||
ResponseCommit commit = 8;
|
ResponseCommit commit = 8;
|
||||||
ResponseQuery query = 9;
|
ResponseQuery query = 9;
|
||||||
@ -175,7 +175,7 @@ message ResponseSetOption{
|
|||||||
string log = 1;
|
string log = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ResponseAppendTx{
|
message ResponseDeliverTx{
|
||||||
CodeType code = 1;
|
CodeType code = 1;
|
||||||
bytes data = 2;
|
bytes data = 2;
|
||||||
string log = 3;
|
string log = 3;
|
||||||
@ -248,7 +248,7 @@ service TMSPApplication {
|
|||||||
rpc Flush(RequestFlush) returns (ResponseFlush);
|
rpc Flush(RequestFlush) returns (ResponseFlush);
|
||||||
rpc Info(RequestInfo) returns (ResponseInfo);
|
rpc Info(RequestInfo) returns (ResponseInfo);
|
||||||
rpc SetOption(RequestSetOption) returns (ResponseSetOption);
|
rpc SetOption(RequestSetOption) returns (ResponseSetOption);
|
||||||
rpc AppendTx(RequestAppendTx) returns (ResponseAppendTx);
|
rpc DeliverTx(RequestDeliverTx) returns (ResponseDeliverTx);
|
||||||
rpc CheckTx(RequestCheckTx) returns (ResponseCheckTx);
|
rpc CheckTx(RequestCheckTx) returns (ResponseCheckTx);
|
||||||
rpc Query(RequestQuery) returns (ResponseQuery);
|
rpc Query(RequestQuery) returns (ResponseQuery);
|
||||||
rpc Commit(RequestCommit) returns (ResponseCommit);
|
rpc Commit(RequestCommit) returns (ResponseCommit);
|
||||||
|
Reference in New Issue
Block a user