Skip to content

Commit

Permalink
Merge pull request #59 from lemois-1337/master
Browse files Browse the repository at this point in the history
Updated all imports to v2
  • Loading branch information
lemois-1337 authored Aug 29, 2024
2 parents f5072cb + 89d18fc commit 21b6f8d
Show file tree
Hide file tree
Showing 846 changed files with 2,490 additions and 2,490 deletions.
24 changes: 12 additions & 12 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ import (
"runtime"
"time"

"github.com/karlsen-network/karlsend/domain/consensus/utils/pow"
"github.com/karlsen-network/karlsend/infrastructure/config"
"github.com/karlsen-network/karlsend/infrastructure/db/database"
"github.com/karlsen-network/karlsend/infrastructure/db/database/ldb"
"github.com/karlsen-network/karlsend/infrastructure/logger"
"github.com/karlsen-network/karlsend/infrastructure/os/execenv"
"github.com/karlsen-network/karlsend/infrastructure/os/limits"
"github.com/karlsen-network/karlsend/infrastructure/os/signal"
"github.com/karlsen-network/karlsend/infrastructure/os/winservice"
"github.com/karlsen-network/karlsend/util/panics"
"github.com/karlsen-network/karlsend/util/profiling"
"github.com/karlsen-network/karlsend/version"
"github.com/karlsen-network/karlsend/v2/domain/consensus/utils/pow"
"github.com/karlsen-network/karlsend/v2/infrastructure/config"
"github.com/karlsen-network/karlsend/v2/infrastructure/db/database"
"github.com/karlsen-network/karlsend/v2/infrastructure/db/database/ldb"
"github.com/karlsen-network/karlsend/v2/infrastructure/logger"
"github.com/karlsen-network/karlsend/v2/infrastructure/os/execenv"
"github.com/karlsen-network/karlsend/v2/infrastructure/os/limits"
"github.com/karlsen-network/karlsend/v2/infrastructure/os/signal"
"github.com/karlsen-network/karlsend/v2/infrastructure/os/winservice"
"github.com/karlsen-network/karlsend/v2/util/panics"
"github.com/karlsen-network/karlsend/v2/util/profiling"
"github.com/karlsen-network/karlsend/v2/version"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/common_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package appmessage

import "github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
import "github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"

// mainnetGenesisHash is the hash of the first block in the block DAG for the
// main network (genesis block).
Expand Down
16 changes: 8 additions & 8 deletions app/appmessage/domainconverters.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import (

"github.com/pkg/errors"

"github.com/karlsen-network/karlsend/domain/consensus/utils/blockheader"
"github.com/karlsen-network/karlsend/domain/consensus/utils/hashes"
"github.com/karlsen-network/karlsend/domain/consensus/utils/utxo"

"github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/domain/consensus/utils/subnetworks"
"github.com/karlsen-network/karlsend/domain/consensus/utils/transactionid"
"github.com/karlsen-network/karlsend/util/mstime"
"github.com/karlsen-network/karlsend/v2/domain/consensus/utils/blockheader"
"github.com/karlsen-network/karlsend/v2/domain/consensus/utils/hashes"
"github.com/karlsen-network/karlsend/v2/domain/consensus/utils/utxo"

"github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/v2/domain/consensus/utils/subnetworks"
"github.com/karlsen-network/karlsend/v2/domain/consensus/utils/transactionid"
"github.com/karlsen-network/karlsend/v2/util/mstime"
)

// DomainBlockToMsgBlock converts an externalapi.DomainBlock to MsgBlock
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgblock.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package appmessage

import (
"github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"
)

// defaultTransactionAlloc is the default size used for the backing array
Expand Down
6 changes: 3 additions & 3 deletions app/appmessage/p2p_msgblock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (
"testing"

"github.com/davecgh/go-spew/spew"
"github.com/karlsen-network/karlsend/util/mstime"
"github.com/karlsen-network/karlsend/v2/util/mstime"

"github.com/karlsen-network/karlsend/domain/consensus/utils/subnetworks"
"github.com/karlsen-network/karlsend/v2/domain/consensus/utils/subnetworks"

"github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"
)

// TestBlock tests the MsgBlock API.
Expand Down
6 changes: 3 additions & 3 deletions app/appmessage/p2p_msgblockheader.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ package appmessage
import (
"math/big"

"github.com/karlsen-network/karlsend/domain/consensus/utils/consensushashing"
"github.com/karlsen-network/karlsend/v2/domain/consensus/utils/consensushashing"

"github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/util/mstime"
"github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/v2/util/mstime"
)

// BaseBlockHeaderPayload is the base number of bytes a block header can be,
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgblockheader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"

"github.com/davecgh/go-spew/spew"
"github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"
)

// TestBlockHeader tests the MsgBlockHeader API.
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgblocklocator.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package appmessage

import (
"github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"
)

// MaxBlockLocatorsPerMsg is the maximum number of block locator hashes allowed
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgblocklocator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package appmessage
import (
"testing"

"github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"

"github.com/davecgh/go-spew/spew"
)
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgblockwithtrusteddata.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package appmessage
import (
"math/big"

"github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"
)

// MsgBlockWithTrustedData represents a karlsen BlockWithTrustedData message
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgibdblocklocator.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package appmessage

import (
"github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"
)

// MsgIBDBlockLocator represents a karlsen ibdBlockLocator message
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgibdblocklocatorhighesthash.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package appmessage

import (
"github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"
)

// MsgIBDBlockLocatorHighestHash represents a karlsen BlockLocatorHighestHash message
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgibdchainblocklocator.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package appmessage

import (
"github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"
)

// MsgIBDChainBlockLocator implements the Message interface and represents a karlsen
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msginvrelayblock.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package appmessage

import (
"github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"
)

// MsgInvRelayBlock implements the Message interface and represents a karlsen
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msginvtransaction.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package appmessage

import (
"github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"
)

// MaxInvPerTxInvMsg is the maximum number of hashes that can
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgpruningpointutxosetchunk.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package appmessage

import "github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
import "github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"

// MsgPruningPointUTXOSetChunk represents a karlsen PruningPointUTXOSetChunk message
type MsgPruningPointUTXOSetChunk struct {
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgrequestaddresses.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package appmessage

import (
"github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"
)

// MsgRequestAddresses implements the Message interface and represents a karlsen
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgrequestanticone.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package appmessage

import (
"github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"
)

// MsgRequestAnticone implements the Message interface and represents a karlsen
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgrequestblocklocator.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package appmessage

import (
"github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"
)

// MsgRequestBlockLocator implements the Message interface and represents a karlsen
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgrequestblocklocator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package appmessage
import (
"testing"

"github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"
)

// TestRequestBlockLocator tests the MsgRequestBlockLocator API.
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgrequestheaders.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package appmessage

import (
"github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"
)

// MsgRequestHeaders implements the Message interface and represents a karlsen
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgrequestheaders_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package appmessage
import (
"testing"

"github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"
)

// TestRequstIBDBlocks tests the MsgRequestIBDBlocks API.
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgrequestibdblocks.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package appmessage

import (
"github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"
)

// MsgRequestIBDBlocks implements the Message interface and represents a karlsen
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgrequestibdchainblocklocator.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package appmessage

import (
"github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"
)

// MsgRequestIBDChainBlockLocator implements the Message interface and represents a karlsen
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package appmessage

import (
"github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"
)

// MsgRequestPruningPointUTXOSet represents a karlsen RequestPruningPointUTXOSet message
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgrequestrelayblocks.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package appmessage

import (
"github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"
)

// MaxRequestRelayBlocksHashes is the maximum number of hashes that can
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgrequesttransactions.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package appmessage

import (
"github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"
)

// MaxInvPerRequestTransactionsMsg is the maximum number of hashes that can
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgtransactionnotfound.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package appmessage

import (
"github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"
)

// MsgTransactionNotFound defines a karlsen TransactionNotFound message which is sent in response to
Expand Down
6 changes: 3 additions & 3 deletions app/appmessage/p2p_msgtx.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
"encoding/binary"
"strconv"

"github.com/karlsen-network/karlsend/domain/consensus/utils/consensushashing"
"github.com/karlsen-network/karlsend/v2/domain/consensus/utils/consensushashing"

"github.com/karlsen-network/karlsend/domain/consensus/utils/subnetworks"
"github.com/karlsen-network/karlsend/v2/domain/consensus/utils/subnetworks"

"github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"
)

const (
Expand Down
8 changes: 4 additions & 4 deletions app/appmessage/p2p_msgtx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import (
"reflect"
"testing"

"github.com/karlsen-network/karlsend/domain/consensus/utils/constants"
"github.com/karlsen-network/karlsend/v2/domain/consensus/utils/constants"

"github.com/karlsen-network/karlsend/domain/consensus/utils/subnetworks"
"github.com/karlsen-network/karlsend/domain/consensus/utils/transactionid"
"github.com/karlsen-network/karlsend/v2/domain/consensus/utils/subnetworks"
"github.com/karlsen-network/karlsend/v2/domain/consensus/utils/transactionid"

"github.com/davecgh/go-spew/spew"
"github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"
)

// TestTx tests the MsgTx API.
Expand Down
8 changes: 4 additions & 4 deletions app/appmessage/p2p_msgversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
"fmt"
"strings"

"github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/version"
"github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"
"github.com/karlsen-network/karlsend/v2/version"

"github.com/karlsen-network/karlsend/infrastructure/network/netadapter/id"
"github.com/karlsen-network/karlsend/util/mstime"
"github.com/karlsen-network/karlsend/v2/infrastructure/network/netadapter/id"
"github.com/karlsen-network/karlsend/v2/util/mstime"
)

// MaxUserAgentLen is the maximum allowed length for the user agent field in a
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_msgversion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"

"github.com/davecgh/go-spew/spew"
"github.com/karlsen-network/karlsend/infrastructure/network/netadapter/id"
"github.com/karlsen-network/karlsend/v2/infrastructure/network/netadapter/id"
)

// TestVersion tests the MsgVersion API.
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/p2p_netaddress.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package appmessage
import (
"net"

"github.com/karlsen-network/karlsend/util/mstime"
"github.com/karlsen-network/karlsend/v2/util/mstime"
)

// NetAddress defines information about a peer on the network including the time
Expand Down
2 changes: 1 addition & 1 deletion app/appmessage/rpc_get_block_count.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package appmessage

import "github.com/karlsen-network/karlsend/domain/consensus/model/externalapi"
import "github.com/karlsen-network/karlsend/v2/domain/consensus/model/externalapi"

// GetBlockCountRequestMessage is an appmessage corresponding to
// its respective RPC message
Expand Down
Loading

0 comments on commit 21b6f8d

Please sign in to comment.