mirror of https://github.com/vacp2p/zerokit.git
fix: rename close_db_connection to flush (#192)
This commit is contained in:
parent
5cf2b2e05e
commit
9d4ed68450
|
@ -403,8 +403,8 @@ pub extern "C" fn get_metadata(ctx: *const RLN, output_buffer: *mut Buffer) -> b
|
||||||
|
|
||||||
#[allow(clippy::not_unsafe_ptr_arg_deref)]
|
#[allow(clippy::not_unsafe_ptr_arg_deref)]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn close_db_connection(ctx: *mut RLN) -> bool {
|
pub extern "C" fn flush(ctx: *mut RLN) -> bool {
|
||||||
call!(ctx, close_db_connection)
|
call!(ctx, flush)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::not_unsafe_ptr_arg_deref)]
|
#[allow(clippy::not_unsafe_ptr_arg_deref)]
|
||||||
|
|
|
@ -1134,7 +1134,7 @@ impl RLN<'_> {
|
||||||
/// This function should be called before the RLN object is dropped.
|
/// This function should be called before the RLN object is dropped.
|
||||||
/// If not called, the connection will be closed when the RLN object is dropped.
|
/// If not called, the connection will be closed when the RLN object is dropped.
|
||||||
/// This improves robustness of the tree.
|
/// This improves robustness of the tree.
|
||||||
pub fn close_db_connection(&mut self) -> Result<()> {
|
pub fn flush(&mut self) -> Result<()> {
|
||||||
self.tree.close_db_connection()
|
self.tree.close_db_connection()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1387,7 +1387,7 @@ mod test {
|
||||||
|
|
||||||
assert_eq!(root_batch_with_init, root_single_additions);
|
assert_eq!(root_batch_with_init, root_single_additions);
|
||||||
|
|
||||||
rln.close_db_connection();
|
rln.flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
Loading…
Reference in New Issue