Skip to content

Commit

Permalink
remove unused funtion and group imports
Browse files Browse the repository at this point in the history
  • Loading branch information
simonjiao committed Oct 17, 2024
1 parent 57e364c commit 6132381
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 27 deletions.
30 changes: 17 additions & 13 deletions genesis/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,23 @@ use starcoin_types::startup_info::{ChainInfo, StartupInfo};
use starcoin_types::transaction::Package;
use starcoin_types::transaction::TransactionInfo;
use starcoin_types::{block::Block, transaction::Transaction};
use starcoin_vm_types::account_config::CORE_CODE_ADDRESS;
use starcoin_vm_types::state_store::table::{TableHandle, TableInfo};
use starcoin_vm_types::state_store::StateView;
use starcoin_vm_types::transaction::{
RawUserTransaction, SignedUserTransaction, TransactionPayload,
use starcoin_vm_types::{
account_config::CORE_CODE_ADDRESS,
state_store::{
table::{TableHandle, TableInfo},
StateView,
},
transaction::{RawUserTransaction, SignedUserTransaction, TransactionPayload},
vm_status::KeptVMStatus,
};
use std::{
collections::BTreeMap,
fmt::Display,
fs::{create_dir_all, File},
io::{Read, Write},
path::{Path, PathBuf},
sync::Arc,
};
use starcoin_vm_types::vm_status::KeptVMStatus;
use std::collections::BTreeMap;
use std::fmt::Display;
use std::fs::{create_dir_all, File};
use std::io::{Read, Write};
use std::path::{Path, PathBuf};
use std::sync::Arc;

pub static G_GENESIS_GENERATED_DIR: &str = "generated";
pub const GENESIS_DIR: Dir = include_dir!("generated");
Expand Down Expand Up @@ -639,7 +643,7 @@ mod tests {
"test if the genesis config is the same as framework config({:?})",
net.id()
);
let mut vm = StarcoinVM::new(None);
let mut vm = StarcoinVM::new(None, state_db);
let data = vm
.execute_readonly_function(
state_db,
Expand Down
23 changes: 13 additions & 10 deletions state/statedb/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,21 @@ use starcoin_types::{
account_state::AccountState,
state_set::{AccountStateSet, ChainStateSet},
};
use starcoin_vm_types::access_path::{DataPath, ModuleName};
#[cfg(test)]
use starcoin_vm_types::account_config::TABLE_ADDRESS_LIST_LEN;
use starcoin_vm_types::account_config::TABLE_HANDLE_ADDRESS_LIST;
use starcoin_vm_types::language_storage::StructTag;
use starcoin_vm_types::state_store::errors::StateviewError;
use starcoin_vm_types::state_store::state_key::inner::StateKeyInner;
use starcoin_vm_types::state_store::state_storage_usage::StateStorageUsage;
use starcoin_vm_types::state_store::state_value::StateValue;
use starcoin_vm_types::state_store::table::TableInfo;
use starcoin_vm_types::state_store::TStateView;
use starcoin_vm_types::state_store::{state_key::StateKey, table::TableHandle};
use starcoin_vm_types::{
access_path::{DataPath, ModuleName},
account_config::TABLE_HANDLE_ADDRESS_LIST,
language_storage::StructTag,
state_store::{
errors::StateviewError,
state_key::{inner::StateKeyInner, StateKey},
state_storage_usage::StateStorageUsage,
state_value::StateValue,
table::{TableHandle, TableInfo},
TStateView,
},
};
use std::collections::HashSet;
use std::convert::TryInto;
use std::sync::Arc;
Expand Down
4 changes: 0 additions & 4 deletions vm/vm-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,3 @@ pub trait VMExecutor: Send + Sync {
metrics: Option<VMMetrics>,
) -> Result<Vec<TransactionOutput>, VMStatus>;
}
/// Get the AccessPath to a resource stored under `address` with type name `tag`
fn create_access_path(address: AccountAddress, tag: StructTag) -> AccessPath {
AccessPath::resource_access_path(address, tag)
}

0 comments on commit 6132381

Please sign in to comment.