The -asmap
option supposedly has a default value ip_asn.map
(as defined by DEFAULT_ASMAP_FILENAME
). However, when I tried to put a file with this name into my datadir, nothing happened. It turns out that this default is not actually used unless the -asmap
option is set, which seems weird since setting the option normally overrides the default. There is a way to set it without overriding the default on the command line (bitcoind -asmap
), but in bitcoin.conf there doesn’t seem to be a way to do that (e.g. asmap=1
sets the file path to 1
).
Some ways this could be resolved:
- Simply better document this behavior. The help text doesn’t say that the default value is not actually used when the option is not set, and the option itself is introduced as
-asmap=<file>
which in no way indicates that it can be used without a value. - If the option is not set (but not explicitly disabled with
-noasmap
) try to load the ASmap file using the default path but don’t abort if the file doesn’t exist. - Remove the default value to prevent any confusion.