mirror of
https://github.com/0xfnzero/solana-streamer.git
synced 2026-08-15 18:08:05 +00:00
feat(events): add recent_blockhash to EventMetadata
- EventMetadata: add recent_blockhash (Option<Vec<u8>>) - gRPC path: extract from message.recent_blockhash, thread through parse_instruction_events_from_grpc_transaction and parse_events_from_grpc_instruction - VersionedTransaction path: get from message.recent_blockhash(), pass into parse_events_from_instruction - BlockMeta event: pass None for recent_blockhash Made-with: Cursor
This commit is contained in:
@@ -312,6 +312,9 @@ pub struct EventMetadata {
|
||||
pub swap_data: Option<SwapData>,
|
||||
pub outer_index: i64,
|
||||
pub inner_index: Option<i64>,
|
||||
/// Transaction message recent blockhash (32 bytes), when available.
|
||||
#[serde(default)]
|
||||
pub recent_blockhash: Option<Vec<u8>>,
|
||||
}
|
||||
|
||||
impl EventMetadata {
|
||||
@@ -328,6 +331,7 @@ impl EventMetadata {
|
||||
inner_index: Option<i64>,
|
||||
recv_us: i64,
|
||||
tx_index: Option<u64>,
|
||||
recent_blockhash: Option<Vec<u8>>,
|
||||
) -> Self {
|
||||
Self {
|
||||
signature,
|
||||
@@ -343,6 +347,7 @@ impl EventMetadata {
|
||||
outer_index,
|
||||
inner_index,
|
||||
tx_index,
|
||||
recent_blockhash,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user