Skip to content

Commit

Permalink
Merge pull request hyperledger-iroha#463 from hyperledger/hotfix/prot…
Browse files Browse the repository at this point in the history
…o-compilation

.proto compilation fix
  • Loading branch information
lebdron authored Jul 22, 2017
2 parents f626474 + 7da7749 commit ce95be4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 21 deletions.
3 changes: 1 addition & 2 deletions schema/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ compile_proto_to_cpp(block.proto)
compile_proto_to_cpp(primitive.proto)
compile_proto_to_cpp(commands.proto)
compile_proto_to_cpp(queries.proto)
compile_proto_to_cpp(responses.proto)
compile_proto_to_grpc_cpp(endpoint.proto)
compile_proto_to_grpc_cpp(peer_service.proto)
compile_proto_to_cpp(queries.proto)
compile_proto_to_cpp(responses.proto)

add_dependencies(commandsproto_h primitiveproto_h)
add_dependencies(queriesproto_h primitiveproto_h)
Expand Down
22 changes: 11 additions & 11 deletions schema/block.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,43 @@ import "commands.proto";
import "primitive.proto";

message Header {
uint64 created_time = 1;
repeated Signature signatures = 2;
uint64 created_time = 1;
repeated Signature signatures = 2;
}

message Transaction {

message Meta {
string creator_account_id = 1;
// used to prevent replay attacks.
uint64 tx_counter = 2;
uint64 tx_counter = 2;
}

message Body {
repeated Command commands = 1;
repeated Command commands = 1;
}

Header header = 1;
Meta meta = 2;
Body body = 3;
Body body = 3;
}

message Block {


message Meta {
uint32 tx_number = 1; // the number of transactions inside. Maximum 16384 or 2^14
uint64 height = 2; // the current block number in a ledger
bytes merkle_root = 3; // global merkle root
bytes prev_block_hash = 4; // Previous block hash
uint32 tx_number = 1; // the number of transactions inside. Maximum 16384 or 2^14
uint64 height = 2; // the current block number in a ledger
bytes merkle_root = 3; // global merkle root
bytes prev_block_hash = 4; // Previous block hash
}

message Body {
repeated Transaction transactions = 1;
repeated Transaction transactions = 1;
}


Header header = 1;
Meta meta = 2;
Body body = 3;
Body body = 3;
}
16 changes: 8 additions & 8 deletions schema/queries.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ package iroha.protocol;

import "primitive.proto";

message Header {
uint64 created_time = 1;
Signature signature = 2;
}

message GetAccount {
string account_id = 1;
}
Expand All @@ -20,19 +15,24 @@ message GetAccountTransactions {
string account_id = 1;
}

message GetAccountAssetTransactions{
message GetAccountAssetTransactions {
string account_id = 1;
string asset_id = 2;
}

message GetAccountAssets{
message GetAccountAssets {
string account_id = 1;
string asset_id = 2;
}

message Query {
message Header {
uint64 created_time = 1;
Signature signature = 2;
}

Header header = 1;
string creator_account_id = 2;
string creator_account_id = 2;

oneof query {
GetAccount get_account = 3;
Expand Down

0 comments on commit ce95be4

Please sign in to comment.