Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pending transaction event from pool #374

Merged
merged 5 commits into from
Jul 23, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions api/stream.go
Original file line number Diff line number Diff line change
@@ -99,23 +99,16 @@ func (s *StreamAPI) NewPendingTransactions(ctx context.Context, fullTx *bool) (*
s.transactionsPublisher,
func(notifier *rpc.Notifier, sub *rpc.Subscription) func(any) error {
return func(data any) error {
tx, ok := data.(models.Transaction)
tx, ok := data.(*gethTypes.Transaction)
if !ok {
return fmt.Errorf("invalid data sent to pending transaction subscription")
}

var res any
if fullTx != nil && *fullTx {
if r, err := NewTransaction(tx, s.config.EVMNetworkID); err != nil {
return err
} else {
res = r
}
} else {
res = tx.Hash()
return notifier.Notify(sub.ID, tx)
}

return notifier.Notify(sub.ID, res)
return notifier.Notify(sub.ID, tx.Hash())
}
},
)

Unchanged files with check annotations Beta

models.NewPublisher(),
models.NewPublisher(),
models.NewPublisher(),
zerolog.Nop(),

Check failure on line 72 in services/ingestion/engine_test.go

GitHub Actions / Test

too many arguments in call to NewEventIngestionEngine
)
done := make(chan struct{})
models.NewPublisher(),
models.NewPublisher(),
models.NewPublisher(),
zerolog.Nop(),

Check failure on line 152 in services/ingestion/engine_test.go

GitHub Actions / Test

too many arguments in call to NewEventIngestionEngine
)
waitErr := make(chan struct{})
models.NewPublisher(),
models.NewPublisher(),
models.NewPublisher(),
zerolog.Nop(),

Check failure on line 262 in services/ingestion/engine_test.go

GitHub Actions / Test

too many arguments in call to NewEventIngestionEngine
)
done := make(chan struct{})
models.NewPublisher(),
models.NewPublisher(),
models.NewPublisher(),
zerolog.Nop(),

Check failure on line 361 in services/ingestion/engine_test.go

GitHub Actions / Test

too many arguments in call to NewEventIngestionEngine
)
done := make(chan struct{})
models.NewPublisher(),
models.NewPublisher(),
models.NewPublisher(),
zerolog.Nop(),

Check failure on line 456 in services/ingestion/engine_test.go

GitHub Actions / Test

too many arguments in call to NewEventIngestionEngine
)
done := make(chan struct{})