mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-05 17:22:18 +00:00
4551bb47fc
* begin event source support * add in events server and proto definitions * fmt * add in stream support and proper building * add in the protos * tidy * add structure and comments * fmt * revert proto changes * only return events we explicitly request * capture missing events needed for eth2 apis * handle underflow * no hash tree roots * gazelle * static * race tests passing * simplify * handle all required events * begin on stream tests * correctness and abstracting method for forwarding to state feed * genesis root * include missing pieces * logging * rem and and handle return * added mock * add in mock * add tests for block events * added comprehensive tests * radek comments * add missing unit tests * updatemockgen file * viz * done * Update beacon-chain/rpc/eventsv1/events.go * Update beacon-chain/rpc/eventsv1/events.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
22 lines
768 B
Go
22 lines
768 B
Go
// Package eventsv1 defines a gRPC events service implementation,
|
|
// following the official API standards https://ethereum.github.io/eth2.0-APIs/#/.
|
|
// This package includes the events endpoint.
|
|
package eventsv1
|
|
|
|
import (
|
|
"context"
|
|
|
|
blockfeed "github.com/prysmaticlabs/prysm/beacon-chain/core/feed/block"
|
|
opfeed "github.com/prysmaticlabs/prysm/beacon-chain/core/feed/operation"
|
|
statefeed "github.com/prysmaticlabs/prysm/beacon-chain/core/feed/state"
|
|
)
|
|
|
|
// Server defines a server implementation of the gRPC events service,
|
|
// providing RPC endpoints to subscribe to events from the beacon node.
|
|
type Server struct {
|
|
Ctx context.Context
|
|
StateNotifier statefeed.Notifier
|
|
BlockNotifier blockfeed.Notifier
|
|
OperationNotifier opfeed.Notifier
|
|
}
|