cargo fmt
This commit is contained in:
parent
344699a6b2
commit
a0425cee61
|
@ -23,8 +23,7 @@ use zcash_client_sqlite::{
|
|||
get_verified_balance,
|
||||
},
|
||||
scan::{decrypt_and_store_transaction, scan_cached_blocks},
|
||||
transact::{create_to_address, OvkPolicy}
|
||||
|
||||
transact::{create_to_address, OvkPolicy},
|
||||
};
|
||||
use zcash_primitives::{
|
||||
block::BlockHash,
|
||||
|
@ -617,7 +616,6 @@ pub extern "C" fn zcashlc_create_to_address(
|
|||
output_params_len: usize,
|
||||
) -> i64 {
|
||||
let res = catch_panic(|| {
|
||||
|
||||
let branch_id = match BranchId::try_from(consensus_branch_id as u32) {
|
||||
Ok(extsk) => extsk,
|
||||
Err(e) => {
|
||||
|
@ -677,7 +675,7 @@ pub extern "C" fn zcashlc_create_to_address(
|
|||
&to,
|
||||
value,
|
||||
Some(memo),
|
||||
OvkPolicy::Sender
|
||||
OvkPolicy::Sender,
|
||||
)
|
||||
.map_err(|e| format_err!("Error while sending funds: {}", e))
|
||||
});
|
||||
|
@ -685,14 +683,12 @@ pub extern "C" fn zcashlc_create_to_address(
|
|||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn zcashlc_branch_id_for_height(
|
||||
height: i32,
|
||||
) -> i32 {
|
||||
pub extern "C" fn zcashlc_branch_id_for_height(height: i32) -> i32 {
|
||||
let res = catch_panic(|| {
|
||||
let branch: BranchId = BranchId::for_height::<Network>(height as u32);
|
||||
let branch_id:u32 = u32::from(branch);
|
||||
let branch_id: u32 = u32::from(branch);
|
||||
Ok(branch_id as i32)
|
||||
});
|
||||
});
|
||||
unwrap_exc_or(res, -1)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue