Add transformer name to config for logging in factory transformer

This commit is contained in:
Edvard 2018-10-11 15:13:22 +02:00
parent 46d8ea8d97
commit 32654ffabc
2 changed files with 2 additions and 1 deletions

View File

@ -55,7 +55,7 @@ func (transformer Transformer) Execute() error {
return err
}
log.Printf("Fetching vat move event logs for %d headers \n", len(missingHeaders))
log.Printf("Fetching %v event logs for %d headers \n", transformer.Config.TransformerName, len(missingHeaders))
for _, header := range missingHeaders {
// Grab topics from config
var topics [][]common.Hash

View File

@ -28,6 +28,7 @@ type Transformer interface {
type TransformerInitializer func(db *postgres.DB, blockChain core.BlockChain) Transformer
type TransformerConfig struct {
TransformerName string
ContractAddresses []string
ContractAbi string
Topics []string