Page MenuHomePhabricator

settings: Add update/getPersistent/isIgnored methods
ClosedPublic

Authored by PiRK on Jan 3 2024, 10:03.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCaf12c92a5334: settings: Add update/getPersistent/isIgnored methods
Summary

Add interfaces::Node methods to give GUI finer grained control over
settings.json file. Update method is used to write settings to the file,
getPersistent and isIgnored methods are used to find out about settings
file and command line option interactions.

This is a partial backport of core#15936
https://github.com/bitcoin/bitcoin/pull/15936/commits/0e55bc6e7fe439404dc56093a0949395dae51e6b

Depends on D15064

Test Plan

ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Jan 3 2024, 10:03
Fabien requested changes to this revision.Jan 4 2024, 11:03
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/interfaces/node.h
89 ↗(On Diff #43841)

weird sentence

91 ↗(On Diff #43841)

isPersistentSettingIgnored would be a better name

src/test/settings_tests.cpp
252 ↗(On Diff #43841)

Do you mind adding the annotations also in the above calls ? false, false, false is not very readable

This revision now requires changes to proceed.Jan 4 2024, 11:03

address all review feedback

Failed tests logs:

====== Bitcoin ABC functional tests: abc_p2p_avalanche_voting.py ======

------- Stdout: -------
2024-01-04T13:42:18.991000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_  _20240104_134215/abc_p2p_avalanche_voting_3
2024-01-04T13:42:26.528000Z TestFramework (INFO): Poll for the chain tip...
2024-01-04T13:42:26.583000Z TestFramework (INFO): Poll for a selection of blocks...
2024-01-04T13:42:26.641000Z TestFramework (INFO): Poll for a selection of blocks, but some are now invalid...
2024-01-04T13:42:26.750000Z TestFramework (INFO): Poll for unknown blocks...
2024-01-04T13:42:26.807000Z TestFramework (INFO): Trigger polling from the node...
2024-01-04T13:42:27.122000Z TestFramework (INFO): Answer all polls to finalize...
2024-01-04T13:42:29.083000Z TestFramework (INFO): Answer all polls to park...
2024-01-04T13:42:35.157000Z TestFramework (INFO): Verify finalization sticks...
2024-01-04T13:42:35.157000Z TestFramework (INFO): ...for a chain 1 block long...
2024-01-04T13:42:35.214000Z TestFramework (INFO): ...for a chain 2 blocks long...
2024-01-04T13:42:37.088000Z TestFramework (INFO): ...for a chain 3 blocks long...
2024-01-04T13:42:39.095000Z TestFramework (INFO): ...for a chain 4 blocks long...
2024-01-04T13:42:40.889000Z TestFramework (INFO): ...for a chain 5 blocks long...
2024-01-04T13:42:42.958000Z TestFramework (INFO): Check the node is discouraging unexpected avaresponses.
2024-01-04T13:42:47.703000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 147, in main
    self._run_test_internal()
  File "/work/test/functional/test_framework/test_framework.py", line 137, in _run_test_internal
    self.run_test()
  File "/work/test/functional/abc_p2p_avalanche_voting.py", line 355, in run_test
    poll_node.send_avaresponse(
  File "/usr/lib/python3.9/contextlib.py", line 124, in __exit__
    next(self.gen)
  File "/work/test/functional/test_framework/test_node.py", line 605, in assert_debug_log
    self._raise_assertion_error(
  File "/work/test/functional/test_framework/test_node.py", line 262, in _raise_assertion_error
    raise AssertionError(self._node_msg(msg))
AssertionError: [node 0] Expected messages "['received: avaresponse']" does not partially match log:

 - 


2024-01-04T13:42:47.922000Z TestFramework (INFO): Stopping nodes
2024-01-04T13:42:49.527000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_  _20240104_134215/abc_p2p_avalanche_voting_3
2024-01-04T13:42:49.527000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_  _20240104_134215/abc_p2p_avalanche_voting_3/test_framework.log
2024-01-04T13:42:49.527000Z TestFramework (ERROR): 
2024-01-04T13:42:49.527000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_  _20240104_134215/abc_p2p_avalanche_voting_3' to consolidate all logs
2024-01-04T13:42:49.527000Z TestFramework (ERROR): 
2024-01-04T13:42:49.527000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2024-01-04T13:42:49.527000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2024-01-04T13:42:49.527000Z TestFramework (ERROR):

Each failure log is accessible here:
Bitcoin ABC functional tests: abc_p2p_avalanche_voting.py

That failure is unrelated.

This revision is now accepted and ready to land.Jan 4 2024, 14:03
This revision was landed with ongoing or failed builds.Jan 4 2024, 14:05
This revision was automatically updated to reflect the committed changes.