Have the Scanner assign batch IDs

This commit is contained in:
Luke Parker
2023-04-11 08:47:15 -04:00
parent caa695511b
commit d74cbe2cce
5 changed files with 55 additions and 24 deletions

View File

@@ -48,10 +48,11 @@ pub async fn test_scanner<C: Coin>(coin: C) {
let verify_event = |mut scanner: ScannerHandle<C, MemDb>| async {
let outputs =
match timeout(Duration::from_secs(30), scanner.events.recv()).await.unwrap().unwrap() {
ScannerEvent::Block(key, block, time, outputs) => {
ScannerEvent::Block { key, block, time, batch, outputs } => {
assert_eq!(key, keys.group_key());
assert_eq!(block, block_id);
assert_eq!(time, block_time);
assert_eq!(batch, 0);
assert_eq!(outputs.len(), 1);
assert_eq!(outputs[0].kind(), OutputType::External);
outputs