Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

add support for preactivate_feature, is_feature_activated, and get_sender intrinsics; move definition of new set_proposed_producers function #668

Merged
merged 4 commits into from
Sep 18, 2019

Conversation

arhag
Copy link
Contributor

@arhag arhag commented Sep 17, 2019

Change Description

Added support for the preactivate_feature, is_feature_activated, and get_sender intrinsics.

Temporarily moved the implementation of the new set_proposed_producers overload introduced in PR #570 from the eosiolib.cpp file to an inline function defined in the privileged.hpp header file. This is to workaround a issue in CDT which brings in all imported intrinsics used within an object file (e.g. eosiolib.cpp.obj) that is linked into the compiled WebAssembly file, even if those intrinsics aren't actually used in any of the contract code. This means that prior to this change, a contract designed to work with EOSIO v1.8.x only would likely inadvertently bring in a dependency to the set_proposed_producers_ex intrinsic (a v2.0.x and above feature) within the compiled WASM and thus make it impossible to deploy on a v1.8.x blockchain. If CDT fixes this issue in the future, the implementation of set_proposed_producers can be moved back into the .cpp file (along with a lot of other functions that are currently defined in header files).

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

…implementation of the set_proposed_producers overload using the set_proposed_producers_ex intrinsic into an inline function defined in the header to prevent pulling in WASM imports that make the contract invalid on a pre-2.0 EOSIO chain.
@arhag arhag requested a review from larryk85 September 17, 2019 00:48
@arhag arhag changed the title add support for preactivate_feature and is_feature_activated intrinsics; move definition of new set_proposed_producers function add support for preactivate_feature, is_feature_activated, and get_sender intrinsics; move definition of new set_proposed_producers function Sep 18, 2019
@larryk85 larryk85 merged commit eecf9a9 into develop Sep 18, 2019
@larryk85 larryk85 deleted the add-preactivate-intrinsics branch September 18, 2019 20:21
rise-worlds pushed a commit to potato-coin/eosio.cdt that referenced this pull request Jul 14, 2020
add support for preactivate_feature, is_feature_activated, and get_sender intrinsics; move definition of new set_proposed_producers function
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants