mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 13:21:10 +00:00
Enable sync mode for paritydb (#7961)
This commit is contained in:
@@ -37,6 +37,7 @@ pub fn open<H: Clone>(path: &std::path::Path, db_type: DatabaseType)
|
|||||||
-> parity_db::Result<std::sync::Arc<dyn Database<H>>>
|
-> parity_db::Result<std::sync::Arc<dyn Database<H>>>
|
||||||
{
|
{
|
||||||
let mut config = parity_db::Options::with_columns(path, NUM_COLUMNS as u8);
|
let mut config = parity_db::Options::with_columns(path, NUM_COLUMNS as u8);
|
||||||
|
config.sync = true; // Flush each commit
|
||||||
if db_type == DatabaseType::Full {
|
if db_type == DatabaseType::Full {
|
||||||
let mut state_col = &mut config.columns[columns::STATE as usize];
|
let mut state_col = &mut config.columns[columns::STATE as usize];
|
||||||
state_col.ref_counted = true;
|
state_col.ref_counted = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user