mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-10 15:17:57 -05:00
add cashier_url to darkfid config file
This commit is contained in:
@@ -146,6 +146,7 @@ impl State {
|
||||
async fn start(executor: Arc<Executor<'_>>, config: Arc<&DarkfidConfig>) -> Result<()> {
|
||||
let connect_addr: SocketAddr = config.connect_url.parse()?;
|
||||
let sub_addr: SocketAddr = config.subscriber_url.parse()?;
|
||||
let cashier_addr: SocketAddr = config.cashier_url.parse()?;
|
||||
let database_path = config.database_path.clone();
|
||||
let walletdb_path = config.walletdb_path.clone();
|
||||
|
||||
@@ -201,7 +202,7 @@ async fn start(executor: Arc<Executor<'_>>, config: Arc<&DarkfidConfig>) -> Resu
|
||||
|
||||
// create gateway client
|
||||
debug!(target: "Cashier Client", "Creating cashier client");
|
||||
let mut cashier_client = CashierClient::new("127.0.0.1:7777".parse()?)?;
|
||||
let mut cashier_client = CashierClient::new(cashier_addr)?;
|
||||
|
||||
debug!(target: "Gateway", "Start subscriber");
|
||||
// start subscribing
|
||||
|
||||
@@ -73,6 +73,10 @@ pub struct DarkfidConfig {
|
||||
#[serde(rename = "subscriber_url")]
|
||||
pub subscriber_url: String,
|
||||
|
||||
#[serde(default)]
|
||||
#[serde(rename = "cashier_url")]
|
||||
pub cashier_url: String,
|
||||
|
||||
#[serde(default)]
|
||||
#[serde(rename = "rpc_url")]
|
||||
pub rpc_url: String,
|
||||
@@ -98,6 +102,7 @@ impl Default for DarkfidConfig {
|
||||
fn default() -> Self {
|
||||
let connect_url = String::from("127.0.0.1:3333");
|
||||
let subscriber_url = String::from("127.0.0.1:4444");
|
||||
let cashier_url = String::from("127.0.0.1:7777");
|
||||
let rpc_url = String::from("127.0.0.1:8000");
|
||||
|
||||
let database_path = String::from("database_client.db");
|
||||
@@ -128,6 +133,7 @@ impl Default for DarkfidConfig {
|
||||
Self {
|
||||
connect_url,
|
||||
subscriber_url,
|
||||
cashier_url,
|
||||
rpc_url,
|
||||
database_path,
|
||||
walletdb_path,
|
||||
|
||||
Reference in New Issue
Block a user