diff options
author | Wei-Ning Huang <w@cobinhood.com> | 2018-09-26 10:48:31 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:49 +0800 |
commit | d056357e4999c6c70c8b8e85a9e4f533895ed6c2 (patch) | |
tree | be9f205d2ed8c73d2130b47f01fed2670c1b4d64 /swarm/storage | |
parent | 953e13b21b0aae335ef655a1907a8883f1ba7be2 (diff) | |
download | dexon-d056357e4999c6c70c8b8e85a9e4f533895ed6c2.tar dexon-d056357e4999c6c70c8b8e85a9e4f533895ed6c2.tar.gz dexon-d056357e4999c6c70c8b8e85a9e4f533895ed6c2.tar.bz2 dexon-d056357e4999c6c70c8b8e85a9e4f533895ed6c2.tar.lz dexon-d056357e4999c6c70c8b8e85a9e4f533895ed6c2.tar.xz dexon-d056357e4999c6c70c8b8e85a9e4f533895ed6c2.tar.zst dexon-d056357e4999c6c70c8b8e85a9e4f533895ed6c2.zip |
Change import go github.com/dexon-foundation/dexon
Diffstat (limited to 'swarm/storage')
57 files changed, 130 insertions, 130 deletions
diff --git a/swarm/storage/chunker.go b/swarm/storage/chunker.go index 0fa5026dc..7baed1849 100644 --- a/swarm/storage/chunker.go +++ b/swarm/storage/chunker.go @@ -24,10 +24,10 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/metrics" - ch "github.com/ethereum/go-ethereum/swarm/chunk" - "github.com/ethereum/go-ethereum/swarm/log" - "github.com/ethereum/go-ethereum/swarm/spancontext" + "github.com/dexon-foundation/dexon/metrics" + ch "github.com/dexon-foundation/dexon/swarm/chunk" + "github.com/dexon-foundation/dexon/swarm/log" + "github.com/dexon-foundation/dexon/swarm/spancontext" opentracing "github.com/opentracing/opentracing-go" olog "github.com/opentracing/opentracing-go/log" ) diff --git a/swarm/storage/chunker_test.go b/swarm/storage/chunker_test.go index 9a1259444..90594d8c1 100644 --- a/swarm/storage/chunker_test.go +++ b/swarm/storage/chunker_test.go @@ -24,7 +24,7 @@ import ( "io" "testing" - "github.com/ethereum/go-ethereum/swarm/testutil" + "github.com/dexon-foundation/dexon/swarm/testutil" "golang.org/x/crypto/sha3" ) diff --git a/swarm/storage/common_test.go b/swarm/storage/common_test.go index 6955ee827..a5da906cc 100644 --- a/swarm/storage/common_test.go +++ b/swarm/storage/common_test.go @@ -28,8 +28,8 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/log" - ch "github.com/ethereum/go-ethereum/swarm/chunk" + "github.com/dexon-foundation/dexon/log" + ch "github.com/dexon-foundation/dexon/swarm/chunk" "github.com/mattn/go-colorable" ) diff --git a/swarm/storage/database.go b/swarm/storage/database.go index 12367b905..81aa37381 100644 --- a/swarm/storage/database.go +++ b/swarm/storage/database.go @@ -20,7 +20,7 @@ package storage // no need for queueing/caching import ( - "github.com/ethereum/go-ethereum/metrics" + "github.com/dexon-foundation/dexon/metrics" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/iterator" "github.com/syndtr/goleveldb/leveldb/opt" diff --git a/swarm/storage/encryption/encryption_test.go b/swarm/storage/encryption/encryption_test.go index 3b4f8a4e3..42ecac870 100644 --- a/swarm/storage/encryption/encryption_test.go +++ b/swarm/storage/encryption/encryption_test.go @@ -20,9 +20,9 @@ import ( "bytes" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/swarm/testutil" + "github.com/dexon-foundation/dexon/common" + "github.com/dexon-foundation/dexon/common/hexutil" + "github.com/dexon-foundation/dexon/swarm/testutil" "golang.org/x/crypto/sha3" ) diff --git a/swarm/storage/feed/binaryserializer.go b/swarm/storage/feed/binaryserializer.go index 4e4f67a09..d6a065553 100644 --- a/swarm/storage/feed/binaryserializer.go +++ b/swarm/storage/feed/binaryserializer.go @@ -16,7 +16,7 @@ package feed -import "github.com/ethereum/go-ethereum/common/hexutil" +import "github.com/dexon-foundation/dexon/common/hexutil" type binarySerializer interface { binaryPut(serializedData []byte) error diff --git a/swarm/storage/feed/binaryserializer_test.go b/swarm/storage/feed/binaryserializer_test.go index 37828d1c9..a9bdd7b32 100644 --- a/swarm/storage/feed/binaryserializer_test.go +++ b/swarm/storage/feed/binaryserializer_test.go @@ -21,7 +21,7 @@ import ( "reflect" "testing" - "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/dexon-foundation/dexon/common/hexutil" ) // KV mocks a key value store diff --git a/swarm/storage/feed/cacheentry.go b/swarm/storage/feed/cacheentry.go index be42008e9..5d7ea11d6 100644 --- a/swarm/storage/feed/cacheentry.go +++ b/swarm/storage/feed/cacheentry.go @@ -21,7 +21,7 @@ import ( "context" "time" - "github.com/ethereum/go-ethereum/swarm/storage" + "github.com/dexon-foundation/dexon/swarm/storage" ) const ( diff --git a/swarm/storage/feed/feed.go b/swarm/storage/feed/feed.go index b6ea665a6..93a9958a6 100644 --- a/swarm/storage/feed/feed.go +++ b/swarm/storage/feed/feed.go @@ -20,9 +20,9 @@ import ( "hash" "unsafe" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/swarm/storage" + "github.com/dexon-foundation/dexon/common" + "github.com/dexon-foundation/dexon/common/hexutil" + "github.com/dexon-foundation/dexon/swarm/storage" ) // Feed represents a particular user's stream of updates on a topic diff --git a/swarm/storage/feed/handler.go b/swarm/storage/feed/handler.go index 063d3e92a..edfcae91d 100644 --- a/swarm/storage/feed/handler.go +++ b/swarm/storage/feed/handler.go @@ -24,10 +24,10 @@ import ( "fmt" "sync" - "github.com/ethereum/go-ethereum/swarm/storage/feed/lookup" + "github.com/dexon-foundation/dexon/swarm/storage/feed/lookup" - "github.com/ethereum/go-ethereum/swarm/log" - "github.com/ethereum/go-ethereum/swarm/storage" + "github.com/dexon-foundation/dexon/swarm/log" + "github.com/dexon-foundation/dexon/swarm/storage" ) type Handler struct { diff --git a/swarm/storage/feed/handler_test.go b/swarm/storage/feed/handler_test.go index 2f8a52453..eb95c82be 100644 --- a/swarm/storage/feed/handler_test.go +++ b/swarm/storage/feed/handler_test.go @@ -26,11 +26,11 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/swarm/chunk" - "github.com/ethereum/go-ethereum/swarm/storage" - "github.com/ethereum/go-ethereum/swarm/storage/feed/lookup" + "github.com/dexon-foundation/dexon/crypto" + "github.com/dexon-foundation/dexon/log" + "github.com/dexon-foundation/dexon/swarm/chunk" + "github.com/dexon-foundation/dexon/swarm/storage" + "github.com/dexon-foundation/dexon/swarm/storage/feed/lookup" ) var ( diff --git a/swarm/storage/feed/id.go b/swarm/storage/feed/id.go index 7e17743c1..52bfe45a3 100644 --- a/swarm/storage/feed/id.go +++ b/swarm/storage/feed/id.go @@ -21,10 +21,10 @@ import ( "hash" "strconv" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/swarm/storage/feed/lookup" + "github.com/dexon-foundation/dexon/common" + "github.com/dexon-foundation/dexon/swarm/storage/feed/lookup" - "github.com/ethereum/go-ethereum/swarm/storage" + "github.com/dexon-foundation/dexon/swarm/storage" ) // ID uniquely identifies an update on the network. diff --git a/swarm/storage/feed/id_test.go b/swarm/storage/feed/id_test.go index e561ff9b4..ee0b4d0a8 100644 --- a/swarm/storage/feed/id_test.go +++ b/swarm/storage/feed/id_test.go @@ -3,7 +3,7 @@ package feed import ( "testing" - "github.com/ethereum/go-ethereum/swarm/storage/feed/lookup" + "github.com/dexon-foundation/dexon/swarm/storage/feed/lookup" ) func getTestID() *ID { diff --git a/swarm/storage/feed/lookup/epoch_test.go b/swarm/storage/feed/lookup/epoch_test.go index 0629f3d1d..d9e3e7adb 100644 --- a/swarm/storage/feed/lookup/epoch_test.go +++ b/swarm/storage/feed/lookup/epoch_test.go @@ -3,7 +3,7 @@ package lookup_test import ( "testing" - "github.com/ethereum/go-ethereum/swarm/storage/feed/lookup" + "github.com/dexon-foundation/dexon/swarm/storage/feed/lookup" ) func TestMarshallers(t *testing.T) { diff --git a/swarm/storage/feed/lookup/lookup_test.go b/swarm/storage/feed/lookup/lookup_test.go index d71e81e95..fc2096a4a 100644 --- a/swarm/storage/feed/lookup/lookup_test.go +++ b/swarm/storage/feed/lookup/lookup_test.go @@ -21,8 +21,8 @@ import ( "math/rand" "testing" - "github.com/ethereum/go-ethereum/swarm/log" - "github.com/ethereum/go-ethereum/swarm/storage/feed/lookup" + "github.com/dexon-foundation/dexon/swarm/log" + "github.com/dexon-foundation/dexon/swarm/storage/feed/lookup" ) type Data struct { diff --git a/swarm/storage/feed/query.go b/swarm/storage/feed/query.go index 8be78a952..785c2b561 100644 --- a/swarm/storage/feed/query.go +++ b/swarm/storage/feed/query.go @@ -20,8 +20,8 @@ import ( "fmt" "strconv" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/swarm/storage/feed/lookup" + "github.com/dexon-foundation/dexon/common" + "github.com/dexon-foundation/dexon/swarm/storage/feed/lookup" ) // Query is used to specify constraints when performing an update lookup diff --git a/swarm/storage/feed/request.go b/swarm/storage/feed/request.go index dd91a7cf4..9fe3beed0 100644 --- a/swarm/storage/feed/request.go +++ b/swarm/storage/feed/request.go @@ -21,10 +21,10 @@ import ( "encoding/json" "hash" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/swarm/storage" - "github.com/ethereum/go-ethereum/swarm/storage/feed/lookup" + "github.com/dexon-foundation/dexon/common" + "github.com/dexon-foundation/dexon/common/hexutil" + "github.com/dexon-foundation/dexon/swarm/storage" + "github.com/dexon-foundation/dexon/swarm/storage/feed/lookup" ) // Request represents a request to sign or signed feed update message diff --git a/swarm/storage/feed/request_test.go b/swarm/storage/feed/request_test.go index c30158fdd..33626f7ca 100644 --- a/swarm/storage/feed/request_test.go +++ b/swarm/storage/feed/request_test.go @@ -24,9 +24,9 @@ import ( "reflect" "testing" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/swarm/storage" - "github.com/ethereum/go-ethereum/swarm/storage/feed/lookup" + "github.com/dexon-foundation/dexon/crypto" + "github.com/dexon-foundation/dexon/swarm/storage" + "github.com/dexon-foundation/dexon/swarm/storage/feed/lookup" ) func areEqualJSON(s1, s2 string) (bool, error) { diff --git a/swarm/storage/feed/sign.go b/swarm/storage/feed/sign.go index 5f0ea0b33..ded0d90b7 100644 --- a/swarm/storage/feed/sign.go +++ b/swarm/storage/feed/sign.go @@ -19,8 +19,8 @@ package feed import ( "crypto/ecdsa" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/dexon-foundation/dexon/common" + "github.com/dexon-foundation/dexon/crypto" ) const signatureLength = 65 diff --git a/swarm/storage/feed/testutil.go b/swarm/storage/feed/testutil.go index caa39d9ff..eb709f8ac 100644 --- a/swarm/storage/feed/testutil.go +++ b/swarm/storage/feed/testutil.go @@ -22,8 +22,8 @@ import ( "path/filepath" "sync" - "github.com/ethereum/go-ethereum/p2p/enode" - "github.com/ethereum/go-ethereum/swarm/storage" + "github.com/dexon-foundation/dexon/p2p/enode" + "github.com/dexon-foundation/dexon/swarm/storage" ) const ( diff --git a/swarm/storage/feed/topic.go b/swarm/storage/feed/topic.go index 43a7b4ba4..005f54201 100644 --- a/swarm/storage/feed/topic.go +++ b/swarm/storage/feed/topic.go @@ -21,9 +21,9 @@ import ( "encoding/json" "fmt" - "github.com/ethereum/go-ethereum/common/bitutil" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/swarm/storage" + "github.com/dexon-foundation/dexon/common/bitutil" + "github.com/dexon-foundation/dexon/common/hexutil" + "github.com/dexon-foundation/dexon/swarm/storage" ) // TopicLength establishes the max length of a topic string diff --git a/swarm/storage/feed/topic_test.go b/swarm/storage/feed/topic_test.go index 0403204f7..75724b40e 100644 --- a/swarm/storage/feed/topic_test.go +++ b/swarm/storage/feed/topic_test.go @@ -3,7 +3,7 @@ package feed import ( "testing" - "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/dexon-foundation/dexon/common/hexutil" ) func TestTopic(t *testing.T) { diff --git a/swarm/storage/feed/update.go b/swarm/storage/feed/update.go index 21c004ca4..5005b4439 100644 --- a/swarm/storage/feed/update.go +++ b/swarm/storage/feed/update.go @@ -20,7 +20,7 @@ import ( "fmt" "strconv" - "github.com/ethereum/go-ethereum/swarm/chunk" + "github.com/dexon-foundation/dexon/swarm/chunk" ) // ProtocolVersion defines the current version of the protocol that will be included in each update message diff --git a/swarm/storage/filestore_test.go b/swarm/storage/filestore_test.go index 06c4be1d7..f0fe5a8a5 100644 --- a/swarm/storage/filestore_test.go +++ b/swarm/storage/filestore_test.go @@ -24,7 +24,7 @@ import ( "os" "testing" - "github.com/ethereum/go-ethereum/swarm/testutil" + "github.com/dexon-foundation/dexon/swarm/testutil" ) const testDataSize = 0x0001000 diff --git a/swarm/storage/hasherstore.go b/swarm/storage/hasherstore.go index 23b52ee0d..341756e34 100644 --- a/swarm/storage/hasherstore.go +++ b/swarm/storage/hasherstore.go @@ -21,8 +21,8 @@ import ( "fmt" "sync/atomic" - ch "github.com/ethereum/go-ethereum/swarm/chunk" - "github.com/ethereum/go-ethereum/swarm/storage/encryption" + ch "github.com/dexon-foundation/dexon/swarm/chunk" + "github.com/dexon-foundation/dexon/swarm/storage/encryption" "golang.org/x/crypto/sha3" ) diff --git a/swarm/storage/hasherstore_test.go b/swarm/storage/hasherstore_test.go index 22cf98d0e..2948024b7 100644 --- a/swarm/storage/hasherstore_test.go +++ b/swarm/storage/hasherstore_test.go @@ -21,9 +21,9 @@ import ( "context" "testing" - "github.com/ethereum/go-ethereum/swarm/storage/encryption" + "github.com/dexon-foundation/dexon/swarm/storage/encryption" - "github.com/ethereum/go-ethereum/common" + "github.com/dexon-foundation/dexon/common" ) func TestHasherStore(t *testing.T) { diff --git a/swarm/storage/ldbstore.go b/swarm/storage/ldbstore.go index 9e4d63841..af39c92fa 100644 --- a/swarm/storage/ldbstore.go +++ b/swarm/storage/ldbstore.go @@ -34,10 +34,10 @@ import ( "io/ioutil" "sync" - "github.com/ethereum/go-ethereum/metrics" - "github.com/ethereum/go-ethereum/rlp" - "github.com/ethereum/go-ethereum/swarm/log" - "github.com/ethereum/go-ethereum/swarm/storage/mock" + "github.com/dexon-foundation/dexon/metrics" + "github.com/dexon-foundation/dexon/rlp" + "github.com/dexon-foundation/dexon/swarm/log" + "github.com/dexon-foundation/dexon/swarm/storage/mock" "github.com/syndtr/goleveldb/leveldb" ) diff --git a/swarm/storage/ldbstore_test.go b/swarm/storage/ldbstore_test.go index 45ae09b2c..7d4748a28 100644 --- a/swarm/storage/ldbstore_test.go +++ b/swarm/storage/ldbstore_test.go @@ -28,10 +28,10 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/common" - ch "github.com/ethereum/go-ethereum/swarm/chunk" - "github.com/ethereum/go-ethereum/swarm/log" - "github.com/ethereum/go-ethereum/swarm/storage/mock/mem" + "github.com/dexon-foundation/dexon/common" + ch "github.com/dexon-foundation/dexon/swarm/chunk" + "github.com/dexon-foundation/dexon/swarm/log" + "github.com/dexon-foundation/dexon/swarm/storage/mock/mem" ldberrors "github.com/syndtr/goleveldb/leveldb/errors" ) diff --git a/swarm/storage/localstore.go b/swarm/storage/localstore.go index eefb7565a..6020665d6 100644 --- a/swarm/storage/localstore.go +++ b/swarm/storage/localstore.go @@ -21,9 +21,9 @@ import ( "path/filepath" "sync" - "github.com/ethereum/go-ethereum/metrics" - "github.com/ethereum/go-ethereum/swarm/log" - "github.com/ethereum/go-ethereum/swarm/storage/mock" + "github.com/dexon-foundation/dexon/metrics" + "github.com/dexon-foundation/dexon/swarm/log" + "github.com/dexon-foundation/dexon/swarm/storage/mock" ) type LocalStoreParams struct { diff --git a/swarm/storage/localstore/gc.go b/swarm/storage/localstore/gc.go index 7718d1e58..e53bdabd1 100644 --- a/swarm/storage/localstore/gc.go +++ b/swarm/storage/localstore/gc.go @@ -92,8 +92,8 @@ package localstore import ( "time" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/swarm/shed" + "github.com/dexon-foundation/dexon/log" + "github.com/dexon-foundation/dexon/swarm/shed" "github.com/syndtr/goleveldb/leveldb" ) diff --git a/swarm/storage/localstore/gc_test.go b/swarm/storage/localstore/gc_test.go index eb039a554..fa9f39ece 100644 --- a/swarm/storage/localstore/gc_test.go +++ b/swarm/storage/localstore/gc_test.go @@ -23,7 +23,7 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/swarm/storage" + "github.com/dexon-foundation/dexon/swarm/storage" ) // TestDB_collectGarbageWorker tests garbage collection runs diff --git a/swarm/storage/localstore/index_test.go b/swarm/storage/localstore/index_test.go index d9abf440f..326b8d9f2 100644 --- a/swarm/storage/localstore/index_test.go +++ b/swarm/storage/localstore/index_test.go @@ -21,7 +21,7 @@ import ( "math/rand" "testing" - "github.com/ethereum/go-ethereum/swarm/storage" + "github.com/dexon-foundation/dexon/swarm/storage" ) // TestDB_pullIndex validates the ordering of keys in pull index. diff --git a/swarm/storage/localstore/localstore.go b/swarm/storage/localstore/localstore.go index 7a9fb54f5..c828deb12 100644 --- a/swarm/storage/localstore/localstore.go +++ b/swarm/storage/localstore/localstore.go @@ -23,10 +23,10 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/swarm/shed" - "github.com/ethereum/go-ethereum/swarm/storage" - "github.com/ethereum/go-ethereum/swarm/storage/mock" + "github.com/dexon-foundation/dexon/log" + "github.com/dexon-foundation/dexon/swarm/shed" + "github.com/dexon-foundation/dexon/swarm/storage" + "github.com/dexon-foundation/dexon/swarm/storage/mock" ) var ( diff --git a/swarm/storage/localstore/localstore_test.go b/swarm/storage/localstore/localstore_test.go index c7309d3cd..77340875b 100644 --- a/swarm/storage/localstore/localstore_test.go +++ b/swarm/storage/localstore/localstore_test.go @@ -28,9 +28,9 @@ import ( "testing" "time" - ch "github.com/ethereum/go-ethereum/swarm/chunk" - "github.com/ethereum/go-ethereum/swarm/shed" - "github.com/ethereum/go-ethereum/swarm/storage" + ch "github.com/dexon-foundation/dexon/swarm/chunk" + "github.com/dexon-foundation/dexon/swarm/shed" + "github.com/dexon-foundation/dexon/swarm/storage" "github.com/syndtr/goleveldb/leveldb" ) @@ -130,10 +130,10 @@ func TestDB_updateGCSem(t *testing.T) { // Measurements on MacBook Pro (Retina, 15-inch, Mid 2014) show // that New function executes around 1s for database with 1M chunks. // -// # go test -benchmem -run=none github.com/ethereum/go-ethereum/swarm/storage/localstore -bench BenchmarkNew -v -timeout 20m +// # go test -benchmem -run=none github.com/dexon-foundation/dexon/swarm/storage/localstore -bench BenchmarkNew -v -timeout 20m // goos: darwin // goarch: amd64 -// pkg: github.com/ethereum/go-ethereum/swarm/storage/localstore +// pkg: github.com/dexon-foundation/dexon/swarm/storage/localstore // BenchmarkNew/1000-8 200 11672414 ns/op 9570960 B/op 10008 allocs/op // BenchmarkNew/10000-8 100 14890609 ns/op 10490118 B/op 7759 allocs/op // BenchmarkNew/100000-8 20 58334080 ns/op 17763157 B/op 22978 allocs/op diff --git a/swarm/storage/localstore/mode_get.go b/swarm/storage/localstore/mode_get.go index 3a69f6e9d..16080f4f9 100644 --- a/swarm/storage/localstore/mode_get.go +++ b/swarm/storage/localstore/mode_get.go @@ -17,9 +17,9 @@ package localstore import ( - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/swarm/shed" - "github.com/ethereum/go-ethereum/swarm/storage" + "github.com/dexon-foundation/dexon/log" + "github.com/dexon-foundation/dexon/swarm/shed" + "github.com/dexon-foundation/dexon/swarm/storage" "github.com/syndtr/goleveldb/leveldb" ) diff --git a/swarm/storage/localstore/mode_put.go b/swarm/storage/localstore/mode_put.go index 1a5a3d1b1..0052d6c96 100644 --- a/swarm/storage/localstore/mode_put.go +++ b/swarm/storage/localstore/mode_put.go @@ -17,8 +17,8 @@ package localstore import ( - "github.com/ethereum/go-ethereum/swarm/shed" - "github.com/ethereum/go-ethereum/swarm/storage" + "github.com/dexon-foundation/dexon/swarm/shed" + "github.com/dexon-foundation/dexon/swarm/storage" "github.com/syndtr/goleveldb/leveldb" ) diff --git a/swarm/storage/localstore/mode_put_test.go b/swarm/storage/localstore/mode_put_test.go index ffe6a4cb4..ca034c03e 100644 --- a/swarm/storage/localstore/mode_put_test.go +++ b/swarm/storage/localstore/mode_put_test.go @@ -23,7 +23,7 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/swarm/storage" + "github.com/dexon-foundation/dexon/swarm/storage" ) // TestModePutRequest validates ModePutRequest index values on the provided DB. @@ -208,11 +208,11 @@ func TestModePutUpload_parallel(t *testing.T) { // // Measurements on MacBook Pro (Retina, 15-inch, Mid 2014) // -// # go test -benchmem -run=none github.com/ethereum/go-ethereum/swarm/storage/localstore -bench BenchmarkPutUpload -v +// # go test -benchmem -run=none github.com/dexon-foundation/dexon/swarm/storage/localstore -bench BenchmarkPutUpload -v // // goos: darwin // goarch: amd64 -// pkg: github.com/ethereum/go-ethereum/swarm/storage/localstore +// pkg: github.com/dexon-foundation/dexon/swarm/storage/localstore // BenchmarkPutUpload/count_100_parallel_1-8 300 5107704 ns/op 2081461 B/op 2374 allocs/op // BenchmarkPutUpload/count_100_parallel_2-8 300 5411742 ns/op 2081608 B/op 2364 allocs/op // BenchmarkPutUpload/count_100_parallel_4-8 500 3704964 ns/op 2081696 B/op 2324 allocs/op diff --git a/swarm/storage/localstore/mode_set.go b/swarm/storage/localstore/mode_set.go index a522f4447..8043af88d 100644 --- a/swarm/storage/localstore/mode_set.go +++ b/swarm/storage/localstore/mode_set.go @@ -17,7 +17,7 @@ package localstore import ( - "github.com/ethereum/go-ethereum/swarm/storage" + "github.com/dexon-foundation/dexon/swarm/storage" "github.com/syndtr/goleveldb/leveldb" ) diff --git a/swarm/storage/localstore/retrieval_index_test.go b/swarm/storage/localstore/retrieval_index_test.go index 9f5b452c5..bccdc6ed9 100644 --- a/swarm/storage/localstore/retrieval_index_test.go +++ b/swarm/storage/localstore/retrieval_index_test.go @@ -20,7 +20,7 @@ import ( "strconv" "testing" - "github.com/ethereum/go-ethereum/swarm/storage" + "github.com/dexon-foundation/dexon/swarm/storage" ) // BenchmarkRetrievalIndexes uploads a number of chunks in order to measure @@ -32,10 +32,10 @@ import ( // Measurements on MacBook Pro (Retina, 15-inch, Mid 2014) show // that two separated indexes perform better. // -// # go test -benchmem -run=none github.com/ethereum/go-ethereum/swarm/storage/localstore -bench BenchmarkRetrievalIndexes -v +// # go test -benchmem -run=none github.com/dexon-foundation/dexon/swarm/storage/localstore -bench BenchmarkRetrievalIndexes -v // goos: darwin // goarch: amd64 -// pkg: github.com/ethereum/go-ethereum/swarm/storage/localstore +// pkg: github.com/dexon-foundation/dexon/swarm/storage/localstore // BenchmarkRetrievalIndexes/1000-8 20 75556686 ns/op 19033493 B/op 84500 allocs/op // BenchmarkRetrievalIndexes/10000-8 1 1079084922 ns/op 382792064 B/op 1429644 allocs/op // BenchmarkRetrievalIndexes/100000-8 1 16891305737 ns/op 2629165304 B/op 12465019 allocs/op @@ -104,10 +104,10 @@ func benchmarkRetrievalIndexes(b *testing.B, o *Options, count int) { // // Measurements on MacBook Pro (Retina, 15-inch, Mid 2014). // -// go test -benchmem -run=none github.com/ethereum/go-ethereum/swarm/storage/localstore -bench BenchmarkUpload -v +// go test -benchmem -run=none github.com/dexon-foundation/dexon/swarm/storage/localstore -bench BenchmarkUpload -v // goos: darwin // goarch: amd64 -// pkg: github.com/ethereum/go-ethereum/swarm/storage/localstore +// pkg: github.com/dexon-foundation/dexon/swarm/storage/localstore // BenchmarkUpload/1000-8 20 59437463 ns/op 25205193 B/op 23208 allocs/op // BenchmarkUpload/10000-8 2 580646362 ns/op 216532932 B/op 248090 allocs/op // BenchmarkUpload/100000-8 1 22373390892 ns/op 2323055312 B/op 3995903 allocs/op diff --git a/swarm/storage/localstore/subscription_pull.go b/swarm/storage/localstore/subscription_pull.go index a18f0915d..7c686d31d 100644 --- a/swarm/storage/localstore/subscription_pull.go +++ b/swarm/storage/localstore/subscription_pull.go @@ -23,9 +23,9 @@ import ( "fmt" "sync" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/swarm/shed" - "github.com/ethereum/go-ethereum/swarm/storage" + "github.com/dexon-foundation/dexon/log" + "github.com/dexon-foundation/dexon/swarm/shed" + "github.com/dexon-foundation/dexon/swarm/storage" ) // SubscribePull returns a channel that provides chunk addresses and stored times from pull syncing index. diff --git a/swarm/storage/localstore/subscription_pull_test.go b/swarm/storage/localstore/subscription_pull_test.go index 5c99e0dec..918ec4513 100644 --- a/swarm/storage/localstore/subscription_pull_test.go +++ b/swarm/storage/localstore/subscription_pull_test.go @@ -24,7 +24,7 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/swarm/storage" + "github.com/dexon-foundation/dexon/swarm/storage" ) // TestDB_SubscribePull uploads some chunks before and after diff --git a/swarm/storage/localstore/subscription_push.go b/swarm/storage/localstore/subscription_push.go index b13f29399..4b554c38c 100644 --- a/swarm/storage/localstore/subscription_push.go +++ b/swarm/storage/localstore/subscription_push.go @@ -20,9 +20,9 @@ import ( "context" "sync" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/swarm/shed" - "github.com/ethereum/go-ethereum/swarm/storage" + "github.com/dexon-foundation/dexon/log" + "github.com/dexon-foundation/dexon/swarm/shed" + "github.com/dexon-foundation/dexon/swarm/storage" ) // SubscribePush returns a channel that provides storage chunks with ordering from push syncing index. diff --git a/swarm/storage/localstore/subscription_push_test.go b/swarm/storage/localstore/subscription_push_test.go index 73e7c25f7..52f57f52e 100644 --- a/swarm/storage/localstore/subscription_push_test.go +++ b/swarm/storage/localstore/subscription_push_test.go @@ -24,7 +24,7 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/swarm/storage" + "github.com/dexon-foundation/dexon/swarm/storage" ) // TestDB_SubscribePush uploads some chunks before and after diff --git a/swarm/storage/localstore_test.go b/swarm/storage/localstore_test.go index ec69951c4..140ea9bf6 100644 --- a/swarm/storage/localstore_test.go +++ b/swarm/storage/localstore_test.go @@ -23,7 +23,7 @@ import ( "testing" "time" - ch "github.com/ethereum/go-ethereum/swarm/chunk" + ch "github.com/dexon-foundation/dexon/swarm/chunk" ) var ( diff --git a/swarm/storage/memstore_test.go b/swarm/storage/memstore_test.go index 8aaf486a7..60557c000 100644 --- a/swarm/storage/memstore_test.go +++ b/swarm/storage/memstore_test.go @@ -20,7 +20,7 @@ import ( "context" "testing" - "github.com/ethereum/go-ethereum/swarm/log" + "github.com/dexon-foundation/dexon/swarm/log" ) func newTestMemStore() *MemStore { diff --git a/swarm/storage/mock/db/db.go b/swarm/storage/mock/db/db.go index 73ae199e8..05415fd92 100644 --- a/swarm/storage/mock/db/db.go +++ b/swarm/storage/mock/db/db.go @@ -27,8 +27,8 @@ import ( "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/util" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/swarm/storage/mock" + "github.com/dexon-foundation/dexon/common" + "github.com/dexon-foundation/dexon/swarm/storage/mock" ) // GlobalStore contains the LevelDB database that is storing diff --git a/swarm/storage/mock/db/db_test.go b/swarm/storage/mock/db/db_test.go index 782faaf35..30caf11a7 100644 --- a/swarm/storage/mock/db/db_test.go +++ b/swarm/storage/mock/db/db_test.go @@ -23,7 +23,7 @@ import ( "os" "testing" - "github.com/ethereum/go-ethereum/swarm/storage/mock/test" + "github.com/dexon-foundation/dexon/swarm/storage/mock/test" ) // TestDBStore is running a test.MockStore tests diff --git a/swarm/storage/mock/mem/mem.go b/swarm/storage/mock/mem/mem.go index 3a0a2beb8..b79d3550f 100644 --- a/swarm/storage/mock/mem/mem.go +++ b/swarm/storage/mock/mem/mem.go @@ -27,8 +27,8 @@ import ( "io/ioutil" "sync" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/swarm/storage/mock" + "github.com/dexon-foundation/dexon/common" + "github.com/dexon-foundation/dexon/swarm/storage/mock" ) // GlobalStore stores all chunk data and also keys and node addresses relations. diff --git a/swarm/storage/mock/mem/mem_test.go b/swarm/storage/mock/mem/mem_test.go index adcefaabb..c758bef42 100644 --- a/swarm/storage/mock/mem/mem_test.go +++ b/swarm/storage/mock/mem/mem_test.go @@ -19,7 +19,7 @@ package mem import ( "testing" - "github.com/ethereum/go-ethereum/swarm/storage/mock/test" + "github.com/dexon-foundation/dexon/swarm/storage/mock/test" ) // TestGlobalStore is running test for a GlobalStore diff --git a/swarm/storage/mock/mock.go b/swarm/storage/mock/mock.go index 626ba3fe1..59c86f584 100644 --- a/swarm/storage/mock/mock.go +++ b/swarm/storage/mock/mock.go @@ -36,7 +36,7 @@ import ( "errors" "io" - "github.com/ethereum/go-ethereum/common" + "github.com/dexon-foundation/dexon/common" ) // ErrNotFound indicates that the chunk is not found. diff --git a/swarm/storage/mock/rpc/rpc.go b/swarm/storage/mock/rpc/rpc.go index 8cd6c83a7..ef8320b9a 100644 --- a/swarm/storage/mock/rpc/rpc.go +++ b/swarm/storage/mock/rpc/rpc.go @@ -26,10 +26,10 @@ package rpc import ( "fmt" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/rpc" - "github.com/ethereum/go-ethereum/swarm/log" - "github.com/ethereum/go-ethereum/swarm/storage/mock" + "github.com/dexon-foundation/dexon/common" + "github.com/dexon-foundation/dexon/rpc" + "github.com/dexon-foundation/dexon/swarm/log" + "github.com/dexon-foundation/dexon/swarm/storage/mock" ) // GlobalStore is rpc.Client that connects to a centralized mock store. diff --git a/swarm/storage/mock/rpc/rpc_test.go b/swarm/storage/mock/rpc/rpc_test.go index f62340ede..0f5430ac8 100644 --- a/swarm/storage/mock/rpc/rpc_test.go +++ b/swarm/storage/mock/rpc/rpc_test.go @@ -19,9 +19,9 @@ package rpc import ( "testing" - "github.com/ethereum/go-ethereum/rpc" - "github.com/ethereum/go-ethereum/swarm/storage/mock/mem" - "github.com/ethereum/go-ethereum/swarm/storage/mock/test" + "github.com/dexon-foundation/dexon/rpc" + "github.com/dexon-foundation/dexon/swarm/storage/mock/mem" + "github.com/dexon-foundation/dexon/swarm/storage/mock/test" ) // TestDBStore is running test for a GlobalStore diff --git a/swarm/storage/mock/test/test.go b/swarm/storage/mock/test/test.go index 69828b144..764ed1528 100644 --- a/swarm/storage/mock/test/test.go +++ b/swarm/storage/mock/test/test.go @@ -25,9 +25,9 @@ import ( "strconv" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/swarm/storage" - "github.com/ethereum/go-ethereum/swarm/storage/mock" + "github.com/dexon-foundation/dexon/common" + "github.com/dexon-foundation/dexon/swarm/storage" + "github.com/dexon-foundation/dexon/swarm/storage/mock" ) // MockStore creates NodeStore instances from provided GlobalStorer, diff --git a/swarm/storage/netstore.go b/swarm/storage/netstore.go index 202af2bf5..e2734600b 100644 --- a/swarm/storage/netstore.go +++ b/swarm/storage/netstore.go @@ -24,8 +24,8 @@ import ( "sync/atomic" "time" - "github.com/ethereum/go-ethereum/p2p/enode" - "github.com/ethereum/go-ethereum/swarm/log" + "github.com/dexon-foundation/dexon/p2p/enode" + "github.com/dexon-foundation/dexon/swarm/log" lru "github.com/hashicorp/golang-lru" ) diff --git a/swarm/storage/netstore_test.go b/swarm/storage/netstore_test.go index 88ec6c28f..ef9715626 100644 --- a/swarm/storage/netstore_test.go +++ b/swarm/storage/netstore_test.go @@ -27,9 +27,9 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/p2p/enode" - ch "github.com/ethereum/go-ethereum/swarm/chunk" + "github.com/dexon-foundation/dexon/common" + "github.com/dexon-foundation/dexon/p2p/enode" + ch "github.com/dexon-foundation/dexon/swarm/chunk" ) var sourcePeerID = enode.HexID("99d8594b52298567d2ca3f4c441a5ba0140ee9245e26460d01102a52773c73b9") diff --git a/swarm/storage/pyramid.go b/swarm/storage/pyramid.go index ed0f843b9..0789e75ae 100644 --- a/swarm/storage/pyramid.go +++ b/swarm/storage/pyramid.go @@ -25,8 +25,8 @@ import ( "sync" "time" - ch "github.com/ethereum/go-ethereum/swarm/chunk" - "github.com/ethereum/go-ethereum/swarm/log" + ch "github.com/dexon-foundation/dexon/swarm/chunk" + "github.com/dexon-foundation/dexon/swarm/log" ) /* diff --git a/swarm/storage/types.go b/swarm/storage/types.go index 7ec21328e..fa0e4e115 100644 --- a/swarm/storage/types.go +++ b/swarm/storage/types.go @@ -25,9 +25,9 @@ import ( "fmt" "io" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/swarm/bmt" - ch "github.com/ethereum/go-ethereum/swarm/chunk" + "github.com/dexon-foundation/dexon/common" + "github.com/dexon-foundation/dexon/swarm/bmt" + ch "github.com/dexon-foundation/dexon/swarm/chunk" "golang.org/x/crypto/sha3" ) |