From fc9229d7d25dafe2eb37965115888d17e473ebe4 Mon Sep 17 00:00:00 2001 From: Determinant Date: Tue, 24 Sep 2019 12:55:57 -0400 Subject: enable AccountManager; add a channel to notify new txs --- eth/backend.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'eth/backend.go') diff --git a/eth/backend.go b/eth/backend.go index 666f0fb..b297b9b 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -99,6 +99,8 @@ type Ethereum struct { netRPCService *ethapi.PublicNetAPI lock sync.RWMutex // Protects the variadic fields (e.g. gas price and etherbase) + + txSubmitChan chan struct{} } func (s *Ethereum) AddLesServer(ls LesServer) { @@ -157,6 +159,7 @@ func New(ctx *node.ServiceContext, config *Config, cb *dummy.ConsensusCallbacks, etherbase: config.Miner.Etherbase, bloomRequests: make(chan chan *bloombits.Retrieval), bloomIndexer: NewBloomIndexer(chainDb, params.BloomBitsBlocks, params.BloomConfirms), + txSubmitChan: make(chan struct{}, 1), } bcVersion := rawdb.ReadDatabaseVersion(chainDb) @@ -545,3 +548,7 @@ func (s *Ethereum) StopPart() error { close(s.shutdownChan) return nil } + +func (s *Ethereum) GetTxSubmitCh() <-chan struct{} { + return s.txSubmitChan +} -- cgit v1.2.3