func (am *Manager) Close() error {
	errc := make(chan error)
	am.quit <- errc
	return <-errc
}
Close terminates the account manager's internal notification processes.
package accounts
import (
	"reflect"
	"sort"
	"sync"
	"github.com/DxChainNetwork/godx/event"
)
type Manager struct {
	backends map[reflect.Type][]Backend  
	updaters []event.Subscription        
	updates  chan WalletEvent            
	wallets  []Wallet                    
	feed event.Feed  
	quit chan chan error
	lock sync.RWMutex
}
func NewManager(backends ...Backend) *Manager {
	var wallets []Wallet
	for _, backend := range backends {
		wallets = merge(wallets, backend.Wallets()...)
	}
	updates := make(chan WalletEvent, 4*len(backends))
	subs := make([]event.Subscription, len(backends))
	for i, backend := range backends {
		subs[i] = backend.Subscribe(updates)
	}
	am := &Manager{
		backends: make(map[reflect.Type][]Backend),
		updaters: subs,
		updates:  updates,
		wallets:  wallets,
		quit:     make(chan chan error),
	}
	for _, backend := range backends {
		kind := reflect.TypeOf(backend)
		am.backends[kind] = append(am.backends[kind], backend)
	}
	go am.update()
	return am
}