在测试网中,获取出块奖励时,报错

surou@bcskillsurou:~$ cleos -u http://127.0.0.1:8000 system claimrewards bcskillsurou -p bcskillsurou
Error 3050003: eosio_assert_message assertion failure
Error Details:
assertion failure with message: quantity exceeds available supply
pending console output:

查询supply

surou@bcskillsurou:~$ cleos -u http://127.0.0.1:8000 get currency stats eosio.token EOS
{
  "EOS": {
    "supply": "10000000000.0000 EOS",
    "max_supply": "10000000000.0000 EOS",
    "issuer": "eosio"
  }
}

发现supply已经不小于max_supply。
由于bp每次claimrewards时,根据距离上次claim的时间差先增发,然后再从奖池里面拿。所以每次claimrewards时,supply都会增加相应的值,但必须小于max_supply。
继续跟进

创建代币
cleos -u http://127.0.0.1:8000 push action eosio.token create '["eosio","10000000000.0000 EOS",0,0,0]' -p eosio.token
发布代币
cleos -u http://127.0.0.1:8000 push action eosio.token issue '["eosio","10000000000.0000 EOS","issue"]' -p eosio.token

发现是当时启动测试网时,issue发行了最大的值,一般应小余最大值10倍,及创建100亿代币的最大值,只发行10亿,之间的差额用于增发。
参考:https://github.com/EOSIO/eos/issues/4325