Skip to content

Commit bf44112

Browse files
committed
fix: update method signatures to use mutable reference for refund order and cumulative event hashes
1 parent 7b1f6f7 commit bf44112

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

modules/brc20_index/src/database/brc20_database.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ impl Brc20Database {
262262
Ok(())
263263
}
264264

265-
pub async fn maybe_fix_refund_order(&self, refund_height: i32) -> Result<bool, Box<dyn Error>> {
265+
pub async fn maybe_fix_refund_order(&mut self, refund_height: i32) -> Result<bool, Box<dyn Error>> {
266266
if self.network != Network::Bitcoin {
267267
return Ok(false);
268268
}
@@ -352,9 +352,10 @@ impl Brc20Database {
352352
}
353353

354354
pub async fn recalculate_cumulative_event_hashes(
355-
&self,
355+
&mut self,
356356
from_height: i32,
357357
) -> Result<(), Box<dyn Error>> {
358+
self.init().await?;
358359
let current_height = self.get_current_block_height().await?;
359360
for height in from_height..=current_height {
360361
let block_event_str = self.get_block_events_str(height).await?;

0 commit comments

Comments
 (0)