Skip to content

Fix rpc.block_count_pruning test flakiness#5012

Merged
pwojcikdev merged 1 commit intonanocurrency:developfrom
pwojcikdev:fix-rpc.block_count_pruning
Jan 26, 2026
Merged

Fix rpc.block_count_pruning test flakiness#5012
pwojcikdev merged 1 commit intonanocurrency:developfrom
pwojcikdev:fix-rpc.block_count_pruning

Conversation

@pwojcikdev
Copy link
Copy Markdown
Contributor

The test was failing because node0 would auto-receive the send block, creating a fork with the receive1 block that node1 processes locally. With two competing receive blocks, elections couldn't reach consensus.

@gr0vity-dev-bot
Copy link
Copy Markdown

gr0vity-dev-bot commented Jan 26, 2026

Test Results for Commit 20af3a2

Pull Request 5012: Results
Overall Status:

Test Case Results

  • 5n4pr_conf_10k_bintree: PASS (Duration: 108s)
  • 5n4pr_conf_10k_change: PASS (Duration: 133s)
  • 5n4pr_conf_change_dependant: PASS (Duration: 137s)
  • 5n4pr_conf_change_independant: FAIL (Duration: 1579s)
  • Log
  • 5n4pr_conf_send_dependant: PASS (Duration: 121s)
  • 5n4pr_conf_send_independant: PASS (Duration: 122s)
  • 5n4pr_rocks_10k_bintree: PASS (Duration: 107s)
  • 5n4pr_rocks_10k_change: PASS (Duration: 144s)

Last updated: 2026-01-26 15:31:36 UTC

@pwojcikdev pwojcikdev requested a review from Copilot January 26, 2026 16:04
@pwojcikdev pwojcikdev merged commit 9d3092c into nanocurrency:develop Jan 26, 2026
28 of 29 checks passed
@pwojcikdev pwojcikdev deleted the fix-rpc.block_count_pruning branch January 26, 2026 16:04
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 fixes a flaky test in the RPC test suite by preventing node0 from auto-receiving a send block that would create a fork with the manually processed receive block.

Changes:

  • Configures node0 with a high receive_minimum threshold to disable auto-receive behavior in the block_count_pruning test

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

nano::node_config node_config0 = system.default_config ();
node_config0.receive_minimum = nano::dev::constants.genesis_amount; // Prevent auto-receive & receive1 block conflicts
auto & node0 = *system.add_node (node_config0);
nano::node_config node_config = system.default_config ();
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

The variable name node_config is used for the second node's configuration (line 2288), while node_config0 is used for the first node. For consistency and clarity, consider renaming node_config to node_config1 to match the pattern where node0 uses node_config0 and node1 uses node_config1. This would make it clearer which configuration belongs to which node.

Copilot uses AI. Check for mistakes.
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