Failed with error: Out of Range (8) read datastream of length 9 over by 1
麒麟测试网部署测试合约时出现一下错误
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;
由于前面合约已部署,就像数据库中表字段的类型已经建好了,下次再部署时,导致表错乱,所以改个表名或者重新部署个账号测试把。等后面发现好的办法再跟帖
当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »