aboutsummaryrefslogtreecommitdiffstats
path: root/dex
diff options
context:
space:
mode:
authorWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:31:08 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-09-17 16:57:29 +0800
commitac088de6322fc16ebe75c2e5554be73754bf1fe2 (patch)
tree086b7827d46a4d07b834cd94be73beaabb77b734 /dex
parent67d565f3f0e398e99bef96827f729e3e4b0edf31 (diff)
downloadgo-tangerine-ac088de6322fc16ebe75c2e5554be73754bf1fe2.tar
go-tangerine-ac088de6322fc16ebe75c2e5554be73754bf1fe2.tar.gz
go-tangerine-ac088de6322fc16ebe75c2e5554be73754bf1fe2.tar.bz2
go-tangerine-ac088de6322fc16ebe75c2e5554be73754bf1fe2.tar.lz
go-tangerine-ac088de6322fc16ebe75c2e5554be73754bf1fe2.tar.xz
go-tangerine-ac088de6322fc16ebe75c2e5554be73754bf1fe2.tar.zst
go-tangerine-ac088de6322fc16ebe75c2e5554be73754bf1fe2.zip
Rebrand as tangerine-network/go-tangerine
Diffstat (limited to 'dex')
-rw-r--r--dex/api.go34
-rw-r--r--dex/api_backend.go32
-rw-r--r--dex/api_tracer.go26
-rw-r--r--dex/app.go20
-rw-r--r--dex/app_test.go38
-rw-r--r--dex/backend.go80
-rw-r--r--dex/blockproposer.go22
-rw-r--r--dex/bloombits.go16
-rw-r--r--dex/cache.go6
-rw-r--r--dex/cache_test.go6
-rw-r--r--dex/config.go14
-rw-r--r--dex/db/db.go16
-rw-r--r--dex/downloader/api.go6
-rw-r--r--dex/downloader/downloader.go44
-rw-r--r--dex/downloader/downloader_test.go36
-rw-r--r--dex/downloader/fakepeer.go10
-rw-r--r--dex/downloader/governance.go16
-rw-r--r--dex/downloader/metrics.go2
-rw-r--r--dex/downloader/peer.go6
-rw-r--r--dex/downloader/queue.go10
-rw-r--r--dex/downloader/statesync.go12
-rw-r--r--dex/downloader/testchain_test.go28
-rw-r--r--dex/downloader/types.go2
-rw-r--r--dex/fetcher/fetcher.go10
-rw-r--r--dex/fetcher/fetcher_test.go14
-rw-r--r--dex/fetcher/metrics.go2
-rw-r--r--dex/governance.go20
-rw-r--r--dex/handler.go48
-rw-r--r--dex/handler_test.go18
-rw-r--r--dex/helper_test.go24
-rw-r--r--dex/metrics.go4
-rw-r--r--dex/network.go8
-rw-r--r--dex/peer.go22
-rw-r--r--dex/peer_test.go4
-rw-r--r--dex/protocol.go12
-rw-r--r--dex/protocol_test.go26
-rw-r--r--dex/recovery.go14
-rw-r--r--dex/recovery_test.go6
-rw-r--r--dex/sync.go10
39 files changed, 362 insertions, 362 deletions
diff --git a/dex/api.go b/dex/api.go
index 991926740..1209e6583 100644
--- a/dex/api.go
+++ b/dex/api.go
@@ -25,28 +25,28 @@ import (
"os"
"strings"
- "github.com/dexon-foundation/dexon/common"
- "github.com/dexon-foundation/dexon/common/hexutil"
- "github.com/dexon-foundation/dexon/core"
- "github.com/dexon-foundation/dexon/core/rawdb"
- "github.com/dexon-foundation/dexon/core/state"
- "github.com/dexon-foundation/dexon/core/types"
- "github.com/dexon-foundation/dexon/internal/ethapi"
- "github.com/dexon-foundation/dexon/params"
- "github.com/dexon-foundation/dexon/rlp"
- "github.com/dexon-foundation/dexon/rpc"
- "github.com/dexon-foundation/dexon/trie"
+ "github.com/tangerine-network/go-tangerine/common"
+ "github.com/tangerine-network/go-tangerine/common/hexutil"
+ "github.com/tangerine-network/go-tangerine/core"
+ "github.com/tangerine-network/go-tangerine/core/rawdb"
+ "github.com/tangerine-network/go-tangerine/core/state"
+ "github.com/tangerine-network/go-tangerine/core/types"
+ "github.com/tangerine-network/go-tangerine/internal/ethapi"
+ "github.com/tangerine-network/go-tangerine/params"
+ "github.com/tangerine-network/go-tangerine/rlp"
+ "github.com/tangerine-network/go-tangerine/rpc"
+ "github.com/tangerine-network/go-tangerine/trie"
)
// PrivateAdminAPI is the collection of Ethereum full node-related APIs
// exposed over the private admin endpoint.
type PrivateAdminAPI struct {
- dex *Dexon
+ dex *Tangerine
}
// NewPrivateAdminAPI creates a new API definition for the full node private
// admin methods of the Ethereum service.
-func NewPrivateAdminAPI(dex *Dexon) *PrivateAdminAPI {
+func NewPrivateAdminAPI(dex *Tangerine) *PrivateAdminAPI {
return &PrivateAdminAPI{dex: dex}
}
@@ -146,12 +146,12 @@ func (api *PrivateAdminAPI) NotaryInfo() (*NotaryInfo, error) {
// PublicDebugAPI is the collection of Ethereum full node APIs exposed
// over the public debugging endpoint.
type PublicDebugAPI struct {
- dex *Dexon
+ dex *Tangerine
}
// NewPublicDebugAPI creates a new API definition for the full node-
// related public debug methods of the Ethereum service.
-func NewPublicDebugAPI(dex *Dexon) *PublicDebugAPI {
+func NewPublicDebugAPI(dex *Tangerine) *PublicDebugAPI {
return &PublicDebugAPI{dex: dex}
}
@@ -177,12 +177,12 @@ func (api *PublicDebugAPI) DumpBlock(blockNr rpc.BlockNumber) (state.Dump, error
// the private debugging endpoint.
type PrivateDebugAPI struct {
config *params.ChainConfig
- dex *Dexon
+ dex *Tangerine
}
// NewPrivateDebugAPI creates a new API definition for the full node-related
// private debug methods of the Ethereum service.
-func NewPrivateDebugAPI(config *params.ChainConfig, dex *Dexon) *PrivateDebugAPI {
+func NewPrivateDebugAPI(config *params.ChainConfig, dex *Tangerine) *PrivateDebugAPI {
return &PrivateDebugAPI{config: config, dex: dex}
}
diff --git a/dex/api_backend.go b/dex/api_backend.go
index 7333a9bb1..39c34550b 100644
--- a/dex/api_backend.go
+++ b/dex/api_backend.go
@@ -20,26 +20,26 @@ import (
"context"
"math/big"
- "github.com/dexon-foundation/dexon/accounts"
- "github.com/dexon-foundation/dexon/common"
- "github.com/dexon-foundation/dexon/common/math"
- "github.com/dexon-foundation/dexon/core"
- "github.com/dexon-foundation/dexon/core/bloombits"
- "github.com/dexon-foundation/dexon/core/state"
- "github.com/dexon-foundation/dexon/core/types"
- "github.com/dexon-foundation/dexon/core/vm"
- "github.com/dexon-foundation/dexon/eth/gasprice"
- "github.com/dexon-foundation/dexon/internal/ethapi"
-
- "github.com/dexon-foundation/dexon/ethdb"
- "github.com/dexon-foundation/dexon/event"
- "github.com/dexon-foundation/dexon/params"
- "github.com/dexon-foundation/dexon/rpc"
+ "github.com/tangerine-network/go-tangerine/accounts"
+ "github.com/tangerine-network/go-tangerine/common"
+ "github.com/tangerine-network/go-tangerine/common/math"
+ "github.com/tangerine-network/go-tangerine/core"
+ "github.com/tangerine-network/go-tangerine/core/bloombits"
+ "github.com/tangerine-network/go-tangerine/core/state"
+ "github.com/tangerine-network/go-tangerine/core/types"
+ "github.com/tangerine-network/go-tangerine/core/vm"
+ "github.com/tangerine-network/go-tangerine/eth/gasprice"
+ "github.com/tangerine-network/go-tangerine/internal/ethapi"
+
+ "github.com/tangerine-network/go-tangerine/ethdb"
+ "github.com/tangerine-network/go-tangerine/event"
+ "github.com/tangerine-network/go-tangerine/params"
+ "github.com/tangerine-network/go-tangerine/rpc"
)
// DexAPIBackend implements ethapi.Backend for full nodes
type DexAPIBackend struct {
- dex *Dexon
+ dex *Tangerine
gpo *gasprice.Oracle
}
diff --git a/dex/api_tracer.go b/dex/api_tracer.go
index d451c376d..ccd77a30e 100644
--- a/dex/api_tracer.go
+++ b/dex/api_tracer.go
@@ -28,19 +28,19 @@ import (
"sync"
"time"
- "github.com/dexon-foundation/dexon/common"
- "github.com/dexon-foundation/dexon/common/hexutil"
- "github.com/dexon-foundation/dexon/core"
- "github.com/dexon-foundation/dexon/core/rawdb"
- "github.com/dexon-foundation/dexon/core/state"
- "github.com/dexon-foundation/dexon/core/types"
- "github.com/dexon-foundation/dexon/core/vm"
- "github.com/dexon-foundation/dexon/eth/tracers"
- "github.com/dexon-foundation/dexon/internal/ethapi"
- "github.com/dexon-foundation/dexon/log"
- "github.com/dexon-foundation/dexon/rlp"
- "github.com/dexon-foundation/dexon/rpc"
- "github.com/dexon-foundation/dexon/trie"
+ "github.com/tangerine-network/go-tangerine/common"
+ "github.com/tangerine-network/go-tangerine/common/hexutil"
+ "github.com/tangerine-network/go-tangerine/core"
+ "github.com/tangerine-network/go-tangerine/core/rawdb"
+ "github.com/tangerine-network/go-tangerine/core/state"
+ "github.com/tangerine-network/go-tangerine/core/types"
+ "github.com/tangerine-network/go-tangerine/core/vm"
+ "github.com/tangerine-network/go-tangerine/eth/tracers"
+ "github.com/tangerine-network/go-tangerine/internal/ethapi"
+ "github.com/tangerine-network/go-tangerine/log"
+ "github.com/tangerine-network/go-tangerine/rlp"
+ "github.com/tangerine-network/go-tangerine/rpc"
+ "github.com/tangerine-network/go-tangerine/trie"
)
const (
diff --git a/dex/app.go b/dex/app.go
index 5a268a09d..8fbc53f82 100644
--- a/dex/app.go
+++ b/dex/app.go
@@ -25,16 +25,16 @@ import (
"sync"
"time"
- coreCommon "github.com/dexon-foundation/dexon-consensus/common"
- coreTypes "github.com/dexon-foundation/dexon-consensus/core/types"
-
- "github.com/dexon-foundation/dexon/common"
- "github.com/dexon-foundation/dexon/core"
- "github.com/dexon-foundation/dexon/core/types"
- "github.com/dexon-foundation/dexon/ethdb"
- "github.com/dexon-foundation/dexon/event"
- "github.com/dexon-foundation/dexon/log"
- "github.com/dexon-foundation/dexon/rlp"
+ coreCommon "github.com/byzantine-lab/dexon-consensus/common"
+ coreTypes "github.com/byzantine-lab/dexon-consensus/core/types"
+
+ "github.com/tangerine-network/go-tangerine/common"
+ "github.com/tangerine-network/go-tangerine/core"
+ "github.com/tangerine-network/go-tangerine/core/types"
+ "github.com/tangerine-network/go-tangerine/ethdb"
+ "github.com/tangerine-network/go-tangerine/event"
+ "github.com/tangerine-network/go-tangerine/log"
+ "github.com/tangerine-network/go-tangerine/rlp"
)
// DexconApp implements the DEXON consensus core application interface.
diff --git a/dex/app_test.go b/dex/app_test.go
index bfc188f36..0a25f61f3 100644
--- a/dex/app_test.go
+++ b/dex/app_test.go
@@ -10,21 +10,21 @@ import (
"testing"
"time"
- coreCommon "github.com/dexon-foundation/dexon-consensus/common"
- coreCrypto "github.com/dexon-foundation/dexon-consensus/core/crypto"
- coreEcdsa "github.com/dexon-foundation/dexon-consensus/core/crypto/ecdsa"
- coreTypes "github.com/dexon-foundation/dexon-consensus/core/types"
- "github.com/dexon-foundation/dexon/common"
- "github.com/dexon-foundation/dexon/common/math"
- "github.com/dexon-foundation/dexon/consensus/dexcon"
- "github.com/dexon-foundation/dexon/core"
- "github.com/dexon-foundation/dexon/core/rawdb"
- "github.com/dexon-foundation/dexon/core/types"
- "github.com/dexon-foundation/dexon/core/vm"
- "github.com/dexon-foundation/dexon/crypto"
- "github.com/dexon-foundation/dexon/ethdb"
- "github.com/dexon-foundation/dexon/event"
- "github.com/dexon-foundation/dexon/rlp"
+ coreCommon "github.com/byzantine-lab/dexon-consensus/common"
+ coreCrypto "github.com/byzantine-lab/dexon-consensus/core/crypto"
+ coreEcdsa "github.com/byzantine-lab/dexon-consensus/core/crypto/ecdsa"
+ coreTypes "github.com/byzantine-lab/dexon-consensus/core/types"
+ "github.com/tangerine-network/go-tangerine/common"
+ "github.com/tangerine-network/go-tangerine/common/math"
+ "github.com/tangerine-network/go-tangerine/consensus/dexcon"
+ "github.com/tangerine-network/go-tangerine/core"
+ "github.com/tangerine-network/go-tangerine/core/rawdb"
+ "github.com/tangerine-network/go-tangerine/core/types"
+ "github.com/tangerine-network/go-tangerine/core/vm"
+ "github.com/tangerine-network/go-tangerine/crypto"
+ "github.com/tangerine-network/go-tangerine/ethdb"
+ "github.com/tangerine-network/go-tangerine/event"
+ "github.com/tangerine-network/go-tangerine/rlp"
)
type singnal int
@@ -2213,13 +2213,13 @@ func (f TxFactory) New(app App, center *ProductCenter, stopTimeMu *sync.RWMutex,
return &f
}
-func TestDexonApp(t *testing.T) {
+func TestTangerineApp(t *testing.T) {
masterKey, err := crypto.GenerateKey()
if err != nil {
t.Fatalf("Generate key fail: %v", err)
}
- dex, keys, err := newDexon(masterKey, 15)
+ dex, keys, err := newTangerine(masterKey, 15)
if err != nil {
t.Fatalf("New dexon fail: %v", err)
}
@@ -2292,7 +2292,7 @@ func TestDexonApp(t *testing.T) {
}
}
-func newDexon(masterKey *ecdsa.PrivateKey, accountNum int) (*Dexon, []*ecdsa.PrivateKey, error) {
+func newTangerine(masterKey *ecdsa.PrivateKey, accountNum int) (*Tangerine, []*ecdsa.PrivateKey, error) {
db := ethdb.NewMemDatabase()
genesis := core.DefaultTestnetGenesisBlock()
@@ -2330,7 +2330,7 @@ func newDexon(masterKey *ecdsa.PrivateKey, accountNum int) (*Dexon, []*ecdsa.Pri
engine := dexcon.New()
- dex := &Dexon{
+ dex := &Tangerine{
chainDb: db,
chainConfig: chainConfig,
networkID: config.NetworkId,
diff --git a/dex/backend.go b/dex/backend.go
index 26a0b49eb..68783864c 100644
--- a/dex/backend.go
+++ b/dex/backend.go
@@ -21,30 +21,30 @@ import (
"fmt"
"time"
- "github.com/dexon-foundation/dexon-consensus/core/syncer"
- "github.com/dexon-foundation/dexon/accounts"
- "github.com/dexon-foundation/dexon/consensus"
- "github.com/dexon-foundation/dexon/consensus/dexcon"
- "github.com/dexon-foundation/dexon/core"
- "github.com/dexon-foundation/dexon/core/bloombits"
- "github.com/dexon-foundation/dexon/core/rawdb"
- "github.com/dexon-foundation/dexon/core/vm"
- "github.com/dexon-foundation/dexon/dex/downloader"
- "github.com/dexon-foundation/dexon/eth/filters"
- "github.com/dexon-foundation/dexon/eth/gasprice"
- "github.com/dexon-foundation/dexon/ethdb"
- "github.com/dexon-foundation/dexon/event"
- "github.com/dexon-foundation/dexon/indexer"
- "github.com/dexon-foundation/dexon/internal/ethapi"
- "github.com/dexon-foundation/dexon/log"
- "github.com/dexon-foundation/dexon/node"
- "github.com/dexon-foundation/dexon/p2p"
- "github.com/dexon-foundation/dexon/params"
- "github.com/dexon-foundation/dexon/rpc"
+ "github.com/byzantine-lab/dexon-consensus/core/syncer"
+ "github.com/tangerine-network/go-tangerine/accounts"
+ "github.com/tangerine-network/go-tangerine/consensus"
+ "github.com/tangerine-network/go-tangerine/consensus/dexcon"
+ "github.com/tangerine-network/go-tangerine/core"
+ "github.com/tangerine-network/go-tangerine/core/bloombits"
+ "github.com/tangerine-network/go-tangerine/core/rawdb"
+ "github.com/tangerine-network/go-tangerine/core/vm"
+ "github.com/tangerine-network/go-tangerine/dex/downloader"
+ "github.com/tangerine-network/go-tangerine/eth/filters"
+ "github.com/tangerine-network/go-tangerine/eth/gasprice"
+ "github.com/tangerine-network/go-tangerine/ethdb"
+ "github.com/tangerine-network/go-tangerine/event"
+ "github.com/tangerine-network/go-tangerine/indexer"
+ "github.com/tangerine-network/go-tangerine/internal/ethapi"
+ "github.com/tangerine-network/go-tangerine/log"
+ "github.com/tangerine-network/go-tangerine/node"
+ "github.com/tangerine-network/go-tangerine/p2p"
+ "github.com/tangerine-network/go-tangerine/params"
+ "github.com/tangerine-network/go-tangerine/rpc"
)
-// Dexon implements the DEXON fullnode service.
-type Dexon struct {
+// Tangerine implements the DEXON fullnode service.
+type Tangerine struct {
config *Config
chainConfig *params.ChainConfig
@@ -68,7 +68,7 @@ type Dexon struct {
APIBackend *DexAPIBackend
- // Dexon consensus.
+ // Tangerine consensus.
app *DexconApp
governance *DexconGovernance
network *DexconNetwork
@@ -81,7 +81,7 @@ type Dexon struct {
indexer indexer.Indexer
}
-func New(ctx *node.ServiceContext, config *Config) (*Dexon, error) {
+func New(ctx *node.ServiceContext, config *Config) (*Tangerine, error) {
// Consensus.
chainDb, err := CreateDB(ctx, config, "chaindata")
if err != nil {
@@ -104,7 +104,7 @@ func New(ctx *node.ServiceContext, config *Config) (*Dexon, error) {
}
engine := dexcon.New()
- dex := &Dexon{
+ dex := &Tangerine{
config: config,
chainDb: chainDb,
chainConfig: chainConfig,
@@ -190,11 +190,11 @@ func New(ctx *node.ServiceContext, config *Config) (*Dexon, error) {
return dex, nil
}
-func (s *Dexon) Protocols() []p2p.Protocol {
+func (s *Tangerine) Protocols() []p2p.Protocol {
return s.protocolManager.SubProtocols
}
-func (s *Dexon) APIs() []rpc.API {
+func (s *Tangerine) APIs() []rpc.API {
apis := ethapi.GetAPIs(s.APIBackend)
// Append any APIs exposed explicitly by the consensus engine
@@ -234,7 +234,7 @@ func (s *Dexon) APIs() []rpc.API {
}...)
}
-func (s *Dexon) Start(srvr *p2p.Server) error {
+func (s *Tangerine) Start(srvr *p2p.Server) error {
// Start the bloom bits servicing goroutines
s.startBloomHandlers(params.BloomBitsBlocks)
@@ -271,7 +271,7 @@ func (s *Dexon) Start(srvr *p2p.Server) error {
return nil
}
-func (s *Dexon) Stop() error {
+func (s *Tangerine) Stop() error {
s.bloomIndexer.Close()
s.blockchain.Stop()
s.engine.Close()
@@ -288,11 +288,11 @@ func (s *Dexon) Stop() error {
return nil
}
-func (s *Dexon) IsCoreSyncing() bool {
+func (s *Tangerine) IsCoreSyncing() bool {
return s.bp.IsCoreSyncing()
}
-func (s *Dexon) IsProposing() bool {
+func (s *Tangerine) IsProposing() bool {
return s.bp.IsProposing()
}
@@ -308,12 +308,12 @@ func CreateDB(ctx *node.ServiceContext, config *Config, name string) (ethdb.Data
return db, nil
}
-func (d *Dexon) AccountManager() *accounts.Manager { return d.accountManager }
-func (d *Dexon) BlockChain() *core.BlockChain { return d.blockchain }
-func (d *Dexon) TxPool() *core.TxPool { return d.txPool }
-func (d *Dexon) DexVersion() int { return int(d.protocolManager.SubProtocols[0].Version) }
-func (d *Dexon) EventMux() *event.TypeMux { return d.eventMux }
-func (d *Dexon) Engine() consensus.Engine { return d.engine }
-func (d *Dexon) ChainDb() ethdb.Database { return d.chainDb }
-func (d *Dexon) Downloader() ethapi.Downloader { return d.protocolManager.downloader }
-func (d *Dexon) NetVersion() uint64 { return d.networkID }
+func (d *Tangerine) AccountManager() *accounts.Manager { return d.accountManager }
+func (d *Tangerine) BlockChain() *core.BlockChain { return d.blockchain }
+func (d *Tangerine) TxPool() *core.TxPool { return d.txPool }
+func (d *Tangerine) DexVersion() int { return int(d.protocolManager.SubProtocols[0].Version) }
+func (d *Tangerine) EventMux() *event.TypeMux { return d.eventMux }
+func (d *Tangerine) Engine() consensus.Engine { return d.engine }
+func (d *Tangerine) ChainDb() ethdb.Database { return d.chainDb }
+func (d *Tangerine) Downloader() ethapi.Downloader { return d.protocolManager.downloader }
+func (d *Tangerine) NetVersion() uint64 { return d.networkID }
diff --git a/dex/blockproposer.go b/dex/blockproposer.go
index d675da4ac..f280d409e 100644
--- a/dex/blockproposer.go
+++ b/dex/blockproposer.go
@@ -7,15 +7,15 @@ import (
"sync/atomic"
"time"
- dexCore "github.com/dexon-foundation/dexon-consensus/core"
- coreEcdsa "github.com/dexon-foundation/dexon-consensus/core/crypto/ecdsa"
- "github.com/dexon-foundation/dexon-consensus/core/syncer"
- coreTypes "github.com/dexon-foundation/dexon-consensus/core/types"
-
- "github.com/dexon-foundation/dexon/core"
- "github.com/dexon-foundation/dexon/dex/db"
- "github.com/dexon-foundation/dexon/log"
- "github.com/dexon-foundation/dexon/rlp"
+ dexCore "github.com/byzantine-lab/dexon-consensus/core"
+ coreEcdsa "github.com/byzantine-lab/dexon-consensus/core/crypto/ecdsa"
+ "github.com/byzantine-lab/dexon-consensus/core/syncer"
+ coreTypes "github.com/byzantine-lab/dexon-consensus/core/types"
+
+ "github.com/tangerine-network/go-tangerine/core"
+ "github.com/tangerine-network/go-tangerine/dex/db"
+ "github.com/tangerine-network/go-tangerine/log"
+ "github.com/tangerine-network/go-tangerine/rlp"
)
var (
@@ -27,7 +27,7 @@ type blockProposer struct {
running int32
syncing int32
proposing int32
- dex *Dexon
+ dex *Tangerine
watchCat *syncer.WatchCat
dMoment time.Time
@@ -35,7 +35,7 @@ type blockProposer struct {
stopCh chan struct{}
}
-func NewBlockProposer(dex *Dexon, watchCat *syncer.WatchCat, dMoment time.Time) *blockProposer {
+func NewBlockProposer(dex *Tangerine, watchCat *syncer.WatchCat, dMoment time.Time) *blockProposer {
return &blockProposer{
dex: dex,
watchCat: watchCat,
diff --git a/dex/bloombits.go b/dex/bloombits.go
index 827cae5f4..1f9bea0cb 100644
--- a/dex/bloombits.go
+++ b/dex/bloombits.go
@@ -20,13 +20,13 @@ import (
"context"
"time"
- "github.com/dexon-foundation/dexon/common"
- "github.com/dexon-foundation/dexon/common/bitutil"
- "github.com/dexon-foundation/dexon/core"
- "github.com/dexon-foundation/dexon/core/bloombits"
- "github.com/dexon-foundation/dexon/core/rawdb"
- "github.com/dexon-foundation/dexon/core/types"
- "github.com/dexon-foundation/dexon/ethdb"
+ "github.com/tangerine-network/go-tangerine/common"
+ "github.com/tangerine-network/go-tangerine/common/bitutil"
+ "github.com/tangerine-network/go-tangerine/core"
+ "github.com/tangerine-network/go-tangerine/core/bloombits"
+ "github.com/tangerine-network/go-tangerine/core/rawdb"
+ "github.com/tangerine-network/go-tangerine/core/types"
+ "github.com/tangerine-network/go-tangerine/ethdb"
)
const (
@@ -49,7 +49,7 @@ const (
// startBloomHandlers starts a batch of goroutines to accept bloom bit database
// retrievals from possibly a range of filters and serving the data to satisfy.
-func (dex *Dexon) startBloomHandlers(sectionSize uint64) {
+func (dex *Tangerine) startBloomHandlers(sectionSize uint64) {
for i := 0; i < bloomServiceThreads; i++ {
go func() {
for {
diff --git a/dex/cache.go b/dex/cache.go
index dbd4b7b5d..a8d246eec 100644
--- a/dex/cache.go
+++ b/dex/cache.go
@@ -20,9 +20,9 @@ package dex
import (
"sync"
- coreCommon "github.com/dexon-foundation/dexon-consensus/common"
- coreDb "github.com/dexon-foundation/dexon-consensus/core/db"
- coreTypes "github.com/dexon-foundation/dexon-consensus/core/types"
+ coreCommon "github.com/byzantine-lab/dexon-consensus/common"
+ coreDb "github.com/byzantine-lab/dexon-consensus/core/db"
+ coreTypes "github.com/byzantine-lab/dexon-consensus/core/types"
)
type voteKey struct {
diff --git a/dex/cache_test.go b/dex/cache_test.go
index 04bca06ef..64801db2d 100644
--- a/dex/cache_test.go
+++ b/dex/cache_test.go
@@ -24,9 +24,9 @@ import (
"strings"
"testing"
- coreCommon "github.com/dexon-foundation/dexon-consensus/common"
- coreDb "github.com/dexon-foundation/dexon-consensus/core/db"
- coreTypes "github.com/dexon-foundation/dexon-consensus/core/types"
+ coreCommon "github.com/byzantine-lab/dexon-consensus/common"
+ coreDb "github.com/byzantine-lab/dexon-consensus/core/db"
+ coreTypes "github.com/byzantine-lab/dexon-consensus/core/types"
)
type byHash []*coreTypes.Vote
diff --git a/dex/config.go b/dex/config.go
index ac3e89969..1c1b588d3 100644
--- a/dex/config.go
+++ b/dex/config.go
@@ -25,12 +25,12 @@ import (
"runtime"
"time"
- "github.com/dexon-foundation/dexon/common"
- "github.com/dexon-foundation/dexon/core"
- "github.com/dexon-foundation/dexon/dex/downloader"
- "github.com/dexon-foundation/dexon/eth/gasprice"
- "github.com/dexon-foundation/dexon/indexer"
- "github.com/dexon-foundation/dexon/params"
+ "github.com/tangerine-network/go-tangerine/common"
+ "github.com/tangerine-network/go-tangerine/core"
+ "github.com/tangerine-network/go-tangerine/dex/downloader"
+ "github.com/tangerine-network/go-tangerine/eth/gasprice"
+ "github.com/tangerine-network/go-tangerine/indexer"
+ "github.com/tangerine-network/go-tangerine/params"
)
// DefaultConfig contains default settings for use on the Ethereum main net.
@@ -125,7 +125,7 @@ type Config struct {
// RPCGasCap is the global gas cap for eth-call variants.
RPCGasCap *big.Int `toml:",omitempty"`
- // Dexon options
+ // Tangerine options
DMoment int64
// Indexer config
diff --git a/dex/db/db.go b/dex/db/db.go
index 5cb809055..c6479cd8c 100644
--- a/dex/db/db.go
+++ b/dex/db/db.go
@@ -18,14 +18,14 @@
package db
import (
- coreCommon "github.com/dexon-foundation/dexon-consensus/common"
- coreDKG "github.com/dexon-foundation/dexon-consensus/core/crypto/dkg"
- coreDb "github.com/dexon-foundation/dexon-consensus/core/db"
- coreTypes "github.com/dexon-foundation/dexon-consensus/core/types"
-
- "github.com/dexon-foundation/dexon/common"
- "github.com/dexon-foundation/dexon/core/rawdb"
- "github.com/dexon-foundation/dexon/ethdb"
+ coreCommon "github.com/byzantine-lab/dexon-consensus/common"
+ coreDKG "github.com/byzantine-lab/dexon-consensus/core/crypto/dkg"
+ coreDb "github.com/byzantine-lab/dexon-consensus/core/db"
+ coreTypes "github.com/byzantine-lab/dexon-consensus/core/types"
+
+ "github.com/tangerine-network/go-tangerine/common"
+ "github.com/tangerine-network/go-tangerine/core/rawdb"
+ "github.com/tangerine-network/go-tangerine/ethdb"
)
// DB implement dexon-consensus BlockDatabase interface.
diff --git a/dex/downloader/api.go b/dex/downloader/api.go
index 721818e75..806a3e65e 100644
--- a/dex/downloader/api.go
+++ b/dex/downloader/api.go
@@ -20,9 +20,9 @@ import (
"context"
"sync"
- ethereum "github.com/dexon-foundation/dexon"
- "github.com/dexon-foundation/dexon/event"
- "github.com/dexon-foundation/dexon/rpc"
+ ethereum "github.com/tangerine-network/go-tangerine"
+ "github.com/tangerine-network/go-tangerine/event"
+ "github.com/tangerine-network/go-tangerine/rpc"
)
// PublicDownloaderAPI provides an API which gives information about the current synchronisation status.
diff --git a/dex/downloader/downloader.go b/dex/downloader/downloader.go
index 0847cd062..71f68ff83 100644
--- a/dex/downloader/downloader.go
+++ b/dex/downloader/downloader.go
@@ -23,22 +23,22 @@ import (
"sync/atomic"
"time"
- dexCore "github.com/dexon-foundation/dexon-consensus/core"
-
- ethereum "github.com/dexon-foundation/dexon"
- "github.com/dexon-foundation/dexon/common"
- "github.com/dexon-foundation/dexon/consensus/dexcon"
- "github.com/dexon-foundation/dexon/core/rawdb"
- "github.com/dexon-foundation/dexon/core/state"
- "github.com/dexon-foundation/dexon/core/types"
- "github.com/dexon-foundation/dexon/core/vm"
- "github.com/dexon-foundation/dexon/crypto"
- "github.com/dexon-foundation/dexon/ethdb"
- "github.com/dexon-foundation/dexon/event"
- "github.com/dexon-foundation/dexon/log"
- "github.com/dexon-foundation/dexon/metrics"
- "github.com/dexon-foundation/dexon/params"
- "github.com/dexon-foundation/dexon/trie"
+ dexCore "github.com/byzantine-lab/dexon-consensus/core"
+
+ ethereum "github.com/tangerine-network/go-tangerine"
+ "github.com/tangerine-network/go-tangerine/common"
+ "github.com/tangerine-network/go-tangerine/consensus/dexcon"
+ "github.com/tangerine-network/go-tangerine/core/rawdb"
+ "github.com/tangerine-network/go-tangerine/core/state"
+ "github.com/tangerine-network/go-tangerine/core/types"
+ "github.com/tangerine-network/go-tangerine/core/vm"
+ "github.com/tangerine-network/go-tangerine/crypto"
+ "github.com/tangerine-network/go-tangerine/ethdb"
+ "github.com/tangerine-network/go-tangerine/event"
+ "github.com/tangerine-network/go-tangerine/log"
+ "github.com/tangerine-network/go-tangerine/metrics"
+ "github.com/tangerine-network/go-tangerine/params"
+ "github.com/tangerine-network/go-tangerine/trie"
)
var (
@@ -178,8 +178,8 @@ type LightChain interface {
GetGovStateByNumber(number uint64) (*types.GovState, error)
- // InsertDexonHeaderChain inserts a batch of headers into the local chain.
- InsertDexonHeaderChain([]*types.HeaderWithGovState,
+ // InsertTangerineHeaderChain inserts a batch of headers into the local chain.
+ InsertTangerineHeaderChain([]*types.HeaderWithGovState,
dexcon.GovernanceStateFetcher, *dexCore.TSigVerifierCache) (int, error)
// Rollback removes a few recently added elements from the local chain.
@@ -208,8 +208,8 @@ type BlockChain interface {
// FastSyncCommitHead directly commits the head block to a certain entity.
FastSyncCommitHead(common.Hash) error
- // InsertDexonChain inserts a batch of blocks into the local chain.
- InsertDexonChain(types.Blocks) (int, error)
+ // InsertTangerineChain inserts a batch of blocks into the local chain.
+ InsertTangerineChain(types.Blocks) (int, error)
// InsertReceiptChain inserts a batch of receipts into the local chain.
InsertReceiptChain(types.Blocks, []types.Receipts) (int, error)
@@ -1503,7 +1503,7 @@ func (d *Downloader) processHeaders(origin uint64, pivot uint64, number uint64)
}
}
- if n, err := d.lightchain.InsertDexonHeaderChain(chunk, d.gov, d.verifierCache); err != nil {
+ if n, err := d.lightchain.InsertTangerineHeaderChain(chunk, d.gov, d.verifierCache); err != nil {
// If some headers were inserted, add them too to the rollback list
if n > 0 {
for _, h := range chunk[:n] {
@@ -1595,7 +1595,7 @@ func (d *Downloader) importBlockResults(results []*fetchResult) error {
for i, result := range results {
blocks[i] = types.NewBlockWithHeader(result.Header).WithBody(result.Transactions, result.Uncles)
}
- if index, err := d.blockchain.InsertDexonChain(blocks); err != nil {
+ if index, err := d.blockchain.InsertTangerineChain(blocks); err != nil {
if index < len(results) {
log.Debug("Downloaded item processing failed", "number", results[index].Header.Number, "hash", results[index].Header.Hash(), "err", err)
} else {
diff --git a/dex/downloader/downloader_test.go b/dex/downloader/downloader_test.go
index e01e0d96b..6d3718d44 100644
--- a/dex/downloader/downloader_test.go
+++ b/dex/downloader/downloader_test.go
@@ -25,19 +25,19 @@ import (
"testing"
"time"
- ethereum "github.com/dexon-foundation/dexon"
- dexCore "github.com/dexon-foundation/dexon-consensus/core"
- coreTypes "github.com/dexon-foundation/dexon-consensus/core/types"
-
- "github.com/dexon-foundation/dexon/common"
- "github.com/dexon-foundation/dexon/consensus/dexcon"
- "github.com/dexon-foundation/dexon/core/state"
- "github.com/dexon-foundation/dexon/core/types"
- "github.com/dexon-foundation/dexon/core/vm"
- "github.com/dexon-foundation/dexon/ethdb"
- "github.com/dexon-foundation/dexon/event"
- "github.com/dexon-foundation/dexon/rlp"
- "github.com/dexon-foundation/dexon/trie"
+ dexCore "github.com/byzantine-lab/dexon-consensus/core"
+ coreTypes "github.com/byzantine-lab/dexon-consensus/core/types"
+ ethereum "github.com/tangerine-network/go-tangerine"
+
+ "github.com/tangerine-network/go-tangerine/common"
+ "github.com/tangerine-network/go-tangerine/consensus/dexcon"
+ "github.com/tangerine-network/go-tangerine/core/state"
+ "github.com/tangerine-network/go-tangerine/core/types"
+ "github.com/tangerine-network/go-tangerine/core/vm"
+ "github.com/tangerine-network/go-tangerine/ethdb"
+ "github.com/tangerine-network/go-tangerine/event"
+ "github.com/tangerine-network/go-tangerine/rlp"
+ "github.com/tangerine-network/go-tangerine/trie"
)
// Reduce some of the parameters to make the tester faster.
@@ -213,13 +213,13 @@ func (dl *downloadTester) FastSyncCommitHead(hash common.Hash) error {
return fmt.Errorf("non existent block: %x", hash[:4])
}
-// InsertDexonHeaderChain injects a new batch of headers into the simulated chain.
-func (dl *downloadTester) InsertDexonHeaderChain(headers []*types.HeaderWithGovState,
+// InsertTangerineHeaderChain injects a new batch of headers into the simulated chain.
+func (dl *downloadTester) InsertTangerineHeaderChain(headers []*types.HeaderWithGovState,
gov dexcon.GovernanceStateFetcher, verifierCache *dexCore.TSigVerifierCache) (i int, err error) {
dl.lock.Lock()
defer dl.lock.Unlock()
- // Do a quick check, as the blockchain.InsertDexonHeaderChain doesn't insert anything in case of errors
+ // Do a quick check, as the blockchain.InsertTangerineHeaderChain doesn't insert anything in case of errors
if _, ok := dl.ownHeaders[headers[0].ParentHash]; !ok {
return 0, errors.New("unknown parent")
}
@@ -265,8 +265,8 @@ func (dl *downloadTester) InsertDexonHeaderChain(headers []*types.HeaderWithGovS
return len(headers), nil
}
-// InsertDexonChain injects a new batch of blocks into the simulated chain.
-func (dl *downloadTester) InsertDexonChain(blocks types.Blocks) (i int, err error) {
+// InsertTangerineChain injects a new batch of blocks into the simulated chain.
+func (dl *downloadTester) InsertTangerineChain(blocks types.Blocks) (i int, err error) {
dl.lock.Lock()
defer dl.lock.Unlock()
diff --git a/dex/downloader/fakepeer.go b/dex/downloader/fakepeer.go
index e1c3070d2..4ec36c19f 100644
--- a/dex/downloader/fakepeer.go
+++ b/dex/downloader/fakepeer.go
@@ -19,11 +19,11 @@ package downloader
import (
"math/big"
- "github.com/dexon-foundation/dexon/common"
- "github.com/dexon-foundation/dexon/core"
- "github.com/dexon-foundation/dexon/core/rawdb"
- "github.com/dexon-foundation/dexon/core/types"
- "github.com/dexon-foundation/dexon/ethdb"
+ "github.com/tangerine-network/go-tangerine/common"
+ "github.com/tangerine-network/go-tangerine/core"
+ "github.com/tangerine-network/go-tangerine/core/rawdb"
+ "github.com/tangerine-network/go-tangerine/core/types"
+ "github.com/tangerine-network/go-tangerine/ethdb"
)
// FakePeer is a mock downloader peer that operates on a local database instance
diff --git a/dex/downloader/governance.go b/dex/downloader/governance.go
index 38281b4a8..70dc3455a 100644
--- a/dex/downloader/governance.go
+++ b/dex/downloader/governance.go
@@ -4,14 +4,14 @@ import (
"fmt"
"sync"
- "github.com/dexon-foundation/dexon/common"
- "github.com/dexon-foundation/dexon/core"
- "github.com/dexon-foundation/dexon/core/state"
- "github.com/dexon-foundation/dexon/core/types"
- "github.com/dexon-foundation/dexon/crypto"
- "github.com/dexon-foundation/dexon/ethdb"
- "github.com/dexon-foundation/dexon/log"
- "github.com/dexon-foundation/dexon/trie"
+ "github.com/tangerine-network/go-tangerine/common"
+ "github.com/tangerine-network/go-tangerine/core"
+ "github.com/tangerine-network/go-tangerine/core/state"
+ "github.com/tangerine-network/go-tangerine/core/types"
+ "github.com/tangerine-network/go-tangerine/crypto"
+ "github.com/tangerine-network/go-tangerine/ethdb"
+ "github.com/tangerine-network/go-tangerine/log"
+ "github.com/tangerine-network/go-tangerine/trie"
)
// governanceDB is backed by memory db for fast sync.
diff --git a/dex/downloader/metrics.go b/dex/downloader/metrics.go
index 86f3298ad..98f793374 100644
--- a/dex/downloader/metrics.go
+++ b/dex/downloader/metrics.go
@@ -19,7 +19,7 @@
package downloader
import (
- "github.com/dexon-foundation/dexon/metrics"
+ "github.com/tangerine-network/go-tangerine/metrics"
)
var (
diff --git a/dex/downloader/peer.go b/dex/downloader/peer.go
index df8ef0ee9..084cd5a0a 100644
--- a/dex/downloader/peer.go
+++ b/dex/downloader/peer.go
@@ -28,9 +28,9 @@ import (
"sync/atomic"
"time"
- "github.com/dexon-foundation/dexon/common"
- "github.com/dexon-foundation/dexon/event"
- "github.com/dexon-foundation/dexon/log"
+ "github.com/tangerine-network/go-tangerine/common"
+ "github.com/tangerine-network/go-tangerine/event"
+ "github.com/tangerine-network/go-tangerine/log"
)
const (
diff --git a/dex/downloader/queue.go b/dex/downloader/queue.go
index ea847913f..6fbd65b1b 100644
--- a/dex/downloader/queue.go
+++ b/dex/downloader/queue.go
@@ -25,11 +25,11 @@ import (
"sync"
"time"
- "github.com/dexon-foundation/dexon/common"
- "github.com/dexon-foundation/dexon/common/prque"
- "github.com/dexon-foundation/dexon/core/types"
- "github.com/dexon-foundation/dexon/log"
- "github.com/dexon-foundation/dexon/metrics"
+ "github.com/tangerine-network/go-tangerine/common"
+ "github.com/tangerine-network/go-tangerine/common/prque"
+ "github.com/tangerine-network/go-tangerine/core/types"
+ "github.com/tangerine-network/go-tangerine/log"
+ "github.com/tangerine-network/go-tangerine/metrics"
)
var (
diff --git a/dex/downloader/statesync.go b/dex/downloader/statesync.go
index 1695ba19c..07919c6d1 100644
--- a/dex/downloader/statesync.go
+++ b/dex/downloader/statesync.go
@@ -22,12 +22,12 @@ import (
"sync"
"time"
- "github.com/dexon-foundation/dexon/common"
- "github.com/dexon-foundation/dexon/core/rawdb"
- "github.com/dexon-foundation/dexon/core/state"
- "github.com/dexon-foundation/dexon/ethdb"
- "github.com/dexon-foundation/dexon/log"
- "github.com/dexon-foundation/dexon/trie"
+ "github.com/tangerine-network/go-tangerine/common"
+ "github.com/tangerine-network/go-tangerine/core/rawdb"
+ "github.com/tangerine-network/go-tangerine/core/state"
+ "github.com/tangerine-network/go-tangerine/ethdb"
+ "github.com/tangerine-network/go-tangerine/log"
+ "github.com/tangerine-network/go-tangerine/trie"
"golang.org/x/crypto/sha3"
)
diff --git a/dex/downloader/testchain_test.go b/dex/downloader/testchain_test.go
index e5c5e4d23..5be77b86f 100644
--- a/dex/downloader/testchain_test.go
+++ b/dex/downloader/testchain_test.go
@@ -21,18 +21,18 @@ import (
"fmt"
"math/big"
- dexCore "github.com/dexon-foundation/dexon-consensus/core"
- coreTypes "github.com/dexon-foundation/dexon-consensus/core/types"
-
- "github.com/dexon-foundation/dexon/common"
- "github.com/dexon-foundation/dexon/consensus/dexcon"
- "github.com/dexon-foundation/dexon/core"
- "github.com/dexon-foundation/dexon/core/state"
- "github.com/dexon-foundation/dexon/core/types"
- "github.com/dexon-foundation/dexon/core/vm"
- "github.com/dexon-foundation/dexon/crypto"
- "github.com/dexon-foundation/dexon/ethdb"
- "github.com/dexon-foundation/dexon/params"
+ dexCore "github.com/byzantine-lab/dexon-consensus/core"
+ coreTypes "github.com/byzantine-lab/dexon-consensus/core/types"
+
+ "github.com/tangerine-network/go-tangerine/common"
+ "github.com/tangerine-network/go-tangerine/consensus/dexcon"
+ "github.com/tangerine-network/go-tangerine/core"
+ "github.com/tangerine-network/go-tangerine/core/state"
+ "github.com/tangerine-network/go-tangerine/core/types"
+ "github.com/tangerine-network/go-tangerine/core/vm"
+ "github.com/tangerine-network/go-tangerine/crypto"
+ "github.com/tangerine-network/go-tangerine/ethdb"
+ "github.com/tangerine-network/go-tangerine/params"
)
// Test chain parameters.
@@ -161,13 +161,13 @@ func (tc *testChain) generate(n int, seed byte, parent *types.Block, nodes *dexc
round := uint64(0)
roundInterval := int(100)
- addTx := func(block *core.DexonBlockGen, node *dexcon.Node, data []byte) {
+ addTx := func(block *core.TangerineBlockGen, node *dexcon.Node, data []byte) {
nonce := block.TxNonce(node.Address())
tx := node.CreateGovTx(nonce, data)
block.AddTx(tx)
}
- blocks, receipts := core.GenerateDexonChain(params.TestnetChainConfig, parent, engine, testDB, n, func(i int, block *core.DexonBlockGen) {
+ blocks, receipts := core.GenerateTangerineChain(params.TestnetChainConfig, parent, engine, testDB, n, func(i int, block *core.TangerineBlockGen) {
block.SetCoinbase(common.Address{seed})
block.SetPosition(coreTypes.Position{
Round: round,
diff --git a/dex/downloader/types.go b/dex/downloader/types.go
index a7143ccd9..8e3299832 100644
--- a/dex/downloader/types.go
+++ b/dex/downloader/types.go
@@ -19,7 +19,7 @@ package downloader
import (
"fmt"
- "github.com/dexon-foundation/dexon/core/types"
+ "github.com/tangerine-network/go-tangerine/core/types"
)
// peerDropFn is a callback type for dropping a peer detected as malicious.
diff --git a/dex/fetcher/fetcher.go b/dex/fetcher/fetcher.go
index 64e576bd8..84737ab35 100644
--- a/dex/fetcher/fetcher.go
+++ b/dex/fetcher/fetcher.go
@@ -22,11 +22,11 @@ import (
"math/rand"
"time"
- "github.com/dexon-foundation/dexon/common"
- "github.com/dexon-foundation/dexon/common/prque"
- "github.com/dexon-foundation/dexon/consensus"
- "github.com/dexon-foundation/dexon/core/types"
- "github.com/dexon-foundation/dexon/log"
+ "github.com/tangerine-network/go-tangerine/common"
+ "github.com/tangerine-network/go-tangerine/common/prque"
+ "github.com/tangerine-network/go-tangerine/consensus"
+ "github.com/tangerine-network/go-tangerine/core/types"
+ "github.com/tangerine-network/go-tangerine/log"
)
const (
diff --git a/dex/fetcher/fetcher_test.go b/dex/fetcher/fetcher_test.go
index 24611a8a0..6f012641c 100644
--- a/dex/fetcher/fetcher_test.go
+++ b/dex/fetcher/fetcher_test.go
@@ -24,13 +24,13 @@ import (
"testing"
"time"
- "github.com/dexon-foundation/dexon/common"
- "github.com/dexon-foundation/dexon/consensus/ethash"
- "github.com/dexon-foundation/dexon/core"
- "github.com/dexon-foundation/dexon/core/types"
- "github.com/dexon-foundation/dexon/crypto"
- "github.com/dexon-foundation/dexon/ethdb"
- "github.com/dexon-foundation/dexon/params"
+ "github.com/tangerine-network/go-tangerine/common"
+ "github.com/tangerine-network/go-tangerine/consensus/ethash"
+ "github.com/tangerine-network/go-tangerine/core"
+ "github.com/tangerine-network/go-tangerine/core/types"
+ "github.com/tangerine-network/go-tangerine/crypto"
+ "github.com/tangerine-network/go-tangerine/ethdb"
+ "github.com/tangerine-network/go-tangerine/params"
)
var (
diff --git a/dex/fetcher/metrics.go b/dex/fetcher/metrics.go
index 23b670549..276ec557d 100644
--- a/dex/fetcher/metrics.go
+++ b/dex/fetcher/metrics.go
@@ -19,7 +19,7 @@
package fetcher
import (
- "github.com/dexon-foundation/dexon/metrics"
+ "github.com/tangerine-network/go-tangerine/metrics"
)
var (
diff --git a/dex/governance.go b/dex/governance.go
index ec09969b0..3e73467b5 100644
--- a/dex/governance.go
+++ b/dex/governance.go
@@ -22,16 +22,16 @@ import (
"crypto/ecdsa"
"math/big"
- coreTypes "github.com/dexon-foundation/dexon-consensus/core/types"
- dkgTypes "github.com/dexon-foundation/dexon-consensus/core/types/dkg"
-
- "github.com/dexon-foundation/dexon/common"
- "github.com/dexon-foundation/dexon/core"
- "github.com/dexon-foundation/dexon/core/types"
- "github.com/dexon-foundation/dexon/core/vm"
- "github.com/dexon-foundation/dexon/crypto"
- "github.com/dexon-foundation/dexon/log"
- "github.com/dexon-foundation/dexon/params"
+ coreTypes "github.com/byzantine-lab/dexon-consensus/core/types"
+ dkgTypes "github.com/byzantine-lab/dexon-consensus/core/types/dkg"
+
+ "github.com/tangerine-network/go-tangerine/common"
+ "github.com/tangerine-network/go-tangerine/core"
+ "github.com/tangerine-network/go-tangerine/core/types"
+ "github.com/tangerine-network/go-tangerine/core/vm"
+ "github.com/tangerine-network/go-tangerine/crypto"
+ "github.com/tangerine-network/go-tangerine/log"
+ "github.com/tangerine-network/go-tangerine/params"
)
type DexconGovernance struct {
diff --git a/dex/handler.go b/dex/handler.go
index cfa6d9bb1..0f0b33534 100644
--- a/dex/handler.go
+++ b/dex/handler.go
@@ -45,28 +45,28 @@ import (
"sync/atomic"
"time"
- coreCommon "github.com/dexon-foundation/dexon-consensus/common"
- dexCore "github.com/dexon-foundation/dexon-consensus/core"
- coreCrypto "github.com/dexon-foundation/dexon-consensus/core/crypto"
- coreTypes "github.com/dexon-foundation/dexon-consensus/core/types"
- dkgTypes "github.com/dexon-foundation/dexon-consensus/core/types/dkg"
-
- "github.com/dexon-foundation/dexon/common"
- "github.com/dexon-foundation/dexon/consensus"
- "github.com/dexon-foundation/dexon/core"
- "github.com/dexon-foundation/dexon/core/types"
- "github.com/dexon-foundation/dexon/crypto"
- dexDB "github.com/dexon-foundation/dexon/dex/db"
- "github.com/dexon-foundation/dexon/dex/downloader"
- "github.com/dexon-foundation/dexon/dex/fetcher"
- "github.com/dexon-foundation/dexon/ethdb"
- "github.com/dexon-foundation/dexon/event"
- "github.com/dexon-foundation/dexon/log"
- "github.com/dexon-foundation/dexon/metrics"
- "github.com/dexon-foundation/dexon/p2p"
- "github.com/dexon-foundation/dexon/p2p/enode"
- "github.com/dexon-foundation/dexon/params"
- "github.com/dexon-foundation/dexon/rlp"
+ coreCommon "github.com/byzantine-lab/dexon-consensus/common"
+ dexCore "github.com/byzantine-lab/dexon-consensus/core"
+ coreCrypto "github.com/byzantine-lab/dexon-consensus/core/crypto"
+ coreTypes "github.com/byzantine-lab/dexon-consensus/core/types"
+ dkgTypes "github.com/byzantine-lab/dexon-consensus/core/types/dkg"
+
+ "github.com/tangerine-network/go-tangerine/common"
+ "github.com/tangerine-network/go-tangerine/consensus"
+ "github.com/tangerine-network/go-tangerine/core"
+ "github.com/tangerine-network/go-tangerine/core/types"
+ "github.com/tangerine-network/go-tangerine/crypto"
+ dexDB "github.com/tangerine-network/go-tangerine/dex/db"
+ "github.com/tangerine-network/go-tangerine/dex/downloader"
+ "github.com/tangerine-network/go-tangerine/dex/fetcher"
+ "github.com/tangerine-network/go-tangerine/ethdb"
+ "github.com/tangerine-network/go-tangerine/event"
+ "github.com/tangerine-network/go-tangerine/log"
+ "github.com/tangerine-network/go-tangerine/metrics"
+ "github.com/tangerine-network/go-tangerine/p2p"
+ "github.com/tangerine-network/go-tangerine/p2p/enode"
+ "github.com/tangerine-network/go-tangerine/params"
+ "github.com/tangerine-network/go-tangerine/rlp"
)
const (
@@ -234,7 +234,7 @@ func NewProtocolManager(
manager.downloader = downloader.New(mode, chaindb, manager.eventMux, blockchain, nil, manager.removePeer)
validator := func(header *types.Header) error {
- return blockchain.VerifyDexonHeader(header)
+ return blockchain.VerifyTangerineHeader(header)
}
heighter := func() uint64 {
return blockchain.CurrentBlock().NumberU64()
@@ -246,7 +246,7 @@ func NewProtocolManager(
return 0, nil
}
atomic.StoreUint32(&manager.acceptTxs, 1) // Mark initial sync done on any fetcher import
- return manager.blockchain.InsertDexonChain(blocks)
+ return manager.blockchain.InsertTangerineChain(blocks)
}
manager.fetcher = fetcher.New(blockchain.GetBlockByHash, validator, manager.BroadcastBlock, heighter, inserter, manager.removePeer)
diff --git a/dex/handler_test.go b/dex/handler_test.go
index 75a57c125..80f36ae9e 100644
--- a/dex/handler_test.go
+++ b/dex/handler_test.go
@@ -22,15 +22,15 @@ import (
"math/rand"
"testing"
- "github.com/dexon-foundation/dexon/common"
- "github.com/dexon-foundation/dexon/core"
- "github.com/dexon-foundation/dexon/core/state"
- "github.com/dexon-foundation/dexon/core/types"
- "github.com/dexon-foundation/dexon/crypto"
- "github.com/dexon-foundation/dexon/dex/downloader"
- "github.com/dexon-foundation/dexon/ethdb"
- "github.com/dexon-foundation/dexon/p2p"
- "github.com/dexon-foundation/dexon/params"
+ "github.com/tangerine-network/go-tangerine/common"
+ "github.com/tangerine-network/go-tangerine/core"
+ "github.com/tangerine-network/go-tangerine/core/state"
+ "github.com/tangerine-network/go-tangerine/core/types"
+ "github.com/tangerine-network/go-tangerine/crypto"
+ "github.com/tangerine-network/go-tangerine/dex/downloader"
+ "github.com/tangerine-network/go-tangerine/ethdb"
+ "github.com/tangerine-network/go-tangerine/p2p"
+ "github.com/tangerine-network/go-tangerine/params"
)
// Tests that protocol versions and modes of operations are matched up properly.
diff --git a/dex/helper_test.go b/dex/helper_test.go
index 1d267d9ae..6e2cd3d77 100644
--- a/dex/helper_test.go
+++ b/dex/helper_test.go
@@ -27,18 +27,18 @@ import (
"sync"
"testing"
- "github.com/dexon-foundation/dexon/common"
- "github.com/dexon-foundation/dexon/consensus/ethash"
- "github.com/dexon-foundation/dexon/core"
- "github.com/dexon-foundation/dexon/core/types"
- "github.com/dexon-foundation/dexon/core/vm"
- "github.com/dexon-foundation/dexon/crypto"
- "github.com/dexon-foundation/dexon/dex/downloader"
- "github.com/dexon-foundation/dexon/ethdb"
- "github.com/dexon-foundation/dexon/event"
- "github.com/dexon-foundation/dexon/p2p"
- "github.com/dexon-foundation/dexon/p2p/enode"
- "github.com/dexon-foundation/dexon/params"
+ "github.com/tangerine-network/go-tangerine/common"
+ "github.com/tangerine-network/go-tangerine/consensus/ethash"
+ "github.com/tangerine-network/go-tangerine/core"
+ "github.com/tangerine-network/go-tangerine/core/types"
+ "github.com/tangerine-network/go-tangerine/core/vm"
+ "github.com/tangerine-network/go-tangerine/crypto"
+ "github.com/tangerine-network/go-tangerine/dex/downloader"
+ "github.com/tangerine-network/go-tangerine/ethdb"
+ "github.com/tangerine-network/go-tangerine/event"
+ "github.com/tangerine-network/go-tangerine/p2p"
+ "github.com/tangerine-network/go-tangerine/p2p/enode"
+ "github.com/tangerine-network/go-tangerine/params"
)
var (
diff --git a/dex/metrics.go b/dex/metrics.go
index 1f691bc15..1cee6aac4 100644
--- a/dex/metrics.go
+++ b/dex/metrics.go
@@ -17,8 +17,8 @@
package dex
import (
- "github.com/dexon-foundation/dexon/metrics"
- "github.com/dexon-foundation/dexon/p2p"
+ "github.com/tangerine-network/go-tangerine/metrics"
+ "github.com/tangerine-network/go-tangerine/p2p"
)
var (
diff --git a/dex/network.go b/dex/network.go
index ab676a349..f4f18beb5 100644
--- a/dex/network.go
+++ b/dex/network.go
@@ -18,10 +18,10 @@
package dex
import (
- coreCommon "github.com/dexon-foundation/dexon-consensus/common"
- "github.com/dexon-foundation/dexon-consensus/core/crypto"
- "github.com/dexon-foundation/dexon-consensus/core/types"
- dkgTypes "github.com/dexon-foundation/dexon-consensus/core/types/dkg"
+ coreCommon "github.com/byzantine-lab/dexon-consensus/common"
+ "github.com/byzantine-lab/dexon-consensus/core/crypto"
+ "github.com/byzantine-lab/dexon-consensus/core/types"
+ dkgTypes "github.com/byzantine-lab/dexon-consensus/core/types/dkg"
)
type DexconNetwork struct {
diff --git a/dex/peer.go b/dex/peer.go
index 68576564f..a9a952f2f 100644
--- a/dex/peer.go
+++ b/dex/peer.go
@@ -40,18 +40,18 @@ import (
"sync"
"time"
+ coreCommon "github.com/byzantine-lab/dexon-consensus/common"
+ coreTypes "github.com/byzantine-lab/dexon-consensus/core/types"
+ dkgTypes "github.com/byzantine-lab/dexon-consensus/core/types/dkg"
mapset "github.com/deckarep/golang-set"
- coreCommon "github.com/dexon-foundation/dexon-consensus/common"
- coreTypes "github.com/dexon-foundation/dexon-consensus/core/types"
- dkgTypes "github.com/dexon-foundation/dexon-consensus/core/types/dkg"
-
- "github.com/dexon-foundation/dexon/common"
- "github.com/dexon-foundation/dexon/core/types"
- "github.com/dexon-foundation/dexon/crypto"
- "github.com/dexon-foundation/dexon/log"
- "github.com/dexon-foundation/dexon/p2p"
- "github.com/dexon-foundation/dexon/p2p/enode"
- "github.com/dexon-foundation/dexon/rlp"
+
+ "github.com/tangerine-network/go-tangerine/common"
+ "github.com/tangerine-network/go-tangerine/core/types"
+ "github.com/tangerine-network/go-tangerine/crypto"
+ "github.com/tangerine-network/go-tangerine/log"
+ "github.com/tangerine-network/go-tangerine/p2p"
+ "github.com/tangerine-network/go-tangerine/p2p/enode"
+ "github.com/tangerine-network/go-tangerine/rlp"
)
var (
diff --git a/dex/peer_test.go b/dex/peer_test.go
index 18f6617d3..7a7230351 100644
--- a/dex/peer_test.go
+++ b/dex/peer_test.go
@@ -6,8 +6,8 @@ import (
"reflect"
"testing"
- "github.com/dexon-foundation/dexon/crypto"
- "github.com/dexon-foundation/dexon/p2p/enode"
+ "github.com/tangerine-network/go-tangerine/crypto"
+ "github.com/tangerine-network/go-tangerine/p2p/enode"
)
func TestPeerSetBuildAndForgetConn(t *testing.T) {
diff --git a/dex/protocol.go b/dex/protocol.go
index 2ce850dc3..e054a3ed3 100644
--- a/dex/protocol.go
+++ b/dex/protocol.go
@@ -38,12 +38,12 @@ import (
"fmt"
"io"
- "github.com/dexon-foundation/dexon/common"
- "github.com/dexon-foundation/dexon/core"
- "github.com/dexon-foundation/dexon/core/types"
- "github.com/dexon-foundation/dexon/event"
- "github.com/dexon-foundation/dexon/p2p/enode"
- "github.com/dexon-foundation/dexon/rlp"
+ "github.com/tangerine-network/go-tangerine/common"
+ "github.com/tangerine-network/go-tangerine/core"
+ "github.com/tangerine-network/go-tangerine/core/types"
+ "github.com/tangerine-network/go-tangerine/event"
+ "github.com/tangerine-network/go-tangerine/p2p/enode"
+ "github.com/tangerine-network/go-tangerine/rlp"
"golang.org/x/crypto/sha3"
)
diff --git a/dex/protocol_test.go b/dex/protocol_test.go
index 81550d918..68b5c4b86 100644
--- a/dex/protocol_test.go
+++ b/dex/protocol_test.go
@@ -24,19 +24,19 @@ import (
"testing"
"time"
- coreCommon "github.com/dexon-foundation/dexon-consensus/common"
- coreCrypto "github.com/dexon-foundation/dexon-consensus/core/crypto"
- "github.com/dexon-foundation/dexon-consensus/core/crypto/dkg"
- coreTypes "github.com/dexon-foundation/dexon-consensus/core/types"
- dkgTypes "github.com/dexon-foundation/dexon-consensus/core/types/dkg"
-
- "github.com/dexon-foundation/dexon/common"
- "github.com/dexon-foundation/dexon/core/types"
- "github.com/dexon-foundation/dexon/crypto"
- "github.com/dexon-foundation/dexon/dex/downloader"
- "github.com/dexon-foundation/dexon/p2p"
- "github.com/dexon-foundation/dexon/p2p/enode"
- "github.com/dexon-foundation/dexon/rlp"
+ coreCommon "github.com/byzantine-lab/dexon-consensus/common"
+ coreCrypto "github.com/byzantine-lab/dexon-consensus/core/crypto"
+ "github.com/byzantine-lab/dexon-consensus/core/crypto/dkg"
+ coreTypes "github.com/byzantine-lab/dexon-consensus/core/types"
+ dkgTypes "github.com/byzantine-lab/dexon-consensus/core/types/dkg"
+
+ "github.com/tangerine-network/go-tangerine/common"
+ "github.com/tangerine-network/go-tangerine/core/types"
+ "github.com/tangerine-network/go-tangerine/crypto"
+ "github.com/tangerine-network/go-tangerine/dex/downloader"
+ "github.com/tangerine-network/go-tangerine/p2p"
+ "github.com/tangerine-network/go-tangerine/p2p/enode"
+ "github.com/tangerine-network/go-tangerine/rlp"
)
func init() {
diff --git a/dex/recovery.go b/dex/recovery.go
index 1393d37df..d687299ef 100644
--- a/dex/recovery.go
+++ b/dex/recovery.go
@@ -26,14 +26,14 @@ import (
"strconv"
"strings"
- "github.com/dexon-foundation/dexon/accounts/abi"
- "github.com/dexon-foundation/dexon/common"
- "github.com/dexon-foundation/dexon/core/types"
- "github.com/dexon-foundation/dexon/crypto"
- "github.com/dexon-foundation/dexon/log"
- "github.com/dexon-foundation/dexon/params"
- "github.com/dexon-foundation/dexon/rlp"
"github.com/onrik/ethrpc"
+ "github.com/tangerine-network/go-tangerine/accounts/abi"
+ "github.com/tangerine-network/go-tangerine/common"
+ "github.com/tangerine-network/go-tangerine/core/types"
+ "github.com/tangerine-network/go-tangerine/crypto"
+ "github.com/tangerine-network/go-tangerine/log"
+ "github.com/tangerine-network/go-tangerine/params"
+ "github.com/tangerine-network/go-tangerine/rlp"
)
const numConfirmation = 1
diff --git a/dex/recovery_test.go b/dex/recovery_test.go
index 8c039db35..27a978488 100644
--- a/dex/recovery_test.go
+++ b/dex/recovery_test.go
@@ -20,9 +20,9 @@ package dex
import (
"testing"
- "github.com/dexon-foundation/dexon/common"
- "github.com/dexon-foundation/dexon/crypto"
- "github.com/dexon-foundation/dexon/params"
+ "github.com/tangerine-network/go-tangerine/common"
+ "github.com/tangerine-network/go-tangerine/crypto"
+ "github.com/tangerine-network/go-tangerine/params"
)
func TestRecoveryVoteTxGeneration(t *testing.T) {
diff --git a/dex/sync.go b/dex/sync.go
index 84c161845..6f5d26a1f 100644
--- a/dex/sync.go
+++ b/dex/sync.go
@@ -21,11 +21,11 @@ import (
"sync/atomic"
"time"
- "github.com/dexon-foundation/dexon/common"
- "github.com/dexon-foundation/dexon/core/types"
- "github.com/dexon-foundation/dexon/dex/downloader"
- "github.com/dexon-foundation/dexon/log"
- "github.com/dexon-foundation/dexon/p2p/enode"
+ "github.com/tangerine-network/go-tangerine/common"
+ "github.com/tangerine-network/go-tangerine/core/types"
+ "github.com/tangerine-network/go-tangerine/dex/downloader"
+ "github.com/tangerine-network/go-tangerine/log"
+ "github.com/tangerine-network/go-tangerine/p2p/enode"
)
const (