mirror of
https://github.com/uqbar-dao/nectar.git
synced 2024-12-23 08:32:23 +03:00
remove some prints & fix a bug
This commit is contained in:
parent
881d4a6b93
commit
ac078d72de
40
Cargo.lock
generated
40
Cargo.lock
generated
@ -111,7 +111,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "alloy"
|
||||
version = "0.2.1"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=c73e70d#c73e70dab6069246bbf20162fbe17c5b11d0c668"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=bd900b4#bd900b4564410c376c811629afcf8e269a0a0896"
|
||||
dependencies = [
|
||||
"alloy-consensus 0.2.1",
|
||||
"alloy-contract",
|
||||
@ -173,7 +173,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "alloy-consensus"
|
||||
version = "0.2.1"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=c73e70d#c73e70dab6069246bbf20162fbe17c5b11d0c668"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=bd900b4#bd900b4564410c376c811629afcf8e269a0a0896"
|
||||
dependencies = [
|
||||
"alloy-eips 0.2.1",
|
||||
"alloy-primitives",
|
||||
@ -186,7 +186,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "alloy-contract"
|
||||
version = "0.2.1"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=c73e70d#c73e70dab6069246bbf20162fbe17c5b11d0c668"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=bd900b4#bd900b4564410c376c811629afcf8e269a0a0896"
|
||||
dependencies = [
|
||||
"alloy-dyn-abi",
|
||||
"alloy-json-abi",
|
||||
@ -263,7 +263,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "alloy-eips"
|
||||
version = "0.2.1"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=c73e70d#c73e70dab6069246bbf20162fbe17c5b11d0c668"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=bd900b4#bd900b4564410c376c811629afcf8e269a0a0896"
|
||||
dependencies = [
|
||||
"alloy-primitives",
|
||||
"alloy-rlp",
|
||||
@ -298,7 +298,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "alloy-genesis"
|
||||
version = "0.2.1"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=c73e70d#c73e70dab6069246bbf20162fbe17c5b11d0c668"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=bd900b4#bd900b4564410c376c811629afcf8e269a0a0896"
|
||||
dependencies = [
|
||||
"alloy-primitives",
|
||||
"alloy-serde 0.2.1",
|
||||
@ -345,7 +345,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "alloy-json-rpc"
|
||||
version = "0.2.1"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=c73e70d#c73e70dab6069246bbf20162fbe17c5b11d0c668"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=bd900b4#bd900b4564410c376c811629afcf8e269a0a0896"
|
||||
dependencies = [
|
||||
"alloy-primitives",
|
||||
"alloy-sol-types",
|
||||
@ -378,7 +378,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "alloy-network"
|
||||
version = "0.2.1"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=c73e70d#c73e70dab6069246bbf20162fbe17c5b11d0c668"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=bd900b4#bd900b4564410c376c811629afcf8e269a0a0896"
|
||||
dependencies = [
|
||||
"alloy-consensus 0.2.1",
|
||||
"alloy-eips 0.2.1",
|
||||
@ -398,7 +398,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "alloy-network-primitives"
|
||||
version = "0.2.1"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=c73e70d#c73e70dab6069246bbf20162fbe17c5b11d0c668"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=bd900b4#bd900b4564410c376c811629afcf8e269a0a0896"
|
||||
dependencies = [
|
||||
"alloy-primitives",
|
||||
"alloy-serde 0.2.1",
|
||||
@ -462,7 +462,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "alloy-provider"
|
||||
version = "0.2.1"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=c73e70d#c73e70dab6069246bbf20162fbe17c5b11d0c668"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=bd900b4#bd900b4564410c376c811629afcf8e269a0a0896"
|
||||
dependencies = [
|
||||
"alloy-chains",
|
||||
"alloy-consensus 0.2.1",
|
||||
@ -497,7 +497,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "alloy-pubsub"
|
||||
version = "0.2.1"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=c73e70d#c73e70dab6069246bbf20162fbe17c5b11d0c668"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=bd900b4#bd900b4564410c376c811629afcf8e269a0a0896"
|
||||
dependencies = [
|
||||
"alloy-json-rpc 0.2.1",
|
||||
"alloy-primitives",
|
||||
@ -558,7 +558,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "alloy-rpc-client"
|
||||
version = "0.2.1"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=c73e70d#c73e70dab6069246bbf20162fbe17c5b11d0c668"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=bd900b4#bd900b4564410c376c811629afcf8e269a0a0896"
|
||||
dependencies = [
|
||||
"alloy-json-rpc 0.2.1",
|
||||
"alloy-primitives",
|
||||
@ -609,7 +609,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "alloy-rpc-types"
|
||||
version = "0.2.1"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=c73e70d#c73e70dab6069246bbf20162fbe17c5b11d0c668"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=bd900b4#bd900b4564410c376c811629afcf8e269a0a0896"
|
||||
dependencies = [
|
||||
"alloy-rpc-types-eth 0.2.1",
|
||||
"alloy-serde 0.2.1",
|
||||
@ -637,7 +637,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "alloy-rpc-types-eth"
|
||||
version = "0.2.1"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=c73e70d#c73e70dab6069246bbf20162fbe17c5b11d0c668"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=bd900b4#bd900b4564410c376c811629afcf8e269a0a0896"
|
||||
dependencies = [
|
||||
"alloy-consensus 0.2.1",
|
||||
"alloy-eips 0.2.1",
|
||||
@ -676,7 +676,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "alloy-serde"
|
||||
version = "0.2.1"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=c73e70d#c73e70dab6069246bbf20162fbe17c5b11d0c668"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=bd900b4#bd900b4564410c376c811629afcf8e269a0a0896"
|
||||
dependencies = [
|
||||
"alloy-primitives",
|
||||
"serde",
|
||||
@ -700,7 +700,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "alloy-signer"
|
||||
version = "0.2.1"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=c73e70d#c73e70dab6069246bbf20162fbe17c5b11d0c668"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=bd900b4#bd900b4564410c376c811629afcf8e269a0a0896"
|
||||
dependencies = [
|
||||
"alloy-primitives",
|
||||
"async-trait",
|
||||
@ -713,7 +713,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "alloy-signer-local"
|
||||
version = "0.2.1"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=c73e70d#c73e70dab6069246bbf20162fbe17c5b11d0c668"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=bd900b4#bd900b4564410c376c811629afcf8e269a0a0896"
|
||||
dependencies = [
|
||||
"alloy-consensus 0.2.1",
|
||||
"alloy-network 0.2.1",
|
||||
@ -838,7 +838,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "alloy-transport"
|
||||
version = "0.2.1"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=c73e70d#c73e70dab6069246bbf20162fbe17c5b11d0c668"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=bd900b4#bd900b4564410c376c811629afcf8e269a0a0896"
|
||||
dependencies = [
|
||||
"alloy-json-rpc 0.2.1",
|
||||
"base64 0.22.1",
|
||||
@ -871,7 +871,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "alloy-transport-http"
|
||||
version = "0.2.1"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=c73e70d#c73e70dab6069246bbf20162fbe17c5b11d0c668"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=bd900b4#bd900b4564410c376c811629afcf8e269a0a0896"
|
||||
dependencies = [
|
||||
"alloy-json-rpc 0.2.1",
|
||||
"alloy-transport 0.2.1",
|
||||
@ -885,7 +885,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "alloy-transport-ws"
|
||||
version = "0.2.1"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=c73e70d#c73e70dab6069246bbf20162fbe17c5b11d0c668"
|
||||
source = "git+https://github.com/bitful-pannul/alloy.git?rev=bd900b4#bd900b4564410c376c811629afcf8e269a0a0896"
|
||||
dependencies = [
|
||||
"alloy-pubsub",
|
||||
"alloy-transport 0.2.1",
|
||||
@ -3755,7 +3755,7 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67"
|
||||
|
||||
[[package]]
|
||||
name = "lib"
|
||||
version = "0.9.0"
|
||||
version = "0.9.1"
|
||||
dependencies = [
|
||||
"alloy 0.2.1",
|
||||
"kit 0.6.8",
|
||||
|
@ -26,7 +26,7 @@ simulation-mode = []
|
||||
|
||||
[dependencies]
|
||||
aes-gcm = "0.10.3"
|
||||
alloy = { git = "https://github.com/bitful-pannul/alloy.git", rev = "c73e70d", features = [
|
||||
alloy = { git = "https://github.com/bitful-pannul/alloy.git", rev = "bd900b4", features = [
|
||||
"consensus",
|
||||
"contract",
|
||||
"json-rpc",
|
||||
|
@ -138,7 +138,6 @@ fn handle_message(our: &Address, state: &mut State, message: &Message) -> anyhow
|
||||
}
|
||||
} else {
|
||||
// attempt to resubscribe
|
||||
println!("attempting resub");
|
||||
state
|
||||
.kimap
|
||||
.provider
|
||||
|
2
kinode/packages/app_store/ui/package-lock.json
generated
2
kinode/packages/app_store/ui/package-lock.json
generated
@ -3749,6 +3749,8 @@
|
||||
},
|
||||
"node_modules/@parcel/watcher-wasm/node_modules/napi-wasm": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/napi-wasm/-/napi-wasm-1.1.0.tgz",
|
||||
"integrity": "sha512-lHwIAJbmLSjF9VDRm9GoVOy9AGp3aIvkjv+Kvz9h16QR3uSVYH78PNQUnT2U4X53mhlnV2M7wrhibQ3GHicDmg==",
|
||||
"inBundle": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
|
@ -131,9 +131,6 @@ fn main(our: Address, mut state: State) -> anyhow::Result<()> {
|
||||
eth_provider.subscribe_loop(1, mints_filter.clone());
|
||||
eth_provider.subscribe_loop(2, notes_filter.clone());
|
||||
|
||||
// if block in state is < current_block, get logs from that part.
|
||||
println!("syncing old logs...");
|
||||
|
||||
// if subscription results come back in the wrong order, we store them here
|
||||
// until the right block is reached.
|
||||
|
||||
@ -142,6 +139,8 @@ fn main(our: Address, mut state: State) -> anyhow::Result<()> {
|
||||
// let mut pending_requests: BTreeMap<u64, Vec<IndexerRequests>> = BTreeMap::new();
|
||||
let mut pending_notes: BTreeMap<u64, Vec<(kimap::contract::Note, u8)>> = BTreeMap::new();
|
||||
|
||||
// if block in state is < current_block, get logs from that part.
|
||||
println!("syncing old logs...");
|
||||
fetch_and_process_logs(
|
||||
ð_provider,
|
||||
&mut state,
|
||||
@ -449,12 +448,6 @@ fn handle_log(
|
||||
.entry(block_number)
|
||||
.or_default()
|
||||
.push((decoded, 0));
|
||||
|
||||
if !state.listening_newblocks && !pending_notes.is_empty() {
|
||||
print_to_terminal(0, "subscribing to newHeads...");
|
||||
listen_to_new_blocks_loop(); // sub_id: 3
|
||||
state.listening_newblocks = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
_log => {
|
||||
|
@ -259,7 +259,6 @@ async fn build_subscription(
|
||||
}
|
||||
let alloy_sub_id = rx.local_id();
|
||||
let alloy_sub_id: alloy::primitives::U256 = alloy_sub_id.clone().into();
|
||||
println!("{target} making sub {:?}", alloy_sub_id);
|
||||
return Ok(Ok((rx, chain_id)));
|
||||
}
|
||||
Err(rpc_error) => {
|
||||
@ -395,7 +394,6 @@ async fn maintain_local_subscription(
|
||||
},
|
||||
value = rx.recv() => {
|
||||
let Ok(value) = value else {
|
||||
println!("sub failed: {:?}\r", value.unwrap_err());
|
||||
break;
|
||||
};
|
||||
let result: SubscriptionResult = match serde_json::from_str(value.get()) {
|
||||
@ -444,10 +442,6 @@ fn unsubscribe(rx: RawSubscription, chain_id: &u64, providers: &Providers) {
|
||||
continue;
|
||||
};
|
||||
let x = pubsub.unsubscribe(alloy_sub_id);
|
||||
println!(
|
||||
"we just tried unsubscribing {:?} unsubscribed: {:?}\r",
|
||||
alloy_sub_id, x
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ kit = { git = "https://github.com/kinode-dao/kit", tag = "v0.6.8" }
|
||||
tokio = "1.28"
|
||||
|
||||
[dependencies]
|
||||
alloy = { git = "https://github.com/bitful-pannul/alloy.git", rev = "c73e70d", features = [
|
||||
alloy = { git = "https://github.com/bitful-pannul/alloy.git", rev = "bd900b4", features = [
|
||||
"json-rpc",
|
||||
"rpc-types",
|
||||
"rpc-types-eth",
|
||||
|
Loading…
Reference in New Issue
Block a user