Skip to content

Commit

Permalink
return
Browse files Browse the repository at this point in the history
  • Loading branch information
anjor committed Dec 3, 2024
1 parent cde0c65 commit a74fc18
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions grpc-server.go
Original file line number Diff line number Diff line change
Expand Up @@ -720,14 +720,12 @@ func (multi *MultiEpoch) StreamTransactions(params *old_faithful_grpc.StreamTran
}

if err := multi.processSlotTransactions(ctx, ser, slot, params.filter, gsfareader); err != nil {
return err
}
return err
}
}
return nil
}



func constructTransactionResponse(tx *old_faithful_grpc.Transaction, block *old_faithful_grpc.BlockResponse) *old_faithful_grpc.TransactionResponse {
return &old_faithful_grpc.TransactionResponse{
Transaction: tx,
Expand All @@ -751,17 +749,16 @@ func (multi *MultiEpoch) streamAllTxns(ctx context.Context, ser old_faithful_grp
return nil
}


func (multi *MultiEpoch) processSlotTransactions(ctx context.Context, ser old_faithful_grpc.OldFaithful_StreamTransactionsServer, slot uint64, filter *old_faithful_grpc.StreamTransactionsFilter, gsfaReader *gsfa.GsfaReaderMultiepoch) error {
if filter == nil {
return multi.streamAllTxns(ctx, ser, slot)
}

if len(filter.AccountInclude) == 0 {
if len(filter.AccountInclude) == 0 {
// Get all transactions
// Apply filters
// Send
} else {
} else {
for _, account := range params.Filter.AccountInclude {
pKey := solana.MustPublicKeyFromBase58(account)
epochToTxns, err := gsfaReader.Get(
Expand Down Expand Up @@ -823,7 +820,5 @@ func (multi *MultiEpoch) processSlotTransactions(ctx context.Context, ser old_fa
}
}
}
}

return nil
return nil
}

0 comments on commit a74fc18

Please sign in to comment.