changes
This commit is contained in:
@@ -99,14 +99,12 @@ func (b *Block) GetPrevHash() []byte {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (b *Block) ToCompact() *walletrpc.CompactBlock {
|
func (b *Block) ToCompact() *walletrpc.CompactBlock {
|
||||||
headerBytes, _ := b.hdr.MarshalBinary()
|
|
||||||
compactBlock := &walletrpc.CompactBlock{
|
compactBlock := &walletrpc.CompactBlock{
|
||||||
ProtoVersion: 1,
|
ProtoVersion: 1,
|
||||||
Height: uint64(b.GetHeight()),
|
Height: uint64(b.GetHeight()),
|
||||||
PrevHash: b.hdr.HashPrevBlock,
|
PrevHash: b.hdr.HashPrevBlock,
|
||||||
Hash: b.GetEncodableHash(),
|
Hash: b.GetEncodableHash(),
|
||||||
Time: b.hdr.Time,
|
Time: b.hdr.Time,
|
||||||
Header: headerBytes,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only Sapling transactions have a meaningful compact encoding
|
// Only Sapling transactions have a meaningful compact encoding
|
||||||
|
|||||||
Reference in New Issue
Block a user