Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
itegulov committed Dec 17, 2024
1 parent b5eebeb commit d6879a9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion crates/core/src/node/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl InMemoryNode {

let allow_no_target = system_contracts.evm_emulator.is_some();
let mut l2_tx = L2Tx::from_request(request.into(), MAX_TX_SIZE, allow_no_target)
.map_err(|err| Web3Error::SerializationError(err))?;
.map_err(Web3Error::SerializationError)?;
let execution_mode = zksync_multivm::interface::TxExecutionMode::EthCall;
let storage = StorageView::new(&inner.fork_storage).into_rc_ptr();

Expand Down
20 changes: 8 additions & 12 deletions crates/core/src/node/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,27 +475,24 @@ impl InMemoryNode {
}
})
}
Ok(self
.write_inner()?
self.write_inner()?
.filters
.add_log_filter(from_block, to_block, addresses, topics)
.map_err(anyhow::Error::msg)?)
.map_err(anyhow::Error::msg)
}

pub async fn new_block_filter_impl(&self) -> anyhow::Result<U256> {
Ok(self
.write_inner()?
self.write_inner()?
.filters
.add_block_filter()
.map_err(anyhow::Error::msg)?)
.map_err(anyhow::Error::msg)
}

pub async fn new_pending_transaction_filter_impl(&self) -> anyhow::Result<U256> {
Ok(self
.write_inner()?
self.write_inner()?
.filters
.add_pending_transaction_filter()
.map_err(anyhow::Error::msg)?)
.map_err(anyhow::Error::msg)
}

pub async fn uninstall_filter_impl(&self, id: U256) -> anyhow::Result<bool> {
Expand Down Expand Up @@ -568,11 +565,10 @@ impl InMemoryNode {
}

pub async fn get_filter_changes_impl(&self, id: U256) -> anyhow::Result<FilterChanges> {
Ok(self
.write_inner()?
self.write_inner()?
.filters
.get_new_changes(id)
.map_err(anyhow::Error::msg)?)
.map_err(anyhow::Error::msg)
}

pub async fn get_block_transaction_count_by_number_impl(
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/node/in_memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ impl InMemoryNodeInner {
MAX_TX_SIZE,
allow_no_target,
)
.map_err(|err| Web3Error::SerializationError(err))?;
.map_err(Web3Error::SerializationError)?;

let tx: Transaction = l2_tx.clone().into();

Expand Down

0 comments on commit d6879a9

Please sign in to comment.