Skip to content

Conversation

@mazinhaggag
Copy link

new: added automatic dedupe for yellowstone gRPC
update: adjusted metrics logging to include share of first arrival per datasource

image

update: adjusted metrics logging to include share of first arrival per datasource
}
}
Update::Transaction(tx) => {
if tx.block_time.is_none() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only works if the BlockDetails arrive before the transaction. If the transaction arrives first, it will remain without a block_time.

_ => {}
}

if let Some(slot) = extract_slot(&update) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use here tx index. #503

}

pub fn get_datasource_last_slots() -> HashMap<String, u64> {
DATASOURCE_LAST_SLOTS.read().unwrap().clone()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each call creates a full copy of the HashMap.

slot_time_index: LruCache<u64, i64>,
}

static DATASOURCE_LAST_SLOTS: Lazy<RwLock<HashMap<String, u64>>> =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RwLock may not be the best choice, but this appears to be dead code that isn't used anywhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants