File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ impl<H> Submitter<H> {
48
48
}
49
49
50
50
impl Submitter < Height > {
51
- pub async fn submit ( & mut self , cb : CertifiedBlock ) {
51
+ pub async fn submit ( & mut self , cb : & CertifiedBlock ) {
52
52
enum State {
53
53
Submit ( bool ) ,
54
54
Verify ,
@@ -59,7 +59,7 @@ impl Submitter<Height> {
59
59
60
60
loop {
61
61
match state {
62
- State :: Submit ( force) => match timeout ( delay, self . submit_block ( & cb, force) ) . await {
62
+ State :: Submit ( force) => match timeout ( delay, self . submit_block ( cb, force) ) . await {
63
63
Ok ( ( ) ) => state = State :: Verify ,
64
64
Err ( e) => {
65
65
debug ! (
@@ -71,7 +71,7 @@ impl Submitter<Height> {
71
71
state = State :: Submit ( true )
72
72
}
73
73
} ,
74
- State :: Verify => match timeout ( delay, self . verify_inclusion ( & cb) ) . await {
74
+ State :: Verify => match timeout ( delay, self . verify_inclusion ( cb) ) . await {
75
75
Ok ( Ok ( ( ) ) ) => {
76
76
debug ! (
77
77
node = %self . public_key( ) ,
@@ -248,7 +248,7 @@ mod tests {
248
248
249
249
tasks. spawn ( async move {
250
250
for _ in 0 ..3 {
251
- s. submit ( g. next ( ) ) . await ;
251
+ s. submit ( & g. next ( ) ) . await ;
252
252
sleep ( Duration :: from_secs ( rand:: random_range ( 0 ..5 ) ) ) . await
253
253
}
254
254
} ) ;
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ impl Timeboost {
95
95
internal_api : spawn ( internal_api) ,
96
96
submitter_task : spawn ( async move {
97
97
while let Some ( cb) = submit_rx. recv ( ) . await {
98
- submitter. submit ( cb) . await
98
+ submitter. submit ( & cb) . await
99
99
}
100
100
} ) ,
101
101
submit_queue : submit_tx,
You can’t perform that action at this time.
0 commit comments