Refactor fetching out from repositories to log_fetcher and watcher

This commit is contained in:
Edvard
2018-12-04 16:04:13 +01:00
parent c26736dc9e
commit 38c745e8c3
33 changed files with 163 additions and 151 deletions
-5
View File
@@ -16,7 +16,6 @@ package vat_flux
import (
"fmt"
"github.com/vulcanize/vulcanizedb/pkg/core"
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
@@ -61,10 +60,6 @@ func (repository VatFluxRepository) MarkHeaderChecked(headerId int64) error {
return shared.MarkHeaderChecked(headerId, repository.db, constants.VatFluxChecked)
}
func (repository VatFluxRepository) MissingHeaders(startingBlock, endingBlock int64) ([]core.Header, error) {
return shared.MissingHeaders(startingBlock, endingBlock, repository.db, constants.VatFluxChecked)
}
func (repository *VatFluxRepository) SetDB(db *postgres.DB) {
repository.db = db
}