Improve check disk space in bitcoind #16265

pull asood123 wants to merge 1 commits into bitcoin:master from asood123:patch-15813 changing 3 files +16 −7
  1. asood123 commented at 8:12 PM on June 21, 2019: contributor

    Addressing: #15813.

    Instead of requiring constant 50MB of space, this checks chainparams.AssumedBlockchainSize() and chainparams.AssumedChainStateSize() for a more accurate calculation.

    This is my first time touching C++ code in Bitcoin, so some questions:

    • I adapted this code from the gui: https://github.com/bitcoin/bitcoin/blob/master/src/qt/intro.cpp#L133. From what I can tell, -prune=1 in bitcoind means manual pruning but gui treats that as a valid 1MB pruning limit? Clarification on that would be helpful.
    • Do I need to add a test?
    • I added the same check for datadir and blocksdir. Is that right (and necessary)?

    Feedback welcome.

  2. DrahtBot added the label Utils/log/libs on Jun 21, 2019
  3. DrahtBot commented at 9:09 PM on June 21, 2019: member

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    No conflicts as of last run.

  4. DrahtBot added the label Needs rebase on Jul 24, 2019
  5. MarcoFalke commented at 6:24 PM on July 24, 2019: member

    This would prevent the node from starting when the blockchain is already downloaded fully?

  6. asood123 force-pushed on Jul 26, 2019
  7. Update check disk space in bitcoind 61433f43d2
  8. asood123 force-pushed on Jul 26, 2019
  9. asood123 commented at 3:29 PM on July 26, 2019: contributor

    This would prevent the node from starting when the blockchain is already downloaded fully?

    I'm not sure to be honest. I was mostly copying what happens in the GUI intro.

    https://github.com/bitcoin/bitcoin/blob/a54a12046e98c57512715041d30ecf2f0ab8f6dd/src/qt/intro.cpp#L133-L146

    It's possible that the GUI intro only happens at the first run, rather than on every start?

  10. DrahtBot removed the label Needs rebase on Jul 26, 2019
  11. MarcoFalke commented at 5:24 PM on July 26, 2019: member

    It's possible that the GUI intro only happens at the first run, rather than on every start?

    Yes, unless you do a -resetguisettings.

  12. laanwj renamed this:
    Update check disk space in bitcoind
    Improve check disk space in bitcoind
    on Sep 30, 2019
  13. laanwj commented at 12:15 PM on September 30, 2019: member

    This PR seems to have been based on a misunderstanding of the GUI code and gone inactive, so closing it for now. Let me know when you intend to work on this again.

  14. laanwj closed this on Sep 30, 2019

  15. DrahtBot locked this on Dec 16, 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-13 15:14 UTC

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