aboutsummaryrefslogtreecommitdiffstats
path: root/core/blockchain.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-09-05 03:35:00 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-09-05 18:34:41 +0800
commitda7d57e07c04dcbb7cc20b35f6606ef3f4c400e3 (patch)
tree01b0266516f76b69ab7d93b0c78e396b3e712600 /core/blockchain.go
parente7408b5552002df7c3ba6a2351f14c533dfc5a36 (diff)
downloaddexon-da7d57e07c04dcbb7cc20b35f6606ef3f4c400e3.tar
dexon-da7d57e07c04dcbb7cc20b35f6606ef3f4c400e3.tar.gz
dexon-da7d57e07c04dcbb7cc20b35f6606ef3f4c400e3.tar.bz2
dexon-da7d57e07c04dcbb7cc20b35f6606ef3f4c400e3.tar.lz
dexon-da7d57e07c04dcbb7cc20b35f6606ef3f4c400e3.tar.xz
dexon-da7d57e07c04dcbb7cc20b35f6606ef3f4c400e3.tar.zst
dexon-da7d57e07c04dcbb7cc20b35f6606ef3f4c400e3.zip
core: make txpool operate on immutable state
Diffstat (limited to 'core/blockchain.go')
-rw-r--r--core/blockchain.go12
1 files changed, 0 insertions, 12 deletions
diff --git a/core/blockchain.go b/core/blockchain.go
index f3ca4e08c..0bb12fc19 100644
--- a/core/blockchain.go
+++ b/core/blockchain.go
@@ -81,7 +81,6 @@ type BlockChain struct {
hc *HeaderChain
chainDb ethdb.Database
- rmTxFeed event.Feed
rmLogsFeed event.Feed
chainFeed event.Feed
chainSideFeed event.Feed
@@ -1194,15 +1193,9 @@ func (bc *BlockChain) reorg(oldBlock, newBlock *types.Block) error {
for _, tx := range diff {
DeleteTxLookupEntry(bc.chainDb, tx.Hash())
}
- // Must be posted in a goroutine because of the transaction pool trying
- // to acquire the chain manager lock
- if len(diff) > 0 {
- go bc.rmTxFeed.Send(RemovedTransactionEvent{diff})
- }
if len(deletedLogs) > 0 {
go bc.rmLogsFeed.Send(RemovedLogsEvent{deletedLogs})
}
-
if len(oldChain) > 0 {
go func() {
for _, block := range oldChain {
@@ -1401,11 +1394,6 @@ func (bc *BlockChain) Config() *params.ChainConfig { return bc.config }
// Engine retrieves the blockchain's consensus engine.
func (bc *BlockChain) Engine() consensus.Engine { return bc.engine }
-// SubscribeRemovedTxEvent registers a subscription of RemovedTransactionEvent.
-func (bc *BlockChain) SubscribeRemovedTxEvent(ch chan<- RemovedTransactionEvent) event.Subscription {
- return bc.scope.Track(bc.rmTxFeed.Subscribe(ch))
-}
-
// SubscribeRemovedLogsEvent registers a subscription of RemovedLogsEvent.
func (bc *BlockChain) SubscribeRemovedLogsEvent(ch chan<- RemovedLogsEvent) event.Subscription {
return bc.scope.Track(bc.rmLogsFeed.Subscribe(ch))