mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-13 12:33:25 +02:00
Rename rpc config section (#1716)
This commit is contained in:
parent
6b774815c8
commit
2bbadbd7de
4 changed files with 16 additions and 16 deletions
|
|
@ -35,9 +35,9 @@ lnd.macaroon_path | string | | yes | "" | SQUEAKNODE_LND_MACAROON_PATH | The pat
|
|||
tor.proxy_ip | string | | yes | "" | SQUEAKNODE_TOR_PROXY_IP | The ip address or host of the SOCKS5 Tor proxy, if one is used.
|
||||
tor.proxy_port | int | | yes | 0 | SQUEAKNODE_TOR_PROXY_PORT | The port of the SOCKS5 Tor proxy, is one is used.
|
||||
db.connection_string | string | | yes | "" | SQUEAKNODE_DB_CONNECTION_STRING | The connection string to use to connect to a SQL database. If none is specified, a sqlite database will be used on the local file system.
|
||||
admin.rpc_enabled | boolean | [true, false] | yes | true | SQUEAKNODE_ADMIN_RPC_ENABLED | Accept RPC commands or not.
|
||||
admin.rpc_host | string | | yes | "0.0.0.0" | SQUEAKNODE_ADMIN_RPC_HOST | Host to listen for admin rpc connections.
|
||||
admin.rpc_port | int | | yes | 8994 | SQUEAKNODE_ADMIN_RPC_PORT | Port to listen for admin rpc connections.
|
||||
rpc.enabled | boolean | [true, false] | yes | false | SQUEAKNODE_RPC_ENABLED | Accept RPC commands or not.
|
||||
rpc.host | string | | yes | "0.0.0.0" | SQUEAKNODE_RPC_HOST | Host to listen for rpc connections.
|
||||
rpc.port | int | | yes | 8994 | SQUEAKNODE_RPC_PORT | Port to listen for rpc connections.
|
||||
webadmin.enabled | boolean | [true, false] | yes | false | SQUEAKNODE_WEBADMIN_ENABLED | Run a web admin server or not.
|
||||
webadmin.host | string | | yes | "0.0.0.0" | SQUEAKNODE_WEBADMIN_HOST | Host to user for serving admin web server.
|
||||
webadmin.port | int | | yes | 12994 | SQUEAKNODE_WEBADMIN_PORT | Port to user for serving admin web server.
|
||||
|
|
@ -46,7 +46,7 @@ webadmin.password | string | | yes | "" | SQUEAKNODE_WEBADMIN_PASSWORD | Passwor
|
|||
webadmin.use_ssl | boolean | | yes | false | SQUEAKNODE_WEBADMIN_USE_SSL | Use SSL for admin web server or not.
|
||||
webadmin.login_disabled | boolean | | yes | false | SQUEAKNODE_WEBADMIN_LOGIN_DISABLED | Disable requiring login for web server or not.
|
||||
webadmin.allow_cors | boolean | | yes | false | SQUEAKNODE_WEBADMIN_ALLOW_CORS | Allow CORS requests to admin web server or not.
|
||||
server.enabled | boolean | | yes | false | SQUEAKNODE_SERVER_ENABLED | If true, then accept inbound connections from other peers.
|
||||
server.enabled | boolean | | yes | true | SQUEAKNODE_SERVER_ENABLED | If true, then accept inbound connections from other peers.
|
||||
server.host | string | | yes | "0.0.0.0" | SQUEAKNODE_SERVER_HOST | Host to user for accepting inbound peer connections.
|
||||
server.port | int | | yes | 8555/18555 | SQUEAKNODE_SERVER_PORT | Port to user for accepting inbound peer connections.
|
||||
server.external_address | string | | yes | "" | SQUEAKNODE_SERVER_EXTERNAL_ADDRESS | The address that other nodes should use to open a connection to this node.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[node]
|
||||
network=simnet
|
||||
price_msat=1000000
|
||||
max_squeaks_per_address_per_block=5
|
||||
max_squeaks_per_address_in_block_range=50
|
||||
|
||||
[lnd]
|
||||
host=lnd
|
||||
|
|
@ -21,5 +21,5 @@ host=db
|
|||
user=postgres
|
||||
password=postgres
|
||||
|
||||
[admin]
|
||||
rpc_enabled=true
|
||||
[rpc]
|
||||
enabled=true
|
||||
|
|
|
|||
|
|
@ -103,11 +103,11 @@ class ServerConfig(Config):
|
|||
external_address = key(cast=str, required=False, default="")
|
||||
|
||||
|
||||
@section('admin')
|
||||
class AdminConfig(Config):
|
||||
rpc_enabled = key(cast=bool, required=False, default=True)
|
||||
rpc_host = key(cast=str, required=False, default=DEFAULT_ADMIN_RPC_HOST)
|
||||
rpc_port = key(cast=int, required=False, default=DEFAULT_ADMIN_RPC_PORT)
|
||||
@section('rpc')
|
||||
class RpcConfig(Config):
|
||||
enabled = key(cast=bool, required=False, default=False)
|
||||
host = key(cast=str, required=False, default=DEFAULT_ADMIN_RPC_HOST)
|
||||
port = key(cast=int, required=False, default=DEFAULT_ADMIN_RPC_PORT)
|
||||
|
||||
|
||||
@section('webadmin')
|
||||
|
|
@ -162,7 +162,7 @@ class SqueaknodeConfig(Config):
|
|||
lnd = group_key(LndConfig)
|
||||
tor = group_key(TorConfig)
|
||||
server = group_key(ServerConfig)
|
||||
admin = group_key(AdminConfig)
|
||||
rpc = group_key(RpcConfig)
|
||||
webadmin = group_key(WebadminConfig)
|
||||
node = group_key(NodeConfig)
|
||||
db = group_key(DbConfig)
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ class SqueakNode:
|
|||
self._initialize()
|
||||
|
||||
self.network_manager.start(self.squeak_controller)
|
||||
if self.config.admin.rpc_enabled:
|
||||
if self.config.rpc.enabled:
|
||||
self.admin_rpc_server.start()
|
||||
if self.config.webadmin.enabled:
|
||||
self.admin_web_server.start()
|
||||
|
|
@ -173,8 +173,8 @@ class SqueakNode:
|
|||
|
||||
def initialize_admin_rpc_server(self):
|
||||
self.admin_rpc_server = SqueakAdminServerServicer(
|
||||
self.config.admin.rpc_host,
|
||||
self.config.admin.rpc_port,
|
||||
self.config.rpc.host,
|
||||
self.config.rpc.port,
|
||||
self.admin_handler,
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue