Skip to content

Commit

Permalink
refactor: rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
karbyshev committed Jul 14, 2023
1 parent 32a10a4 commit 20a110f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions apps/src/lib/node/ledger/storage/rocksdb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ impl DB for RocksDB {
}
}

fn write_block(
fn add_block_to_batch(
&self,
state: BlockStateWrite,
batch: &mut Self::WriteBatch,
Expand Down Expand Up @@ -1806,6 +1806,6 @@ mod test {
eth_events_queue: &eth_events_queue,
};

db.write_block(block, batch, true)
db.add_block_to_batch(block, batch, true)
}
}
2 changes: 1 addition & 1 deletion core/src/ledger/storage/mockdb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ impl DB for MockDB {
}
}

fn write_block(
fn add_block_to_batch(
&self,
state: BlockStateWrite,
_batch: &mut Self::WriteBatch,
Expand Down
5 changes: 3 additions & 2 deletions core/src/ledger/storage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ pub trait DB: std::fmt::Debug {

/// Write block's metadata. Merkle tree sub-stores are committed only when
/// `is_full_commit` is `true` (typically on a beginning of a new epoch).
fn write_block(
fn add_block_to_batch(
&self,
state: BlockStateWrite,
batch: &mut Self::WriteBatch,
Expand Down Expand Up @@ -532,7 +532,8 @@ where
ethereum_height: self.ethereum_height.as_ref(),
eth_events_queue: &self.eth_events_queue,
};
self.db.write_block(state, &mut batch, is_full_commit)?;
self.db
.add_block_to_batch(state, &mut batch, is_full_commit)?;
let header = self
.header
.take()
Expand Down

0 comments on commit 20a110f

Please sign in to comment.