Bitcoin full node and query server

Sep 5, 2018

View in context in the libbitcoin Slack #general mirror.

@evoskuil I've been re-thinking your proposed solution for safety regarding the derivable values in bc::settings. I came to the conclusion that if we use standard C++ encapsulation mechanisms we can get it all: safety and performance. So we have non-derivable values upon which other (derivable) values depend. I would make both of them private members and only make them accessible through getter methods. For the non-derivable values we'd then implement setter methods that will also update the dependent values. Consequently, the derivation of the values would be an one-off computation rather than recurring for each use. This implementation would still be compatible with boost::program_options because the bc::settings setter methods can be passed into the boost::program_options's notifer method which then causes the value to be set according to the configuration. The only drawback would be that bc::settings would not be perfectly consistent with the other settings classes. But with the current solution it's not either.
👍 1