restore coinbase height check

The reason that it had to be disabled has gone away. This provides more
security by ensuring that the blocks we receive from zcashd are valid.
This commit is contained in:
Larry Ruane 2021-01-15 16:43:33 -07:00 committed by Larry Ruane
parent 82045d493a
commit a69537cf2b
1 changed files with 1 additions and 2 deletions

View File

@ -281,8 +281,7 @@ func (c *BlockCache) Add(height int, block *walletrpc.CompactBlock) error {
}
bheight := int(block.Height)
// XXX check? TODO COINBASE-HEIGHT: restore this check after coinbase height is fixed
if false && bheight != height {
if bheight != height {
// This could only happen if zcashd returned the wrong
// block (not the height we requested).
Log.Fatal("cache.Add wrong height: ", bheight, " expecting: ", height)