mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(sync): headers commit threshold (#296)
* headers stream init * fix tests * return header if available regardless of control flow * proper stream termination & docs * upd headers stage to consume stream * adjust response validation for stream * use cursor.insert for headers * wrap poll_next in a loop to bypass poking waker * fix typo * fix last td lookup * Apply suggestions from code review Co-authored-by: Georgios Konstantopoulos <me@gakonst.com> * misc * remove waker ref * dedup response handling logic * clippy * add docs to poll Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
This commit is contained in:
committed by
Georgios Konstantopoulos
parent
2671cd1cb6
commit
9628d03871
@ -266,6 +266,11 @@ impl SealedHeader {
|
||||
pub fn hash(&self) -> BlockHash {
|
||||
self.hash
|
||||
}
|
||||
|
||||
/// Return the number hash tuple.
|
||||
pub fn num_hash(&self) -> (BlockNumber, BlockHash) {
|
||||
(self.number, self.hash)
|
||||
}
|
||||
}
|
||||
|
||||
/// Represents the direction for a headers request depending on the `reverse` field of the request.
|
||||
|
||||
Reference in New Issue
Block a user