-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(sdk)!: impl Fetch/FetchMany for masternode voting endpoints #1864
Merged
QuantumExplorer
merged 239 commits into
feat/contestedDocumentResolutionWithMasternodeVoting
from
feat/mn-voting-sdk
Jun 14, 2024
Merged
feat(sdk)!: impl Fetch/FetchMany for masternode voting endpoints #1864
QuantumExplorer
merged 239 commits into
feat/contestedDocumentResolutionWithMasternodeVoting
from
feat/mn-voting-sdk
Jun 14, 2024
Conversation
This file contains 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
lklimek
changed the title
feat(sdk): impl Fetch/FetchMany for masternode voting endpoints
feat(sdk)!: impl Fetch/FetchMany for masternode voting endpoints
Jun 11, 2024
…WithMasternodeVoting' into feat/mn-voting-sdk
…WithMasternodeVoting' into feat/mn-voting-sdk
QuantumExplorer
requested changes
Jun 11, 2024
packages/rs-drive/src/drive/verify/voting/verify_identity_votes_given_proof/mod.rs
Outdated
Show resolved
Hide resolved
shumkov
force-pushed
the
feat/contestedDocumentResolutionWithMasternodeVoting
branch
from
June 11, 2024 13:53
fbbc8da
to
f6b572f
Compare
QuantumExplorer
force-pushed
the
feat/contestedDocumentResolutionWithMasternodeVoting
branch
from
June 11, 2024 13:57
f6b572f
to
2d30333
Compare
…WithMasternodeVoting' into feat/mn-voting-sdk
…WithMasternodeVoting' into feat/mn-voting-sdk
…se PlatformEncode
QuantumExplorer
approved these changes
Jun 14, 2024
Comment on lines
+73
to
+100
impl PlatformVersionEncode for ExtendedDocument { | ||
fn platform_encode<E: Encoder>( | ||
&self, | ||
encoder: &mut E, | ||
platform_version: &PlatformVersion, | ||
) -> Result<(), EncodeError> { | ||
let serialized = self.serialize_to_bytes(platform_version).map_err(|e| { | ||
EncodeError::OtherString(format!("Failed to serialize ExtendedDocument: {}", e)) | ||
})?; | ||
|
||
serialized.platform_encode(encoder, platform_version) | ||
} | ||
} | ||
|
||
impl PlatformVersionedDecode for ExtendedDocument { | ||
fn platform_versioned_decode<D: bincode::de::Decoder>( | ||
decoder: &mut D, | ||
platform_version: &PlatformVersion, | ||
) -> Result<Self, bincode::error::DecodeError> { | ||
let bytes = Vec::<u8>::platform_versioned_decode(decoder, platform_version)?; | ||
|
||
Self::from_bytes(&bytes, platform_version) | ||
.map_err(|e| { | ||
EncodeError::OtherString(format!("Failed to serialize ExtendedDocument: {}", e)) | ||
}) | ||
.map_err(|e| bincode::error::DecodeError::OtherString(e.to_string())) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this just get a vec that you would reencode? I don't mind all that much because nothing very important uses ExtendedDocument.
…WithMasternodeVoting' into feat/mn-voting-sdk
QuantumExplorer
merged commit Jun 14, 2024
9919a8f
into
feat/contestedDocumentResolutionWithMasternodeVoting
2 checks passed
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.
Issue being fixed or feature implemented
Masternode Voting introduces several new endpoints that should be implemented.
What was done?
How Has This Been Tested?
Only "proof of non-existence" tests implemented, more tests will be added in separate PR.
Breaking Changes
FetchMany trait now uses 2 generics instead of one.
Checklist:
For repository code-owners and collaborators only