根据文档(http://godoc.org/github.com/btcsuite/btcrpcclient),费用可以通过使用设置
SetTxFee(fee btcutil.Amount) // hard coded0.0006 BTC
Run Code Online (Sandbox Code Playgroud)
我将费用设置为0.0000016比特币/千字节,并执行以下操作:
但是当我尝试发送交易时,我得到了
-26: 256: absurdly-high-fee
Run Code Online (Sandbox Code Playgroud)
有没有其他方法来设置使用此库的费用?
的debug.log
ThreadRPCServer method=listunspent
ThreadRPCServer method=settxfee
ThreadRPCServer method=createrawtransaction
ThreadRPCServer method=signrawtransaction
ThreadRPCServer method=sendrawtransaction
Run Code Online (Sandbox Code Playgroud)
金额:
amounts := map[btcutil.Address]btcutil.Amount{
destAddress: destAmount,
}
Run Code Online (Sandbox Code Playgroud)
更新 似乎它试图发送整个交易总额,而不是我希望它发送的金额.
如果A中的交易是1 BTC并且我想将0.3 BTC发送到另一个地址,那么在设置金额时如何实现这一点?