xuperchain / xuperchain

A highly flexible blockchain architecture with great transaction performance.

Home Page:https://xuper.baidu.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Transfer操作utxo不足

widuu opened this issue · comments

commented

golang native合约Transfer utxo不足

使用 https://github.com/xuperchain/contract-sdk-go/blob/main/example/features/main.go 测试
Describe here.

Your environment

XuperChain and OS/Go/gcc version etc.

xchain-cli version : v5.3.0

go version: go version go1.16.5 darwin/amd64

xchain version:v5.3.0-10449e8

所有账号余额充足。

执行合约
xchain-cli native invoke --method Transfer -a '{"to":"TWF5YmUgY29tbW9uIHRyYW5zZmVyIHRyYW5zYWN0aW9u","amount":"1000"}' test4

返回 utxo不足
contract error status:500 message:rpc error: code = Unknown desc = no enough money(UTXO) to start this transaction

commented

所有账号都有 100000000000000000 余额

commented

你的请求发起账号和合约账号的余额分别是如何查询的?

commented

谢谢 已解决 不好意思

commented

@widuu 哈哈,其实还挺好奇你碰到问题的原因是啥

commented

@widuu 哈哈,其实还挺好奇你碰到问题的原因是啥

很奇怪,当时创建test4 然后 xchain-cli transfer --to test4 --amount 100000000000000000 执行显示utxo不足,然后在golang里返回caller 给caller 转账也提示不足,

然后我就去写evm的合约了,然后晚上我新建的test10 xchain-cli transfer --to test10 --amount 100000000000000000相同的操作竟然可以了

commented

相同的指令,但是有不同的运行结果,应该是有状态是不一样的。
或许你在再碰到的时候,可以查下具体的账户余额(或者其他信息),这个思路上排查排查~

commented

相同的指令,但是有不同的运行结果,应该是有状态是不一样的。 或许你在再碰到的时候,可以查下具体的账户余额(或者其他信息),这个思路上排查排查~

好的 非常感谢

怎么解决的

我也冲了钱,有余额,然后我看了看我的合约账户和发起请求的账户也都有余额