From c3362c46c148c212e20b4daaced9518a72d2d27e Mon Sep 17 00:00:00 2001 From: Sean Zheng Date: Fri, 26 Jul 2024 10:10:07 +0800 Subject: [PATCH] refactor: update data types to bytes in Block and Transaction messages - Change the type of `id`, `transaction_ids`, `block_id`, `from`, and `to` fields from `string` to `bytes` in the `Block` and `Transaction` messages. Signed-off-by: Sean Zheng --- pb/entity/domain/block/model/model.proto | 4 ++-- pb/entity/domain/transaction/model/model.proto | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pb/entity/domain/block/model/model.proto b/pb/entity/domain/block/model/model.proto index a47c273..66b8cc9 100644 --- a/pb/entity/domain/block/model/model.proto +++ b/pb/entity/domain/block/model/model.proto @@ -3,8 +3,8 @@ syntax = "proto3"; import "google/protobuf/timestamp.proto"; message Block { - string id = 1; + bytes id = 1; int64 height = 2; google.protobuf.Timestamp timestamp = 3; - repeated string transaction_ids = 4; + repeated bytes transaction_ids = 4; } diff --git a/pb/entity/domain/transaction/model/model.proto b/pb/entity/domain/transaction/model/model.proto index 82cdcce..14ead33 100644 --- a/pb/entity/domain/transaction/model/model.proto +++ b/pb/entity/domain/transaction/model/model.proto @@ -3,10 +3,10 @@ syntax = "proto3"; import "google/protobuf/timestamp.proto"; message Transaction { - string id = 1; - string block_id = 2; - string from = 3; - string to = 4; + bytes id = 1; + bytes block_id = 2; + bytes from = 3; + bytes to = 4; double amount = 5; google.protobuf.Timestamp timestamp = 6; }