Fix name: full_transaction -> full_transactions

This commit is contained in:
Nex 2020-03-06 10:01:02 +08:00
parent 08f427899c
commit bbe9b2123d

View File

@ -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;
}