Skip to content

Commit

Permalink
style: incorporate feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
0xrusowsky committed Dec 16, 2024
1 parent 1713732 commit a0de7f2
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 180 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ Cargo.lock

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

# Ignore RISCV emulator files
**/rvemu.*
Binary file removed r55/rvemu.dtb
Binary file not shown.
88 changes: 0 additions & 88 deletions r55/rvemu.dts

This file was deleted.

8 changes: 5 additions & 3 deletions r55/src/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ use revm::{
};
use rvemu::{emulator::Emulator, exception::Exception};
use std::{collections::BTreeMap, rc::Rc, sync::Arc};
use tracing::{debug, warn};
use tracing::{debug, trace, warn};

use super::error::{Error, Result, TxResult};
use super::gas;
use super::syscall_gas;

const R5_REST_OF_RAM_INIT: u64 = 0x80300000; // Defined at `r5-rust-rt.x`

pub fn deploy_contract(db: &mut InMemoryDB, bytecode: Bytes) -> Result<Address> {
let mut evm = Evm::builder()
.with_db(db)
Expand Down Expand Up @@ -203,7 +205,7 @@ fn execute_riscv(
) -> Result<InterpreterAction> {
debug!(
"{} RISC-V execution: PC: {:#x} Return data dst: {:#?}",
if rvemu.emu.cpu.pc == 0x80300000 {
if rvemu.emu.cpu.pc == R5_REST_OF_RAM_INIT {
"Starting"
} else {
"Resuming"
Expand Down Expand Up @@ -547,7 +549,7 @@ fn execute_riscv(
}
}
Ok(_) => {
debug!("Successful instruction at PC: {:#x}", emu.cpu.pc);
trace!("Successful instruction at PC: {:#x}", emu.cpu.pc);
continue;
}
Err(e) => {
Expand Down
1 change: 0 additions & 1 deletion r55/src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ pub fn initialize_logger() {
log_level
)))
.with_target(false)
// .without_time()
.finish();
tracing::subscriber::set_global_default(tracing_sub)
.expect("Setting tracing subscriber failed");
Expand Down
88 changes: 0 additions & 88 deletions rvemu.dts

This file was deleted.

0 comments on commit a0de7f2

Please sign in to comment.