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

Remove definitions and functions that have moved to later versions of… #576

Open
wants to merge 1 commit into
base: release/1.8.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 1 addition & 38 deletions contracts/eosio.bios/include/eosio.bios/eosio.bios.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,8 @@
#include <eosio/fixed_bytes.hpp>
#include <eosio/privileged.hpp>
#include <eosio/producer_schedule.hpp>
#include <eosio/system.hpp>

// This header is needed until `is_feature_activiated` and `preactivate_feature` are added to `eosio.cdt`
#include <eosio/../../capi/eosio/crypto.h>

namespace eosio {
namespace internal_use_do_not_use {
extern "C" {
__attribute__((eosio_wasm_import))
bool is_feature_activated( const ::capi_checksum256* feature_digest );

__attribute__((eosio_wasm_import))
void preactivate_feature( const ::capi_checksum256* feature_digest );
}
}
}

namespace eosio {
bool is_feature_activated( const eosio::checksum256& feature_digest ) {
auto feature_digest_data = feature_digest.extract_as_byte_array();
return internal_use_do_not_use::is_feature_activated(
reinterpret_cast<const ::capi_checksum256*>( feature_digest_data.data() )
);
}

void preactivate_feature( const eosio::checksum256& feature_digest ) {
auto feature_digest_data = feature_digest.extract_as_byte_array();
internal_use_do_not_use::preactivate_feature(
reinterpret_cast<const ::capi_checksum256*>( feature_digest_data.data() )
);
}
}

namespace eosio {

Expand All @@ -52,14 +23,6 @@ namespace eosio {
EOSLIB_SERIALIZE( permission_level_weight, (permission)(weight) )
};

struct key_weight {
eosio::public_key key;
uint16_t weight;

// explicit serialization macro is not necessary, used here only to improve compilation time
EOSLIB_SERIALIZE( key_weight, (key)(weight) )
};

struct wait_weight {
uint32_t wait_sec;
uint16_t weight;
Expand Down
32 changes: 1 addition & 31 deletions contracts/eosio.system/include/eosio.system/native.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,6 @@
#include <eosio/privileged.hpp>
#include <eosio/producer_schedule.hpp>

// This header is needed until `is_feature_activiated` and `preactivate_feature` are added to `eosio.cdt`
#include <eosio/../../capi/eosio/crypto.h>

namespace eosio {
namespace internal_use_do_not_use {
extern "C" {
__attribute__((eosio_wasm_import))
bool is_feature_activated( const ::capi_checksum256* feature_digest );

__attribute__((eosio_wasm_import))
void preactivate_feature( const ::capi_checksum256* feature_digest );
}
}

bool is_feature_activated( const eosio::checksum256& feature_digest );
void preactivate_feature( const eosio::checksum256& feature_digest );
}

namespace eosiosystem {

Expand All @@ -49,19 +32,6 @@ namespace eosiosystem {
EOSLIB_SERIALIZE( permission_level_weight, (permission)(weight) )
};

/**
* Weighted key.
*
* A weighted key is defined by a public key and an associated weight.
*/
struct key_weight {
eosio::public_key key;
uint16_t weight;

// explicit serialization macro is not necessary, used here only to improve compilation time
EOSLIB_SERIALIZE( key_weight, (key)(weight) )
};

/**
* Wait weight.
*
Expand All @@ -86,7 +56,7 @@ namespace eosiosystem {
*/
struct authority {
uint32_t threshold = 0;
std::vector<key_weight> keys;
std::vector<eosio::key_weight> keys;
std::vector<permission_level_weight> accounts;
std::vector<wait_weight> waits;

Expand Down
15 changes: 0 additions & 15 deletions contracts/eosio.system/src/native.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,6 @@

#include <eosio/check.hpp>

namespace eosio {
bool is_feature_activated( const eosio::checksum256& feature_digest ) {
auto feature_digest_data = feature_digest.extract_as_byte_array();
return internal_use_do_not_use::is_feature_activated(
reinterpret_cast<const ::capi_checksum256*>( feature_digest_data.data() )
);
}

void preactivate_feature( const eosio::checksum256& feature_digest ) {
auto feature_digest_data = feature_digest.extract_as_byte_array();
internal_use_do_not_use::preactivate_feature(
reinterpret_cast<const ::capi_checksum256*>( feature_digest_data.data() )
);
}
}

namespace eosiosystem {

Expand Down