Fix tests

This commit is contained in:
Vurich
2017-06-28 16:41:08 +02:00
parent 3d8dc11442
commit 01ce28bc9a
24 changed files with 64 additions and 64 deletions

View File

@@ -1826,14 +1826,14 @@ mod tests {
let mut state = get_temp_state();
state.require_or_from(&a, false, ||Account::new_contract(42.into(), 0.into()), |_|{}).unwrap();
state.init_code(&a, vec![1, 2, 3]).unwrap();
assert_eq!(state.code(&a).unwrap(), Some(Arc::new([1u8, 2, 3].into_vec())));
assert_eq!(state.code(&a).unwrap(), Some(Arc::new(vec![1u8, 2, 3])));
state.commit().unwrap();
assert_eq!(state.code(&a).unwrap(), Some(Arc::new([1u8, 2, 3].into_vec())));
assert_eq!(state.code(&a).unwrap(), Some(Arc::new(vec![1u8, 2, 3])));
state.drop()
};
let state = State::from_existing(db, root, U256::from(0u8), Default::default()).unwrap();
assert_eq!(state.code(&a).unwrap(), Some(Arc::new([1u8, 2, 3].into_vec())));
assert_eq!(state.code(&a).unwrap(), Some(Arc::new(vec![1u8, 2, 3])));
}
#[test]
@@ -2040,7 +2040,7 @@ mod tests {
let mut state = get_temp_state();
let a: Address = 0xa.into();
state.init_code(&a, b"abcdefg".into_vec()).unwrap();;
state.init_code(&a, b"abcdefg".to_vec()).unwrap();;
state.add_balance(&a, &256.into(), CleanupMode::NoEmpty).unwrap();
state.set_storage(&a, 0xb.into(), 0xc.into()).unwrap();