Compiled lib.rs
This commit is contained in:
parent
169a79e36b
commit
3cad02bf26
|
@ -29,7 +29,6 @@ use zcash_client_sqlite::{
|
||||||
use zcash_primitives::{
|
use zcash_primitives::{
|
||||||
block::BlockHash,
|
block::BlockHash,
|
||||||
consensus::{BlockHeight, BranchId, Parameters},
|
consensus::{BlockHeight, BranchId, Parameters},
|
||||||
legacy::TransparentAddress,
|
|
||||||
note_encryption::Memo,
|
note_encryption::Memo,
|
||||||
transaction::{components::Amount, Transaction},
|
transaction::{components::Amount, Transaction},
|
||||||
zip32::ExtendedFullViewingKey,
|
zip32::ExtendedFullViewingKey,
|
||||||
|
@ -128,8 +127,9 @@ pub extern "C" fn zcashlc_init_data_database(db_data: *const u8, db_data_len: us
|
||||||
slice::from_raw_parts(db_data, db_data_len)
|
slice::from_raw_parts(db_data, db_data_len)
|
||||||
}));
|
}));
|
||||||
|
|
||||||
init_data_database(&db_data)
|
WalletDB::for_path(db_data)
|
||||||
.map(|()| 1)
|
.map(|db| init_data_database(&db))
|
||||||
|
.map(|_| 1)
|
||||||
.map_err(|e| format_err!("Error while initializing data DB: {}", e))
|
.map_err(|e| format_err!("Error while initializing data DB: {}", e))
|
||||||
});
|
});
|
||||||
unwrap_exc_or_null(res)
|
unwrap_exc_or_null(res)
|
||||||
|
@ -406,7 +406,7 @@ pub extern "C" fn zcashlc_init_blocks_table(
|
||||||
let sapling_tree =
|
let sapling_tree =
|
||||||
hex::decode(unsafe { CStr::from_ptr(sapling_tree_hex) }.to_str()?).unwrap();
|
hex::decode(unsafe { CStr::from_ptr(sapling_tree_hex) }.to_str()?).unwrap();
|
||||||
|
|
||||||
match init_blocks_table(&db_data, BlockHeight(height as u32), hash,time, &sapling_tree) {
|
match init_blocks_table(&db_data, BlockHeight::from_u32(height as u32), hash,time, &sapling_tree) {
|
||||||
Ok(()) => Ok(1),
|
Ok(()) => Ok(1),
|
||||||
Err(e) => Err(format_err!("Error while initializing blocks table: {}", e)),
|
Err(e) => Err(format_err!("Error while initializing blocks table: {}", e)),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue