@@ -128,8 +128,6 @@ var (
128128// NodeHooks defines a worker's duties at common events.
129129// These are called from the runtime's common node's worker.
130130type NodeHooks interface {
131- // Guarded by CrossNode.
132- HandleNewBlockEarlyLocked (* runtime.BlockInfo )
133131 // Guarded by CrossNode.
134132 HandleNewBlockLocked (* runtime.BlockInfo )
135133 // Guarded by CrossNode.
@@ -531,17 +529,6 @@ func (n *Node) handleNewBlock(blk *block.Block, height int64) {
531529 n .KeyManagerClient .SetKeyManagerID (n .CurrentDescriptor .KeyManager )
532530 }
533531
534- bi := & runtime.BlockInfo {
535- RuntimeBlock : n .CurrentBlock ,
536- ConsensusBlock : n .CurrentConsensusBlock ,
537- Epoch : n .CurrentEpoch ,
538- ActiveDescriptor : n .CurrentDescriptor ,
539- }
540-
541- for _ , hooks := range n .hooks {
542- hooks .HandleNewBlockEarlyLocked (bi )
543- }
544-
545532 // Perform actions based on block type.
546533 switch header .HeaderType {
547534 case block .Normal :
@@ -566,11 +553,18 @@ func (n *Node) handleNewBlock(blk *block.Block, height int64) {
566553 n .handleSuspendLocked (height )
567554 default :
568555 n .logger .Error ("invalid block type" ,
569- "block" , bi . RuntimeBlock ,
556+ "block" , blk ,
570557 )
571558 return
572559 }
573560
561+ bi := & runtime.BlockInfo {
562+ RuntimeBlock : n .CurrentBlock ,
563+ ConsensusBlock : n .CurrentConsensusBlock ,
564+ Epoch : n .CurrentEpoch ,
565+ ActiveDescriptor : n .CurrentDescriptor ,
566+ }
567+
574568 n .TxPool .ProcessBlock (bi )
575569
576570 // Fetch incoming messages.
0 commit comments