Skip to content

Commit

Permalink
Add network and commit to write task logs
Browse files Browse the repository at this point in the history
  • Loading branch information
teor2345 committed Feb 3, 2023
1 parent fc3c637 commit 9327468
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions zebra-state/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,16 +338,19 @@ impl StateService {
tokio::sync::mpsc::unbounded_channel();

let finalized_state_for_writing = finalized_state.clone();
let span = Span::current();
let block_write_task = std::thread::spawn(move || {
write::write_blocks_from_channels(
finalized_block_write_receiver,
non_finalized_block_write_receiver,
finalized_state_for_writing,
non_finalized_state,
invalid_block_reset_sender,
chain_tip_sender,
non_finalized_state_sender,
)
span.in_scope(move || {
write::write_blocks_from_channels(
finalized_block_write_receiver,
non_finalized_block_write_receiver,
finalized_state_for_writing,
non_finalized_state,
invalid_block_reset_sender,
chain_tip_sender,
non_finalized_state_sender,
)
})
});
let block_write_task = Arc::new(block_write_task);

Expand Down

0 comments on commit 9327468

Please sign in to comment.