File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed
Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -171,22 +171,15 @@ func (e *Engine) process(originID flow.Identifier, event interface{}) error {
171171 case * messages.SubmitCollectionGuarantee :
172172 e .engMetrics .MessageReceived (metrics .EngineCollectionProvider , metrics .MessageSubmitGuarantee )
173173 defer e .engMetrics .MessageHandled (metrics .EngineCollectionProvider , metrics .MessageSubmitGuarantee )
174- return e .onSubmitCollectionGuarantee (originID , ev )
174+ if originID != e .me .NodeID () {
175+ return fmt .Errorf ("invalid remote request to submit collection guarantee (from=%x)" , originID )
176+ }
177+ return e .SubmitCollectionGuarantee (& ev .Guarantee )
175178 default :
176179 return fmt .Errorf ("invalid event type (%T)" , event )
177180 }
178181}
179182
180- // onSubmitCollectionGuarantee handles submitting the given collection guarantee
181- // to consensus nodes.
182- func (e * Engine ) onSubmitCollectionGuarantee (originID flow.Identifier , req * messages.SubmitCollectionGuarantee ) error {
183- if originID != e .me .NodeID () {
184- return fmt .Errorf ("invalid remote request to submit collection guarantee (from=%x)" , originID )
185- }
186-
187- return e .SubmitCollectionGuarantee (& req .Guarantee )
188- }
189-
190183// SubmitCollectionGuarantee submits the collection guarantee to all consensus nodes.
191184func (e * Engine ) SubmitCollectionGuarantee (guarantee * flow.CollectionGuarantee ) error {
192185 consensusNodes , err := e .state .Final ().Identities (filter.HasRole [flow.Identity ](flow .RoleConsensus ))
You can’t perform that action at this time.
0 commit comments