Skip to content

Commit 8b9fc47

Browse files
authored
Parallelize reward account fetches (#3815)
* parallelize reward accounts * lint * read tx, reduce concurrency * PR comment
1 parent f8dcf0b commit 8b9fc47

File tree

4 files changed

+275
-59
lines changed

4 files changed

+275
-59
lines changed

sequencer/src/api.rs

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5160,12 +5160,19 @@ mod test {
51605160
)
51615161
.await
51625162
.unwrap();
5163-
let mut tx = ds.write().await?;
5163+
let mut tx = ds.read().await?;
51645164

5165-
let (state, leaf) =
5166-
reconstruct_state(&instance, &mut tx, node_block_height - 1, to_view, &[], &[])
5167-
.await
5168-
.unwrap();
5165+
let (state, leaf) = reconstruct_state(
5166+
&instance,
5167+
&ds,
5168+
&mut tx,
5169+
node_block_height - 1,
5170+
to_view,
5171+
&[],
5172+
&[],
5173+
)
5174+
.await
5175+
.unwrap();
51695176
assert_eq!(leaf.view_number(), to_view);
51705177
assert!(
51715178
state
@@ -5179,6 +5186,7 @@ mod test {
51795186
// Reconstruct fee state
51805187
let (state, leaf) = reconstruct_state(
51815188
&instance,
5189+
&ds,
51825190
&mut tx,
51835191
node_block_height - 1,
51845192
to_view,
@@ -5206,6 +5214,7 @@ mod test {
52065214

52075215
let (state, leaf) = reconstruct_state(
52085216
&instance,
5217+
&ds,
52095218
&mut tx,
52105219
node_block_height - 1,
52115220
to_view,
@@ -5250,6 +5259,7 @@ mod test {
52505259

52515260
let (state, leaf) = reconstruct_state(
52525261
&instance,
5262+
&ds,
52535263
&mut tx,
52545264
node_block_height - 1,
52555265
to_view,

0 commit comments

Comments
 (0)