Bitcoin full node and query server

Aug 26, 2021

View in context in the libbitcoin Slack #general mirror.

P
Phil20:28
Hey there. Please @evoskuil, can you confirm to me how the bn.cfg parsing works. If I got it right, the parser::load_settings() function is responsible for adding the options. For the example:
(
    "bitcoin.retargeting_factor",
    value<uint32_t>(&configured.bitcoin.retargeting_factor),
    "The difficulty retargeting factor, defaults to 4."
)
The first line is the name of the option. Here retargeting_factor must be under a [bitcoin] flag. Then the second line tells boost which time the option is and where to store it. Third seems to be just a description. Ok, if I add my custom option here, the only other change that I absolutely need to make is to create the actual variable that will store the option. Following the example, retargeting_factor is declared in the file: libbitcoin-system/include/bitcoin/system/settings.hpp. Is this all I need to add a new option to bn.cfg?