Closed guggero closed 1 year ago
Small linter error:
Error: blockmanager.go:33:2: `maxTimeOffset` is unused (deadcode)
Small linter error:
Oops, fixed.
@roasbeef: review reminder @guggero, remember to re-request review from reviewers when ready
Replaces https://github.com/lightninglabs/neutrino/pull/263.
This uses btcd's HeaderCtx and ChainCtx interfaces to be able to validate headers, both contextually and context-free. This allows neutrino to call blockchain.CheckBlockHeaderContext and blockchain.CheckBlockHeaderSanity. Also included is a check to assert that when neutrino receives a p2p headers message, that each header connects to the previous one.
Fixes https://github.com/lightninglabs/neutrino/issues/255