Skip to content

Conversation

@linh2931
Copy link
Contributor

@linh2931 linh2931 commented Apr 7, 2025

Do not include max_sync_call_depth and max_sync_call_data_size in the return value of get_consensus_parameters if sync_call protocol feature is not activated. This is consistent with the behavior of #1284.

Resolves #1289

…lue of get_consensus_parameters is sync_call protocol feature is not activated
chain_config_v2 v2config;
from_variant(parms.chain_config, v2config);

BOOST_TEST(v2config.max_action_return_value_size == t.control->get_global_properties().configuration.max_action_return_value_size);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line looks like it might be a copy/paste from above -- don't you want to check that max_sync_call_depth and max_sync_call_data_size match -- not max_action_return_value_size?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I should have verified the returned values of max_sync_call_depth and max_sync_call_data_size

28b5f9f

to_variant(db.get_global_properties().configuration.base(), results.chain_config); //chain_config_v1
else
to_variant(db.get_global_properties().configuration.base(), results.chain_config); //chain_config_v0
to_variant(db.get_global_properties().configuration.v0(), results.chain_config); //chain_config_v0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively base().base() if you don't want to add the new v0(). I don't have a strong preference either way

@linh2931 linh2931 merged commit 06bc310 into sync_call Apr 7, 2025
36 checks passed
@linh2931 linh2931 deleted the hide_chain_config_v2 branch April 7, 2025 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SC: Do not show chain_config_v2 parameters if SYNC_CALL protocol feature is not activated

4 participants