Minor buig fixes
This commit is contained in:
parent
d025d957a6
commit
3e4ec00f0a
|
@ -172,7 +172,7 @@ pub fn poll_block(
|
||||||
let task_spawner: AnyhowJoinHandle = tokio::spawn(async move {
|
let task_spawner: AnyhowJoinHandle = tokio::spawn(async move {
|
||||||
let counting_semaphore = Arc::new(tokio::sync::Semaphore::new(1024));
|
let counting_semaphore = Arc::new(tokio::sync::Semaphore::new(1024));
|
||||||
let mut slot_notification = slot_notification;
|
let mut slot_notification = slot_notification;
|
||||||
let current_slot = Arc::new(AtomicU64::new(0));
|
let current_slot = Arc::new(AtomicU64::new(rpc_client.get_slot()));
|
||||||
loop {
|
loop {
|
||||||
let SlotNotification { processed_slot, .. } = slot_notification
|
let SlotNotification { processed_slot, .. } = slot_notification
|
||||||
.recv()
|
.recv()
|
||||||
|
|
|
@ -84,7 +84,7 @@ pub fn poll_slots(
|
||||||
// this is because it may be a slot block
|
// this is because it may be a slot block
|
||||||
if estimated_slot < current_slot + 32 {
|
if estimated_slot < current_slot + 32 {
|
||||||
estimated_slot += 1;
|
estimated_slot += 1;
|
||||||
}
|
|
||||||
sender
|
sender
|
||||||
.send(SlotNotification {
|
.send(SlotNotification {
|
||||||
processed_slot: current_slot,
|
processed_slot: current_slot,
|
||||||
|
@ -94,6 +94,7 @@ pub fn poll_slots(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
Ok(vec![task1, task2])
|
Ok(vec![task1, task2])
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue