manager.go 591 B

123456789101112131415161718192021222324
  1. package core
  2. import (
  3. "github.com/ethereum/go-ethereum/accounts"
  4. "github.com/ethereum/go-ethereum/common"
  5. "github.com/ethereum/go-ethereum/eth/downloader"
  6. "github.com/ethereum/go-ethereum/event"
  7. "github.com/ethereum/go-ethereum/p2p"
  8. )
  9. // TODO move this to types?
  10. type Backend interface {
  11. AccountManager() *accounts.Manager
  12. BlockProcessor() *BlockProcessor
  13. ChainManager() *ChainManager
  14. TxPool() *TxPool
  15. PeerCount() int
  16. IsListening() bool
  17. Peers() []*p2p.Peer
  18. BlockDb() common.Database
  19. StateDb() common.Database
  20. EventMux() *event.TypeMux
  21. Downloader() *downloader.Downloader
  22. }