Skip to content

Commit

Permalink
update go.mod & fix tests (#601)
Browse files Browse the repository at this point in the history
* update go.mod
* fix: tests
  • Loading branch information
semyon-dev authored Oct 30, 2024
1 parent 7a60f70 commit 73e917d
Show file tree
Hide file tree
Showing 109 changed files with 271 additions and 279 deletions.
2 changes: 1 addition & 1 deletion authutils/auth_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/singnet/snet-daemon/blockchain"
"github.com/singnet/snet-daemon/v5/blockchain"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion authutils/auth_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

"github.com/singnet/snet-daemon/config"
"github.com/singnet/snet-daemon/v5/config"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion blockchain/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/ethereum/go-ethereum/ethclient"
"github.com/ethereum/go-ethereum/rpc"
"github.com/pkg/errors"
"github.com/singnet/snet-daemon/config"
"github.com/singnet/snet-daemon/v5/config"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion blockchain/ethereumClient.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"encoding/base64"

"github.com/singnet/snet-daemon/config"
"github.com/singnet/snet-daemon/v5/config"

"github.com/ethereum/go-ethereum/ethclient"
"github.com/ethereum/go-ethereum/rpc"
Expand Down
4 changes: 2 additions & 2 deletions blockchain/orginzationMetadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strings"
"time"

"github.com/singnet/snet-daemon/config"
"github.com/singnet/snet-daemon/ipfsutils"
"github.com/singnet/snet-daemon/v5/config"
"github.com/singnet/snet-daemon/v5/ipfsutils"

"github.com/ethereum/go-ethereum/common"
"go.uber.org/zap"
Expand Down
2 changes: 1 addition & 1 deletion blockchain/orginzationMetadata_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package blockchain

import (
"github.com/singnet/snet-daemon/config"
"github.com/singnet/snet-daemon/v5/config"
"github.com/stretchr/testify/assert"
"math/big"
"testing"
Expand Down
4 changes: 2 additions & 2 deletions blockchain/serviceMetadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/ethclient"
"github.com/pkg/errors"
"github.com/singnet/snet-daemon/config"
"github.com/singnet/snet-daemon/ipfsutils"
"github.com/singnet/snet-daemon/v5/config"
"github.com/singnet/snet-daemon/v5/ipfsutils"
"go.uber.org/zap"
"google.golang.org/protobuf/reflect/protoreflect"
)
Expand Down
2 changes: 1 addition & 1 deletion blockchain/serviceMetadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"

"github.com/ethereum/go-ethereum/common"
"github.com/singnet/snet-daemon/config"
"github.com/singnet/snet-daemon/v5/config"
"github.com/stretchr/testify/assert"
)

Expand Down
1 change: 1 addition & 0 deletions codec/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package codec
import (
"fmt"
"google.golang.org/grpc/encoding"
_ "google.golang.org/grpc/encoding/gzip"
_ "google.golang.org/grpc/encoding/proto" // ensure default "proto" codec is registered first
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/protoadapt"
Expand Down
4 changes: 2 additions & 2 deletions configuration_service/configuration_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/math"
"github.com/singnet/snet-daemon/authutils"
"github.com/singnet/snet-daemon/config"
"github.com/singnet/snet-daemon/v5/authutils"
"github.com/singnet/snet-daemon/v5/config"
"go.uber.org/zap"

"math/big"
Expand Down
4 changes: 2 additions & 2 deletions configuration_service/configuration_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/math"
"github.com/ethereum/go-ethereum/crypto"
"github.com/singnet/snet-daemon/authutils"
"github.com/singnet/snet-daemon/v5/authutils"

"github.com/singnet/snet-daemon/config"
"github.com/singnet/snet-daemon/v5/config"
"github.com/stretchr/testify/assert"
)

Expand Down
4 changes: 2 additions & 2 deletions contract_event_listener/contract_event_listener.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package contractlistener

import (
"github.com/singnet/snet-daemon/blockchain"
"github.com/singnet/snet-daemon/etcddb"
"github.com/singnet/snet-daemon/v5/blockchain"
"github.com/singnet/snet-daemon/v5/etcddb"
)

type EventSignature string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"slices"

"github.com/singnet/snet-daemon/blockchain"
"github.com/singnet/snet-daemon/etcddb"
"github.com/singnet/snet-daemon/v5/blockchain"
"github.com/singnet/snet-daemon/v5/etcddb"

"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/gorilla/websocket"
Expand Down
4 changes: 2 additions & 2 deletions escrow/allowed_user_payment_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package escrow

import (
"github.com/ethereum/go-ethereum/common"
"github.com/singnet/snet-daemon/blockchain"
"github.com/singnet/snet-daemon/handler"
"github.com/singnet/snet-daemon/v5/blockchain"
"github.com/singnet/snet-daemon/v5/handler"
"google.golang.org/grpc/codes"
)

Expand Down
4 changes: 2 additions & 2 deletions escrow/allowed_user_payment_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"crypto/ecdsa"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/singnet/snet-daemon/config"
"github.com/singnet/snet-daemon/handler"
"github.com/singnet/snet-daemon/v5/config"
"github.com/singnet/snet-daemon/v5/handler"
"github.com/stretchr/testify/assert"
"google.golang.org/grpc/metadata"
"math/big"
Expand Down
4 changes: 2 additions & 2 deletions escrow/control_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/math"
"github.com/singnet/snet-daemon/authutils"
"github.com/singnet/snet-daemon/blockchain"
"github.com/singnet/snet-daemon/v5/authutils"
"github.com/singnet/snet-daemon/v5/blockchain"

"go.uber.org/zap"
"golang.org/x/net/context"
Expand Down
8 changes: 4 additions & 4 deletions escrow/control_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/math"
"github.com/ethereum/go-ethereum/crypto"
"github.com/singnet/snet-daemon/authutils"
"github.com/singnet/snet-daemon/config"
"github.com/singnet/snet-daemon/storage"
"github.com/singnet/snet-daemon/v5/authutils"
"github.com/singnet/snet-daemon/v5/config"
"github.com/singnet/snet-daemon/v5/storage"
"github.com/stretchr/testify/suite"
"math/big"
"strings"
"testing"

"github.com/stretchr/testify/assert"

"github.com/singnet/snet-daemon/blockchain"
"github.com/singnet/snet-daemon/v5/blockchain"
)

type ControlServiceTestSuite struct {
Expand Down
6 changes: 3 additions & 3 deletions escrow/escrow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"crypto/ecdsa"
"errors"
"fmt"
"github.com/singnet/snet-daemon/config"
"github.com/singnet/snet-daemon/storage"
"github.com/singnet/snet-daemon/v5/config"
"github.com/singnet/snet-daemon/v5/storage"
"math/big"
"testing"

Expand All @@ -14,7 +14,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"

"github.com/singnet/snet-daemon/blockchain"
"github.com/singnet/snet-daemon/v5/blockchain"
)

type paymentChannelServiceMock struct {
Expand Down
4 changes: 2 additions & 2 deletions escrow/free_call.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package escrow
import (
"fmt"

"github.com/singnet/snet-daemon/blockchain"
"github.com/singnet/snet-daemon/config"
"github.com/singnet/snet-daemon/v5/blockchain"
"github.com/singnet/snet-daemon/v5/config"
"go.uber.org/zap"
)

Expand Down
6 changes: 3 additions & 3 deletions escrow/free_call_payment_handler.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package escrow

import (
"github.com/singnet/snet-daemon/blockchain"
"github.com/singnet/snet-daemon/config"
"github.com/singnet/snet-daemon/handler"
"github.com/singnet/snet-daemon/v5/blockchain"
"github.com/singnet/snet-daemon/v5/config"
"github.com/singnet/snet-daemon/v5/handler"
)

const (
Expand Down
8 changes: 4 additions & 4 deletions escrow/free_call_payment_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import (
"bytes"
"crypto/ecdsa"
"fmt"
"github.com/singnet/snet-daemon/blockchain"
"github.com/singnet/snet-daemon/storage"
"github.com/singnet/snet-daemon/v5/blockchain"
"github.com/singnet/snet-daemon/v5/storage"
"math/big"
"strconv"
"testing"

"github.com/ethereum/go-ethereum/crypto"
"github.com/singnet/snet-daemon/config"
"github.com/singnet/snet-daemon/handler"
"github.com/singnet/snet-daemon/v5/config"
"github.com/singnet/snet-daemon/v5/handler"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
"google.golang.org/grpc/metadata"
Expand Down
4 changes: 2 additions & 2 deletions escrow/free_call_state_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"math/big"

"github.com/singnet/snet-daemon/blockchain"
"github.com/singnet/snet-daemon/config"
"github.com/singnet/snet-daemon/v5/blockchain"
"github.com/singnet/snet-daemon/v5/config"
"go.uber.org/zap"

"golang.org/x/net/context"
Expand Down
6 changes: 3 additions & 3 deletions escrow/free_call_state_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"crypto/ecdsa"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/singnet/snet-daemon/blockchain"
"github.com/singnet/snet-daemon/config"
"github.com/singnet/snet-daemon/storage"
"github.com/singnet/snet-daemon/v5/blockchain"
"github.com/singnet/snet-daemon/v5/config"
"github.com/singnet/snet-daemon/v5/storage"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
"math/big"
Expand Down
2 changes: 1 addition & 1 deletion escrow/free_call_storage.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package escrow

import (
"github.com/singnet/snet-daemon/storage"
"github.com/singnet/snet-daemon/v5/storage"
"reflect"
)

Expand Down
2 changes: 1 addition & 1 deletion escrow/free_call_storage_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package escrow

import (
"github.com/singnet/snet-daemon/storage"
"github.com/singnet/snet-daemon/v5/storage"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
"testing"
Expand Down
6 changes: 3 additions & 3 deletions escrow/free_call_test.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package escrow

import (
"github.com/singnet/snet-daemon/storage"
"github.com/singnet/snet-daemon/v5/storage"
"testing"

"github.com/singnet/snet-daemon/blockchain"
"github.com/singnet/snet-daemon/config"
"github.com/singnet/snet-daemon/v5/blockchain"
"github.com/singnet/snet-daemon/v5/config"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
)
Expand Down
4 changes: 2 additions & 2 deletions escrow/income.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package escrow

import (
"github.com/singnet/snet-daemon/pricing"
"github.com/singnet/snet-daemon/v5/pricing"
"math/big"

"github.com/singnet/snet-daemon/handler"
"github.com/singnet/snet-daemon/v5/handler"
)

// IncomeData is used to pass information to the pricing validation system.
Expand Down
6 changes: 3 additions & 3 deletions escrow/income_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package escrow

import (
"fmt"
"github.com/singnet/snet-daemon/blockchain"
"github.com/singnet/snet-daemon/handler"
"github.com/singnet/snet-daemon/pricing"
"github.com/singnet/snet-daemon/v5/blockchain"
"github.com/singnet/snet-daemon/v5/handler"
"github.com/singnet/snet-daemon/v5/pricing"
"math/big"
"testing"

Expand Down
2 changes: 1 addition & 1 deletion escrow/lock.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package escrow

import (
"github.com/singnet/snet-daemon/storage"
"github.com/singnet/snet-daemon/v5/storage"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion escrow/payment_channel_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/ethereum/go-ethereum/common"

"github.com/singnet/snet-daemon/blockchain"
"github.com/singnet/snet-daemon/v5/blockchain"
)

// Payment contains MultiPartyEscrow payment details
Expand Down
4 changes: 2 additions & 2 deletions escrow/payment_channel_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
"reflect"

"github.com/ethereum/go-ethereum/common"
"github.com/singnet/snet-daemon/storage"
"github.com/singnet/snet-daemon/v5/storage"
"github.com/spf13/viper"
"go.uber.org/zap"

"github.com/singnet/snet-daemon/blockchain"
"github.com/singnet/snet-daemon/v5/blockchain"
)

// PaymentChannelStorage is a storage for PaymentChannelData by
Expand Down
4 changes: 2 additions & 2 deletions escrow/payment_channel_storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package escrow

import (
"errors"
"github.com/singnet/snet-daemon/storage"
"github.com/singnet/snet-daemon/v5/storage"
"math/big"
"testing"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/singnet/snet-daemon/blockchain"
"github.com/singnet/snet-daemon/v5/blockchain"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
)
Expand Down
8 changes: 4 additions & 4 deletions escrow/payment_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"go.uber.org/zap"
"google.golang.org/grpc/codes"

"github.com/singnet/snet-daemon/blockchain"
"github.com/singnet/snet-daemon/config"
"github.com/singnet/snet-daemon/handler"
"github.com/singnet/snet-daemon/metrics"
"github.com/singnet/snet-daemon/v5/blockchain"
"github.com/singnet/snet-daemon/v5/config"
"github.com/singnet/snet-daemon/v5/handler"
"github.com/singnet/snet-daemon/v5/metrics"
)

const (
Expand Down
Loading

0 comments on commit 73e917d

Please sign in to comment.