Skip to content

Commit 05ec812

Browse files
committed
Add get_locator_responses
1 parent 14e769b commit 05ec812

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

sync/src/types/mod.rs

+10
Original file line numberDiff line numberDiff line change
@@ -1909,6 +1909,16 @@ impl ActiveChain {
19091909
.collect()
19101910
}
19111911

1912+
pub fn get_locator_responses(
1913+
&self,
1914+
block_number: BlockNumber,
1915+
hash_stop: &Byte32,
1916+
) -> Vec<Vec<core::HeaderView>> {
1917+
(0..32).iter().map(|index| {
1918+
get_locator_response(block_number + (i * MAX_HEADERS_LEN), &Byte32::default())
1919+
}).collect();
1920+
}
1921+
19121922
pub fn send_getheaders_to_peer(
19131923
&self,
19141924
nc: &dyn CKBProtocolContext,

0 commit comments

Comments
 (0)