Fixed freezing GUI on reindex #17565

pull mxaddict wants to merge 1 commits into bitcoin:master from mxaddict:freezing-gui-on-reindex changing 1 files +2 −1
  1. mxaddict commented at 9:27 pm on November 22, 2019: contributor

    Issue

    GUI wallet freezes on start (Loading block files for reindex)

    Fix

    Added a check for fReindex in the BlockTipChanged method/function when update if for a header

    Test

    • Run a fully indexed node with GUI (navcoin-qt) with -reindex=1
    • GUI wallet should not freeze when starting reindex.
  2. fanquake added the label GUI on Nov 22, 2019
  3. in src/qt/clientmodel.cpp:246 in 439ece1527 outdated
    242@@ -243,7 +243,7 @@ static void BlockTipChanged(ClientModel *clientmodel, bool initialSync, int heig
    243         clientmodel->cachedBestHeaderTime = blockTime;
    244     }
    245     // if we are in-sync or if we notify a header update, update the UI regardless of last update time
    246-    if (fHeader || !initialSync || now - nLastUpdateNotification > MODEL_UPDATE_DELAY) {
    247+    if (fHeader && !fReindex || !initialSync || now - nLastUpdateNotification > MODEL_UPDATE_DELAY) {
    


    instagibbs commented at 9:41 pm on November 22, 2019:
    please put parenthesis around fHeader && !fReindex to make it unambiguous to readers if that’s what you meant

    mxaddict commented at 9:41 pm on November 22, 2019:
    ACK
  4. mxaddict commented at 9:44 pm on November 22, 2019: contributor
    @instagibbs I’ve made the requested change 👍
  5. Fixed freezing GUI on reindex 7a633fdc81
  6. in src/qt/clientmodel.cpp:18 in 7a633fdc81
    14@@ -15,6 +15,7 @@
    15 #include <net.h>
    16 #include <netbase.h>
    17 #include <util/system.h>
    18+#include <validation.h>
    


    laanwj commented at 10:53 am on November 23, 2019:
    I don’t think you’re supposed to introduce a direct dependency here, either the flag should be passed in or the request should go through the node interface @ryanofsky

    mxaddict commented at 4:36 pm on November 23, 2019:
    ACK, so use the node getFreindex() method.

    ryanofsky commented at 8:10 pm on November 25, 2019:

    re: #17565 (review)

    In commit “Fixed freezing GUI on reindex” (7a633fdc8111d1a6140e2c139fb4b71f41934ae7)

    You’d replace fReindex here with clientmodel->node().getReindex()

  7. MarcoFalke added the label Waiting for author on Dec 10, 2019
  8. MarcoFalke commented at 5:08 pm on December 10, 2019: member
    Is this up for grabs?
  9. fanquake added the label Up for grabs on Jan 25, 2020
  10. fanquake commented at 8:09 am on January 25, 2020: member
    Closing as Up for grabs.
  11. fanquake closed this on Jan 25, 2020

  12. fanquake removed the label Up for grabs on Feb 11, 2020
  13. fanquake removed the label Waiting for author on Feb 11, 2020
  14. jonasschnelli referenced this in commit 0c20809da8 on Feb 13, 2020
  15. PastaPastaPasta referenced this in commit e1d30656f6 on Sep 17, 2021
  16. PastaPastaPasta referenced this in commit b6a1b67143 on Sep 18, 2021
  17. thelazier referenced this in commit 54faad1c17 on Sep 25, 2021
  18. DrahtBot locked this on Feb 15, 2022

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: 2024-12-22 18:12 UTC

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