Skip to content

Conversation

@sidhujag
Copy link
Member

@sidhujag sidhujag commented May 1, 2021

mining related fix around concurrent getauxblock() calls causing crashes

jagdeep sidhu added 2 commits May 1, 2021 15:44
flow of mining auxpow when getauxblock is called with no params:

1) GetCoinbaseScript() - this will add to data.emplace(walletname, wallet object) of the proposed block
1a) AddBlockHash() - gets the data by walletname and stored the blockhash in the wallet object value of the data map

The call passing in hash and auxpow params:
1) MarkBlockSubmitted() - This will delete the block hash passed in from the map

What I think happens is the second call is called in between the 1/1a calls in the getauxblock call without parameters. By the time 1a is called, MarkBlockSubmitted has already deleted from the map and then an assert is thrown when AddBlockHash is called and it cannot find an entry in the data map for the wallet.

The fix is simple, just lock around the usage of g_mining_keys
@sidhujag sidhujag merged commit e17e7a6 into master May 1, 2021
sidhujag pushed a commit that referenced this pull request Sep 29, 2021
…n third-party link action

2ccde2f qt: hyphenate usage of third-party modifier (Jarol Rodriguez)
8177578 qt: ensure seperator when adding third-party transaction links (Jarol Rodriguez)
a70a980 qt: improve text for open third-party tx url action (Jarol Rodriguez)
9980f4a qt, refactor: simplify third-party tx url action through overload (Jarol Rodriguez)

Pull request description:

  [bitcoin#4092](bitcoin#4092) introduced the ability to open up a transaction in a block explorer. This improves the related code by simplifying the addition and connection of the action through an [overloaded](https://doc.qt.io/archives/qt-5.9/qmenu.html#addAction-5) `addAction` function and prepends action description text to the host, "Show in". The reason to add this text is to make it clear what the action does. It also creates a clearer mental correlation between a user doing the work to add the 3rd-party tx link and this new menu action popping up.

  This updates the setting text so that "third-party" is hyphenated. It should be hyphenated because it is being used as a modifier of both "URL" and "transaction URLs".

  Additionally, this fixes #431 by ensuring that the seperator will be added before creating action.

  Screenshots of visual changes:

  **Context menu actions**
  |   master   |   pr   |
  |--------------|--------|
  | <img width="248" alt="3pt-master" src="https://user-images.githubusercontent.com/23396902/134618354-00278ac6-5094-44ee-8ba7-fe648fdcb7d2.png"> | <img width="248" alt="3pt-pr" src="https://user-images.githubusercontent.com/23396902/134618364-ddb64269-e5ee-40af-a2a6-1922001b6f4e.png"> |

  **Setting text**
  (tooltip text containing usage of "third-party" is also properly hyphenated)
  |   master   |   pr   |
  |--------------|--------|
  | ![unnamed](https://user-images.githubusercontent.com/23396902/134854070-fb299ba5-3491-487f-b37f-c0cd96514353.png) | ![pr-hyphenate](https://user-images.githubusercontent.com/23396902/134854127-88630cc2-a178-4376-a569-f413f66eba0d.png) |

ACKs for top commit:
  stratospher:
    tested ACK 2ccde2f.
  promag:
    Code view ACK 2ccde2f.
  hebasto:
    ACK 2ccde2f

Tree-SHA512: 8dfcd539a1d41c8abf3c8208d150d1480d4ef81a008de826299e8bad1dfa6e3c49dc76d041c5946fafcf0b033eebb9b9fbd3d49ba6d8af93dd388c488e92f143
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.

2 participants