Update watcher to use blockchain instead of contract data fetcher
This commit is contained in:
parent
76dad443ec
commit
a11fb709b2
@ -10,7 +10,7 @@ type Handler interface {
|
||||
Execute() error
|
||||
}
|
||||
|
||||
type HandlerInitializer func(db *postgres.DB, blockchain core.ContractDataFetcher) Handler
|
||||
type HandlerInitializer func(db *postgres.DB, blockchain core.Blockchain) Handler
|
||||
|
||||
func HexToInt64(byteString string) int64 {
|
||||
intHash := common.HexToHash(byteString)
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
type Watcher struct {
|
||||
Handlers []Handler
|
||||
DB postgres.DB
|
||||
Blockchain core.ContractDataFetcher
|
||||
Blockchain core.Blockchain
|
||||
}
|
||||
|
||||
func (watcher *Watcher) AddHandlers(us []HandlerInitializer) {
|
||||
|
@ -23,7 +23,7 @@ func (mh *MockHandler) Execute() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func fakeHandlerInitializer(db *postgres.DB, blockchain core.ContractDataFetcher) shared.Handler {
|
||||
func fakeHandlerInitializer(db *postgres.DB, blockchain core.Blockchain) shared.Handler {
|
||||
return &MockHandler{}
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,7 @@ var _ = Describe("Parity Node Info", func() {
|
||||
|
||||
It("returns infura ID and client name for infura node", func() {
|
||||
mcc := MockContextCaller{core.INFURA}
|
||||
cw := node.ClientWrapper{mcc, "https://mainnet.infura.io/123"}
|
||||
cw := node.ClientWrapper{ContextCaller: mcc, IPCPath: "https://mainnet.infura.io/123"}
|
||||
n := node.MakeNode(cw)
|
||||
Expect(n.ID).To(Equal("infura"))
|
||||
Expect(n.ClientName).To(Equal("infura"))
|
||||
|
Loading…
Reference in New Issue
Block a user