diff --git a/core/blockchain.go b/core/blockchain.go index b4b550476..fea3c70cc 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1455,7 +1455,7 @@ func (bc *BlockChain) writeBlockWithState(block *types.Block, receipts []*types. if status == CanonStatTy { logs := bc.collectLogs(block, false) - bc.chainFeed.Send(ChainEvent{Block: block, Hash: block.Hash(), Logs: logs}) + bc.chainFeed.Send(ChainEvent{Header: block.Header(), Hash: block.Hash(), Logs: logs}) if len(logs) > 0 { bc.logsFeed.Send(logs) } diff --git a/core/events.go b/core/events.go index ae481817f..4262c01ed 100644 --- a/core/events.go +++ b/core/events.go @@ -36,9 +36,9 @@ type NewMinedBlockEvent struct{ Block *types.Block } type RemovedLogsEvent struct{ Logs []*types.Log } type ChainEvent struct { - Block *types.Block - Hash common.Hash - Logs []*types.Log + Header *types.Header + Hash common.Hash + Logs []*types.Log } type ChainSideEvent struct { diff --git a/ctxc/filters/filter_system.go b/ctxc/filters/filter_system.go index 0d1ad7ea5..780137d83 100644 --- a/ctxc/filters/filter_system.go +++ b/ctxc/filters/filter_system.go @@ -422,10 +422,10 @@ func (es *EventSystem) handleTxsEvent(filters filterIndex, ev core.NewTxsEvent) func (es *EventSystem) handleChainEvent(filters filterIndex, ev core.ChainEvent) { for _, f := range filters[BlocksSubscription] { - f.headers <- ev.Block.Header() + f.headers <- ev.Header } if es.lightMode && len(filters[LogsSubscription]) > 0 { - es.lightFilterNewHead(ev.Block.Header(), func(header *types.Header, remove bool) { + es.lightFilterNewHead(ev.Header, func(header *types.Header, remove bool) { for _, f := range filters[LogsSubscription] { if matchedLogs := es.lightFilterLogs(header, f.logsCrit.Addresses, f.logsCrit.Topics, remove); len(matchedLogs) > 0 { f.logs <- matchedLogs