[Qt] add defaultConfirmTarget constant to sendcoinsdialog #5932

pull Diapolo wants to merge 1 commits into bitcoin:master from Diapolo:sendcoinsdialog changing 2 files +5 −3
  1. Diapolo commented at 5:22 PM on March 21, 2015: none
    • replaces some hard-coded values for the default confirmation target
  2. jonasschnelli commented at 6:51 PM on March 21, 2015: contributor

    utACK @theuni trivial branch

  3. Diapolo commented at 6:41 AM on March 23, 2015: none

    Same here, even if it is a small change, I've been told by @theuni and @laanwj that these don't belong into trivial.

  4. sipa commented at 1:05 PM on March 24, 2015: member

    utACK.

  5. fanquake commented at 3:11 AM on March 26, 2015: member

    utACK

  6. in src/qt/sendcoinsdialog.cpp:None in 9a7f327cef outdated
     627 | @@ -628,7 +628,7 @@ void SendCoinsDialog::updateSmartFeeLabel()
     628 |      if(!model || !model->getOptionsModel())
     629 |          return;
     630 |  
     631 | -    int nBlocksToConfirm = (int)25 - (int)std::max(0, std::min(24, ui->sliderSmartFee->value()));
     632 | +    int nBlocksToConfirm = (int)defaultConfirmTarget - (int)std::max(ui->sliderSmartFee->minimum(), std::min(ui->sliderSmartFee->maximum(), ui->sliderSmartFee->value()));
    


    laanwj commented at 7:04 AM on March 26, 2015:

    (int)std::max(ui->sliderSmartFee->minimum(), std::min(ui->sliderSmartFee->maximum(), ui->sliderSmartFee->value()

    Does the slider guarantee this value range for its value, making this redundant?


    Diapolo commented at 12:36 PM on April 8, 2015:

    <pre> When setting this property, the minimum is adjusted if necessary to ensure that the range remains valid. Also the slider's current value is adjusted to be within the new range. </pre>

    Seems like this IS the case...


    Diapolo commented at 1:08 PM on April 8, 2015:

    @laanwj So this would become int nBlocksToConfirm = defaultConfirmTarget - ui->sliderSmartFee->value();, right?


    Diapolo commented at 12:50 PM on April 28, 2015:

    @laanwj Updated to include your suggestion...

  7. laanwj added the label Improvement on Mar 26, 2015
  8. [Qt] add defaultConfirmTarget constant to sendcoinsdialog
    - replaces some hard-coded values for the default confirmation target
    - also simplify code that is using the new constant
    107d35b700
  9. Diapolo commented at 8:47 AM on May 11, 2015: none

    @laanwj Can you re-check please?

  10. laanwj merged this on May 12, 2015
  11. laanwj closed this on May 12, 2015

  12. laanwj referenced this in commit 40de49c358 on May 12, 2015
  13. Diapolo deleted the branch on May 12, 2015
  14. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me