Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Change Tx validation logic to add: Tx wait that its parent has been validated. #137

Merged
merged 13 commits into from
Mar 14, 2024
10 changes: 10 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions crates/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ http-body-util = { version = "0.1", optional = true }
hyper = { version = "1", features = ["full"], optional = true }
hyper-util = { version = "0.1", features = ["full"], optional = true }
num_cpus = { version = "1.4.0", optional = true }
lru = "0.12.3"
num-traits = { version = "0.2", optional = true }
parking_lot = { version = "0.12", optional = true }
pea2pea = { version = "0.48", optional = true }
Expand Down
1 change: 1 addition & 0 deletions crates/node/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ async fn run(config: Arc<Config>) -> Result<()> {
database.clone(),
rcv_tx_event_rx,
new_validated_tx_receiver.clone(),
database.clone(),
)
.await?;

Expand Down
3 changes: 2 additions & 1 deletion crates/node/src/txvalidation/download_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ pub async fn download_asset_file(
.filter_map(|(peer, port)| {
port.map(|port| {
//use parse to create an URL, no new method.
let mut url = reqwest::Url::parse(HTTP_SERVER_SCHEME).unwrap(); //unwrap always succeed
let mut url =
reqwest::Url::parse(&format!("{HTTP_SERVER_SCHEME}localhost")).unwrap(); //unwrap always succeed
url.set_ip_host(peer.ip()).unwrap(); //unwrap always succeed
url.set_port(Some(port)).unwrap(); //unwrap always succeed
url.set_path(&file_uri); //unwrap Path always ok
Expand Down
Loading
Loading