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