Page MenuHomePhabricator

fix compiler warning "Declaration shadows a local variable"
ClosedPublic

Authored by PiRK on Sep 14 2021, 16:15.

Details

Summary

In D9886, the round variable was shadowed by the local loop variable
of the same name. Calling this loop variable r and removing the
intermediate variable uint64_t r gets rid of the warning while simplifying the
code even more. And it restores the previous behavior of assigning a value to the
round variable, which is used after the for loop is finished on line 876.

Test Plan

ninja check

Event Timeline

PiRK requested review of this revision.Sep 14 2021, 16:15

Failed tests logs:

====== Bitcoin ABC functional tests with the next upgrade activated: wallet_groups.py ======

------- Stdout: -------
2021-09-14T16:20:34.895000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210914_162034/wallet_groups_2
2021-09-14T16:21:41.661000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 128, in main
    self.run_test()
  File "/work/test/functional/wallet_groups.py", line 117, in run_test
    self.sync_all()
  File "/work/test/functional/test_framework/test_framework.py", line 610, in sync_all
    self.sync_mempools(nodes)
  File "/work/test/functional/test_framework/test_framework.py", line 580, in sync_mempools
    "".join("\n  {!r}".format(m) for m in pool),
AssertionError: Mempool sync timed out after 60s:
  {'3e937aabf2476cc93ace72898db561eac4048132f18c6db75114246a878ac87e'}
  {'3e937aabf2476cc93ace72898db561eac4048132f18c6db75114246a878ac87e'}
  {'3e937aabf2476cc93ace72898db561eac4048132f18c6db75114246a878ac87e'}
  {'3e937aabf2476cc93ace72898db561eac4048132f18c6db75114246a878ac87e'}
  set()
2021-09-14T16:21:41.712000Z TestFramework (INFO): Stopping nodes
2021-09-14T16:21:42.016000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210914_162034/wallet_groups_2
2021-09-14T16:21:42.016000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210914_162034/wallet_groups_2/test_framework.log
2021-09-14T16:21:42.016000Z TestFramework (ERROR): 
2021-09-14T16:21:42.016000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210914_162034/wallet_groups_2' to consolidate all logs
2021-09-14T16:21:42.016000Z TestFramework (ERROR): 
2021-09-14T16:21:42.016000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2021-09-14T16:21:42.016000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2021-09-14T16:21:42.016000Z TestFramework (ERROR):

Each failure log is accessible here:
Bitcoin ABC functional tests with the next upgrade activated: wallet_groups.py

PiRK planned changes to this revision.Sep 15 2021, 06:13

test failing

rebase (unrelated failure)

This revision is now accepted and ready to land.Sep 15 2021, 06:16