MCPcopy Create free account
hub / github.com/CPChain/chain / Stop

Method Stop

core/tx_pool.go:541–553  ·  view source on GitHub ↗

Stop terminates the transaction pool.

()

Source from the content-addressed store, hash-verified

539
540// Stop terminates the transaction pool.
541func (pool *TxPool) Stop() {
542 // Unsubscribe all subscriptions registered from txpool
543 pool.scope.Close()
544
545 // Unsubscribe subscriptions registered from blockchain
546 pool.chainHeadSub.Unsubscribe()
547 pool.wg.Wait()
548
549 if pool.journal != nil {
550 pool.journal.close()
551 }
552 log.Info("Transaction pool stopped")
553}
554
555// SubscribeNewTxsEvent registers a subscription of NewTxsEvent and
556// starts sending event to the given channel.

Calls 5

WaitMethod · 0.80
CloseMethod · 0.65
UnsubscribeMethod · 0.65
InfoMethod · 0.65
closeMethod · 0.45