Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Agusrodri committed Jun 19, 2024
1 parent ed64bc2 commit 8bf3859
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
7 changes: 6 additions & 1 deletion interpreter/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,12 @@ pub trait RuntimeBackend: RuntimeBaseBackend {
/// Fully delete storages of an account.
fn reset_storage(&mut self, address: H160);
/// Set code of an account.
fn set_code(&mut self, address: H160, code: Vec<u8>, caller: Option<H160>) -> Result<(), ExitError>;
fn set_code(
&mut self,
address: H160,
code: Vec<u8>,
caller: Option<H160>,
) -> Result<(), ExitError>;
/// Reset balance of an account.
fn reset_balance(&mut self, address: H160);
fn deposit(&mut self, target: H160, value: U256);
Expand Down
7 changes: 6 additions & 1 deletion interpreter/tests/usability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,12 @@ impl RuntimeBackend for UnimplementedHandler {
unimplemented!()
}

fn set_code(&mut self, _address: H160, _code: Vec<u8>, _caller: Option<H160>) -> Result<(), ExitError> {
fn set_code(
&mut self,
_address: H160,
_code: Vec<u8>,
_caller: Option<H160>,
) -> Result<(), ExitError> {
unimplemented!()
}

Expand Down
7 changes: 6 additions & 1 deletion src/backend/overlayed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,12 @@ impl<B: RuntimeBaseBackend> RuntimeBackend for OverlayedBackend<B> {
self.substate.storage_resets.insert(address);
}

fn set_code(&mut self, address: H160, code: Vec<u8>, _caller: Option<H160>) -> Result<(), ExitError> {
fn set_code(
&mut self,
address: H160,
code: Vec<u8>,
_caller: Option<H160>,
) -> Result<(), ExitError> {
self.substate.codes.insert(address, code);
Ok(())
}
Expand Down
2 changes: 1 addition & 1 deletion src/standard/invoker/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ where
retbuf,
&mut substate,
handler,
None
None,
)?;

Ok(TransactValue::Create {
Expand Down

0 comments on commit 8bf3859

Please sign in to comment.