Fix errors
This commit is contained in:
parent
ccbdf71659
commit
7a5ca2870b
2 changed files with 5 additions and 3 deletions
1
go.sum
1
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=
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue