Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Use a transaction for writing blocks #1718

Merged
merged 1 commit into from
Jul 25, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ethcore/src/blockchain/blockchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,9 @@ impl BlockChain {
children: vec![]
};

bc.blocks_db.put(&hash, genesis).unwrap();
let block_batch = DBTransaction::new();
block_batch.put(&hash, genesis).unwrap();
bc.blocks_db.write(block_batch).expect("Low level database error. Some issue with disk?");

let batch = DBTransaction::new();
batch.write(&hash, &details);
Expand Down