File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ use super::{
24
24
} ;
25
25
use crate :: { log_provider:: LogPathProvider , node:: NodeKind } ;
26
26
27
- pub const FINALITY_DEPTH : u64 = 30 ;
27
+ pub const DEFAULT_FINALITY_DEPTH : u64 = 5 ;
28
28
29
29
pub struct BitcoinNode {
30
30
spawn_output : SpawnOutput ,
@@ -98,8 +98,8 @@ impl BitcoinNode {
98
98
Ok ( ( ) )
99
99
}
100
100
101
- pub async fn get_finalized_height ( & self ) -> Result < u64 > {
102
- Ok ( self . get_block_count ( ) . await ? - FINALITY_DEPTH + 1 )
101
+ pub async fn get_finalized_height ( & self , finality_depth : Option < u64 > ) -> Result < u64 > {
102
+ Ok ( self . get_block_count ( ) . await ? - finality_depth . unwrap_or ( DEFAULT_FINALITY_DEPTH ) + 1 )
103
103
}
104
104
105
105
async fn wait_for_shutdown ( & self ) -> Result < ( ) > {
Original file line number Diff line number Diff line change 1
1
use async_trait:: async_trait;
2
2
use bitcoincore_rpc:: RpcApi ;
3
3
use citrea_e2e:: {
4
- bitcoin:: FINALITY_DEPTH ,
4
+ bitcoin:: DEFAULT_FINALITY_DEPTH ,
5
5
config:: { TestCaseConfig , TestCaseDockerConfig } ,
6
6
framework:: TestFramework ,
7
7
test_case:: { TestCase , TestCaseRunner } ,
@@ -40,8 +40,8 @@ impl TestCase for DockerIntegrationTest {
40
40
// Wait for blob inscribe tx to be in mempool
41
41
da. wait_mempool_len ( 1 , None ) . await ?;
42
42
43
- da. generate ( FINALITY_DEPTH ) . await ?;
44
- let finalized_height = da. get_finalized_height ( ) . await ?;
43
+ da. generate ( DEFAULT_FINALITY_DEPTH ) . await ?;
44
+ let finalized_height = da. get_finalized_height ( None ) . await ?;
45
45
46
46
batch_prover
47
47
. wait_for_l1_height ( finalized_height, None )
You can’t perform that action at this time.
0 commit comments