Conversation
src/validator/collator.rs
Outdated
|
|
||
| let rand_seed = rand_seed.unwrap_or_else(|| secure_256_bits().into()); | ||
|
|
||
| let finalize_parallel_timeout_ms = |
There was a problem hiding this comment.
Looks like method of CollatorConfig
src/validator/collator.rs
Outdated
| self.process_new_messages(!collator_data.inbound_queues_empty, prev_data, | ||
| collator_data, &mut exec_manager).await?; | ||
| if collator_data.inbound_queues_empty { | ||
| self.process_new_messages(!collator_data.inbound_queues_empty, prev_data, |
There was a problem hiding this comment.
Seems it is a good idea to delete the first parameter in the enqueue_only func and refactor it a bit.
src/validator/collator.rs
Outdated
| self.create_ticktock_transaction(config_account_id, tock, prev_data, collator_data, | ||
| exec_manager).await?; | ||
| exec_manager.wait_transactions(collator_data).await?; | ||
| exec_manager.wait_transactions(collator_data, || self.check_finilize_parallel_timeout()).await?; |
There was a problem hiding this comment.
All the wait_transactions calls receive check_finilize_parallel_timeout. Need to encapsulate that logic in the exec manager
src/validator/collator.rs
Outdated
| // process newly-generated messages (only by including them into output queue) | ||
| self.process_new_messages( | ||
| true, prev_data, collator_data, &mut exec_manager).await?; | ||
| // DO NOT NEED THIS - all new messages were queued already |
There was a problem hiding this comment.
Just delete the commented code. Git remembers all the history =)
src/validator/collator.rs
Outdated
| } | ||
| } | ||
|
|
||
| type TxLastLt = u64; |
There was a problem hiding this comment.
Usually, we don't use type redefinitions.
|
|
||
| type TxLastLt = u64; | ||
|
|
||
| struct CollatorData { |
There was a problem hiding this comment.
Encapsulation of the new parameters to some new struct might be a good idea.
There was a problem hiding this comment.
Won't fix. Finally we should encapsulate and existing context parameters, too. Not in this PR
src/validator/collator.rs
Outdated
| } | ||
| } | ||
| } | ||
| msgs_to_revert.reverse(); |
There was a problem hiding this comment.
Consider using .iter().rev()
b33a3b3 to
0440c96
Compare
No description provided.