diff options
author | Felix Lange <fjl@twurst.com> | 2017-04-22 00:54:27 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2017-04-22 00:56:00 +0800 |
commit | 7b2fc0643f68258cbb10afac1a487e09342dd7ab (patch) | |
tree | c5104df0854a9c9a7792846398d6e680ff12d8a9 /core | |
parent | d2fda73ad7f4771dadb265d1cbfaecaaabb2cb42 (diff) | |
download | dexon-7b2fc0643f68258cbb10afac1a487e09342dd7ab.tar dexon-7b2fc0643f68258cbb10afac1a487e09342dd7ab.tar.gz dexon-7b2fc0643f68258cbb10afac1a487e09342dd7ab.tar.bz2 dexon-7b2fc0643f68258cbb10afac1a487e09342dd7ab.tar.lz dexon-7b2fc0643f68258cbb10afac1a487e09342dd7ab.tar.xz dexon-7b2fc0643f68258cbb10afac1a487e09342dd7ab.tar.zst dexon-7b2fc0643f68258cbb10afac1a487e09342dd7ab.zip |
core, light: delete SplitStatTy, ChainSplitEvent (unused)
Diffstat (limited to 'core')
-rw-r--r-- | core/blockchain.go | 9 | ||||
-rw-r--r-- | core/events.go | 6 |
2 files changed, 3 insertions, 12 deletions
diff --git a/core/blockchain.go b/core/blockchain.go index d6f2653ae..cab923bca 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -628,7 +628,6 @@ type WriteStatus byte const ( NonStatTy WriteStatus = iota CanonStatTy - SplitStatTy SideStatTy ) @@ -1029,9 +1028,6 @@ func (self *BlockChain) InsertChain(chain types.Blocks) (int, error) { blockInsertTimer.UpdateSince(bstart) events = append(events, ChainSideEvent{block}) - - case SplitStatTy: - events = append(events, ChainSplitEvent{block, logs}) } stats.processed++ stats.usedGas += usedGas.Uint64() @@ -1226,8 +1222,9 @@ func (self *BlockChain) postChainEvents(events []interface{}, logs []*types.Log) self.eventMux.Post(logs) for _, event := range events { if event, ok := event.(ChainEvent); ok { - // We need some control over the mining operation. Acquiring locks and waiting for the miner to create new block takes too long - // and in most cases isn't even necessary. + // We need some control over the mining operation. Acquiring locks and waiting + // for the miner to create new block takes too long and in most cases isn't + // even necessary. if self.LastBlockHash() == event.Hash { self.eventMux.Post(ChainHeadEvent{event.Block}) } diff --git a/core/events.go b/core/events.go index 31ad8364b..106b52c80 100644 --- a/core/events.go +++ b/core/events.go @@ -46,12 +46,6 @@ type RemovedTransactionEvent struct{ Txs types.Transactions } // RemovedLogEvent is posted when a reorg happens type RemovedLogsEvent struct{ Logs []*types.Log } -// ChainSplit is posted when a new head is detected -type ChainSplitEvent struct { - Block *types.Block - Logs []*types.Log -} - type ChainEvent struct { Block *types.Block Hash common.Hash |