| 345 | } |
| 346 | |
| 347 | fn reader_for( |
| 348 | url: &str, |
| 349 | sender: mpsc::Sender<InsertValidatedTransaction>, |
| 350 | cancel: CancellationToken, |
| 351 | ) -> TestReader { |
| 352 | DestinationReader::new( |
| 353 | NoopTransactionPool::new(), |
| 354 | ReaderConfig { |
| 355 | resend_after: Duration::from_secs(4), |
| 356 | validity_hold: Duration::from_secs(60), |
| 357 | channel_capacity: 1, |
| 358 | poll_interval: Duration::from_millis(1), |
| 359 | fifo_percent: 20, |
| 360 | }, |
| 361 | sender, |
| 362 | cancel, |
| 363 | url.parse().unwrap(), |
| 364 | ) |
| 365 | } |
| 366 | |
| 367 | /// The wire form must carry the fields the builder RPC needs, or the queue would move |
| 368 | /// well-formed-looking rows that the destination rejects. |