eth,eth/filters: fix formatting

This commit is contained in:
Domino Valdano 2018-05-10 17:42:20 -07:00
parent d843dedd88
commit b06488abfc
3 changed files with 16 additions and 16 deletions

View file

@ -152,7 +152,7 @@ func (b *EthAPIBackend) SubscribeChainSideEvent(ch chan<- core.ChainSideEvent) e
return b.eth.BlockChain().SubscribeChainSideEvent(ch) return b.eth.BlockChain().SubscribeChainSideEvent(ch)
} }
func (b *EthApiBackend) SubscribeTransactionEvent(ch chan<- core.TransactionEvent) event.Subscription { func (b *EthAPIBackend) SubscribeTransactionEvent(ch chan<- core.TransactionEvent) event.Subscription {
return b.eth.BlockChain().SubscribeTransactionEvent(ch) return b.eth.BlockChain().SubscribeTransactionEvent(ch)
} }

View file

@ -102,7 +102,7 @@ type EventSystem struct {
lastHead *types.Header lastHead *types.Header
// Subscriptions // Subscriptions
txPreSub event.Subscription // Subscription for pre transaction events txPreSub event.Subscription // Subscription for pre transaction events
txSub event.Subscription // Subscription for transaction events txSub event.Subscription // Subscription for transaction events
logsSub event.Subscription // Subscription for new log event logsSub event.Subscription // Subscription for new log event
rmLogsSub event.Subscription // Subscription for removed log event rmLogsSub event.Subscription // Subscription for removed log event
@ -110,13 +110,13 @@ type EventSystem struct {
pendingLogSub *event.TypeMuxSubscription // Subscription for pending log event pendingLogSub *event.TypeMuxSubscription // Subscription for pending log event
// Channels // Channels
install chan *subscription // install filter for event notification install chan *subscription // install filter for event notification
uninstall chan *subscription // remove filter for event notification uninstall chan *subscription // remove filter for event notification
txPreCh chan core.TxPreEvent // Channel to recieve new pre transaction events txPreCh chan core.TxPreEvent // Channel to receive new pre transaction events
txCh chan core.TransactionEvent // Channel to receive new transaction events txCh chan core.TransactionEvent // Channel to receive new transaction events
logsCh chan []*types.Log // Channel to receive new log event logsCh chan []*types.Log // Channel to receive new log event
rmLogsCh chan core.RemovedLogsEvent // Channel to receive removed log event rmLogsCh chan core.RemovedLogsEvent // Channel to receive removed log event
chainCh chan core.ChainEvent // Channel to receive new chain event chainCh chan core.ChainEvent // Channel to receive new chain event
} }
// NewEventSystem creates a new manager that listens for event on the given mux, // NewEventSystem creates a new manager that listens for event on the given mux,
@ -132,7 +132,7 @@ func NewEventSystem(mux *event.TypeMux, backend Backend, lightMode bool) *EventS
lightMode: lightMode, lightMode: lightMode,
install: make(chan *subscription), install: make(chan *subscription),
uninstall: make(chan *subscription), uninstall: make(chan *subscription),
txPrech: make(chan core.TxPreEvent, txPreChanSize), txPreCh: make(chan core.TxPreEvent, txPreChanSize),
txCh: make(chan core.TransactionEvent, txPostChanSize), txCh: make(chan core.TransactionEvent, txPostChanSize),
logsCh: make(chan []*types.Log, logsChanSize), logsCh: make(chan []*types.Log, logsChanSize),
rmLogsCh: make(chan core.RemovedLogsEvent, rmLogsChanSize), rmLogsCh: make(chan core.RemovedLogsEvent, rmLogsChanSize),
@ -140,7 +140,7 @@ func NewEventSystem(mux *event.TypeMux, backend Backend, lightMode bool) *EventS
} }
// Subscribe events // Subscribe events
m.txPreSub = m.backend.SubscribeTxPreEvent(m.txPreCh) m.txPreSub = m.backend.SubscribeTxPreEvent(m.txPreCh)
m.txSub = m.backend.SubscribeTransactionEvent(m.txCh) m.txSub = m.backend.SubscribeTransactionEvent(m.txCh)
m.logsSub = m.backend.SubscribeLogsEvent(m.logsCh) m.logsSub = m.backend.SubscribeLogsEvent(m.logsCh)
m.rmLogsSub = m.backend.SubscribeRemovedLogsEvent(m.rmLogsCh) m.rmLogsSub = m.backend.SubscribeRemovedLogsEvent(m.rmLogsCh)
@ -475,7 +475,7 @@ func (es *EventSystem) eventLoop() {
// Ensure all subscriptions get cleaned up // Ensure all subscriptions get cleaned up
defer func() { defer func() {
es.pendingLogSub.Unsubscribe() es.pendingLogSub.Unsubscribe()
es.txPreSub.Unsubscribe() es.txPreSub.Unsubscribe()
es.txSub.Unsubscribe() es.txSub.Unsubscribe()
es.logsSub.Unsubscribe() es.logsSub.Unsubscribe()
es.rmLogsSub.Unsubscribe() es.rmLogsSub.Unsubscribe()

View file

@ -158,7 +158,7 @@ func TestBlockSubscription(t *testing.T) {
var ( var (
mux = new(event.TypeMux) mux = new(event.TypeMux)
db = ethdb.NewMemDatabase() db = ethdb.NewMemDatabase()
txPreFeed = new(event.Feed) txPreFeed = new(event.Feed)
txPostFeed = new(event.Feed) txPostFeed = new(event.Feed)
rmLogsFeed = new(event.Feed) rmLogsFeed = new(event.Feed)
@ -332,7 +332,7 @@ func TestInvalidLogFilterCreation(t *testing.T) {
mux = new(event.TypeMux) mux = new(event.TypeMux)
db = ethdb.NewMemDatabase() db = ethdb.NewMemDatabase()
txPreFeed = new(event.Feed) txPreFeed = new(event.Feed)
txPostFeed = new(evnt.Feed) txPostFeed = new(event.Feed)
rmLogsFeed = new(event.Feed) rmLogsFeed = new(event.Feed)
logsFeed = new(event.Feed) logsFeed = new(event.Feed)
chainFeed = new(event.Feed) chainFeed = new(event.Feed)
@ -481,7 +481,7 @@ func TestPendingLogsSubscription(t *testing.T) {
var ( var (
mux = new(event.TypeMux) mux = new(event.TypeMux)
db = ethdb.NewMemDatabase() db = ethdb.NewMemDatabase()
txPreFeed = new(event.Feed) txPreFeed = new(event.Feed)
txPostFeed = new(event.Feed) txPostFeed = new(event.Feed)
rmLogsFeed = new(event.Feed) rmLogsFeed = new(event.Feed)