forked from cerc-io/plugeth
Call pluginNewHead even when invoked through beacon calls
This commit is contained in:
parent
011619ec82
commit
a74109ae46
@ -2125,6 +2125,14 @@ func (bc *BlockChain) SetChainHead(head *types.Block) error {
|
|||||||
if len(logs) > 0 {
|
if len(logs) > 0 {
|
||||||
bc.logsFeed.Send(logs)
|
bc.logsFeed.Send(logs)
|
||||||
}
|
}
|
||||||
|
// begin plugeth code injection
|
||||||
|
ptd := bc.GetTd(head.ParentHash(), head.NumberU64()-1)
|
||||||
|
externTd := ptd
|
||||||
|
if ptd != nil {
|
||||||
|
externTd = new(big.Int).Add(head.Difficulty(), ptd)
|
||||||
|
}
|
||||||
|
pluginNewHead(head, head.Hash(), logs, externTd)
|
||||||
|
// end plugeth code injection
|
||||||
bc.chainHeadFeed.Send(ChainHeadEvent{Block: head})
|
bc.chainHeadFeed.Send(ChainHeadEvent{Block: head})
|
||||||
|
|
||||||
context := []interface{}{
|
context := []interface{}{
|
||||||
|
Loading…
Reference in New Issue
Block a user