Skip to content

Conversation

@random-zebra
Copy link

@random-zebra random-zebra commented Sep 2, 2020

Introduce a GetCoinDepth() utility function in CCoinsViewCache and use that instead (with pcoinsTip... no need to lock/load the mempool too in the backend).
This should fix the invalid lock order:

2020-09-02 10:23:17 POTENTIAL DEADLOCK DETECTED
2020-09-02 10:23:17 Previous lock order was:
2020-09-02 10:23:17  cs_process_message /src/masternodeman.cpp:690 (in thread pivx-msghand)
2020-09-02 10:23:17  (1) mempool.cs /src/main.cpp:777 (in thread pivx-msghand)
2020-09-02 10:23:17  (2) cs_main /src/main.cpp:785 (in thread pivx-msghand)
2020-09-02 10:23:17 Current lock order is:
2020-09-02 10:23:17  (2) cs_main /src/main.cpp:4571 (in thread )
2020-09-02 10:23:17  (1) cs /src/txmempool.cpp:590 (in thread )

To be able to use the new per-txout interface, this is based on top of:

The present PR starts with [Refactoring] Add GetCoinDepth utility function to CCoinsViewCache (294e177bd1d282620f52ad14f0627da99381bfbe)

BONUS: remove the cached "ages" saved/serialized in CMasternode class... no comment.

furszy
furszy previously approved these changes Sep 2, 2020
Copy link

@furszy furszy left a comment

Choose a reason for hiding this comment

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

Strong ACK 2be200d ☕ with a refactor comment.

@random-zebra random-zebra force-pushed the 202008_nuke_GetInputAge branch from 81aaec9 to cf7003b Compare September 5, 2020 14:31
@random-zebra
Copy link
Author

Rebased on master and squashed the name change.

Copy link

@furszy furszy left a comment

Choose a reason for hiding this comment

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

utACK cf7003b

@furszy
Copy link

furszy commented Sep 7, 2020

extra: tested with 1829 and all good. Merging..

@furszy furszy merged commit 9c06e5d into PIVX-Project:master Sep 7, 2020
@random-zebra random-zebra added this to the 4.3.0 milestone Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants