提交 b020413f 编写于 作者: W wangxxzhiyy

Only admin user can remove miner now.

上级 a27daa43
...@@ -446,12 +446,15 @@ void hddpool::delminer(uint64_t minerid, uint8_t acc_type, name caller) ...@@ -446,12 +446,15 @@ void hddpool::delminer(uint64_t minerid, uint8_t acc_type, name caller)
eosio_assert(itminerinfo != _minerinfo.end(), "minerid not exist in minerinfo table"); eosio_assert(itminerinfo != _minerinfo.end(), "minerid not exist in minerinfo table");
if(acc_type == 1) { if(acc_type == 1) {
eosio_assert(is_account(caller), "caller not a account."); eosio_assert(is_account(caller), "caller not a account.");
check_bp_account(caller.value, minerid, true); check_bp_account(caller.value, minerid, true);
eosio_assert(1 == 2, "not support");
} else if(acc_type == 2) { } else if(acc_type == 2) {
require_auth(itminerinfo->admin); require_auth(itminerinfo->admin);
eosio_assert(1 == 2, "not support");
} else { } else {
require_auth(N(hddpooladmin)); require_auth(N(hddpooladmin));
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册