Skip to content

test: correct pow_tests#23

Merged
gto90 merged 2 commits intoDigiByte-Core:developfrom
SmartArray:tests/pow_tests
Apr 7, 2021
Merged

test: correct pow_tests#23
gto90 merged 2 commits intoDigiByte-Core:developfrom
SmartArray:tests/pow_tests

Conversation

@SmartArray
Copy link

DigiByte specific pow_tests

What is the intention of this PR?

This PR fixes the pow_tests with DigiByte's specific PoW Implementation.

Description of the changes

The commit SmartArray@ae74c4d updated the pow_tests unit test in order to test DigiBytes Proof Of Work.

How to verify?

  1. Change to the directory src/test
  2. Compile the test suite
  3. Run it using
./test_digibyte --run_test=pow_tests

Expected outcome

$ ./test_digibyte --run_test=pow_tests
Running 5 test cases...
*** No errors detected

@SmartArray SmartArray marked this pull request as ready for review April 4, 2021 07:17
Copy link
Member

@gto90 gto90 left a comment

Choose a reason for hiding this comment

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

utACK

Copy link

@digicontributer digicontributer left a comment

Choose a reason for hiding this comment

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

ACK

@gto90 gto90 merged commit da15583 into DigiByte-Core:develop Apr 7, 2021
@SmartArray SmartArray deleted the tests/pow_tests branch April 8, 2021 05:13
JaredTate added a commit that referenced this pull request Mar 18, 2026
…(Bug #23)

The Qt wallet could hang indefinitely on the 'DigiByte is shutting down...'
dialog when a DigiDollar time-locked position existed. The GetDDTimeLocks
polling loop fired every 60 seconds for 19+ hours without completing shutdown.

Root cause: The QTimer in DigiDollarPositionsWidget was created as a local
variable in setupUI() and never stopped during shutdown. The timer callback
called GetDDTimeLocks() which acquires cs_dd_wallet, potentially deadlocking
against the shutdown thread tearing down the wallet.

Fix:
- Store autoRefreshTimer as member variable (m_autoRefreshTimer)
- Stop timer in destructor via stopRefresh()
- Stop timer when wallet model is set to null (shutdown teardown path)
- Add ShutdownRequested() guard in updatePositions() as safety net
- Add null m_walletModel check before any wallet access

Qt/wallet layer only — no consensus changes.
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