From 7a5ca2870bc73e4dde2fa99f3be7bb80bcb0b15d Mon Sep 17 00:00:00 2001 From: Patrick O'Grady Date: Tue, 29 Sep 2020 09:33:02 -0700 Subject: [PATCH] Fix errors --- go.sum | 1 + indexer/indexer.go | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/go.sum b/go.sum index 4b96a8d..7e8bc51 100644 --- a/go.sum +++ b/go.sum @@ -114,6 +114,7 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ethereum/go-ethereum v1.9.21 h1:8qRlhzrItnmUGdVlBzZLI2Tb46S0RdSNjFwICo781ws= github.com/ethereum/go-ethereum v1.9.21/go.mod h1:RXAVzbGrSGmDkDnHymruTAIEjUR3E4TX0EOpaj702sI= +github.com/ethereum/go-ethereum v1.9.22 h1:/Fea9n2EWJuNJ9oahMq9luqjRBcbW7QWdThbcJl13ek= github.com/ethereum/go-ethereum v1.9.22/go.mod h1:FQjK3ZwD8C5DYn7ukTmFee36rq1dOMESiUfXr5RUc1w= github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= diff --git a/indexer/indexer.go b/indexer/indexer.go index cfc37c0..b03f29c 100644 --- a/indexer/indexer.go +++ b/indexer/indexer.go @@ -29,6 +29,7 @@ import ( "github.com/coinbase/rosetta-sdk-go/storage" "github.com/coinbase/rosetta-sdk-go/syncer" "github.com/coinbase/rosetta-sdk-go/types" + sdkUtils "github.com/coinbase/rosetta-sdk-go/utils" "github.com/dgraph-io/badger/v2" ) @@ -194,7 +195,7 @@ func (i *Indexer) waitForNode(ctx context.Context) error { } logger.Infow("waiting for bitcoind...") - if err := utils.ContextSleep(ctx, nodeWaitSleep); err != nil { + if err := sdkUtils.ContextSleep(ctx, nodeWaitSleep); err != nil { return err } } @@ -394,7 +395,7 @@ func (i *Indexer) findCoin( databaseTransaction, ) if errors.Is(err, storage.ErrHeadBlockNotFound) { - if err := utils.ContextSleep(ctx, missingTransactionDelay); err != nil { + if err := sdkUtils.ContextSleep(ctx, missingTransactionDelay); err != nil { return nil, nil, err } @@ -604,7 +605,7 @@ func (i *Indexer) Block( return nil, fmt.Errorf("%w: unable to get raw block %+v", err, blockIdentifier) } - if err := utils.ContextSleep(ctx, retryDelay); err != nil { + if err := sdkUtils.ContextSleep(ctx, retryDelay); err != nil { return nil, err } }