Open
Conversation
Implement special handling of DogeShareValidation user queries
cyber-pc
reviewed
Mar 27, 2026
| { | ||
| LockGuard guard(lock); | ||
|
|
||
| if (findTask(task->customMiningType, task->jobId) >= 0) |
Collaborator
There was a problem hiding this comment.
Should it be if (findTask(task->customMiningType, task->jobId) < 0) ? I think below code block for adding a new task if this task doesn't exist ?
| LockGuard guard(lock); | ||
|
|
||
| // Check if the solution corresponds to an active task. | ||
| unsigned int typeSpecificTaskIndex = findTask(solution->customMiningType, solution->jobId); |
Collaborator
There was a problem hiding this comment.
We mixed the unsigned and signed data here, findTask return int and typeSpecificTaskIndex is unsigned int and we has problem with check if (typeSpecificTaskIndex < 0) if the findTask return -1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds processing of doge tasks and solutions to the core node.
A new
CustomQubicMiningStorageclass is introduced to save active tasks and keep record of solutions to prevent duplicate solutions from being broadcasted. The class is designed to support other custom mining tasks apart from doge in the future.Apart from adding tasks and solutions to the storage, the core node will send an oracle query for share validation if the solution came from a computor pool matching its own comp id.
Missing features:
system.tick + TICK_TRANSACTIONS_PUBLICATION_OFFSETor if it is an empty tick