Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3e7f4e7254 | |||
| 3be71635ac | |||
| e6c412e2c3 | |||
| 960076f4ce | |||
| 7d12b93e7e |
+3
-3
@@ -14,9 +14,9 @@ endif()
|
||||
project(cdt)
|
||||
|
||||
set(VERSION_MAJOR 4)
|
||||
set(VERSION_MINOR 0)
|
||||
set(VERSION_PATCH 1)
|
||||
set(VERSION_SUFFIX "rc1")
|
||||
set(VERSION_MINOR 1)
|
||||
set(VERSION_PATCH 0)
|
||||
# set(VERSION_SUFFIX "rc1")
|
||||
|
||||
if (VERSION_SUFFIX)
|
||||
set(VERSION_FULL "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}-${VERSION_SUFFIX}")
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
FROM ubuntu:latest
|
||||
|
||||
WORKDIR /workdir
|
||||
|
||||
COPY build/cdt_*.deb /workdir
|
||||
|
||||
RUN apt-get update && apt-get install -y wget cmake build-essential g++ libboost-all-dev libz3-dev && \
|
||||
apt install ./cdt_*.deb -y && \
|
||||
rm cdt_*.deb
|
||||
@@ -10,6 +10,16 @@ extern "C" {
|
||||
* @brief Defines %C Privileged API
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get the RAM usage an account
|
||||
*
|
||||
* @param account - name of the account whose resource limit to get
|
||||
* @param used_ram_bytes - pointer to `int64_t` to hold retrieved ram usage in absolute bytes
|
||||
*/
|
||||
__attribute__((eosio_wasm_import))
|
||||
void get_account_ram_usage( capi_name account, int64_t* used_ram_bytes );
|
||||
|
||||
|
||||
/**
|
||||
* Get the resource limits of an account
|
||||
*
|
||||
|
||||
@@ -12,6 +12,9 @@ namespace eosio {
|
||||
__attribute__((eosio_wasm_import))
|
||||
bool is_privileged( uint64_t account );
|
||||
|
||||
__attribute__((eosio_wasm_import))
|
||||
void get_account_ram_usage( uint64_t account, int64_t* used_ram_bytes );
|
||||
|
||||
__attribute__((eosio_wasm_import))
|
||||
void get_resource_limits( uint64_t account, int64_t* ram_bytes, int64_t* net_weight, int64_t* cpu_weight );
|
||||
|
||||
@@ -182,6 +185,19 @@ namespace eosio {
|
||||
*/
|
||||
void get_blockchain_parameters(eosio::blockchain_parameters& params);
|
||||
|
||||
|
||||
/**
|
||||
* Get the ram usage of an account
|
||||
*
|
||||
* @ingroup privileged
|
||||
* @param account - name of the account whose resource limit to get
|
||||
* @param used_ram_bytes - output to hold retrieved ram usage in absolute bytes
|
||||
*/
|
||||
inline void get_account_ram_usage( name account, int64_t& used_ram_bytes ) {
|
||||
internal_use_do_not_use::get_account_ram_usage( account.value, &used_ram_bytes);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the resource limits of an account
|
||||
*
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
// Boilerplate
|
||||
using namespace eosio::native;
|
||||
extern "C" {
|
||||
void get_account_ram_usage( capi_name account, int64_t* used_ram_bytes ) {
|
||||
return intrinsics::get().call<intrinsics::get_account_ram_usage>(account, used_ram_bytes);
|
||||
}
|
||||
void get_resource_limits( capi_name account, int64_t* ram_bytes, int64_t* net_weight, int64_t* cpu_weight ) {
|
||||
return intrinsics::get().call<intrinsics::get_resource_limits>(account, ram_bytes, net_weight, cpu_weight);
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ namespace eosio { namespace native {
|
||||
}
|
||||
|
||||
#define INTRINSICS(intrinsic_macro) \
|
||||
intrinsic_macro(get_account_ram_usage) \
|
||||
intrinsic_macro(get_resource_limits) \
|
||||
intrinsic_macro(set_resource_limits) \
|
||||
intrinsic_macro(set_proposed_producers) \
|
||||
|
||||
Reference in New Issue
Block a user