Skip to content

Commit

Permalink
Add get_locator_responses
Browse files Browse the repository at this point in the history
  • Loading branch information
eval-exec committed Dec 13, 2024
1 parent 14e769b commit 05ec812
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions sync/src/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1909,6 +1909,16 @@ impl ActiveChain {
.collect()
}

pub fn get_locator_responses(
&self,
block_number: BlockNumber,
hash_stop: &Byte32,
) -> Vec<Vec<core::HeaderView>> {
(0..32).iter().map(|index| {
get_locator_response(block_number + (i * MAX_HEADERS_LEN), &Byte32::default())
}).collect();
}

pub fn send_getheaders_to_peer(
&self,
nc: &dyn CKBProtocolContext,
Expand Down

0 comments on commit 05ec812

Please sign in to comment.