les: provide SubscribePendingLogsEvent in LesApiBackend

This commit is contained in:
Felix Lange 2019-11-18 15:20:40 +01:00
parent ff226b3ad4
commit ef54939d15

View file

@ -225,6 +225,13 @@ func (b *LesApiBackend) SubscribeLogsEvent(ch chan<- []*types.Log) event.Subscri
return b.eth.blockchain.SubscribeLogsEvent(ch) return b.eth.blockchain.SubscribeLogsEvent(ch)
} }
func (b *LesApiBackend) SubscribePendingLogsEvent(ch chan<- []*types.Log) event.Subscription {
return event.NewSubscription(func(quit <-chan struct{}) error {
<-quit
return nil
})
}
func (b *LesApiBackend) SubscribeRemovedLogsEvent(ch chan<- core.RemovedLogsEvent) event.Subscription { func (b *LesApiBackend) SubscribeRemovedLogsEvent(ch chan<- core.RemovedLogsEvent) event.Subscription {
return b.eth.blockchain.SubscribeRemovedLogsEvent(ch) return b.eth.blockchain.SubscribeRemovedLogsEvent(ch)
} }
@ -245,10 +252,6 @@ func (b *LesApiBackend) ChainDb() ethdb.Database {
return b.eth.chainDb return b.eth.chainDb
} }
func (b *LesApiBackend) EventMux() *event.TypeMux {
return b.eth.eventMux
}
func (b *LesApiBackend) AccountManager() *accounts.Manager { func (b *LesApiBackend) AccountManager() *accounts.Manager {
return b.eth.accountManager return b.eth.accountManager
} }