Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update go.mod & tests #602

Merged
merged 4 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
8 changes: 4 additions & 4 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 Expand Up @@ -119,8 +119,8 @@ func (reader *BlockchainChannelReader) GetChannelStateFromBlockchain(key *Paymen

if recipientPaymentAddress != ch.Recipient {
zap.L().Warn("Recipient Address from org metadata not Match on what was retrieved from Channel",
zap.Any("recipientPaymentAddress", recipientPaymentAddress),
zap.Any("ch.Recipient", ch.Recipient))
zap.String("recipientPaymentAddress", recipientPaymentAddress.Hex()),
zap.String("ch.Recipient", ch.Recipient.Hex()))
return nil, false, fmt.Errorf("recipient Address from org metadata does not Match on what was retrieved from Channel")
}
return &PaymentChannelData{
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
Loading
Loading