diff --git a/cli/src/cli.rs b/cli/src/cli.rs index da7633804..05eebbba8 100644 --- a/cli/src/cli.rs +++ b/cli/src/cli.rs @@ -355,9 +355,9 @@ impl KaspaCli { Events::WalletClose => { this.term().refresh_prompt(); }, - Events::DAAScoreChange { daa_score } => { + Events::DAAScoreChange { current_daa_score } => { if this.is_mutted() && this.flags.get(Track::Daa) { - tprintln!(this, "{NOTIFY} DAA: {daa_score}"); + tprintln!(this, "{NOTIFY} DAA: {current_daa_score}"); } }, Events::Reorg { diff --git a/wallet/core/src/events.rs b/wallet/core/src/events.rs index ff873c379..9423f516a 100644 --- a/wallet/core/src/events.rs +++ b/wallet/core/src/events.rs @@ -105,7 +105,7 @@ pub enum Events { /// for an unknown reason. (general error trap) UtxoProcError { message: String }, /// DAA score change - DAAScoreChange { daa_score: u64 }, + DAAScoreChange { current_daa_score: u64 }, /// New incoming pending UTXO/transaction Pending { record: TransactionRecord, diff --git a/wallet/core/src/runtime/wallet.rs b/wallet/core/src/runtime/wallet.rs index bcd368de8..7c7cd3f17 100644 --- a/wallet/core/src/runtime/wallet.rs +++ b/wallet/core/src/runtime/wallet.rs @@ -221,7 +221,7 @@ impl Wallet { /// For end-user wallets only - activates all accounts in the wallet /// storage. pub async fn activate_all_stored_accounts(self: &Arc) -> Result>> { - Ok(self.accounts(None).await?.try_collect::>().await?) + self.accounts(None).await?.try_collect::>().await } /// Select an account as 'active'. Supply `None` to remove active selection. diff --git a/wallet/core/src/utxo/processor.rs b/wallet/core/src/utxo/processor.rs index 4888f1d10..64134c476 100644 --- a/wallet/core/src/utxo/processor.rs +++ b/wallet/core/src/utxo/processor.rs @@ -165,20 +165,20 @@ impl UtxoProcessor { Ok(()) } - pub async fn handle_daa_score_change(&self, daa_score: u64) -> Result<()> { - self.inner.current_daa_score.store(daa_score, Ordering::SeqCst); - self.notify(Events::DAAScoreChange { daa_score }).await?; - self.handle_pending(daa_score).await?; - self.handle_recoverable(daa_score).await?; + pub async fn handle_daa_score_change(&self, current_daa_score: u64) -> Result<()> { + self.inner.current_daa_score.store(current_daa_score, Ordering::SeqCst); + self.notify(Events::DAAScoreChange { current_daa_score }).await?; + self.handle_pending(current_daa_score).await?; + self.handle_recoverable(current_daa_score).await?; Ok(()) } - pub async fn handle_pending(&self, daa_score: u64) -> Result<()> { + pub async fn handle_pending(&self, current_daa_score: u64) -> Result<()> { let mature_entries = { let mut mature_entries = vec![]; let pending_entries = &self.inner.pending; pending_entries.retain(|_, pending| { - if pending.is_mature(daa_score) { + if pending.is_mature(current_daa_score) { mature_entries.push(pending.clone()); false } else {