PR fixes; remove all infura token references and setup travis to use encrypted env
variable; rest of the ethjson_rpc dependent tests extracted to integration_test
This commit is contained in:
+1
-1
@@ -42,7 +42,7 @@ var composeCmd = &cobra.Command{
|
||||
port = 5432
|
||||
|
||||
[client]
|
||||
ipcPath = "http://kovan0.vulcanize.io:8545"
|
||||
ipcPath = "/Users/user/Library/Ethereum/geth.ipc"
|
||||
|
||||
[exporter]
|
||||
home = "github.com/vulcanize/vulcanizedb"
|
||||
|
||||
@@ -42,7 +42,7 @@ var composeAndExecuteCmd = &cobra.Command{
|
||||
port = 5432
|
||||
|
||||
[client]
|
||||
ipcPath = "http://kovan0.vulcanize.io:8545"
|
||||
ipcPath = "/Users/user/Library/Ethereum/geth.ipc"
|
||||
|
||||
[exporter]
|
||||
home = "github.com/vulcanize/vulcanizedb"
|
||||
@@ -180,7 +180,7 @@ func composeAndExecute() {
|
||||
gw := watcher.NewContractWatcher(&db, blockChain)
|
||||
gw.AddTransformers(ethContractInitializers)
|
||||
wg.Add(1)
|
||||
go contractWatching(&gw, &wg)
|
||||
go watchEthContract(&gw, &wg)
|
||||
}
|
||||
wg.Wait()
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ Requires a .toml config file:
|
||||
port = 5432
|
||||
|
||||
[client]
|
||||
ipcPath = "path_to_ethjson_rpc"
|
||||
ipcPath = "/Users/user/Library/Ethereum/geth.ipc"
|
||||
|
||||
[contract]
|
||||
network = ""
|
||||
@@ -112,12 +112,14 @@ func contractWatcher() {
|
||||
}
|
||||
|
||||
for range ticker.C {
|
||||
t.Execute()
|
||||
err = t.Execute()
|
||||
if err != nil {
|
||||
log.Error("Execution error for transformer:", t.GetConfig().Name, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(contractWatcherCmd)
|
||||
|
||||
contractWatcherCmd.Flags().StringVarP(&mode, "mode", "o", "light", "'light' or 'full' mode to work with either light synced or fully synced vDB (default is light)")
|
||||
}
|
||||
|
||||
+6
-15
@@ -46,7 +46,7 @@ var executeCmd = &cobra.Command{
|
||||
port = 5432
|
||||
|
||||
[client]
|
||||
ipcPath = "http://kovan0.vulcanize.io:8545"
|
||||
ipcPath = "/Users/user/Library/Ethereum/geth.ipc"
|
||||
|
||||
[exporter]
|
||||
name = "exampleTransformerExporter"
|
||||
@@ -128,7 +128,7 @@ func execute() {
|
||||
gw := watcher.NewContractWatcher(&db, blockChain)
|
||||
gw.AddTransformers(ethContractInitializers)
|
||||
wg.Add(1)
|
||||
go contractWatching(&gw, &wg)
|
||||
go watchEthContract(&gw, &wg)
|
||||
}
|
||||
wg.Wait()
|
||||
}
|
||||
@@ -155,10 +155,7 @@ func watchEthEvents(w *watcher.EventWatcher, wg *syn.WaitGroup) {
|
||||
ticker := time.NewTicker(pollingInterval)
|
||||
defer ticker.Stop()
|
||||
for range ticker.C {
|
||||
err := w.Execute(recheck)
|
||||
if err != nil {
|
||||
// TODO Handle watcher errors in execute
|
||||
}
|
||||
w.Execute(recheck)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,23 +166,17 @@ func watchEthStorage(w *watcher.StorageWatcher, wg *syn.WaitGroup) {
|
||||
ticker := time.NewTicker(pollingInterval)
|
||||
defer ticker.Stop()
|
||||
for range ticker.C {
|
||||
err := w.Execute()
|
||||
if err != nil {
|
||||
// TODO Handle watcher errors in execute
|
||||
}
|
||||
w.Execute()
|
||||
}
|
||||
}
|
||||
|
||||
func contractWatching(w *watcher.ContractWatcher, wg *syn.WaitGroup) {
|
||||
func watchEthContract(w *watcher.ContractWatcher, wg *syn.WaitGroup) {
|
||||
defer wg.Done()
|
||||
// Execute over the ContractTransformerInitializer set using the contract watcher
|
||||
log.Info("executing contract_watcher transformers")
|
||||
ticker := time.NewTicker(pollingInterval)
|
||||
defer ticker.Stop()
|
||||
for range ticker.C {
|
||||
err := w.Execute(nil)
|
||||
if err != nil {
|
||||
// TODO Handle watcher errors in execute
|
||||
}
|
||||
w.Execute()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user