(
)
}
-type TaggedBatchRunner =
- BatchRunner<(AccountId, S), SaplingDomain
, CompactOutputDescription>;
+type TaggedBatch
= Batch<(AccountId, S), SaplingDomain
, CompactOutputDescription>;
+type TaggedBatchRunner
=
+ BatchRunner<(AccountId, S), SaplingDomain
, CompactOutputDescription, T>;
-pub(crate) fn add_block_to_runner
(
+pub(crate) fn add_block_to_runner
(
params: &P,
block: CompactBlock,
- batch_runner: &mut TaggedBatchRunner
,
+ batch_runner: &mut TaggedBatchRunner
,
) where
P: consensus::Parameters + Send + 'static,
S: Clone + Send + 'static,
+ T: Tasks>,
{
let block_hash = block.hash();
let block_height = block.height();
@@ -211,14 +213,18 @@ pub(crate) fn add_block_to_runner(
}
}
-pub(crate) fn scan_block_with_runner(
+pub(crate) fn scan_block_with_runner<
+ P: consensus::Parameters + Send + 'static,
+ K: ScanningKey,
+ T: Tasks> + Sync,
+>(
params: &P,
block: CompactBlock,
vks: &[(&AccountId, &K)],
nullifiers: &[(AccountId, Nullifier)],
tree: &mut CommitmentTree,
existing_witnesses: &mut [&mut IncrementalWitness],
- mut batch_runner: Option<&mut TaggedBatchRunner>,
+ mut batch_runner: Option<&mut TaggedBatchRunner
>,
) -> Vec> {
let mut wtxs: Vec> = vec![];
let block_height = block.height();
@@ -554,7 +560,7 @@ mod tests {
let mut tree = CommitmentTree::empty();
let mut batch_runner = if scan_multithreaded {
- let mut runner = BatchRunner::new(
+ let mut runner = BatchRunner::<_, _, _, ()>::new(
10,
extfvk
.to_sapling_keys()
@@ -618,7 +624,7 @@ mod tests {
let mut tree = CommitmentTree::empty();
let mut batch_runner = if scan_multithreaded {
- let mut runner = BatchRunner::new(
+ let mut runner = BatchRunner::<_, _, _, ()>::new(
10,
extfvk
.to_sapling_keys()