We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 356c09c commit 67060daCopy full SHA for 67060da
1 file changed
rust/main/chains/hyperlane-tron/src/provider/http_client.rs
@@ -29,14 +29,27 @@ pub struct TronHttpProvider {
29
}
30
31
/// A single HTTP channel used by the FallbackProvider
32
-#[derive(Clone, Debug)]
+#[derive(Debug)]
33
pub struct TronHttpChannel {
34
client: Client,
35
base_url: Url,
36
metrics: PrometheusClientMetrics,
37
config: PrometheusConfig,
38
39
40
+impl Clone for TronHttpChannel {
41
+ fn clone(&self) -> Self {
42
+ let chain_name = PrometheusConfig::chain_name(&self.config.chain);
43
+ self.metrics.increment_provider_instance(chain_name);
44
+ Self {
45
+ client: self.client.clone(),
46
+ base_url: self.base_url.clone(),
47
+ metrics: self.metrics.clone(),
48
+ config: self.config.clone(),
49
+ }
50
51
+}
52
+
53
impl TronHttpChannel {
54
fn new(
55
url: &Url,
0 commit comments