Fix API compatibility issues in RPC implementations#65
Open
alchemistkay wants to merge 1 commit intopurpleprotocol:mainfrom
Open
Fix API compatibility issues in RPC implementations#65alchemistkay wants to merge 1 commit intopurpleprotocol:mainfrom
alchemistkay wants to merge 1 commit intopurpleprotocol:mainfrom
Conversation
This commit fixes compilation errors in the RPC implementations (GetBlockchainInfo, GetBlockHash, and GetBlockStats) that were introduced after PR purpleprotocol#63 was merged due to upstream API changes. Changes: - Update mempool access to use tx_map and current_size_bytes fields - Update shard method calls to use backend accessor - Handle BlockHeader.hash() now returning Option<&Hash256> - Update BlockData field access (transactions renamed to txs) - Update BlockHeader field access (pos renamed to height) - Remove timestamp field usage (removed from BlockHeader in protocol update) - Remove transaction fee field usage (no longer stored in blocks) All 722 tests pass successfully after these changes.
alchemistkay
added a commit
to alchemistkay/purplecoin
that referenced
this pull request
Oct 30, 2025
This commit implements three previously stubbed mempool RPC commands and includes API compatibility fixes similar to PR purpleprotocol#65. New RPC implementations: - GetMempoolInfo: Returns mempool statistics (transaction count, total size) - GetRawMempool: Returns all transaction hashes from the entire mempool - GetRawMempoolShard: Returns transaction hashes filtered by chain_id/shard API compatibility fixes: - Update mempool access to use tx_map and current_size_bytes fields - Update shard method calls to use backend accessor - Handle BlockHeader.hash() now returning Option<&Hash256> - Update BlockData field access (transactions renamed to txs) - Update BlockHeader field access (pos renamed to height) - Remove timestamp field usage (removed from BlockHeader in protocol update) - Remove transaction fee field usage (no longer stored in blocks) New struct added: - RawMempool: Contains transaction_hashes vector and total_transactions count
alchemistkay
added a commit
to alchemistkay/purplecoin
that referenced
this pull request
Oct 30, 2025
This commit implements three previously stubbed mempool RPC commands and includes API compatibility fixes similar to PR purpleprotocol#65. New RPC implementations: - GetMempoolInfo: Returns mempool statistics (transaction count, total size) - GetRawMempool: Returns all transaction hashes from the entire mempool - GetRawMempoolShard: Returns transaction hashes filtered by chain_id/shard API compatibility fixes: - Update mempool access to use tx_map and current_size_bytes fields - Update shard method calls to use backend accessor - Handle BlockHeader.hash() now returning Option<&Hash256> - Update BlockData field access (transactions renamed to txs) - Update BlockHeader field access (pos renamed to height) - Remove timestamp field usage (removed from BlockHeader in protocol update) - Remove transaction fee field usage (no longer stored in blocks) New struct added: - RawMempool: Contains transaction_hashes vector and total_transactions count
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
This PR fixes compilation errors in the RPC implementations (GetBlockchainInfo, GetBlockHash, and GetBlockStats) that were introduced after PR #63 was merged due to upstream API changes.
Changes
tx_mapandcurrent_size_bytesfieldsbackendaccessorBlockHeader.hash()now returningOption<&Hash256>transactionsrenamed totxs)posrenamed toheight)Testing
All 722 tests pass successfully after these changes.
Related
Fixes compilation errors introduced after #63 was merged.