Commit e8f6130
authored
fix: properly init geyser plugin for rpc and use valid dummy Library (#402)
<!-- greptile_comment -->
## Greptile Summary
Implements a workaround for geyser plugin initialization by creating a
dummy Library handle, as the plugin is not loaded from a .so file. While
functional, this approach requires careful consideration.
- Unsafe code and memory leaks introduced in
`magicblock-api/src/init_geyser_service.rs` through `Box::leak` and
`transmute` for dummy Library creation
- Added proper `LoadedGeyserPlugin` initialization and registration with
plugin manager
- Current implementation may need future refinement to address memory
management concerns
<!-- /greptile_comment -->1 parent 68eef55 commit e8f6130
1 file changed
+19
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | | - | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
68 | | - | |
69 | | - | |
| 69 | + | |
| 70 | + | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| |||
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
85 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
86 | 100 | | |
| 101 | + | |
87 | 102 | | |
88 | 103 | | |
89 | 104 | | |
0 commit comments