Skip to content

Commit 309a31a

Browse files
someone235coderofstuff
authored andcommitted
Moving ClientPool to grpc/client
1 parent 0ce37ba commit 309a31a

File tree

10 files changed

+17
-20
lines changed

10 files changed

+17
-20
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ include = [
7777
mimalloc = { version = "0.1.39", default-features = false, features = [
7878
'override',
7979
] }
80-
kaspa-testing-integration = { version = "0.13.1", path = "testing/integration" }
80+
# kaspa-testing-integration = { version = "0.13.1", path = "testing/integration" }
8181
kaspa-addresses = { version = "0.13.1", path = "crypto/addresses" }
8282
kaspa-addressmanager = { version = "0.13.1", path = "components/addressmanager" }
8383
kaspa-bip32 = { version = "0.13.1", path = "wallet/bip32" }

consensus/core/src/tx.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -145,16 +145,7 @@ impl Transaction {
145145
gas: u64,
146146
payload: Vec<u8>,
147147
) -> Self {
148-
let mut tx = Self {
149-
version,
150-
inputs,
151-
outputs,
152-
lock_time,
153-
subnetwork_id,
154-
gas,
155-
payload,
156-
id: Default::default(), // Temp init before the finalize below
157-
};
148+
let mut tx = Self::new_non_finalized(version, inputs, outputs, lock_time, subnetwork_id, gas, payload);
158149
tx.finalize();
159150
tx
160151
}

rothschild/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ kaspa-rpc-core.workspace = true
1515
kaspa-addresses.workspace = true
1616
kaspa-txscript.workspace = true
1717
kaspa-utils.workspace = true
18-
kaspa-testing-integration.workspace = true
1918
async-channel.workspace = true
2019
parking_lot.workspace = true
2120

@@ -32,4 +31,4 @@ criterion.workspace = true
3231

3332
[[bench]]
3433
name = "bench"
35-
harness = false
34+
harness = false

rothschild/src/main.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ use kaspa_consensus_core::{
1111
tx::{MutableTransaction, Transaction, TransactionInput, TransactionOutpoint, TransactionOutput, UtxoEntry},
1212
};
1313
use kaspa_core::{info, kaspad_env::version, time::unix_now, warn};
14-
use kaspa_grpc_client::GrpcClient;
14+
use kaspa_grpc_client::{ClientPool, GrpcClient};
1515
use kaspa_rpc_core::{api::rpc::RpcApi, notify::mode::NotificationMode};
16-
use kaspa_testing_integration::common::client_pool::ClientPool;
1716
use kaspa_txscript::pay_to_address_script;
1817
use parking_lot::Mutex;
1918
use rayon::prelude::*;

rpc/grpc/client/Cargo.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@ prost.workspace = true
2727
rand.workspace = true
2828
regex.workspace = true
2929
thiserror.workspace = true
30-
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "sync", "time"] }
30+
tokio = { workspace = true, features = [
31+
"rt-multi-thread",
32+
"macros",
33+
"sync",
34+
"time",
35+
] }
3136
tokio-stream.workspace = true
3237
tonic = { workspace = true, features = ["gzip"] }
3338
triggered.workspace = true
39+
futures-util.workspace = true

testing/integration/src/common/client_pool.rs renamed to rpc/grpc/client/src/client_pool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
use super::GrpcClient;
12
use async_channel::{SendError, Sender};
23
use futures_util::Future;
34
use kaspa_core::trace;
4-
use kaspa_grpc_client::GrpcClient;
55
use kaspa_utils::{any::type_name_short, channel::Channel};
66
use std::sync::Arc;
77
use tokio::task::JoinHandle;

rpc/grpc/client/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use self::{
44
};
55
use async_channel::{Receiver, Sender};
66
use async_trait::async_trait;
7+
pub use client_pool::ClientPool;
78
use connection_event::ConnectionEvent;
89
use futures::{future::FutureExt, pin_mut, select};
910
use kaspa_core::{debug, trace};
@@ -55,6 +56,8 @@ mod resolver;
5556
#[macro_use]
5657
mod route;
5758

59+
mod client_pool;
60+
5861
pub type GrpcClientCollector = CollectorFrom<RpcCoreConverter>;
5962
pub type GrpcClientNotify = DynNotify<Notification>;
6063
pub type GrpcClientNotifier = Notifier<Notification, ChannelConnection>;

testing/integration/src/common/daemon.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use kaspad_lib::{args::Args, daemon::create_core_with_runtime};
88
use std::{sync::Arc, time::Duration};
99
use tempfile::TempDir;
1010

11-
use super::client_pool::ClientPool;
11+
use kaspa_grpc_client::ClientPool;
1212

1313
pub struct Daemon {
1414
// Type and suffix of the daemon network

testing/integration/src/common/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use std::{
55
};
66

77
pub mod client_notify;
8-
pub mod client_pool;
98
pub mod daemon;
109
pub mod utils;
1110

0 commit comments

Comments
 (0)