diff --git a/processor/src/scanner.rs b/processor/src/scanner.rs index 7ded6d12..4d6e3e07 100644 --- a/processor/src/scanner.rs +++ b/processor/src/scanner.rs @@ -349,6 +349,13 @@ impl Scanner { // Panic if we've already seen these outputs for output in &outputs { let id = output.id(); + info!( + "block {} had output {} worth {}", + hex::encode(&block_id), + hex::encode(&id), + output.amount() + ); + // On Bitcoin, the output ID should be unique for a given chain // On Monero, it's trivial to make an output sharing an ID with another // We should only scan outputs with valid IDs however, which will be unique diff --git a/processor/src/tests/addresses.rs b/processor/src/tests/addresses.rs index a8fcd889..2999623e 100644 --- a/processor/src/tests/addresses.rs +++ b/processor/src/tests/addresses.rs @@ -48,7 +48,7 @@ async fn spend( for _ in 0 .. C::CONFIRMATIONS { coin.mine_block().await; } - match timeout(Duration::from_secs(10), scanner.events.recv()).await.unwrap().unwrap() { + match timeout(Duration::from_secs(20), scanner.events.recv()).await.unwrap().unwrap() { ScannerEvent::Outputs(this_key, _, outputs) => { assert_eq!(this_key, key); assert_eq!(outputs.len(), 1); @@ -81,7 +81,7 @@ pub async fn test_addresses(coin: C) { // Verify the Scanner picked them up let outputs = - match timeout(Duration::from_secs(10), scanner.events.recv()).await.unwrap().unwrap() { + match timeout(Duration::from_secs(20), scanner.events.recv()).await.unwrap().unwrap() { ScannerEvent::Outputs(this_key, block, outputs) => { assert_eq!(this_key, key); assert_eq!(block, block_id); diff --git a/processor/src/tests/scanner.rs b/processor/src/tests/scanner.rs index 6aaffcb1..bbb7d3b7 100644 --- a/processor/src/tests/scanner.rs +++ b/processor/src/tests/scanner.rs @@ -45,7 +45,7 @@ pub async fn test_scanner(coin: C) { // Verify the Scanner picked them up let verify_event = |mut scanner: ScannerHandle| async { let outputs = - match timeout(Duration::from_secs(10), scanner.events.recv()).await.unwrap().unwrap() { + match timeout(Duration::from_secs(20), scanner.events.recv()).await.unwrap().unwrap() { ScannerEvent::Outputs(key, block, outputs) => { assert_eq!(key, keys.group_key()); assert_eq!(block, block_id); @@ -65,8 +65,8 @@ pub async fn test_scanner(coin: C) { assert_eq!(scanner.ack_block(keys.group_key(), block_id.clone()).await, outputs); // There should be no more events - assert!(timeout(Duration::from_secs(10), scanner.events.recv()).await.is_err()); + assert!(timeout(Duration::from_secs(20), scanner.events.recv()).await.is_err()); // Create a new scanner off the current DB and make sure it also does nothing - assert!(timeout(Duration::from_secs(10), new_scanner().await.events.recv()).await.is_err()); + assert!(timeout(Duration::from_secs(20), new_scanner().await.events.recv()).await.is_err()); } diff --git a/processor/src/tests/wallet.rs b/processor/src/tests/wallet.rs index 700b744a..23b4bc60 100644 --- a/processor/src/tests/wallet.rs +++ b/processor/src/tests/wallet.rs @@ -29,7 +29,7 @@ pub async fn test_wallet(coin: C) { let block_id = coin.test_send(C::address(key)).await.id(); - match timeout(Duration::from_secs(10), scanner.events.recv()).await.unwrap().unwrap() { + match timeout(Duration::from_secs(20), scanner.events.recv()).await.unwrap().unwrap() { ScannerEvent::Outputs(this_key, block, outputs) => { assert_eq!(this_key, key); assert_eq!(block, block_id); @@ -95,7 +95,7 @@ pub async fn test_wallet(coin: C) { coin.mine_block().await; } - match timeout(Duration::from_secs(10), scanner.events.recv()).await.unwrap().unwrap() { + match timeout(Duration::from_secs(20), scanner.events.recv()).await.unwrap().unwrap() { ScannerEvent::Outputs(this_key, block_id, these_outputs) => { assert_eq!(this_key, key); assert_eq!(block_id, block.id());