forked from cerc-io/ipld-eth-server
Add logging for every transformer
- Also add drip file transformer initializer
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
package ilk_test
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"testing"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
@@ -25,3 +27,7 @@ func TestIlk(t *testing.T) {
|
||||
RegisterFailHandler(Fail)
|
||||
RunSpecs(t, "Ilk Suite")
|
||||
}
|
||||
|
||||
var _ = BeforeSuite(func() {
|
||||
log.SetOutput(ioutil.Discard)
|
||||
})
|
||||
|
||||
@@ -15,7 +15,10 @@
|
||||
package ilk
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
|
||||
"github.com/vulcanize/vulcanizedb/pkg/core"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/drip_file"
|
||||
@@ -50,6 +53,7 @@ func (transformer DripFileIlkTransformer) Execute() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
log.Printf("Fetching drip file ilk event logs for %d headers \n", len(missingHeaders))
|
||||
for _, header := range missingHeaders {
|
||||
topics := [][]common.Hash{{common.HexToHash(shared.DripFileIlkSignature)}}
|
||||
matchingLogs, err := transformer.Fetcher.FetchLogs(drip_file.DripFileConfig.ContractAddress, topics, header.BlockNumber)
|
||||
|
||||
Reference in New Issue
Block a user