mirror of
https://github.com/uqbar-dao/nectar.git
synced 2025-01-08 02:31:56 +03:00
cleaned up miscellaneous warnings and removed node_id parameter from get_name in qns indexer
This commit is contained in:
parent
928704b4dc
commit
5d50d37667
@ -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()) {
|
||||
|
@ -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(());
|
||||
};
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user