@ -538,7 +538,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
nBytes = nBytesInputs + ( ( CoinControlDialog : : payAmounts . size ( ) > 0 ? CoinControlDialog : : payAmounts . size ( ) + 1 : 2 ) * 34 ) + 10 ; // always assume +1 output for change here
nBytes = nBytesInputs + ( ( CoinControlDialog : : payAmounts . size ( ) > 0 ? CoinControlDialog : : payAmounts . size ( ) + 1 : 2 ) * 34 ) + 10 ; // always assume +1 output for change here
// Priority
// Priority
double mempoolEstimatePriority = mempool . estimatePriority ( nTxConfirmTarget ) ;
double mempoolEstimatePriority = mempool . estimateSmart Priority ( nTxConfirmTarget ) ;
dPriority = dPriorityInputs / ( nBytes - nBytesInputs + ( nQuantityUncompressed * 29 ) ) ; // 29 = 180 - 151 (uncompressed public keys are over the limit. max 151 bytes of the input are ignored for priority)
dPriority = dPriorityInputs / ( nBytes - nBytesInputs + ( nQuantityUncompressed * 29 ) ) ; // 29 = 180 - 151 (uncompressed public keys are over the limit. max 151 bytes of the input are ignored for priority)
sPriorityLabel = CoinControlDialog : : getPriorityLabel ( dPriority , mempoolEstimatePriority ) ;
sPriorityLabel = CoinControlDialog : : getPriorityLabel ( dPriority , mempoolEstimatePriority ) ;
@ -550,10 +550,8 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
// Fee
// Fee
nPayFee = CWallet : : GetMinimumFee ( nBytes , nTxConfirmTarget , mempool ) ;
nPayFee = CWallet : : GetMinimumFee ( nBytes , nTxConfirmTarget , mempool ) ;
// Allow free?
// Allow free? (require at least hard-coded threshold and default to that if no estimate)
double dPriorityNeeded = mempoolEstimatePriority ;
double dPriorityNeeded = std : : max ( mempoolEstimatePriority , AllowFreeThreshold ( ) ) ;
if ( dPriorityNeeded < = 0 )
dPriorityNeeded = AllowFreeThreshold ( ) ; // not enough data, back to hard-coded
fAllowFree = ( dPriority > = dPriorityNeeded ) ;
fAllowFree = ( dPriority > = dPriorityNeeded ) ;
if ( fSendFreeTransactions )
if ( fSendFreeTransactions )
@ -649,8 +647,9 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
double dFeeVary ;
double dFeeVary ;
if ( payTxFee . GetFeePerK ( ) > 0 )
if ( payTxFee . GetFeePerK ( ) > 0 )
dFeeVary = ( double ) std : : max ( CWallet : : GetRequiredFee ( 1000 ) , payTxFee . GetFeePerK ( ) ) / 1000 ;
dFeeVary = ( double ) std : : max ( CWallet : : GetRequiredFee ( 1000 ) , payTxFee . GetFeePerK ( ) ) / 1000 ;
else
else {
dFeeVary = ( double ) std : : max ( CWallet : : GetRequiredFee ( 1000 ) , mempool . estimateFee ( nTxConfirmTarget ) . GetFeePerK ( ) ) / 1000 ;
dFeeVary = ( double ) std : : max ( CWallet : : GetRequiredFee ( 1000 ) , mempool . estimateSmartFee ( nTxConfirmTarget ) . GetFeePerK ( ) ) / 1000 ;
}
QString toolTip4 = tr ( " Can vary +/- %1 satoshi(s) per input. " ) . arg ( dFeeVary ) ;
QString toolTip4 = tr ( " Can vary +/- %1 satoshi(s) per input. " ) . arg ( dFeeVary ) ;
l3 - > setToolTip ( toolTip4 ) ;
l3 - > setToolTip ( toolTip4 ) ;
@ -686,7 +685,7 @@ void CoinControlDialog::updateView()
QFlags < Qt : : ItemFlag > flgTristate = Qt : : ItemIsSelectable | Qt : : ItemIsEnabled | Qt : : ItemIsUserCheckable | Qt : : ItemIsTristate ;
QFlags < Qt : : ItemFlag > flgTristate = Qt : : ItemIsSelectable | Qt : : ItemIsEnabled | Qt : : ItemIsUserCheckable | Qt : : ItemIsTristate ;
int nDisplayUnit = model - > getOptionsModel ( ) - > getDisplayUnit ( ) ;
int nDisplayUnit = model - > getOptionsModel ( ) - > getDisplayUnit ( ) ;
double mempoolEstimatePriority = mempool . estimatePriority ( nTxConfirmTarget ) ;
double mempoolEstimatePriority = mempool . estimateSmart Priority ( nTxConfirmTarget ) ;
std : : map < QString , std : : vector < COutput > > mapCoins ;
std : : map < QString , std : : vector < COutput > > mapCoins ;
model - > listCoins ( mapCoins ) ;
model - > listCoins ( mapCoins ) ;