From bbe9b2123d74617b82f51a2016d8578cb3e4e8da Mon Sep 17 00:00:00 2001 From: Nex Date: Fri, 6 Mar 2020 10:01:02 +0800 Subject: [PATCH] Fix name: full_transaction -> full_transactions --- bdledger/api/query.proto | 62 ++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/bdledger/api/query.proto b/bdledger/api/query.proto index 9111963..a7d8958 100644 --- a/bdledger/api/query.proto +++ b/bdledger/api/query.proto @@ -10,13 +10,18 @@ option java_outer_classname = "QueryProto"; option java_multiple_files = true; service Query { + rpc GetBlockByHash (GetBlockByHashRequest) returns (GetBlockByHashResponse); rpc GetBlocks (BlocksRequest) returns (GetBlocksResponse); rpc CountBlocks (BlocksRequest) returns (CountBlocksResponse); - rpc GetTransactions(TransactionsRequest) returns (GetTransactionsResponse); - rpc CountTransactions(TransactionsRequest) returns (CountTransactionsResponse); - rpc GetBlockByHash (GetBlockByHashRequest) returns (GetBlockByHashResponse); rpc GetTransactionByHash (GetTransactionByHashRequest) returns (GetTransactionByHashResponse); rpc GetTransactionByBlockHashAndIndex (GetTransactionByBlockHashAndIndexRequest) returns (GetTransactionByBlockHashAndIndexResponse); + rpc GetTransactions (TransactionsRequest) returns (GetTransactionsResponse); + rpc CountTransactions (TransactionsRequest) returns (CountTransactionsResponse); +} + +message BlockFilter { + bytes hash = 1; + int64 timestamp = 2; } // repeated Transaction/BlockFilters are combined by "&&"(and) operator; @@ -27,9 +32,13 @@ message TransactionFilter { bytes timestamp = 4; } -message BlockFilter { - bytes hash = 1; - int64 timestamp = 2; +message GetBlockByHashRequest { + string ledger = 1; + bytes hash = 2; + bool full_transactions = 3; +} +message GetBlockByHashResponse { + Block block = 1; } message BlocksRequest { @@ -39,7 +48,7 @@ message BlocksRequest { int64 end_timestamp = 4; } message GetBlocksResponse { - repeated Block blocks= 1; + repeated Block blocks = 1; int64 start_timestamp = 2; int64 end_timestamp = 3; } @@ -47,30 +56,6 @@ message CountBlocksResponse { uint64 count = 1; } -message TransactionsRequest { - string ledger = 1; - repeated TransactionFilter filters = 2; - int64 start_timestamp = 3; // required - int64 end_timestamp = 4; -} -message GetTransactionsResponse { - repeated Transaction transactions = 1; - int64 start_timestamp = 2; - int64 end_timestamp = 3; -} -message CountTransactionsResponse { - uint64 count = 1; -} - -message GetBlockByHashRequest { - string ledger = 1; - bytes hash = 2; - bool full_transaction = 3; -} -message GetBlockByHashResponse { - Block block = 1; -} - message GetTransactionByHashRequest { string ledger = 1; bytes hash = 2; @@ -87,3 +72,18 @@ message GetTransactionByBlockHashAndIndexRequest { message GetTransactionByBlockHashAndIndexResponse { Transaction transaction = 1; } + +message TransactionsRequest { + string ledger = 1; + repeated TransactionFilter filters = 2; + int64 start_timestamp = 3; // required + int64 end_timestamp = 4; +} +message GetTransactionsResponse { + repeated Transaction transactions = 1; + int64 start_timestamp = 2; + int64 end_timestamp = 3; +} +message CountTransactionsResponse { + uint64 count = 1; +}