feat: wire masternode engine methods to UniFFI bridge#31
Merged
Conversation
- Add `masternode_engine()` async accessor on `DashSpvClient` that returns `Option<Arc<RwLock<MasternodeListEngine>>>` (clone of field) - Implement `SpvClient::get_masternode_count()`: reads the latest masternode list from the engine and returns the entry count; returns 0 when masternodes are disabled or no list received yet - Implement `SpvClient::get_masternodes()`: iterates the latest masternode list and maps `MasternodeListEntry` fields to `MasternodeInfo` (pro_reg_tx_hash → pro_tx_hash, service_address → address, is_valid → "Enabled"/"PoSeBanned"); pose_penalty/last_paid_height/ registered_height default to 0 as they are not in the SML diff - Replace stub bridge tests with no-engine and empty-engine variants - Add DashSpvClient-level tests for masternode_engine() accessor and a populated-engine scenario using a manually constructed MasternodeList Closes #29 Co-authored-by: Kevin Rombach <xdustinface@users.noreply.github.com>
|
This PR has merge conflicts with the base branch. Please rebase or merge the base branch into your branch to resolve them. |
33ba2f6 to
4b2f3b6
Compare
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.
Summary
masternode_engine()async accessor to DashSpvClientget_masternode_count()to return real count from MasternodeListEngineget_masternodes()to return real MasternodeListEntry data mapped to MasternodeInfoCloses #29
Test plan