区块链钱包开发

这里总结了开发中一些常见报错和解决方案

1. 提示:createRawtx_change "Amount is not a number"

解决:参数中 tx 的 amout 需要改为 value。

2. 提示:mandatory-script-verify-flag-failed:

解决: return omniHelper.signRawtransaction(data, _tx, [temp_privatekey]); 此处需要私钥

3. 提示:{ Error: JSON value is not an object as expected

解决:_tx需要为数组

** 4. 提示: { Error: 66: insufficient priority sendrawtransaction err**

原因:tx的带费用的unspent需要两个或以上 或者其中地址所需手续费不足
解决:累加unspent直到手续费足够

5. 提示: Operation not valid with the current stack size'

解决:检查私钥正确性

6. 提示: 创建新交易,账户无金额入账

解决:尝试更换input中两个tx的位置

原文地址:https://www.cnblogs.com/mapleChain/p/11527686.html