rpc: minor nits on prior update
This commit is contained in:
parent
e2326f1aea
commit
a3ce1900c9
|
@ -11,9 +11,9 @@ package proto;
|
|||
message CompactBlock {
|
||||
uint32 protoVersion = 1; // the version of this wire format, for storage
|
||||
uint64 height = 2; // the height of this block
|
||||
bytes hash = 3; // the hash of this block
|
||||
uint32 time = 4; // the block time
|
||||
bytes header = 5; // OR send the full header
|
||||
bytes hash = 3;
|
||||
uint32 time = 4;
|
||||
bytes header = 5; // (hash and time) OR (full header)
|
||||
repeated CompactTx vtx = 6; // compact transactions from this block
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
package proto
|
||||
|
||||
//go:generate protoc -I . ./compact_formats.proto --go_out=plugins=grpc:.
|
||||
//go:generate protoc -I . ./service.proto --go_out=plugins=grpc:.
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
syntax = "proto3";
|
||||
package proto;
|
||||
|
||||
import "compact_formats.proto";
|
||||
|
||||
// A BlockID message contains identifiers to select a block: a height or a
|
||||
// hash. If the hash is present it takes precedence.
|
||||
message BlockID {
|
||||
|
@ -24,12 +26,8 @@ message TxFilter {
|
|||
bytes hash = 3;
|
||||
}
|
||||
|
||||
message FullTransaction {
|
||||
TxFilter txID = 1;
|
||||
bytes data = 2;
|
||||
}
|
||||
|
||||
message SentTransaction {
|
||||
// RawTransaction contains the complete transaction data.
|
||||
message RawTransaction {
|
||||
bytes data = 1;
|
||||
}
|
||||
|
||||
|
@ -45,6 +43,6 @@ service CompactTxStreamer {
|
|||
rpc GetLatestBlock(ChainSpec) returns (BlockID) {}
|
||||
rpc GetBlock(BlockID) returns (CompactBlock) {}
|
||||
rpc GetBlockRange(BlockRange) returns (stream CompactBlock) {}
|
||||
rpc GetTransaction(TxFilter) returns (FullTransaction) {}
|
||||
rpc GetTransaction(TxFilter) returns (RawTransaction) {}
|
||||
rpc SendTransaction(RawTransaction) returns (SendResponse) {}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue