Merge branch 'gav' into cacheman

This commit is contained in:
Gav Wood 2016-01-19 11:57:45 +01:00
commit e9f65ad063
3 changed files with 7 additions and 7 deletions

View File

@ -236,7 +236,7 @@ mod tests {
#[test]
fn storage_at() {
let mut db = MemoryDB::new_temp();
let mut db = MemoryDB::new();
let rlp = {
let mut a = Account::new_contract(U256::from(69u8));
a.set_storage(H256::from(&U256::from(0x00u64)), H256::from(&U256::from(0x1234u64)));
@ -254,7 +254,7 @@ mod tests {
#[test]
fn note_code() {
let mut db = MemoryDB::new_temp();
let mut db = MemoryDB::new();
let rlp = {
let mut a = Account::new_contract(U256::from(69u8));
@ -273,7 +273,7 @@ mod tests {
#[test]
fn commit_storage() {
let mut a = Account::new_contract(U256::from(69u8));
let mut db = MemoryDB::new_temp();
let mut db = MemoryDB::new();
a.set_storage(x!(0), x!(0x1234));
assert_eq!(a.storage_root(), None);
a.commit_storage(&mut db);
@ -283,7 +283,7 @@ mod tests {
#[test]
fn commit_remove_commit_storage() {
let mut a = Account::new_contract(U256::from(69u8));
let mut db = MemoryDB::new_temp();
let mut db = MemoryDB::new();
a.set_storage(x!(0), x!(0x1234));
a.commit_storage(&mut db);
a.set_storage(x!(1), x!(0x1234));
@ -296,7 +296,7 @@ mod tests {
#[test]
fn commit_code() {
let mut a = Account::new_contract(U256::from(69u8));
let mut db = MemoryDB::new_temp();
let mut db = MemoryDB::new();
a.init_code(vec![0x55, 0x44, 0xffu8]);
assert_eq!(a.code_hash(), SHA3_EMPTY);
a.commit_code(&mut db);

View File

@ -40,7 +40,7 @@ mod tests {
fn ensure_db_good() {
let engine = new_morden().to_engine().unwrap();
let genesis_header = engine.spec().genesis_header();
let mut db = MemoryDB::new_temp();
let mut db = JournalDB::new_temp();
engine.spec().ensure_db_good(&mut db);
let s = State::from_existing(db.clone(), genesis_header.state_root.clone(), engine.account_start_nonce());
assert_eq!(s.balance(&address_from_hex("0000000000000000000000000000000000000001")), U256::from(1u64));

View File

@ -137,7 +137,7 @@ impl OverlayDB {
let mut s = RlpStream::new_list(2);
s.append(&payload.1);
s.append(&payload.0);
self.backing.put(&key.bytes(), &s.out()).expect("Low-level database error. Some issue with your hard disk?");
self.backing.put(&key.bytes(), s.as_raw()).expect("Low-level database error. Some issue with your hard disk?");
false
} else {
self.backing.delete(&key.bytes()).expect("Low-level database error. Some issue with your hard disk?");