Skip to content

Commit

Permalink
rusk-wallet: Rename fetch_network_pos to num_notes
Browse files Browse the repository at this point in the history
  • Loading branch information
Daksh14 committed Oct 1, 2024
1 parent af9245d commit 60430ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions rusk-wallet/src/clients.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,8 @@ impl State {
Ok(branch)
}

/// Queries the transfer contract for the latest network position.
pub async fn fetch_network_pos(&self) -> Result<u64, Error> {
/// Queries the transfer contract for the number of notes.
pub async fn fetch_num_notes(&self) -> Result<u64, Error> {
let status = self.status;
status("Fetching latest note position...");

Expand Down
2 changes: 1 addition & 1 deletion rusk-wallet/src/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,7 @@ impl<F: SecureWalletFile + Debug> Wallet<F> {
pub async fn is_synced(&mut self) -> Result<bool, Error> {
let state = self.state()?;
let db_pos = state.cache().last_pos()?.unwrap_or(0);
let network_last_pos = state.fetch_network_pos().await? - 1;
let network_last_pos = state.fetch_num_notes().await? - 1;

Ok(network_last_pos == db_pos)
}
Expand Down

0 comments on commit 60430ff

Please sign in to comment.