mirror of
https://github.com/0xfnzero/solana-streamer.git
synced 2026-08-17 19:08:05 +00:00
feat: 添加交易索引功能支持
- 为 TransactionPretty 添加 transaction_index 字段 - 从 Yellowstone gRPC 的 SubscribeUpdateTransaction.transaction.index 提取交易索引 - 为 EventMetadata 添加 transaction_index 字段用于存储交易在 slot 中的索引 - 为 UnifiedEvent trait 添加 transaction_index() 和 set_transaction_index() 方法 - 更新事件处理器以传递交易索引到事件元数据 - 更新主程序日志以显示交易索引信息 交易事件现在包含它们在 slot 中的索引位置,账户事件由于 gRPC 协议限制保持为 None
This commit is contained in:
@@ -67,6 +67,12 @@ pub trait UnifiedEvent: Debug + Send + Sync {
|
||||
|
||||
/// Get index
|
||||
fn index(&self) -> String;
|
||||
|
||||
/// Get transaction index in slot
|
||||
fn transaction_index(&self) -> Option<u64>;
|
||||
|
||||
/// Set transaction index in slot
|
||||
fn set_transaction_index(&mut self, transaction_index: Option<u64>);
|
||||
}
|
||||
|
||||
/// 事件解析器trait - 定义了事件解析的核心方法
|
||||
|
||||
Reference in New Issue
Block a user