geyser: build block info struct once (#2161)
This commit is contained in:
parent
736bf934be
commit
fa5dab5a41
|
@ -37,10 +37,8 @@ impl BlockMetadataNotifier for BlockMetadataNotifierImpl {
|
||||||
if plugin_manager.plugins.is_empty() {
|
if plugin_manager.plugins.is_empty() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let rewards = Self::build_rewards(rewards);
|
|
||||||
|
|
||||||
for plugin in plugin_manager.plugins.iter() {
|
let rewards = Self::build_rewards(rewards);
|
||||||
let mut measure = Measure::start("geyser-plugin-update-slot");
|
|
||||||
let block_info = Self::build_replica_block_info(
|
let block_info = Self::build_replica_block_info(
|
||||||
parent_slot,
|
parent_slot,
|
||||||
parent_blockhash,
|
parent_blockhash,
|
||||||
|
@ -52,6 +50,9 @@ impl BlockMetadataNotifier for BlockMetadataNotifierImpl {
|
||||||
executed_transaction_count,
|
executed_transaction_count,
|
||||||
entry_count,
|
entry_count,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
for plugin in plugin_manager.plugins.iter() {
|
||||||
|
let mut measure = Measure::start("geyser-plugin-update-slot");
|
||||||
let block_info = ReplicaBlockInfoVersions::V0_0_4(&block_info);
|
let block_info = ReplicaBlockInfoVersions::V0_0_4(&block_info);
|
||||||
match plugin.notify_block_metadata(block_info) {
|
match plugin.notify_block_metadata(block_info) {
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
|
|
Loading…
Reference in New Issue