From 9ef2656ff30953155c67c296f11171a41f50f4ae Mon Sep 17 00:00:00 2001 From: dr-frmr Date: Tue, 30 Jul 2024 20:59:58 +0300 Subject: [PATCH] update to latest process_lib --- kinode/packages/app_store/app_store/src/state.rs | 5 ++--- kinode/packages/kns_indexer/kns_indexer/src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/kinode/packages/app_store/app_store/src/state.rs b/kinode/packages/app_store/app_store/src/state.rs index 99fd6ca0..7843e2c4 100644 --- a/kinode/packages/app_store/app_store/src/state.rs +++ b/kinode/packages/app_store/app_store/src/state.rs @@ -3,7 +3,7 @@ use crate::{KIMAP_ADDRESS, VFS_TIMEOUT}; use alloy_sol_types::SolEvent; use kinode_process_lib::kernel_types::Erc721Metadata; use kinode_process_lib::{ - eth, kernel_types as kt, kimap, net, println, vfs, Address, NodeId, PackageId, Request, + eth, kernel_types as kt, kimap, println, vfs, Address, NodeId, PackageId, Request, }; use serde::{Deserialize, Serialize}; use std::collections::{HashMap, HashSet}; @@ -373,8 +373,7 @@ impl State { // use kns_indexer to convert nodehash to a kimap name let package_full_path = - net::get_name(¬e.nodehash.to_string(), log.block_number, Some(10)) - .ok_or(AppStoreLogError::GetNameError)?; + kimap::resolve_full_name(&log, Some(10)).ok_or(AppStoreLogError::GetNameError)?; // the app store exclusively looks for ~metadata-uri postings: if one is // observed, we then *query* for ~metadata-hash to verify the content diff --git a/kinode/packages/kns_indexer/kns_indexer/src/lib.rs b/kinode/packages/kns_indexer/kns_indexer/src/lib.rs index 74c3d55d..4f593967 100644 --- a/kinode/packages/kns_indexer/kns_indexer/src/lib.rs +++ b/kinode/packages/kns_indexer/kns_indexer/src/lib.rs @@ -307,7 +307,7 @@ fn handle_log(our: &Address, state: &mut State, log: ð::Log) -> anyhow::Resul let decoded = kimap::contract::Note::decode_log_data(log.data(), true).unwrap(); let note = String::from_utf8(decoded.note.to_vec())?; - let node_hash = decoded.nodehash.to_string(); + let node_hash = decoded.parenthash.to_string(); let Some(node_name) = get_parent_name(&state.names, &node_hash) else { return Err(anyhow::anyhow!("parent node for note not found"));