cleaned up miscellaneous warnings and removed node_id parameter from get_name in qns indexer

This commit is contained in:
commercium-sys 2024-01-03 11:22:40 -05:00
parent 928704b4dc
commit 5d50d37667
4 changed files with 6 additions and 5 deletions

View File

@ -192,7 +192,7 @@ fn main(our: Address, mut state: State) -> anyhow::Result<()> {
let name = match state.names.entry(node_id.clone().to_string()) {
Entry::Occupied(o) => o.into_mut(),
Entry::Vacant(v) => v.insert(get_name(&e, &node_id))
Entry::Vacant(v) => v.insert(get_name(&e))
};
let mut node = state.nodes
@ -239,7 +239,7 @@ fn main(our: Address, mut state: State) -> anyhow::Result<()> {
}
}
fn get_name(log: &Log, node_id: &B256) -> String {
fn get_name(log: &Log) -> String {
let decoded = NodeRegistered::abi_decode_data(&log.data, true).unwrap();
let name = match dnswire_decode(decoded.0.clone()) {

View File

@ -97,7 +97,7 @@ async fn handle_http_server_request(
connections: Arc<Mutex<RpcConnections>>,
) -> Result<(), anyhow::Error> {
match action {
HttpServerRequest::WebSocketOpen { path, channel_id } => {}
HttpServerRequest::WebSocketOpen { .. /*path, channel_id*/ } => {}
HttpServerRequest::WebSocketPush {
channel_id,
message_type,
@ -246,7 +246,7 @@ async fn spawn_provider_read_stream(
}
fn handle_response(ipc: &Vec<u8>) -> Result<()> {
let Ok(message) = serde_json::from_slice::<HttpServerAction>(ipc) else {
let Ok(_message) = serde_json::from_slice::<HttpServerAction>(ipc) else {
return Ok(());
};

View File

@ -35,7 +35,7 @@ impl WsProviderSubscription {
pub async fn kill(&self) -> () {
if let Some(provider) = &self.provider {
if let Some(subscription) = &self.subscription {
provider.unsubscribe(subscription).await;
let _ = provider.unsubscribe(subscription).await;
}
}
if let Some(handle) = &self.handle {

View File

@ -11,6 +11,7 @@ use tokio::{fs, time::timeout};
#[cfg(feature = "simulation-mode")]
use ring::{rand::SystemRandom, signature, signature::KeyPair};
mod eth;
mod http;
mod kernel;