Add storing prevhash to local db and logs

This commit is contained in:
mdr0id
2019-07-09 15:52:35 -07:00
parent 03118ba2d7
commit 1002580cd9
3 changed files with 13 additions and 6 deletions

View File

@@ -93,12 +93,16 @@ func (b *Block) GetHeight() int {
return int(blockHeight)
}
func (b *Block) GetPrevHash() []byte {
return b.hdr.HashPrevBlock
}
func (b *Block) ToCompact() *walletrpc.CompactBlock {
compactBlock := &walletrpc.CompactBlock{
//TODO ProtoVersion: 1,
Height: uint64(b.GetHeight()),
Hash: b.GetEncodableHash(),
PrevHash: b.hdr.HashPrevBlock,
Hash: b.GetEncodableHash(),
Time: b.hdr.Time,
}