@@ -148,14 +148,16 @@ func (payload *Payload) ResolveEmpty() *engine.ExecutionPayloadEnvelope {
148148 return engine .BlockToExecutableData (payload .empty , big .NewInt (0 ), nil )
149149}
150150
151- func (payload * Payload ) resolveBlock () (* types.Block , * big.Int , []* types.BlobTxSidecar ) {
151+ // ResolveFull is basically identical to Resolve, but it expects full block only.
152+ // Don't call Resolve until ResolveFull returns, otherwise it might block forever.
153+ func (payload * Payload ) ResolveFull () * engine.ExecutionPayloadEnvelope {
152154 payload .lock .Lock ()
153155 defer payload .lock .Unlock ()
154156
155157 if payload .full == nil {
156158 select {
157159 case <- payload .stop :
158- return nil , nil , nil
160+ return nil
159161 default :
160162 }
161163 // Wait the full payload construction. Note it might block
@@ -169,17 +171,7 @@ func (payload *Payload) resolveBlock() (*types.Block, *big.Int, []*types.BlobTxS
169171 default :
170172 close (payload .stop )
171173 }
172- return payload .full , payload .fullFees , payload .sidecars
173- }
174-
175- // ResolveFull is basically identical to Resolve, but it expects full block only.
176- // Don't call Resolve until ResolveFull returns, otherwise it might block forever.
177- func (payload * Payload ) ResolveFull () * engine.ExecutionPayloadEnvelope {
178- full , fees , sidecars := payload .resolveBlock ()
179- if full == nil {
180- return nil
181- }
182- return engine .BlockToExecutableData (full , fees , sidecars )
174+ return engine .BlockToExecutableData (payload .full , payload .fullFees , payload .sidecars )
183175}
184176
185177// buildPayload builds the payload according to the provided parameters.
0 commit comments