Fix transformer factory

This commit is contained in:
Edvard
2018-10-23 10:43:03 +02:00
parent 1b9e6491da
commit 15e33db33d
3 changed files with 45 additions and 43 deletions
+9
View File
@@ -28,10 +28,19 @@ type LogFetcher interface {
FetchLogs(contractAddresses []string, topics [][]common.Hash, blockNumber int64) ([]types.Log, error)
}
type SettableLogFetcher interface {
LogFetcher
SetBC(bc core.BlockChain)
}
type Fetcher struct {
blockChain core.BlockChain
}
func (fetcher *Fetcher) SetBC(bc core.BlockChain) {
fetcher.blockChain = bc
}
func NewFetcher(blockchain core.BlockChain) Fetcher {
return Fetcher{
blockChain: blockchain,