Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions kinode/src/register.rs
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,6 @@ pub async fn assign_routing(
let namehash = FixedBytes::<32>::from_slice(&keygen::namehash(&our.name));
let ip_call = ipCall { _0: namehash }.abi_encode();
let key_call = keyCall { _0: namehash }.abi_encode();
let router_call = routersCall { _0: namehash }.abi_encode();
let tx_input = TransactionInput::new(Bytes::from(ip_call));
let tx = TransactionRequest::default()
.to(kns_address)
Expand Down Expand Up @@ -737,18 +736,6 @@ pub async fn assign_routing(
));
}

let router_tx_input = TransactionInput::new(Bytes::from(router_call));
let router_tx = TransactionRequest::default()
.to(kns_address)
.input(router_tx_input);

let Ok(routers) = provider.call(&router_tx).await else {
return Err(anyhow::anyhow!("Failed to fetch node routers from PKI"));
};
let Ok(routers) = <Vec<FixedBytes<32>>>::abi_decode(&routers, false) else {
return Err(anyhow::anyhow!("Failed to decode node routers from PKI"));
};

let node_ip = format!(
"{}.{}.{}.{}",
(ip >> 24) & 0xFF,
Expand All @@ -757,7 +744,7 @@ pub async fn assign_routing(
ip & 0xFF
);

if !routers.is_empty() {
if !our.is_direct() {
// indirect node
return Ok(());
}
Expand Down
2 changes: 1 addition & 1 deletion kinode/src/terminal/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ pub async fn terminal(
_ = sigalrm.recv() => return Err(anyhow::anyhow!("exiting due to SIGALRM")),
_ = sighup.recv() => return Err(anyhow::anyhow!("exiting due to SIGHUP")),
_ = sigint.recv() => return Err(anyhow::anyhow!("exiting due to SIGINT")),
_ = sigpipe.recv() => return Err(anyhow::anyhow!("exiting due to SIGPIPE")),
_ = sigpipe.recv() => continue, // IGNORE SIGPIPE!
_ = sigquit.recv() => return Err(anyhow::anyhow!("exiting due to SIGQUIT")),
_ = sigterm.recv() => return Err(anyhow::anyhow!("exiting due to SIGTERM")),
_ = sigusr1.recv() => return Err(anyhow::anyhow!("exiting due to SIGUSR1")),
Expand Down