@@ -55,6 +55,8 @@ pub struct PluginData {
55
55
/// Highest slot that an account write has been processed for thus far.
56
56
highest_write_slot : Arc < AtomicU64 > ,
57
57
58
+ /// Only set to true if account_data_notifications_enabled is true
59
+ /// Otherwise, will always be false
58
60
is_startup_completed : AtomicBool ,
59
61
ignore_startup_updates : bool ,
60
62
account_data_notifications_enabled : bool ,
@@ -219,6 +221,8 @@ impl GeyserPlugin for GeyserGrpcPlugin {
219
221
data. runtime . shutdown_background ( ) ;
220
222
}
221
223
224
+ /// Note: this is called only if account_data_notifications_enabled is set to true.
225
+ /// Do not use it for anything except for account updates
222
226
fn notify_end_of_startup ( & self ) -> PluginResult < ( ) > {
223
227
self . data
224
228
. as_ref ( )
@@ -345,10 +349,6 @@ impl GeyserPlugin for GeyserGrpcPlugin {
345
349
) -> PluginResult < ( ) > {
346
350
let data = self . data . as_ref ( ) . expect ( "plugin must be initialized" ) ;
347
351
348
- if data. ignore_startup_updates && !data. is_startup_completed . load ( Ordering :: Relaxed ) {
349
- return Ok ( ( ) ) ;
350
- }
351
-
352
352
debug ! ( "Updating slot {:?} at with status {:?}" , slot, status) ;
353
353
354
354
let status = match status {
@@ -386,10 +386,6 @@ impl GeyserPlugin for GeyserGrpcPlugin {
386
386
) -> PluginResult < ( ) > {
387
387
let data = self . data . as_ref ( ) . expect ( "plugin must be initialized" ) ;
388
388
389
- if data. ignore_startup_updates && !data. is_startup_completed . load ( Ordering :: Relaxed ) {
390
- return Ok ( ( ) ) ;
391
- }
392
-
393
389
let transaction_update = match transaction {
394
390
ReplicaTransactionInfoVersions :: V0_0_1 ( tx) => TimestampedTransactionUpdate {
395
391
ts : Some ( prost_types:: Timestamp :: from ( SystemTime :: now ( ) ) ) ,
@@ -437,10 +433,6 @@ impl GeyserPlugin for GeyserGrpcPlugin {
437
433
fn notify_block_metadata ( & self , block_info : ReplicaBlockInfoVersions ) -> PluginResult < ( ) > {
438
434
let data = self . data . as_ref ( ) . expect ( "plugin must be initialized" ) ;
439
435
440
- if data. ignore_startup_updates && !data. is_startup_completed . load ( Ordering :: Relaxed ) {
441
- return Ok ( ( ) ) ;
442
- }
443
-
444
436
let block = match block_info {
445
437
ReplicaBlockInfoVersions :: V0_0_1 ( block) => TimestampedBlockUpdate {
446
438
ts : Some ( prost_types:: Timestamp :: from ( SystemTime :: now ( ) ) ) ,
0 commit comments