updat dep and serve cmd
This commit is contained in:
@@ -23,8 +23,6 @@ import (
|
||||
"github.com/ethereum/go-ethereum/rpc"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/vulcanize/ipfs-blockchain-watcher/pkg/node"
|
||||
|
||||
"github.com/vulcanize/ipld-eth-server/pkg/eth"
|
||||
"github.com/vulcanize/ipld-eth-server/pkg/shared"
|
||||
v "github.com/vulcanize/ipld-eth-server/version"
|
||||
@@ -87,12 +85,6 @@ func (api *PublicServerAPI) Stream(ctx context.Context, params eth.SubscriptionS
|
||||
return rpcSub, nil
|
||||
}
|
||||
|
||||
// Node is a public rpc method to allow transformers to fetch the node info for the watcher
|
||||
// NOTE: this is the node info for the node that the watcher is syncing from, not the node info for the watcher itself
|
||||
func (api *PublicServerAPI) Node() *node.Info {
|
||||
return api.w.Node()
|
||||
}
|
||||
|
||||
// Chain returns the chain type that this watcher instance supports
|
||||
func (api *PublicServerAPI) Chain() shared.ChainType {
|
||||
return api.w.Chain()
|
||||
|
||||
+5
-4
@@ -20,12 +20,13 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/vulcanize/ipld-eth-indexer/pkg/node"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
|
||||
"github.com/vulcanize/ipfs-blockchain-watcher/pkg/node"
|
||||
"github.com/vulcanize/ipfs-blockchain-watcher/pkg/postgres"
|
||||
"github.com/vulcanize/ipld-eth-indexer/pkg/postgres"
|
||||
|
||||
"github.com/vulcanize/ipld-eth-server/utils"
|
||||
"github.com/vulcanize/ipld-eth-indexer/utils"
|
||||
)
|
||||
|
||||
// Env variables
|
||||
@@ -79,7 +80,7 @@ func NewConfig() (*Config, error) {
|
||||
}
|
||||
c.HTTPEndpoint = httpPath
|
||||
overrideDBConnConfig(&c.DBConfig)
|
||||
serveDB := utils.LoadPostgres(c.DBConfig, postgres.Info{})
|
||||
serveDB := utils.LoadPostgres(c.DBConfig, node.Info{})
|
||||
c.DB = &serveDB
|
||||
|
||||
return c, nil
|
||||
|
||||
@@ -28,9 +28,8 @@ import (
|
||||
"github.com/ethereum/go-ethereum/rpc"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
eth2 "github.com/vulcanize/ipfs-blockchain-watcher/pkg/eth"
|
||||
"github.com/vulcanize/ipfs-blockchain-watcher/pkg/node"
|
||||
"github.com/vulcanize/ipfs-blockchain-watcher/pkg/postgres"
|
||||
eth2 "github.com/vulcanize/ipld-eth-indexer/pkg/eth"
|
||||
"github.com/vulcanize/ipld-eth-indexer/pkg/postgres"
|
||||
|
||||
"github.com/vulcanize/ipld-eth-server/pkg/eth"
|
||||
"github.com/vulcanize/ipld-eth-server/pkg/shared"
|
||||
@@ -88,7 +87,6 @@ func NewServer(settings *Config) (Server, error) {
|
||||
sn.QuitChan = make(chan bool)
|
||||
sn.Subscriptions = make(map[common.Hash]map[rpc.ID]Subscription)
|
||||
sn.SubscriptionTypes = make(map[common.Hash]eth.SubscriptionSettings)
|
||||
sn.NodeInfo = &settings.NodeInfo
|
||||
return sn, nil
|
||||
}
|
||||
|
||||
@@ -273,7 +271,7 @@ func (sap *Service) sendHistoricalData(sub Subscription, id rpc.ID, params eth.S
|
||||
for i := startingBlock; i <= endingBlock; i++ {
|
||||
select {
|
||||
case <-sap.QuitChan:
|
||||
log.Infof("%s watcher historical data feed to subscription %s closed", id)
|
||||
log.Infof("ethereum historical data feed to subscription %s closed", id)
|
||||
return
|
||||
default:
|
||||
}
|
||||
@@ -309,7 +307,7 @@ func (sap *Service) sendHistoricalData(sub Subscription, id rpc.ID, params eth.S
|
||||
case sub.PayloadChan <- SubscriptionPayload{Data: nil, Err: "", Flag: BackFillCompleteFlag}:
|
||||
log.Debugf("eth ipld server sending backFill completion notice to subscription %s", id)
|
||||
default:
|
||||
log.Infof("eth ipld server unable to send backFill completion notice to %s subscription %s", id)
|
||||
log.Infof("eth ipld server unable to send backFill completion notice to subscription %s", id)
|
||||
}
|
||||
}()
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user