diff --git a/documentation.swagger.json b/documentation.swagger.json index b2c2215..2f30a33 100644 --- a/documentation.swagger.json +++ b/documentation.swagger.json @@ -11,7 +11,7 @@ ], "swagger": "2.0", "info": { - "title": "service/account.proto", + "title": "service/accountBalance.proto", "version": "version not set" }, "paths": { @@ -754,7 +754,7 @@ }, "modelHost": { "type": "object", - "title": "Host represent", + "title": "Host represent node and listed peers information", "properties": { "BlacklistedPeers": { "type": "object", diff --git a/model/host.proto b/model/host.proto index 87c910b..aaa7ed2 100644 --- a/model/host.proto +++ b/model/host.proto @@ -7,7 +7,7 @@ option go_package = "github.com/zoobc/zoobc-core/common/model"; import "model/node.proto"; import "model/peer.proto"; -// Host represent +// Host represent data sructure node and listed peers in node it's self message Host { Node Info = 1; map ResolvedPeers = 2; diff --git a/model/transaction.proto b/model/transaction.proto index f619b4d..6351323 100644 --- a/model/transaction.proto +++ b/model/transaction.proto @@ -84,6 +84,12 @@ message GetTransactionsResponse { repeated Transaction Transactions = 3; } +// SendTransaction request in p2pCommunication service +message SendTransactionRequest { + bytes TransactionBytes = 1; +} + +// TODO: Currently not yet used. Should we delete it? message PostUnconfirmedTransactionRequest { Transaction Transaction = 1; uint32 ArrivalTimestamp = 2; diff --git a/service/p2pCommunication.proto b/service/p2pCommunication.proto index 5c5e38c..924d042 100644 --- a/service/p2pCommunication.proto +++ b/service/p2pCommunication.proto @@ -7,9 +7,13 @@ option go_package = "github.com/zoobc/zoobc-core/common/service"; import "model/peer.proto"; import "model/node.proto"; import "model/empty.proto"; +import "model/block.proto"; +import "model/transaction.proto"; service P2PCommunication { rpc GetPeerInfo(model.GetPeerInfoRequest) returns (model.Node) {} rpc GetMorePeers(model.Empty) returns (model.GetMorePeersResponse) {} rpc SendPeers(model.SendPeersRequest) returns (model.Empty) {} + rpc SendBlock (model.Block) returns (model.Empty) {} + rpc SendTransaction (model.SendTransactionRequest) returns (model.Empty) {} }