From 0a66d297157b965846fe0cf5f02caa1a36a3d7dc Mon Sep 17 00:00:00 2001 From: Nikolay Volf Date: Sun, 31 Jan 2016 14:07:22 +0400 Subject: [PATCH] fixed mistake of not taking previous database --- src/state.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/state.rs b/src/state.rs index 8d9f35750..58cdf85a2 100644 --- a/src/state.rs +++ b/src/state.rs @@ -351,7 +351,7 @@ fn remove() { fn remove_from_database() { let a = Address::zero(); let temp = RandomTempPath::new(); - { + let (root, db) = { let mut state = get_temp_state_in(temp.as_path()); state.inc_nonce(&a); state.commit(); @@ -361,7 +361,7 @@ fn remove_from_database() { }; let (root, db) = { - let mut state = get_temp_state_in(temp.as_path()); + let mut state = State::from_existing(db, root, U256::from(0u8)); assert_eq!(state.exists(&a), true); assert_eq!(state.nonce(&a), U256::from(1u64)); state.kill_account(&a);