@@ -6,7 +6,7 @@ use starcoin_statedb::{ChainStateDB, ChainStateReader};
6
6
use starcoin_storage:: {
7
7
db_storage:: DBStorage , storage:: StorageInstance , BlockStore , Storage , StorageVersion ,
8
8
} ;
9
- use std:: { fmt :: Debug , io:: Write , path:: Path , sync:: Arc } ;
9
+ use std:: { io:: Write , path:: Path , sync:: Arc } ;
10
10
11
11
/// Export resources and code from storage for a specific block
12
12
pub fn export ( db : & str , output : & Path , block_id : HashValue ) -> anyhow:: Result < ( ) > {
@@ -81,15 +81,12 @@ pub fn export_from_statedb<W: Write>(
81
81
#[ cfg( test) ]
82
82
mod test {
83
83
use super :: * ;
84
- use starcoin_config:: ChainNetwork ;
85
84
use std:: io:: Cursor ;
86
- use tempfile:: TempDir ;
87
85
use test_helper:: executor:: prepare_genesis;
88
86
89
87
#[ test]
90
88
fn test_export_from_statedb ( ) -> anyhow:: Result < ( ) > {
91
89
// Initialize test storage with genesis
92
- let net = ChainNetwork :: new_test ( ) ;
93
90
let ( chain_statedb, _net) = prepare_genesis ( ) ;
94
91
95
92
// Create a buffer to write CSV data
@@ -108,7 +105,7 @@ mod test {
108
105
let mut csv_reader = csv:: Reader :: from_reader ( data_str. as_bytes ( ) ) ;
109
106
let mut has_data = false ;
110
107
for result in csv_reader. records ( ) {
111
- let record = result?;
108
+ let _record = result?;
112
109
// println!("Record: {:?}", record);
113
110
has_data = true ;
114
111
}
0 commit comments