提交 11495829 编写于 作者: W wangxxzhiyy

enable hdds transfer

上级 9861b589
......@@ -286,8 +286,6 @@ void hddpool::buyhdd(name from, name receiver, int64_t amount, std::string memo)
void hddpool::transhdds(name from, name to, int64_t amount, std::string memo)
{
eosio_assert(false, "not support now!");
require_auth(from);
eosio_assert(is_account(from), "user not a account");
......@@ -296,6 +294,10 @@ void hddpool::transhdds(name from, name to, int64_t amount, std::string memo)
eosio_assert(is_hdd_amount_within_range(amount), "magnitude of amount must be less than 2^62");
eosio_assert( memo.size() <= 256, "memo has more than 256 bytes" );
require_recipient( from );
require_recipient( to );
userhdd_index _userhddfrom(_self, from.value);
auto itfrom = _userhddfrom.find(from.value);
eosio_assert(itfrom != _userhddfrom.end(), "from not exists in userhdd table");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册