eos 源码资源限制两个对象
程序员文章站
2022-06-09 19:11:45
...
resource_usage_object 实际使用资源
struct resource_usage_object
{
id_type id;
account_name owner; //< owner should not be changed within a chainbase modifier lambda
usage_accumulator net_usage;
usage_accumulator cpu_usage;
uint64_t ram_usage = 0;
}
resource_limits_object 购买的资源
struct resource_limits_object : public chainbase::object<resource_limits_object_type, resource_limits_object> {
OBJECT_CTOR(resource_limits_object)
id_type id;
account_name owner; //< owner should not be changed within a chainbase modifier lambda
bool pending = false; //< pending should not be changed within a chainbase modifier lambda
int64_t net_weight = -1;
int64_t cpu_weight = -1;
int64_t ram_bytes = -1;
};
上一篇: js中的i++和++i的区别与联系
下一篇: ViewPager2滑动冲突的解决方法
推荐阅读