Skip to content

Commit

Permalink
Track down the error point.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben-PH committed Feb 1, 2023
1 parent 1db6b2a commit 67d2921
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 2 additions & 3 deletions massa-execution-exports/src/test_exports/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,8 @@ impl ExecutionController for MockExecutionController {
{
println!("mock error {err}");
}
response_rx
.recv_timeout(Duration::from_millis(100))
.unwrap()
dbg!("never seen this not err...");
dbg!(response_rx.recv_timeout(Duration::from_millis(100))).unwrap()
}

fn clone_box(&self) -> Box<dyn ExecutionController> {
Expand Down
4 changes: 4 additions & 0 deletions massa-pool-worker/src/operation_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,17 @@ impl OperationPool {

// check if the op was already executed
// TODO batch this
dbg!(&slot);
if self
.execution_controller
.unexecuted_ops_among(&vec![op_info.id].into_iter().collect(), slot.thread)
.is_empty()
{
// this is never outputted
dbg!("continuing");
continue;
}
dbg!(&slot);

// check balance
//TODO: It's a weird behaviour because if the address is created afterwards this operation will be executed
Expand Down
4 changes: 4 additions & 0 deletions massa-pool-worker/src/tests/operation_pool_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,14 @@ fn test_pool() {

// checks ops are the expected ones for thread 0 and 1 and various periods
for thread in 0u8..pool_config.thread_count {
dbg!(thread);
for period in 0u64..70 {
let target_slot = Slot::new(period, thread);
let max_count = 3;
// fails at a non-deterministic point in this double iteration.
// Furthest I saw it get was thread 8 in 0..32
let (ids, storage) = pool.get_block_operations(&target_slot);

assert!(ids
.iter()
.map(|id| (
Expand Down

0 comments on commit 67d2921

Please sign in to comment.