prysm-pulse/beacon-chain/core/feed/block/events.go
Radosław Kapka ed07f4bd77
Add execution_optimistic field to API responses (#10389)
* protos

* grpc

* middleware

* event protos

* event backend

* event middleware

* fix tests

* use `IsOptimisticForRoot` with proper block instead of header

* better algorithm

* return proper error

* review

* optimistic return on bellatrix proposal

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-03-25 16:31:50 +00:00

19 lines
478 B
Go

// Package block contains types for block-specific events fired
// during the runtime of a beacon node.
package block
import (
"github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/block"
)
const (
// ReceivedBlock is sent after a block has been received by the beacon node via p2p or RPC.
ReceivedBlock = iota + 1
)
// ReceivedBlockData is the data sent with ReceivedBlock events.
type ReceivedBlockData struct {
SignedBlock block.SignedBeaconBlock
IsOptimistic bool
}