@@ -43,18 +43,18 @@ where
43
43
BlockNumReader :: last_block_number ( & self . 0 )
44
44
}
45
45
46
- fn insert_journal_hash ( & self , rollup_height : u64 , hash : B256 ) -> ProviderResult < ( ) > {
47
- self . tx_ref ( ) . put :: < JournalHashes > ( rollup_height , hash) ?;
46
+ fn insert_journal_hash ( & self , ru_height : u64 , hash : B256 ) -> ProviderResult < ( ) > {
47
+ self . tx_ref ( ) . put :: < JournalHashes > ( ru_height , hash) ?;
48
48
Ok ( ( ) )
49
49
}
50
50
51
- fn remove_journal_hash ( & self , rollup_height : u64 ) -> ProviderResult < ( ) > {
52
- self . tx_ref ( ) . delete :: < JournalHashes > ( rollup_height , None ) ?;
51
+ fn remove_journal_hash ( & self , ru_height : u64 ) -> ProviderResult < ( ) > {
52
+ self . tx_ref ( ) . delete :: < JournalHashes > ( ru_height , None ) ?;
53
53
Ok ( ( ) )
54
54
}
55
55
56
- fn get_journal_hash ( & self , rollup_height : u64 ) -> ProviderResult < Option < B256 > > {
57
- self . tx_ref ( ) . get :: < JournalHashes > ( rollup_height ) . map_err ( Into :: into)
56
+ fn get_journal_hash ( & self , ru_height : u64 ) -> ProviderResult < Option < B256 > > {
57
+ self . tx_ref ( ) . get :: < JournalHashes > ( ru_height ) . map_err ( Into :: into)
58
58
}
59
59
60
60
fn latest_journal_hash ( & self ) -> ProviderResult < B256 > {
67
67
/// Insert an enter into the DB
68
68
/// This is a signet-specific function that inserts an enter event into the
69
69
/// [`SignetEvents`] table.
70
- fn insert_enter ( & self , height : u64 , index : u64 , enter : Enter ) -> ProviderResult < ( ) > {
70
+ fn insert_enter ( & self , ru_height : u64 , index : u64 , enter : Enter ) -> ProviderResult < ( ) > {
71
71
self . tx_ref ( )
72
- . put :: < SignetEvents > ( height , DbSignetEvent :: Enter ( index, enter) )
72
+ . put :: < SignetEvents > ( ru_height , DbSignetEvent :: Enter ( index, enter) )
73
73
. map_err ( Into :: into)
74
74
}
75
75
@@ -78,23 +78,29 @@ where
78
78
/// into the [`SignetEvents`] table.
79
79
fn insert_enter_token (
80
80
& self ,
81
- height : u64 ,
81
+ ru_height : u64 ,
82
82
index : u64 ,
83
83
enter_token : EnterToken ,
84
84
) -> ProviderResult < ( ) > {
85
- self . tx_ref ( ) . put :: < SignetEvents > ( height, DbSignetEvent :: EnterToken ( index, enter_token) ) ?;
85
+ self . tx_ref ( )
86
+ . put :: < SignetEvents > ( ru_height, DbSignetEvent :: EnterToken ( index, enter_token) ) ?;
86
87
Ok ( ( ) )
87
88
}
88
89
89
90
/// Insert a Transact into the DB
90
91
/// This is a signet-specific function that inserts a transact event into the
91
92
/// [`SignetEvents`] table.
92
- fn insert_transact ( & self , height : u64 , index : u64 , transact : & Transact ) -> ProviderResult < ( ) > {
93
+ fn insert_transact (
94
+ & self ,
95
+ ru_height : u64 ,
96
+ index : u64 ,
97
+ transact : & Transact ,
98
+ ) -> ProviderResult < ( ) > {
93
99
// this is unfortunate, but probably fine because the large part is the
94
100
// shared Bytes object.
95
101
let t = transact. clone ( ) ;
96
102
self . tx_ref ( )
97
- . put :: < SignetEvents > ( height , DbSignetEvent :: Transact ( index, t) )
103
+ . put :: < SignetEvents > ( ru_height , DbSignetEvent :: Transact ( index, t) )
98
104
. map_err ( Into :: into)
99
105
}
100
106
@@ -453,24 +459,24 @@ where
453
459
454
460
let mut index: u64 = 0 ;
455
461
for enter in enters. into_iter ( ) {
456
- self . insert_enter ( host_height , index, enter) ?;
457
- debug ! ( host_height , index, "inserted enter" ) ;
462
+ self . insert_enter ( ru_height , index, enter) ?;
463
+ debug ! ( ru_height , index, "inserted enter" ) ;
458
464
index += 1 ;
459
465
}
460
466
461
467
for enter_token in enter_tokens. into_iter ( ) {
462
- self . insert_enter_token ( host_height , index, enter_token) ?;
463
- debug ! ( host_height , index, "inserted enter token" ) ;
468
+ self . insert_enter_token ( ru_height , index, enter_token) ?;
469
+ debug ! ( ru_height , index, "inserted enter token" ) ;
464
470
index += 1 ;
465
471
}
466
472
467
473
for transact in transacts. into_iter ( ) {
468
- self . insert_transact ( host_height , index, & transact) ?;
469
- debug ! ( host_height , index, "inserted transact" ) ;
474
+ self . insert_transact ( ru_height , index, & transact) ?;
475
+ debug ! ( ru_height , index, "inserted transact" ) ;
470
476
index += 1 ;
471
477
}
472
478
473
- self . update_history_indices ( host_height ..=host_height ) ?;
479
+ self . update_history_indices ( ru_height ..=ru_height ) ?;
474
480
475
481
self . update_pipeline_stages ( ru_height, false ) ?;
476
482
0 commit comments