feat(persist): Add stage_and_commit to Persist
In the example_cli we were not always committing (seemingly by mistake). This then caused all the examples to have to compensate by manually committing.
This commit is contained in:
@@ -122,7 +122,7 @@ fn main() -> anyhow::Result<()> {
|
||||
let electrum_cmd = match &args.command {
|
||||
example_cli::Commands::ChainSpecific(electrum_cmd) => electrum_cmd,
|
||||
general_cmd => {
|
||||
let res = example_cli::handle_commands(
|
||||
return example_cli::handle_commands(
|
||||
&graph,
|
||||
&db,
|
||||
&chain,
|
||||
@@ -135,9 +135,6 @@ fn main() -> anyhow::Result<()> {
|
||||
},
|
||||
general_cmd.clone(),
|
||||
);
|
||||
|
||||
db.lock().unwrap().commit()?;
|
||||
return res;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user