HomePhabricator

Fix a bug in ibd.sh where multiple args provided to the script would not be…

Description

Fix a bug in ibd.sh where multiple args provided to the script would not be parsed correctly

Summary:
Discovered while doing additional testing on ibd.sh after D2612. Initially introduced in D2027.
Ordering of the arguments and whether or not those args contain = impacts the final args interpretted by bitcoind.
The quotes cause the args to be interpretted as a single arg with the value inside the quotes. In this case, without
the below patch, passing the follow args gives the following results due to the string being evaluated as a single argument:
ibd.sh -assumvalid=0 -checkpoints=0 -disablewallet
assumevalid = 0 -checkpoints=0 -disablewallet
Assumevalid gets set to some hex based on the above string.
Checkpoints remains enabled by default.
Wallet is enabled by default.

ibd.sh -disablewallet -assumvalid=0 -checkpoints=0
disablewallet assumevalid = 0 checkpoints=0
Wallet, assumevalid, and checkpoints all remain at their default values.

Test Plan:
Add a log message to check for fCheckpointsEnabled value in init.cpp for sanity. (not included in this patch)

cd build/
../../contrib/teamcity/ibd.sh -assumevalid=0 -checkpoints=0 -disablewallet
less ibd/debug.log

Ensure that messages for assumevalid, checkpoints, and wallet indicate they are all disabled.

Reviewers: deadalnix, Fabien, #bitcoin_abc

Reviewed By: deadalnix, #bitcoin_abc

Subscribers: nakihito, teamcity, schancel

Differential Revision: https://reviews.bitcoinabc.org/D2637

Details

Provenance
jasonbcoxAuthored on Mar 1 2019, 23:59
nakihitoPushed on Mar 2 2019, 02:42
Reviewer
Restricted Project
Differential Revision
D2637: Fix a bug in ibd.sh where multiple args provided to the script would not be parsed correctly
Parents
rSTAGING86594408f2fa: Updated ibd.sh script to take bitcoind options and then pass them directly to…
Branches
Unknown
Tags
Unknown