mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-30 10:11:33 +00:00
fix closest lgos
This commit is contained in:
@ -400,10 +400,11 @@ impl Iterator for ClosestBucketsIter {
|
|||||||
Some(i)
|
Some(i)
|
||||||
}
|
}
|
||||||
ClosestBucketsIterState::ZoomIn(i) => {
|
ClosestBucketsIterState::ZoomIn(i) => {
|
||||||
|
let old_i = i.0;
|
||||||
if let Some(i) = self.next_in(i) {
|
if let Some(i) = self.next_in(i) {
|
||||||
println!(
|
println!(
|
||||||
"ClosestBucketsIter: distance = {}; ZoomIn({}) -> ZoomIn({})",
|
"ClosestBucketsIter: distance = {}; ZoomIn({}) -> ZoomIn({})",
|
||||||
self.distance.0, i.0, i.0
|
self.distance.0, old_i, i.0
|
||||||
);
|
);
|
||||||
self.state = ClosestBucketsIterState::ZoomIn(i);
|
self.state = ClosestBucketsIterState::ZoomIn(i);
|
||||||
Some(i)
|
Some(i)
|
||||||
@ -418,10 +419,11 @@ impl Iterator for ClosestBucketsIter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ClosestBucketsIterState::ZoomOut(i) => {
|
ClosestBucketsIterState::ZoomOut(i) => {
|
||||||
|
let old_i = i.0;
|
||||||
if let Some(i) = self.next_out(i) {
|
if let Some(i) = self.next_out(i) {
|
||||||
println!(
|
println!(
|
||||||
"ClosestBucketsIter: distance = {}; ZoomOut({}) -> ZoomOut({})",
|
"ClosestBucketsIter: distance = {}; ZoomOut({}) -> ZoomOut({})",
|
||||||
self.distance.0, i.0, i.0
|
self.distance.0, old_i, i.0
|
||||||
);
|
);
|
||||||
self.state = ClosestBucketsIterState::ZoomOut(i);
|
self.state = ClosestBucketsIterState::ZoomOut(i);
|
||||||
Some(i)
|
Some(i)
|
||||||
|
Reference in New Issue
Block a user