github.com/linapex/ethereum-go-chinese@v0.0.0-20190316121929-f8b7a73c3fa1/core/events.go (about)

     1  
     2  //<developer>
     3  //    <name>linapex 曹一峰</name>
     4  //    <email>linapex@163.com</email>
     5  //    <wx>superexc</wx>
     6  //    <qqgroup>128148617</qqgroup>
     7  //    <url>https://jsq.ink</url>
     8  //    <role>pku engineer</role>
     9  //    <date>2019-03-16 19:16:35</date>
    10  //</624450078714630144>
    11  
    12  
    13  package core
    14  
    15  import (
    16  	"github.com/ethereum/go-ethereum/common"
    17  	"github.com/ethereum/go-ethereum/core/types"
    18  )
    19  
    20  //当一批交易进入交易池时,将过账newtxsevent。
    21  type NewTxsEvent struct{ Txs []*types.Transaction }
    22  
    23  //PendingLogSevent在挖掘前发布,并通知挂起的日志。
    24  type PendingLogsEvent struct {
    25  	Logs []*types.Log
    26  }
    27  
    28  //当块被导入时,将发布NewMinedBlockEvent。
    29  type NewMinedBlockEvent struct{ Block *types.Block }
    30  
    31  //当发生REORG时,会发布REMOVEDLogsevent
    32  type RemovedLogsEvent struct{ Logs []*types.Log }
    33  
    34  type ChainEvent struct {
    35  	Block *types.Block
    36  	Hash  common.Hash
    37  	Logs  []*types.Log
    38  }
    39  
    40  type ChainSideEvent struct {
    41  	Block *types.Block
    42  }
    43  
    44  type ChainHeadEvent struct{ Block *types.Block }
    45