Skip to content

Move receivable scan to dedicated wallets thread#5011

Merged
pwojcikdev merged 1 commit intonanocurrency:developfrom
pwojcikdev:wallet-search-receivable-thread
Jan 25, 2026
Merged

Move receivable scan to dedicated wallets thread#5011
pwojcikdev merged 1 commit intonanocurrency:developfrom
pwojcikdev:wallet-search-receivable-thread

Conversation

@pwojcikdev
Copy link
Copy Markdown
Contributor

No description provided.

@gr0vity-dev-bot
Copy link
Copy Markdown

Test Results for Commit 10c10ed

Pull Request 5011: Results
Overall Status:

Test Case Results

  • 5n4pr_conf_10k_bintree: FAIL (Duration: 185s)
  • Log
  • 5n4pr_conf_10k_change: PASS (Duration: 128s)
  • 5n4pr_conf_change_dependant: PASS (Duration: 131s)
  • 5n4pr_conf_change_independant: PASS (Duration: 139s)
  • 5n4pr_conf_send_dependant: PASS (Duration: 124s)
  • 5n4pr_conf_send_independant: PASS (Duration: 128s)
  • 5n4pr_rocks_10k_bintree: PASS (Duration: 106s)
  • 5n4pr_rocks_10k_change: PASS (Duration: 146s)

Last updated: 2026-01-25 21:31:45 UTC

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the receivable block scanning functionality by moving it from a delayed task on the node's worker thread pool to a dedicated background thread in the wallets component, following the same pattern established by the existing representative scanning thread.

Changes:

  • Created a dedicated receivable_thread in the wallets class that continuously scans for receivable blocks
  • Removed the recursive node::search_receivable_all() method that used worker thread scheduling
  • Added appropriate thread role and statistics enums for the new thread

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
nano/node/wallet.hpp Added run_receivable_scan() method declaration, receivable_condition condition variable, and receivable_thread member
nano/node/wallet.cpp Implemented run_receivable_scan() loop, thread initialization in start(), and cleanup in stop()
nano/node/node.hpp Removed search_receivable_all() method declaration from node class
nano/node/node.cpp Removed search_receivable_all() implementation and its call from node::start()
nano/lib/thread_roles.hpp Added wallet_receivable thread role enum value
nano/lib/thread_roles.cpp Added string mapping for wallet_receivable thread role
nano/lib/stats_enums.hpp Added loop_receivable statistic detail enum value
nano/core_test/wallets.cpp Added comprehensive test for the background receivable scanning functionality

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pwojcikdev pwojcikdev merged commit c71134a into nanocurrency:develop Jan 25, 2026
32 checks passed
@pwojcikdev pwojcikdev deleted the wallet-search-receivable-thread branch January 26, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants