Fix code style
This commit is contained in:
@@ -11,85 +11,85 @@ option java_outer_classname = "AccountingChainProto";
|
||||
option java_multiple_files = true;
|
||||
|
||||
service AccountingChain {
|
||||
rpc ClientVersion (google.protobuf.Empty) returns (ClientVersionResponse);
|
||||
rpc BlockNumber (BlockNumberRequest) returns (BlockNumberResponse);
|
||||
rpc GetBlockByNumber (GetBlockByNumberRequest) returns (BlockResponse);
|
||||
rpc GetBlockByHash (GetBlockByHashRequest) returns (BlockResponse);
|
||||
rpc GetTransactionByHash (GetTransactionByHashRequest) returns (TransactionResponse);
|
||||
rpc GetTransactionByBlockNumberAndIndex (GetTransactionByBlockNumberAndIndexRequest) returns (TransactionResponse);
|
||||
rpc GetTransactionByBlockHashAndIndex (GetTransactionByBlockHashAndIndexRequest) returns (TransactionResponse);
|
||||
rpc ClientVersion (google.protobuf.Empty) returns (ClientVersionResponse);
|
||||
rpc BlockNumber (BlockNumberRequest) returns (BlockNumberResponse);
|
||||
rpc GetBlockByNumber (GetBlockByNumberRequest) returns (BlockResponse);
|
||||
rpc GetBlockByHash (GetBlockByHashRequest) returns (BlockResponse);
|
||||
rpc GetTransactionByHash (GetTransactionByHashRequest) returns (TransactionResponse);
|
||||
rpc GetTransactionByBlockNumberAndIndex (GetTransactionByBlockNumberAndIndexRequest) returns (TransactionResponse);
|
||||
rpc GetTransactionByBlockHashAndIndex (GetTransactionByBlockHashAndIndexRequest) returns (TransactionResponse);
|
||||
}
|
||||
|
||||
message Transaction {
|
||||
uint64 block_number = 1; // 事务所在的区块的区块号,当事务处于待确认状态时为`null`
|
||||
bytes block_hash = 2; // 事务所在的区块的哈希,当事务处于待确认状态时为`null`
|
||||
uint32 index = 3; // 事务在区块中的位置index,当事务处于待确认状态时为`null`
|
||||
bytes hash = 4; // 事务的哈希
|
||||
TransactionType type = 5; // 事务类型
|
||||
bytes from = 6; // 发送账户地址
|
||||
uint64 nonce = 7; // 这条事务之前发送者所发送的事务数量
|
||||
bytes to = 8; // 接收账户地址,或者调用的合约地址,或者`null`如为合约创建
|
||||
bytes data = 9; // 数据或合约代码
|
||||
bytes v = 10; // ECDSA recovery id
|
||||
bytes r = 11; // ECDSA signature r
|
||||
bytes s = 12; // ECDSA signature s
|
||||
uint64 block_number = 1; // 事务所在的区块的区块号,当事务处于待确认状态时为`null`
|
||||
bytes block_hash = 2; // 事务所在的区块的哈希,当事务处于待确认状态时为`null`
|
||||
uint32 index = 3; // 事务在区块中的位置index,当事务处于待确认状态时为`null`
|
||||
bytes hash = 4; // 事务的哈希
|
||||
TransactionType type = 5; // 事务类型
|
||||
bytes from = 6; // 发送账户地址
|
||||
uint64 nonce = 7; // 这条事务之前发送者所发送的事务数量
|
||||
bytes to = 8; // 接收账户地址,或者调用的合约地址,或者`null`如为合约创建
|
||||
bytes data = 9; // 数据或合约代码
|
||||
bytes v = 10; // ECDSA recovery id
|
||||
bytes r = 11; // ECDSA signature r
|
||||
bytes s = 12; // ECDSA signature s
|
||||
}
|
||||
|
||||
message Block {
|
||||
uint64 number = 1; // 区块号,当区块处于待确认状态时为`null`
|
||||
bytes hash = 2; // 区块的哈希,当区块处于待确认状态时为`null`
|
||||
bytes parent_hash = 3; // 父区块的哈希
|
||||
bytes witness = 4; // 见证者账户地址
|
||||
uint64 timestamp = 5; // 区块产生时的UNIX时间戳
|
||||
uint64 size = 6; // 区块大小的字节数
|
||||
bytes transactions_root = 7; // 区块的事务树根
|
||||
repeated Transaction transactions = 8; // 事务对象的数组,或为空
|
||||
repeated bytes transaction_hashes = 9; // 32字节的交易哈希的数组,或为空
|
||||
uint64 number = 1; // 区块号,当区块处于待确认状态时为`null`
|
||||
bytes hash = 2; // 区块的哈希,当区块处于待确认状态时为`null`
|
||||
bytes parent_hash = 3; // 父区块的哈希
|
||||
bytes witness = 4; // 见证者账户地址
|
||||
uint64 timestamp = 5; // 区块产生时的UNIX时间戳
|
||||
uint64 size = 6; // 区块大小的字节数
|
||||
bytes transactions_root = 7; // 区块的事务树根
|
||||
repeated Transaction transactions = 8; // 事务对象的数组,或为空
|
||||
repeated bytes transaction_hashes = 9; // 32字节的交易哈希的数组,或为空
|
||||
}
|
||||
|
||||
message BlockNumberRequest {
|
||||
string ledger = 1;
|
||||
string ledger = 1;
|
||||
}
|
||||
message BlockNumberResponse {
|
||||
Error error = 1;
|
||||
uint64 block_number = 2;
|
||||
Error error = 1;
|
||||
uint64 block_number = 2;
|
||||
}
|
||||
|
||||
message GetBlockByNumberRequest {
|
||||
string ledger = 1;
|
||||
uint64 number = 2;
|
||||
bool full_transaction = 3;
|
||||
string ledger = 1;
|
||||
uint64 number = 2;
|
||||
bool full_transaction = 3;
|
||||
}
|
||||
|
||||
message GetBlockByHashRequest {
|
||||
string ledger = 1;
|
||||
bytes hash = 2;
|
||||
bool full_transaction = 3;
|
||||
string ledger = 1;
|
||||
bytes hash = 2;
|
||||
bool full_transaction = 3;
|
||||
}
|
||||
|
||||
message BlockResponse {
|
||||
Error error = 1;
|
||||
Block block = 2;
|
||||
Error error = 1;
|
||||
Block block = 2;
|
||||
}
|
||||
|
||||
message GetTransactionByHashRequest {
|
||||
string ledger = 1;
|
||||
bytes hash = 2;
|
||||
string ledger = 1;
|
||||
bytes hash = 2;
|
||||
}
|
||||
|
||||
message GetTransactionByBlockNumberAndIndexRequest {
|
||||
string ledger = 1;
|
||||
uint64 block_number = 2;
|
||||
uint32 index = 3;
|
||||
string ledger = 1;
|
||||
uint64 block_number = 2;
|
||||
uint32 index = 3;
|
||||
}
|
||||
|
||||
message GetTransactionByBlockHashAndIndexRequest {
|
||||
string ledger = 1;
|
||||
bytes block_hash = 2;
|
||||
uint32 index = 3;
|
||||
string ledger = 1;
|
||||
bytes block_hash = 2;
|
||||
uint32 index = 3;
|
||||
}
|
||||
|
||||
message TransactionResponse {
|
||||
Error error = 1;
|
||||
Transaction transaction = 2;
|
||||
Error error = 1;
|
||||
Transaction transaction = 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user