Drain the transaction overlay (#11654) (#59)

This commit is contained in:
rakita 2020-09-25 10:46:51 +02:00 committed by GitHub
parent b6a25ba30a
commit 15ebc98877
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -499,8 +499,13 @@ impl StateRebuilder {
account_trie.insert(&hash, &thin_rlp)?;
}
}
trace!(target: "snapshot", "current state root: {:?}", self.state_root);
let backing = self.db.backing().clone();
let mut batch = backing.transaction();
// Drain the transaction overlay and put the data into the batch.
self.db.inject(&mut batch)?;
backing.write_buffered(batch);
Ok(())
}