Add Pip price feed

This commit is contained in:
Rob Mulholand
2018-08-16 11:22:16 -05:00
parent 0551147453
commit 2949996d22
25 changed files with 474 additions and 69 deletions
+4 -1
View File
@@ -32,7 +32,8 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/geth/node"
"github.com/vulcanize/vulcanizedb/pkg/history"
"github.com/vulcanize/vulcanizedb/pkg/transformers"
"github.com/vulcanize/vulcanizedb/pkg/transformers/pep"
"github.com/vulcanize/vulcanizedb/pkg/transformers/price_feeds/pep"
"github.com/vulcanize/vulcanizedb/pkg/transformers/price_feeds/pip"
"github.com/vulcanize/vulcanizedb/utils"
)
@@ -87,10 +88,12 @@ func syncPriceFeeds() {
db := utils.LoadPostgres(databaseConfig, blockChain.Node())
headerRepository := repositories.NewHeaderRepository(&db)
// TODO: add transformers to validation so we don't miss events on new block headers
validator := history.NewHeaderValidator(blockChain, headerRepository, validationWindow)
missingBlocksPopulated := make(chan int)
transformers := []transformers.Transformer{
pep.NewPepTransformer(blockChain, &db),
pip.NewPipTransformer(blockChain, &db),
}
go backFillPriceFeeds(blockChain, headerRepository, missingBlocksPopulated, startingBlockNumber, transformers)