Repository navigation
feat(sdk)!: impl Fetch/FetchMany for masternode voting endpoints - #1864
Merged
QuantumExplorer merged 239 commits intoJun 14, 2024
Merged
QuantumExplorer merged 239 commits into
QuantumExplorer merged 239 commits into
Conversation
lklimek
marked this pull request as ready for review
June 11, 2024 11:05
…WithMasternodeVoting' into feat/mn-voting-sdk
…WithMasternodeVoting' into feat/mn-voting-sdk
QuantumExplorer
requested changes
Jun 11, 2024
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())) | ||
| } | ||
| } |
Member
There was a problem hiding this comment.
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
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.
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