Skip to content

Commit

Permalink
trace the block
Browse files Browse the repository at this point in the history
  • Loading branch information
jackzhhuang committed Aug 31, 2024
1 parent f23823d commit 953881c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sync/src/parallel/sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ impl DagBlockSender {
ExecuteState::Executing(header_id) => {
if *header_id == block.header().parent_hash() || block.header.parents_hash().contains(header_id) {
executor.state = ExecuteState::Executing(block.id());
info!("send the block {:?} to the executor: {:p}", block.id(), &executor);
match executor.sender_to_executor.try_send(block.clone()) {
Ok(_) => (),
Err(e) => {
Expand Down Expand Up @@ -106,14 +107,16 @@ impl DagBlockSender {
self.dag.clone(),
)?;

self.executors.push(DagBlockWorker {
let executor = DagBlockWorker {
sender_to_executor: sender_to_worker.clone(),
receiver_from_executor,
state: ExecuteState::Executing(block.id()),
handle: executor.start_to_execute()?,
});
};

info!("send the block {:?} to the executor: {:p}", block.id(), &executor);
sender_to_worker.send(block).await?;
self.executors.push(executor);

self.flush_executor_state(notify).await?;
}
Expand Down

0 comments on commit 953881c

Please sign in to comment.