Correct description of blocksdir default value #16010

pull kristapsk wants to merge 1 commits into bitcoin:master from kristapsk:blocksdir changing 1 files +1 −1
  1. kristapsk commented at 9:46 PM on May 11, 2019: contributor

    I recently moved all my Bitcoin datadir except blocksdir from a slow storage to the fast one. By previous description of blocksdir default I expected that blocksdir value should be "old_datadir/blocks", but it actually should be "old_datadir", as it expects / creates "blocks" subdirectory under it, so it's default is actually <datadir>, not <datadir>/blocks. See also GetDataDir() in src/util/system.cpp.

  2. Correct description of blocksdir default value 1b6afadd5b
  3. fanquake added the label Docs on May 11, 2019
  4. DrahtBot commented at 12:15 AM on May 12, 2019: member

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #15457 (Check std::system for -[alert|block|wallet]notify by Sjors)
    • #14364 (doc: Clarify -blocksdir usage by sangaman)
    • #12557 ([WIP] 64 bit iOS device support by Sjors)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  5. promag commented at 5:25 PM on May 12, 2019: member
  6. kristapsk commented at 5:52 PM on May 12, 2019: contributor

    I'm not saying default is not correct, I am saying it's current description in help is a lie.

  7. promag commented at 7:39 PM on May 12, 2019: member

    Oh right! Didn't check history but is current behavior correct? I mean, is it normal to expect subdirectory blocks/ on the specified -blocksdir?

    Edit: see #12828 (comment)

    I think the help should say something like Specify root directory for blocks (*blk) and undo (*.rev) files (default: <datadir>).

  8. in src/init.cpp:383 in 1b6afadd5b
     379 | @@ -380,7 +380,7 @@ void SetupServerArgs()
     380 |      gArgs.AddArg("-version", "Print version and exit", false, OptionsCategory::OPTIONS);
     381 |      gArgs.AddArg("-alertnotify=<cmd>", "Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)", false, OptionsCategory::OPTIONS);
     382 |      gArgs.AddArg("-assumevalid=<hex>", strprintf("If this block is in the chain assume that it and its ancestors are valid and potentially skip their script verification (0 to verify all, default: %s, testnet: %s)", defaultChainParams->GetConsensus().defaultAssumeValid.GetHex(), testnetChainParams->GetConsensus().defaultAssumeValid.GetHex()), false, OptionsCategory::OPTIONS);
     383 | -    gArgs.AddArg("-blocksdir=<dir>", "Specify blocks directory (default: <datadir>/blocks)", false, OptionsCategory::OPTIONS);
     384 | +    gArgs.AddArg("-blocksdir=<dir>", "Specify blocks directory (default: <datadir>)", false, OptionsCategory::OPTIONS);
    


    MarcoFalke commented at 4:43 PM on May 13, 2019:

    Should this put blocks into some quotes to clarify this is a string literal and not a English word (that e.g. can be translated). Thankfully we no longer translate those, but could still make it clear?

        gArgs.AddArg("-blocksdir=<dir>", "Specify 'blocks' directory (default: <datadir>)", false, OptionsCategory::OPTIONS);
    
  9. MarcoFalke commented at 4:43 PM on May 13, 2019: member

    ACK

  10. DrahtBot commented at 5:13 PM on May 13, 2019: member

    <!--cf906140f33d8803c4a75a2196329ecb-->Needs rebase

  11. DrahtBot added the label Needs rebase on May 13, 2019
  12. kristapsk commented at 7:24 PM on May 13, 2019: contributor

    #14364 got merged (noticed existence of such PR only after pushing this one), this isn't actual anymore.

  13. kristapsk closed this on May 13, 2019

  14. laanwj removed the label Needs rebase on Oct 24, 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-22 18:14 UTC

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