github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/engine/consensus/sealing.go (about) 1 package consensus 2 3 import "github.com/onflow/flow-go/model/flow" 4 5 // SealingCore processes incoming execution results and result approvals. 6 // Accepts `flow.IncorporatedResult` to start processing approvals for particular result. 7 // Whenever enough approvals are collected produces a candidate seal and adds it to the mempool. 8 // Implementations of SealingCore are _concurrency safe_. 9 type SealingCore interface { 10 // ProcessApproval processes approval in blocking way. Concurrency safe. 11 // Returns: 12 // * exception in case of unexpected error 13 // * nil - successfully processed result approval 14 ProcessApproval(approval *flow.ResultApproval) error 15 // ProcessIncorporatedResult processes incorporated result in blocking way. Concurrency safe. 16 // Returns: 17 // * exception in case of unexpected error 18 // * nil - successfully processed incorporated result 19 ProcessIncorporatedResult(result *flow.IncorporatedResult) error 20 // ProcessFinalizedBlock processes finalization events in blocking way. Concurrency safe. 21 // Returns: 22 // * exception in case of unexpected error 23 // * nil - successfully processed finalized block 24 ProcessFinalizedBlock(finalizedBlockID flow.Identifier) error 25 }