I have a problem with bitcoin in sending payments from one user to another user. When I try to send, I get the error txfee cannot be less than min relay tx fee (0.00001000 BTC/kB)
.
1 Answer
You need to increase your transaction fee to meet the minimums required by the node you are connected to. If you use a fee below that, the node (and other nodes on the network) will refuse to broadcast your transactions, preventing them from reaching miners.
-
const calculateTxFee = async (input, output, confirmations) => { try { const fee = await client.estimateSmartFee(6); var txFee = (((input * 148 + output * 34 + 10) + 40) / 1024) * fee['feerate']; console.log("txfee-------->", txFee) return txFee; } catch (err) { console.log("error 4 ------", err); throw err; } } This is the node.js code which I have written , please suggest what else should I add ? Nov 12, 2019 at 14:07