According to the docs (http://godoc.org/github.com/btcsuite/btcrpcclient) the fee can be set by using
SetTxFee(fee btcutil.Amount) // hard coded0.0006 BTC
I set the fee to 0.0000016 bitcoin/kilobyte and do as follow:
- ListUnspent
- SetTxFee
- CreateRawTransaction
- SignRawTransaction
- SendRawTransaction
But when i try to send transaction i get
-26: 256: absurdly-high-fee
Is there any other way to set the fee using this library?
Debug.log
ThreadRPCServer method=listunspent
ThreadRPCServer method=settxfee
ThreadRPCServer method=createrawtransaction
ThreadRPCServer method=signrawtransaction
ThreadRPCServer method=sendrawtransaction
Amounts:
amounts := map[btcutil.Address]btcutil.Amount{
destAddress: destAmount,
}
UPDATE It seems like it tries to send whole sum of the transaction, not the amount i want it to send.
If transaction in to A is 1 BTC and i want to send 0.3 BTC to another address, how to achieve this when setting amounts?