update to latest process_lib

This commit is contained in:
dr-frmr 2024-07-30 20:59:58 +03:00
parent 77ce0a8c79
commit 9ef2656ff3
No known key found for this signature in database
2 changed files with 3 additions and 4 deletions

View File

@ -3,7 +3,7 @@ use crate::{KIMAP_ADDRESS, VFS_TIMEOUT};
use alloy_sol_types::SolEvent; use alloy_sol_types::SolEvent;
use kinode_process_lib::kernel_types::Erc721Metadata; use kinode_process_lib::kernel_types::Erc721Metadata;
use kinode_process_lib::{ 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 serde::{Deserialize, Serialize};
use std::collections::{HashMap, HashSet}; use std::collections::{HashMap, HashSet};
@ -373,8 +373,7 @@ impl State {
// use kns_indexer to convert nodehash to a kimap name // use kns_indexer to convert nodehash to a kimap name
let package_full_path = let package_full_path =
net::get_name(&note.nodehash.to_string(), log.block_number, Some(10)) kimap::resolve_full_name(&log, Some(10)).ok_or(AppStoreLogError::GetNameError)?;
.ok_or(AppStoreLogError::GetNameError)?;
// the app store exclusively looks for ~metadata-uri postings: if one is // the app store exclusively looks for ~metadata-uri postings: if one is
// observed, we then *query* for ~metadata-hash to verify the content // observed, we then *query* for ~metadata-hash to verify the content

View File

@ -307,7 +307,7 @@ fn handle_log(our: &Address, state: &mut State, log: &eth::Log) -> anyhow::Resul
let decoded = kimap::contract::Note::decode_log_data(log.data(), true).unwrap(); let decoded = kimap::contract::Note::decode_log_data(log.data(), true).unwrap();
let note = String::from_utf8(decoded.note.to_vec())?; 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 { let Some(node_name) = get_parent_name(&state.names, &node_hash) else {
return Err(anyhow::anyhow!("parent node for note not found")); return Err(anyhow::anyhow!("parent node for note not found"));