fix: migrate get_dynamic_global_properties from database_api to condenser_api - #372
Merged
Merged
Conversation
…nser_api
database_api is a legacy low-level steemd plugin API that is being
phased out. condenser_api is the public-facing high-level API that
wraps database_api and other plugin APIs (follow_api, tags_api).
This change also fixes a Bad Cast error: database_api expects params
as {} (object) while condenser_api expects [] (array). The _rpc_body
helper already handles this correctly based on the method name prefix,
so only the METHOD_API mapping needed updating.
All other methods in METHOD_API already use condenser_api (or block_api);
get_dynamic_global_properties was the last remaining database_api usage.
kuny0707
approved these changes
Jun 8, 2026
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.
Problem
get_dynamic_global_propertiesinhive/steem/http_client.pystill maps todatabase_api, while all other methods inMETHOD_APIalready usecondenser_api.This causes a Bad Cast error when the request reaches steemd, because:
_rpc_body()generatesparams={}fordatabase_apimethods (line 78)translateToAppbaserewritesdatabase_api.*→condenser_api.*but does not normalizeparamsformatparams=[](array) forcondenser_apimethodsBad Cast: Invalid cast from object_type to ArrayFix
Change the
METHOD_APImapping:_rpc_body()already has the logic to use[]forcondenser_apimethods (line 78:args = [] if 'condenser_api' in method else {}), so this one-line change fixes both the namespace and the params format.Context
database_apiis a low-level steemd plugin API being phased outcondenser_apiis the public-facing high-level API that wrapsdatabase_api,follow_api,tags_apidatabase_api.*calls tocondenser_api.*viatranslateToAppbasecondenser_api(assertsapi == 'condenser_api'incall.py)database_apiusage in hivemind's HTTP clientTesting
Verified against
api.steemit.com: