Skip to content

Commit

Permalink
Multiserver connection & Load Balancer
Browse files Browse the repository at this point in the history
  • Loading branch information
hhanh00 committed Oct 11, 2024
1 parent 4535696 commit 26f21a8
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 18 deletions.
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ tracing-subscriber = { version = "0.3.18", features = [ "env-filter" ] }
tokio = { version = "1.40", features = ["rt-multi-thread"] }
tokio-stream = "0.1.15"
tonic = { version = "0.12", features = ["tls", "tls-native-roots", "tls-webpki-roots"] }
tower = "0.4.13"
hyper = "1.4.1"
prost = "0.13"
hex = { version = "0.4", features = ["serde"] }
fpdec = "0.10.3"
Expand Down
2 changes: 1 addition & 1 deletion dart-warp
16 changes: 1 addition & 15 deletions warp-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ pub fn c_export(_attr: TokenStream, item: TokenStream) -> TokenStream {
let mut has_connection = false;
let mut mut_connection = false;
let mut has_client = false;
let mut has_url = false;
for input in inputs.iter() {
if let FnArg::Typed(pat) = input {
if let Pat::Ident(param) = pat.pat.as_ref() {
Expand All @@ -140,10 +139,6 @@ pub fn c_export(_attr: TokenStream, item: TokenStream) -> TokenStream {
has_network = true;
continue;
}
"url" => {
has_url = true;
continue;
}
"connection" => {
has_connection = true;
if type_name == "& mut Connection" {
Expand Down Expand Up @@ -234,13 +229,6 @@ pub fn c_export(_attr: TokenStream, item: TokenStream) -> TokenStream {
} else {
quote! {}
};
let url = if has_url {
quote! {
let url = coin_def.config.lwd_url.clone().unwrap();
}
} else {
quote! {}
};
let connection = if has_connection {
if mut_connection {
quote! {
Expand All @@ -257,7 +245,7 @@ pub fn c_export(_attr: TokenStream, item: TokenStream) -> TokenStream {
};
let client = if has_client {
quote! {
let mut client = coin_def.connect_lwd().await?;
let mut client = coin_def.connect_lwd()?;
let client = &mut client;
}
} else {
Expand Down Expand Up @@ -292,7 +280,6 @@ pub fn c_export(_attr: TokenStream, item: TokenStream) -> TokenStream {
#coin
#network
#connection
#url
#client
#(#convs)*
#ident(#(#args),*).await
Expand All @@ -315,7 +302,6 @@ pub fn c_export(_attr: TokenStream, item: TokenStream) -> TokenStream {
#coin
#network
#connection
#url
#client
#(#convs)*
#ident(#(#args),*)
Expand Down
2 changes: 1 addition & 1 deletion ywallet
2 changes: 1 addition & 1 deletion zcash-warp

0 comments on commit 26f21a8

Please sign in to comment.