Hey! I'm trying to use this to build a transaction that CPFP another one. It could be useful to have an option to specify the previous transaction fee rate, so the algorithm can take it into account. I can add this, but would need to check with you @landabaso the best way to do it. We need to know the previous transaction fee rate, so we can compute a new fee rate from the given fee rate and the previous one: newFeeRate = 2 * feeRate - previousFeeRate (with feeRate > previousFeeRate otherwise it wouldn't bump anything). Then use that new fee rate as replacement of the input fee rate in the algos.
Hey! I'm trying to use this to build a transaction that CPFP another one. It could be useful to have an option to specify the previous transaction fee rate, so the algorithm can take it into account. I can add this, but would need to check with you @landabaso the best way to do it. We need to know the previous transaction fee rate, so we can compute a new fee rate from the given fee rate and the previous one:
newFeeRate = 2 * feeRate - previousFeeRate(withfeeRate>previousFeeRateotherwise it wouldn't bump anything). Then use that new fee rate as replacement of the input fee rate in the algos.