mirror of
https://github.com/uqbar-dao/nectar.git
synced 2024-12-23 00:21:38 +03:00
Merge pull request #536 from kinode-dao/develop
add printout for newHeads (bad!)
This commit is contained in:
commit
50a49c1160
@ -1,6 +1,7 @@
|
|||||||
use crate::eth::*;
|
use crate::eth::*;
|
||||||
use alloy::pubsub::RawSubscription;
|
use alloy::pubsub::RawSubscription;
|
||||||
use alloy::rpc::types::eth::pubsub::SubscriptionResult;
|
use alloy::rpc::types::eth::pubsub::SubscriptionResult;
|
||||||
|
use alloy::rpc::types::pubsub;
|
||||||
|
|
||||||
/// cleans itself up when the subscription is closed or fails.
|
/// cleans itself up when the subscription is closed or fails.
|
||||||
pub async fn create_new_subscription(
|
pub async fn create_new_subscription(
|
||||||
@ -189,6 +190,11 @@ async fn build_subscription(
|
|||||||
else {
|
else {
|
||||||
return Err(EthError::PermissionDenied); // will never hit
|
return Err(EthError::PermissionDenied); // will never hit
|
||||||
};
|
};
|
||||||
|
if *kind == pubsub::SubscriptionKind::NewHeads {
|
||||||
|
Printout::new(0, format!("newHeads subscription requested by {target}!"))
|
||||||
|
.send(print_tx)
|
||||||
|
.await;
|
||||||
|
}
|
||||||
let mut urls = {
|
let mut urls = {
|
||||||
// in code block to drop providers lock asap to avoid deadlock
|
// in code block to drop providers lock asap to avoid deadlock
|
||||||
let Some(aps) = providers.get(&chain_id) else {
|
let Some(aps) = providers.get(&chain_id) else {
|
||||||
|
Loading…
Reference in New Issue
Block a user