Add prevHash field to CompactBlock

This enables basic verification of chain validity when CompactBlocks are
received without the full header.
This commit is contained in:
Jack Grigg
2019-05-01 13:21:48 +01:00
parent fd87121244
commit 2774d2730f
3 changed files with 69 additions and 3 deletions

View File

@@ -13,9 +13,10 @@ message CompactBlock {
uint32 protoVersion = 1; // the version of this wire format, for storage
uint64 height = 2; // the height of this block
bytes hash = 3;
uint32 time = 4;
bytes header = 5; // (hash and time) OR (full header)
repeated CompactTx vtx = 6; // compact transactions from this block
bytes prevHash = 4;
uint32 time = 5;
bytes header = 6; // (hash, prevHash, and time) OR (full header)
repeated CompactTx vtx = 7; // compact transactions from this block
}
message CompactTx {