tokenika / eosfactory

Python-based EOS smart-contract development & testing framework
http://eosfactory.io/
Other
243 stars 62 forks source link

http-server-address cannot be changed #37

Closed jonericcook closed 6 years ago

jonericcook commented 6 years ago

When I change http-server-address in the config.ini file, node.reset() still starts a node on 127.0.0.1:8888

andresberrios commented 6 years ago

I think that for the node that eosfactory spins up, you need to edit the eosfactory-specific config.ini file in eosfactory/build/daemon/data-dir/config.ini.

jakub-zarembinski commented 6 years ago

You can modify the default EOSFactory configuration by adding entries to the teos/config.json file. By default this file is empty but you can edit it and assign specific values to the configuration variables. Any entries added there will override the default settings.

In order to list your current settings and thus the variables available for amendment, use a bash terminal:

$ $eosf get config

...or use a python3 terminal:

>>> import teos
>>> ok = teos.GetConfig()

You should get something like this:

#  {
#      "EOSIO_SOURCE_DIR": "/mnt/c/Workspaces/EOS/eos",
#      "EOSIO_EOSFACTORY_DIR": "/mnt/c/Workspaces/EOS/eosfactory",
#      "EOSIO_DATA_DIR": "/mnt/c/Workspaces/EOS/eosfactory/build/daemon/data-dir/",
#      "EOSIO_CONFIG_DIR": "/mnt/c/Workspaces/EOS/eosfactory/build/daemon/data-dir/",
#      "EOSIO_WALLET_DIR": "/mnt/c/Workspaces/EOS/eosfactory/build/daemon/data-dir/wallet/",
#      "KEOSD_WALLET_DIR": "${HOME}/eosio-wallet/",
#      "nodeExe": "/mnt/c/Workspaces/EOS/eos/build/programs/nodeos/nodeos",
#      "cleosExe": "/mnt/c/Workspaces/EOS/eos/build/programs/cleos/cleos",
#      "genesisJson": "/mnt/c/Workspaces/EOS/eosfactory/build/daemon/data-dir/genesis.json",
#      "EOSIO_DAEMON_ADDRESS": "127.0.0.1:8888",
#      "EOSIO_KEY_PRIVATE": "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3",
#      "EOSIO_KEY_PUBLIC": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
#      "EOSIO_WALLET_ADDRESS": "127.0.0.1:8888",
#      "EOSIO_DAEMON_NAME": "nodeos",
#      "EOSIO_WASM_CLANG": "/home/cartman/opt/wasm/bin/clang",
#      "EOSIO_BOOST_INCLUDE_DIR": "/home/cartman/opt/boost/include",
#      "EOSIO_WASM_LLVM_LINK": "/home/cartman/opt/wasm/bin/llvm-link",
#      "EOSIO_WASM_LLC": "/home/cartman/opt/wasm/bin/llc",
#      "sharedMemory": "200",
#      "contractWorkspace": "/mnt/c/Workspaces/EOS/contracts",
#      "workspaceEosio": "/mnt/c/Workspaces/EOS/eos/build/contracts/"
#  }

In your case, if it's just a matter of changing the http-server-address, you'll need to add the following entry to the teos/config.json file, for example:

{
    "EOSIO_DAEMON_ADDRESS": "127.0.0.1:8999"
}