Skip to content

Commit

Permalink
Updated version of ipfs/go-log to v2
Browse files Browse the repository at this point in the history
Updated version of ipfs/go-log to the latest v2.
  • Loading branch information
nkuba committed Apr 18, 2020
1 parent f22b8e7 commit 6d7af98
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 48 deletions.
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ require (
github.com/gorilla/websocket v1.4.1 // indirect
github.com/hashicorp/golang-lru v0.5.3 // indirect
github.com/huin/goupnp v1.0.0 // indirect
github.com/ipfs/go-log v0.0.1
github.com/ipfs/go-log/v2 v2.0.4
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
github.com/karalabe/usb v0.0.0-20191104083709-911d15fe12a9 // indirect
github.com/olekukonko/tablewriter v0.0.2 // indirect
Expand All @@ -29,8 +29,9 @@ require (
github.com/status-im/keycard-go v0.0.0-20191119114148-6dd40a46baa0 // indirect
github.com/tyler-smith/go-bip39 v1.0.2 // indirect
github.com/urfave/cli v1.22.1
go.uber.org/zap v1.14.1 // indirect
golang.org/x/crypto v0.0.0-20190926114937-fa1a29108794
golang.org/x/net v0.0.0-20190926025831-c00fd9afed17 // indirect
golang.org/x/tools v0.0.0-20190925230517-ea99b82c7b93
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5
gopkg.in/olebedev/go-duktape.v3 v3.0.0-20190709231704-1e4459ed25ff // indirect
)
63 changes: 26 additions & 37 deletions go.sum

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions pkg/chain/ethereum/blockcounter/blockcounter.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"sync"
"time"

"github.com/ipfs/go-log"
"github.com/ipfs/go-log/v2"

"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/ethclient"
Expand Down Expand Up @@ -173,7 +173,7 @@ func (ebc *EthereumBlockCounter) subscribeBlocks(ctx context.Context, client *et
newBlockChan,
)
if err != nil {
logger.Warningf("could not create subscription to new blocks: [%v]", err)
logger.Warnf("could not create subscription to new blocks: [%v]", err)
errorChan <- err
return
}
Expand All @@ -183,7 +183,7 @@ func (ebc *EthereumBlockCounter) subscribeBlocks(ctx context.Context, client *et
case header := <-newBlockChan:
ebc.subscriptionChannel <- block{header.Number.String()}
case err = <-subscription.Err():
logger.Warningf("subscription to new blocks interrupted: [%v]", err)
logger.Warnf("subscription to new blocks interrupted: [%v]", err)
subscription.Unsubscribe()
errorChan <- err
return
Expand Down
4 changes: 2 additions & 2 deletions pkg/chain/ethereum/ethutil/ethutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"io/ioutil"
"math/big"

"github.com/ipfs/go-log"
"github.com/ipfs/go-log/v2"

"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/abi"
Expand Down Expand Up @@ -141,7 +141,7 @@ func CallAtBlock(
// the true gas limit requirement as other transactions may be added or removed by miners,
// but it should provide a basis for setting a reasonable default.
func EstimateGas(
from common.Address,
from common.Address,
to common.Address,
method string,
contractABI *abi.ABI,
Expand Down
2 changes: 1 addition & 1 deletion pkg/logging/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

logging "github.com/ipfs/go-log"
logging "github.com/ipfs/go-log/v2"
)

// Configure sets up logging configuration from the given string. This string is
Expand Down
4 changes: 2 additions & 2 deletions pkg/persistence/persistence.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Package persistence adds a layer which handles data storage. This package
// separates the data from the business layer and is responsible for saving and
// separates the data from the business layer and is responsible for saving and
// retrieving it.
package persistence

import "github.com/ipfs/go-log"
import "github.com/ipfs/go-log/v2"

var logger = log.Logger("keep-persistence")

Expand Down
2 changes: 1 addition & 1 deletion tools/generators/ethereum/contract_template_content.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ipfs/go-log"
"github.com/ipfs/go-log/v2"
"github.com/keep-network/keep-common/pkg/chain/ethereum/ethutil"
"github.com/keep-network/keep-common/pkg/subscription"
Expand Down

0 comments on commit 6d7af98

Please sign in to comment.