Add validate_best_block_header utility
authorJeffrey Czyz <jkczyz@gmail.com>
Tue, 2 Mar 2021 18:03:11 +0000 (10:03 -0800)
committerJeffrey Czyz <jkczyz@gmail.com>
Tue, 2 Mar 2021 18:03:11 +0000 (10:03 -0800)
commit60f4daf2c22431504a77814679e6fa7f6629bd12
treec9f1d6b6ada6059a89d843bb9ecedc6e887db23f
parent81c6bdc953ce3191e2428a3575e5994381f31c1f
Add validate_best_block_header utility

Refactor synchronize_listeners by pulling out a function returning the
validated block header of a BlockSource's best chain tip. This is needed
when a node is started from scratch and has no listeners to sync.
lightning-block-sync/src/init.rs