麒麟测试网部署测试合约时出现一下错误
suroudeMacBook-Pro:contracts surou$ cleos -u http://api.kylin.eosbeijing.one:8880 get table cryptokylinq cryptokylinq results
2018-10-10T14:09:41.215 thread-0 main.cpp:3143 main ] Failed with error: Out of Range (8)
read datastream of length 9 over by 1
开始演示步骤
开始部署合约中表的结构为
//@abi table results i64
struct approval_info{
account_name name;
uint8_t iresult;
uint64_t primary_key()const { return name; }
EOSLIB_SERIALIZE(approval_info, (name)(iresult))
};
typedef eosio::multi_index<N(results),approval_info> result_table;
然后直接修改了 iresult
为std::string
//@abi table results i64
struct approval_info{
account_name name;
std::string iresult;
uint64_t primary_key()const { return name; }
EOSLIB_SERIALIZE(approval_info, (name)(iresult))
};
typedef eosio::multi_index<N(results),approval_info> result_table;
由于前面合约已部署,就像数据库中表字段的类型已经建好了,下次再部署时,导致表错乱,所以改个表名或者重新部署个账号测试把。等后面发现好的办法再跟帖
版权属于:区块链中文技术社区 / 转载原创者
本文链接:https://bcskill.com/index.php/archives/465.html
相关技术文章仅限于相关区块链底层技术研究,禁止用于非法用途,后果自负!本站严格遵守一切相关法律政策!