build: update node and wallet to latest versions
This commit is contained in:
Generated
+1
@@ -4275,6 +4275,7 @@ dependencies = [
|
|||||||
"easy-jsonrpc-mw",
|
"easy-jsonrpc-mw",
|
||||||
"futures 0.3.31",
|
"futures 0.3.31",
|
||||||
"grin_api",
|
"grin_api",
|
||||||
|
"grin_chain",
|
||||||
"grin_core",
|
"grin_core",
|
||||||
"grin_keychain",
|
"grin_keychain",
|
||||||
"grin_util",
|
"grin_util",
|
||||||
|
|||||||
+1
-1
Submodule node updated: f3796fa27b...386ac1ed5c
+1
-1
@@ -682,7 +682,7 @@ fn start_node_server() -> Result<Server, Error> {
|
|||||||
// Start integrated node server.
|
// Start integrated node server.
|
||||||
let api_chan: &'static mut (oneshot::Sender<()>, oneshot::Receiver<()>) =
|
let api_chan: &'static mut (oneshot::Sender<()>, oneshot::Receiver<()>) =
|
||||||
Box::leak(Box::new(oneshot::channel::<()>()));
|
Box::leak(Box::new(oneshot::channel::<()>()));
|
||||||
let server_result = Server::new(server_config, None, api_chan);
|
let server_result = Server::new(server_config, None, None, api_chan);
|
||||||
server_result
|
server_result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -122,7 +122,7 @@ pub type WalletInstance = Arc<
|
|||||||
Box<
|
Box<
|
||||||
dyn WalletInst<
|
dyn WalletInst<
|
||||||
'static,
|
'static,
|
||||||
DefaultLCProvider<'static, HTTPNodeClient, ExtKeychain>,
|
DefaultLCProvider<HTTPNodeClient, ExtKeychain>,
|
||||||
HTTPNodeClient,
|
HTTPNodeClient,
|
||||||
ExtKeychain,
|
ExtKeychain,
|
||||||
>,
|
>,
|
||||||
|
|||||||
+9
-10
@@ -35,7 +35,7 @@ use grin_wallet_api::Owner;
|
|||||||
use grin_wallet_controller::command::parse_slatepack;
|
use grin_wallet_controller::command::parse_slatepack;
|
||||||
use grin_wallet_controller::controller;
|
use grin_wallet_controller::controller;
|
||||||
use grin_wallet_controller::controller::ForeignAPIHandlerV2;
|
use grin_wallet_controller::controller::ForeignAPIHandlerV2;
|
||||||
use grin_wallet_impls::{DefaultLCProvider, DefaultWalletImpl, HTTPNodeClient, LMDBBackend};
|
use grin_wallet_impls::{DefaultLCProvider, DefaultWalletImpl, HTTPNodeClient};
|
||||||
use grin_wallet_libwallet::api_impl::owner::{
|
use grin_wallet_libwallet::api_impl::owner::{
|
||||||
cancel_tx, init_send_tx, retrieve_summary_info, retrieve_txs, verify_payment_proof,
|
cancel_tx, init_send_tx, retrieve_summary_info, retrieve_txs, verify_payment_proof,
|
||||||
};
|
};
|
||||||
@@ -206,8 +206,8 @@ impl Wallet {
|
|||||||
)
|
)
|
||||||
.map_err(|_| Error::IO("Seed file creation error".to_string()))?;
|
.map_err(|_| Error::IO("Seed file creation error".to_string()))?;
|
||||||
let node_client = Self::create_node_client(&config)?;
|
let node_client = Self::create_node_client(&config)?;
|
||||||
let mut wallet: LMDBBackend<'static, HTTPNodeClient, ExtKeychain> =
|
let mut wallet: WalletBackend<HTTPNodeClient, ExtKeychain> =
|
||||||
match LMDBBackend::new(path.to_str().unwrap(), node_client) {
|
match WalletBackend::new(path.to_str().unwrap(), node_client) {
|
||||||
Err(_) => {
|
Err(_) => {
|
||||||
return Err(Error::Lifecycle("DB creation error".to_string()).into());
|
return Err(Error::Lifecycle("DB creation error".to_string()).into());
|
||||||
}
|
}
|
||||||
@@ -311,12 +311,12 @@ impl Wallet {
|
|||||||
node_client: C,
|
node_client: C,
|
||||||
) -> Result<Arc<Mutex<Box<dyn WalletInst<'static, L, C, K>>>>, Error>
|
) -> Result<Arc<Mutex<Box<dyn WalletInst<'static, L, C, K>>>>, Error>
|
||||||
where
|
where
|
||||||
DefaultWalletImpl<'static, C>: WalletInst<'static, L, C, K>,
|
DefaultWalletImpl<C>: WalletInst<'static, L, C, K>,
|
||||||
L: WalletLCProvider<'static, C, K>,
|
L: WalletLCProvider<'static, C, K>,
|
||||||
C: NodeClient + 'static,
|
C: NodeClient + 'static,
|
||||||
K: Keychain + 'static,
|
K: Keychain + 'static,
|
||||||
{
|
{
|
||||||
let mut wallet = Box::new(DefaultWalletImpl::<'static, C>::new(node_client).unwrap())
|
let mut wallet = Box::new(DefaultWalletImpl::<C>::new(node_client).unwrap())
|
||||||
as Box<dyn WalletInst<'static, L, C, K>>;
|
as Box<dyn WalletInst<'static, L, C, K>>;
|
||||||
let lc = wallet.lc_provider()?;
|
let lc = wallet.lc_provider()?;
|
||||||
lc.set_top_level_directory(config.get_data_path().as_str())?;
|
lc.set_top_level_directory(config.get_data_path().as_str())?;
|
||||||
@@ -666,7 +666,7 @@ impl Wallet {
|
|||||||
let parent_key_id = w.parent_key_id();
|
let parent_key_id = w.parent_key_id();
|
||||||
// Retrieve txs from database.
|
// Retrieve txs from database.
|
||||||
let txs: Vec<TxLogEntry> = w
|
let txs: Vec<TxLogEntry> = w
|
||||||
.tx_log_iter()
|
.tx_log_iter()?
|
||||||
.filter(|tx_entry| tx_entry.parent_key_id == parent_key_id)
|
.filter(|tx_entry| tx_entry.parent_key_id == parent_key_id)
|
||||||
// Filter transactions to not show txs without slate (usually unspent outputs).
|
// Filter transactions to not show txs without slate (usually unspent outputs).
|
||||||
.filter(|tx| {
|
.filter(|tx| {
|
||||||
@@ -708,7 +708,7 @@ impl Wallet {
|
|||||||
let w = lc.wallet_inst()?;
|
let w = lc.wallet_inst()?;
|
||||||
let parent_key_id = w.parent_key_id();
|
let parent_key_id = w.parent_key_id();
|
||||||
// Retrieve txs from database.
|
// Retrieve txs from database.
|
||||||
w.tx_log_iter()
|
w.tx_log_iter()?
|
||||||
.filter(|tx_entry| tx_entry.parent_key_id == parent_key_id)
|
.filter(|tx_entry| tx_entry.parent_key_id == parent_key_id)
|
||||||
.filter(|tx_entry| {
|
.filter(|tx_entry| {
|
||||||
if tx_entry.tx_type == TxLogEntryType::TxSent
|
if tx_entry.tx_type == TxLogEntryType::TxSent
|
||||||
@@ -1026,7 +1026,7 @@ impl Wallet {
|
|||||||
estimate_only: Some(true),
|
estimate_only: Some(true),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
let res = init_send_tx(&mut **w, self.keychain_mask().as_ref(), args, false);
|
let res = init_send_tx(w, self.keychain_mask().as_ref(), args, false);
|
||||||
match res {
|
match res {
|
||||||
Ok(slate) => Ok(slate.fee_fields.fee()),
|
Ok(slate) => Ok(slate.fee_fields.fee()),
|
||||||
Err(e) => match e {
|
Err(e) => match e {
|
||||||
@@ -1490,7 +1490,7 @@ impl Wallet {
|
|||||||
let w = lc.wallet_inst()?;
|
let w = lc.wallet_inst()?;
|
||||||
// Find wallet transaction to update or create.
|
// Find wallet transaction to update or create.
|
||||||
let txs = w
|
let txs = w
|
||||||
.tx_log_iter()
|
.tx_log_iter()?
|
||||||
.filter(|entry| {
|
.filter(|entry| {
|
||||||
if let Some(excess) = entry.kernel_excess {
|
if let Some(excess) = entry.kernel_excess {
|
||||||
return excess == proof.excess;
|
return excess == proof.excess;
|
||||||
@@ -1873,7 +1873,6 @@ async fn handle_task(w: &Wallet, t: WalletTask) {
|
|||||||
WalletTask::Send(a, r) => {
|
WalletTask::Send(a, r) => {
|
||||||
w.send_creating.store(true, Ordering::Relaxed);
|
w.send_creating.store(true, Ordering::Relaxed);
|
||||||
if let Ok(s) = w.send(*a, r.clone()) {
|
if let Ok(s) = w.send(*a, r.clone()) {
|
||||||
error!("send amount: {}", s.amount);
|
|
||||||
sync_wallet_data(&w, false);
|
sync_wallet_data(&w, false);
|
||||||
let tx = w.retrieve_tx_by_id(None, Some(s.id));
|
let tx = w.retrieve_tx_by_id(None, Some(s.id));
|
||||||
if let Some(tx) = tx {
|
if let Some(tx) = tx {
|
||||||
|
|||||||
+1
-1
Submodule wallet updated: 065825b8e6...8847ee5157
Reference in New Issue
Block a user