2096 | @@ -2097,6 +2097,9 @@ bool CWallet::FundTransaction(CMutableTransaction& tx, CAmount& nFeeRet, bool ov
2097 | bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet,
2098 | int& nChangePosInOut, std::string& strFailReason, const CCoinControl* coinControl, bool sign)
2099 | {
2100 | + CFeeRate minValueRate = mempool.estimateFee(6);
It's better to use the mempool relay fee here, I think. Estimatefee is
about getting into a block and depends on the speed. The relay fee is just
about being relayed.
As explained, the problem with relay fee (txMinRelayFee right ?) is that when we bump it as we did on #6793, then old wallet starts to send unrelayable transaction which cause perturbations to users.
6 is arbitrary, the goal is to not create output which would cost more than their value to redeem in 6 block.
I'm open to any other number, I just wanted it to be a bit higher than txMinRelayFee so we have space to increase this default later without impacting users.
@NicolasDorier Please note that 6793 has been reverted in the meantime while adding the size limit to the mempool. What @sipa meant, is to use the minimum relay fee of your current mempool and not the minimum relay fee of the node (hardcoded) nor the expected transaction fee to confirm within 6 blocks.
ohh I did not know that the mempool also had its own minimum relay fee.