Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

DAWN-229 ⁃ libraries/appbase/application.cpp ignores the value supplied to —config #1065

Closed
blockone-syncclient opened this issue Jan 10, 2018 · 0 comments
Assignees
Milestone

Comments

@blockone-syncclient
Copy link

blockone-syncclient commented Jan 10, 2018

From Phil:

just now found that libraries/appbase/application.cpp ignores the value supplied to —config.
bfs::path config_file_name = data_dir / "config.ini";
if( options.count( "config" ) ) {
auto config_file_name = options["config"].asbfs::path();
if( config_file_name.is_relative() )
config_file_name = data_dir / config_file_name;
}

if someone wants to supply an alternate config file, it won’t be used. Second, the —config option doesn’t behave as advertised.

not earth shattering, but I was going to use the feature in the launcher to assess whether or not —enable-stale-production was defined in a collection of staged config files.

It’s a one-word code change, but all the process of modifying the submodule. :-(

ATC

Prerequisites

  • A local test net with the latest code, including the latest submodule. git submodule update to be sure.

Side effects

  • An additional config file will be left in tn_data_00.

Procedure

  1. Copy tn_data_00/config.ini to tn_data_00/config-port-8880.ini
  2. Edit tn_data_00/config-port-8880.ini and change http-server-address = 127.0.0.1:8888 to http-server-address = 127.0.0.1:8880.
  3. Run eosiod normally.
  4. Verify the daemon can be reached by eosioc on the default port:
  • programs/eosioc/eosioc get info should return the usual JSON results.
  1. Shut down eosiod
  2. Run eosiod with command line option --config config-port-8880.ini.
  3. Verify the daemon can not be reached by eosioc on the default port:
  • programs/eosioc/eosioc get info returns Failed to connect to eosd at localhost:8888; is eosd running?
  1. Verify the daemon can be reached on port 8880:
  • programs/eosioc/eosioc -p 8880 get info returns the usual JSON results.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants