From 21cbe9d5b1630be351329a5715fd599030a00122 Mon Sep 17 00:00:00 2001 From: Wei-Ning Huang Date: Wed, 26 Sep 2018 10:48:31 +0800 Subject: Change import go github.com/dexon-foundation/dexon --- swarm/pss/api.go | 10 +++++----- swarm/pss/client/client.go | 16 ++++++++-------- swarm/pss/client/client_test.go | 24 ++++++++++++------------ swarm/pss/client/doc.go | 10 +++++----- swarm/pss/forwarding_test.go | 14 +++++++------- swarm/pss/handshake.go | 14 +++++++------- swarm/pss/handshake_test.go | 2 +- swarm/pss/keystore.go | 10 +++++----- swarm/pss/notify/notify.go | 12 ++++++------ swarm/pss/notify/notify_test.go | 22 +++++++++++----------- swarm/pss/ping.go | 6 +++--- swarm/pss/protocol.go | 8 ++++---- swarm/pss/protocol_test.go | 8 ++++---- swarm/pss/pss.go | 24 ++++++++++++------------ swarm/pss/pss_test.go | 34 +++++++++++++++++----------------- swarm/pss/types.go | 12 ++++++------ swarm/pss/writeup.md | 24 ++++++++++++------------ 17 files changed, 125 insertions(+), 125 deletions(-) (limited to 'swarm/pss') diff --git a/swarm/pss/api.go b/swarm/pss/api.go index 4556d7b7c..9cb1208f4 100644 --- a/swarm/pss/api.go +++ b/swarm/pss/api.go @@ -21,11 +21,11 @@ import ( "errors" "fmt" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/rpc" - "github.com/ethereum/go-ethereum/swarm/log" + "github.com/dexon-foundation/dexon/common/hexutil" + "github.com/dexon-foundation/dexon/crypto" + "github.com/dexon-foundation/dexon/p2p" + "github.com/dexon-foundation/dexon/rpc" + "github.com/dexon-foundation/dexon/swarm/log" ) // Wrapper for receiving pss messages when using the pss API diff --git a/swarm/pss/client/client.go b/swarm/pss/client/client.go index 5ee387aa7..89c6d9b13 100644 --- a/swarm/pss/client/client.go +++ b/swarm/pss/client/client.go @@ -25,14 +25,14 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/p2p/enode" - "github.com/ethereum/go-ethereum/p2p/protocols" - "github.com/ethereum/go-ethereum/rlp" - "github.com/ethereum/go-ethereum/rpc" - "github.com/ethereum/go-ethereum/swarm/log" - "github.com/ethereum/go-ethereum/swarm/pss" + "github.com/dexon-foundation/dexon/common/hexutil" + "github.com/dexon-foundation/dexon/p2p" + "github.com/dexon-foundation/dexon/p2p/enode" + "github.com/dexon-foundation/dexon/p2p/protocols" + "github.com/dexon-foundation/dexon/rlp" + "github.com/dexon-foundation/dexon/rpc" + "github.com/dexon-foundation/dexon/swarm/log" + "github.com/dexon-foundation/dexon/swarm/pss" ) const ( diff --git a/swarm/pss/client/client_test.go b/swarm/pss/client/client_test.go index 1c6f2e522..ed01badb2 100644 --- a/swarm/pss/client/client_test.go +++ b/swarm/pss/client/client_test.go @@ -27,18 +27,18 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/node" - "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/p2p/enode" - "github.com/ethereum/go-ethereum/p2p/simulations" - "github.com/ethereum/go-ethereum/p2p/simulations/adapters" - "github.com/ethereum/go-ethereum/rpc" - "github.com/ethereum/go-ethereum/swarm/network" - "github.com/ethereum/go-ethereum/swarm/pss" - "github.com/ethereum/go-ethereum/swarm/state" - whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" + "github.com/dexon-foundation/dexon/common/hexutil" + "github.com/dexon-foundation/dexon/log" + "github.com/dexon-foundation/dexon/node" + "github.com/dexon-foundation/dexon/p2p" + "github.com/dexon-foundation/dexon/p2p/enode" + "github.com/dexon-foundation/dexon/p2p/simulations" + "github.com/dexon-foundation/dexon/p2p/simulations/adapters" + "github.com/dexon-foundation/dexon/rpc" + "github.com/dexon-foundation/dexon/swarm/network" + "github.com/dexon-foundation/dexon/swarm/pss" + "github.com/dexon-foundation/dexon/swarm/state" + whisper "github.com/dexon-foundation/dexon/whisper/whisperv6" ) type protoCtrl struct { diff --git a/swarm/pss/client/doc.go b/swarm/pss/client/doc.go index 080af45a9..cd60ec341 100644 --- a/swarm/pss/client/doc.go +++ b/swarm/pss/client/doc.go @@ -28,11 +28,11 @@ // "context" // "fmt" // "os" -// pss "github.com/ethereum/go-ethereum/swarm/pss/client" -// "github.com/ethereum/go-ethereum/p2p/protocols" -// "github.com/ethereum/go-ethereum/p2p" -// "github.com/ethereum/go-ethereum/swarm/pot" -// "github.com/ethereum/go-ethereum/swarm/log" +// pss "github.com/dexon-foundation/dexon/swarm/pss/client" +// "github.com/dexon-foundation/dexon/p2p/protocols" +// "github.com/dexon-foundation/dexon/p2p" +// "github.com/dexon-foundation/dexon/swarm/pot" +// "github.com/dexon-foundation/dexon/swarm/log" // ) // // type FooMsg struct { diff --git a/swarm/pss/forwarding_test.go b/swarm/pss/forwarding_test.go index 746d4dc40..983c69c97 100644 --- a/swarm/pss/forwarding_test.go +++ b/swarm/pss/forwarding_test.go @@ -6,13 +6,13 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/p2p/enode" - "github.com/ethereum/go-ethereum/p2p/protocols" - "github.com/ethereum/go-ethereum/swarm/network" - "github.com/ethereum/go-ethereum/swarm/pot" - whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" + "github.com/dexon-foundation/dexon/crypto" + "github.com/dexon-foundation/dexon/p2p" + "github.com/dexon-foundation/dexon/p2p/enode" + "github.com/dexon-foundation/dexon/p2p/protocols" + "github.com/dexon-foundation/dexon/swarm/network" + "github.com/dexon-foundation/dexon/swarm/pot" + whisper "github.com/dexon-foundation/dexon/whisper/whisperv6" ) type testCase struct { diff --git a/swarm/pss/handshake.go b/swarm/pss/handshake.go index bb67b5156..d637042a0 100644 --- a/swarm/pss/handshake.go +++ b/swarm/pss/handshake.go @@ -25,13 +25,13 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/rlp" - "github.com/ethereum/go-ethereum/rpc" - "github.com/ethereum/go-ethereum/swarm/log" + "github.com/dexon-foundation/dexon/common" + "github.com/dexon-foundation/dexon/common/hexutil" + "github.com/dexon-foundation/dexon/crypto" + "github.com/dexon-foundation/dexon/p2p" + "github.com/dexon-foundation/dexon/rlp" + "github.com/dexon-foundation/dexon/rpc" + "github.com/dexon-foundation/dexon/swarm/log" ) const ( diff --git a/swarm/pss/handshake_test.go b/swarm/pss/handshake_test.go index 895163f30..25454db0c 100644 --- a/swarm/pss/handshake_test.go +++ b/swarm/pss/handshake_test.go @@ -24,7 +24,7 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/swarm/log" + "github.com/dexon-foundation/dexon/swarm/log" ) // asymmetrical key exchange between two directly connected peers diff --git a/swarm/pss/keystore.go b/swarm/pss/keystore.go index 510d21bcf..72e8ebb30 100644 --- a/swarm/pss/keystore.go +++ b/swarm/pss/keystore.go @@ -22,11 +22,11 @@ import ( "fmt" "sync" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/metrics" - "github.com/ethereum/go-ethereum/swarm/log" - whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" + "github.com/dexon-foundation/dexon/common" + "github.com/dexon-foundation/dexon/crypto" + "github.com/dexon-foundation/dexon/metrics" + "github.com/dexon-foundation/dexon/swarm/log" + whisper "github.com/dexon-foundation/dexon/whisper/whisperv6" ) type KeyStore struct { diff --git a/swarm/pss/notify/notify.go b/swarm/pss/notify/notify.go index e9d40dc32..60e429262 100644 --- a/swarm/pss/notify/notify.go +++ b/swarm/pss/notify/notify.go @@ -5,12 +5,12 @@ import ( "fmt" "sync" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/rlp" - "github.com/ethereum/go-ethereum/swarm/log" - "github.com/ethereum/go-ethereum/swarm/pss" + "github.com/dexon-foundation/dexon/common/hexutil" + "github.com/dexon-foundation/dexon/crypto" + "github.com/dexon-foundation/dexon/p2p" + "github.com/dexon-foundation/dexon/rlp" + "github.com/dexon-foundation/dexon/swarm/log" + "github.com/dexon-foundation/dexon/swarm/pss" ) const ( diff --git a/swarm/pss/notify/notify_test.go b/swarm/pss/notify/notify_test.go index bd9b2a4c1..e6a1e17c0 100644 --- a/swarm/pss/notify/notify_test.go +++ b/swarm/pss/notify/notify_test.go @@ -9,17 +9,17 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/node" - "github.com/ethereum/go-ethereum/p2p/enode" - "github.com/ethereum/go-ethereum/p2p/simulations" - "github.com/ethereum/go-ethereum/p2p/simulations/adapters" - "github.com/ethereum/go-ethereum/swarm/network" - "github.com/ethereum/go-ethereum/swarm/pss" - "github.com/ethereum/go-ethereum/swarm/state" - whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" + "github.com/dexon-foundation/dexon/common/hexutil" + "github.com/dexon-foundation/dexon/crypto" + "github.com/dexon-foundation/dexon/log" + "github.com/dexon-foundation/dexon/node" + "github.com/dexon-foundation/dexon/p2p/enode" + "github.com/dexon-foundation/dexon/p2p/simulations" + "github.com/dexon-foundation/dexon/p2p/simulations/adapters" + "github.com/dexon-foundation/dexon/swarm/network" + "github.com/dexon-foundation/dexon/swarm/pss" + "github.com/dexon-foundation/dexon/swarm/state" + whisper "github.com/dexon-foundation/dexon/whisper/whisperv6" ) var ( diff --git a/swarm/pss/ping.go b/swarm/pss/ping.go index ff635f40a..b45bd169b 100644 --- a/swarm/pss/ping.go +++ b/swarm/pss/ping.go @@ -23,9 +23,9 @@ import ( "errors" "time" - "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/p2p/protocols" - "github.com/ethereum/go-ethereum/swarm/log" + "github.com/dexon-foundation/dexon/p2p" + "github.com/dexon-foundation/dexon/p2p/protocols" + "github.com/dexon-foundation/dexon/swarm/log" ) // Generic ping protocol implementation for diff --git a/swarm/pss/protocol.go b/swarm/pss/protocol.go index 7f186f615..d3751f157 100644 --- a/swarm/pss/protocol.go +++ b/swarm/pss/protocol.go @@ -24,10 +24,10 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/p2p/protocols" - "github.com/ethereum/go-ethereum/rlp" - "github.com/ethereum/go-ethereum/swarm/log" + "github.com/dexon-foundation/dexon/p2p" + "github.com/dexon-foundation/dexon/p2p/protocols" + "github.com/dexon-foundation/dexon/rlp" + "github.com/dexon-foundation/dexon/swarm/log" ) const ( diff --git a/swarm/pss/protocol_test.go b/swarm/pss/protocol_test.go index 520c48a20..6d379c067 100644 --- a/swarm/pss/protocol_test.go +++ b/swarm/pss/protocol_test.go @@ -25,10 +25,10 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/p2p/enode" - "github.com/ethereum/go-ethereum/swarm/log" + "github.com/dexon-foundation/dexon/common" + "github.com/dexon-foundation/dexon/p2p" + "github.com/dexon-foundation/dexon/p2p/enode" + "github.com/dexon-foundation/dexon/swarm/log" ) type protoCtrl struct { diff --git a/swarm/pss/pss.go b/swarm/pss/pss.go index 183aab04d..b371f615e 100644 --- a/swarm/pss/pss.go +++ b/swarm/pss/pss.go @@ -27,18 +27,18 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/metrics" - "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/p2p/enode" - "github.com/ethereum/go-ethereum/p2p/protocols" - "github.com/ethereum/go-ethereum/rpc" - "github.com/ethereum/go-ethereum/swarm/log" - "github.com/ethereum/go-ethereum/swarm/network" - "github.com/ethereum/go-ethereum/swarm/pot" - "github.com/ethereum/go-ethereum/swarm/storage" - whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" + "github.com/dexon-foundation/dexon/common" + "github.com/dexon-foundation/dexon/crypto" + "github.com/dexon-foundation/dexon/metrics" + "github.com/dexon-foundation/dexon/p2p" + "github.com/dexon-foundation/dexon/p2p/enode" + "github.com/dexon-foundation/dexon/p2p/protocols" + "github.com/dexon-foundation/dexon/rpc" + "github.com/dexon-foundation/dexon/swarm/log" + "github.com/dexon-foundation/dexon/swarm/network" + "github.com/dexon-foundation/dexon/swarm/pot" + "github.com/dexon-foundation/dexon/swarm/storage" + whisper "github.com/dexon-foundation/dexon/whisper/whisperv6" "golang.org/x/crypto/sha3" ) diff --git a/swarm/pss/pss_test.go b/swarm/pss/pss_test.go index 675b4cfcd..2de8988cd 100644 --- a/swarm/pss/pss_test.go +++ b/swarm/pss/pss_test.go @@ -34,23 +34,23 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/metrics" - "github.com/ethereum/go-ethereum/metrics/influxdb" - "github.com/ethereum/go-ethereum/node" - "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/p2p/enode" - "github.com/ethereum/go-ethereum/p2p/protocols" - "github.com/ethereum/go-ethereum/p2p/simulations" - "github.com/ethereum/go-ethereum/p2p/simulations/adapters" - "github.com/ethereum/go-ethereum/rpc" - "github.com/ethereum/go-ethereum/swarm/network" - "github.com/ethereum/go-ethereum/swarm/pot" - "github.com/ethereum/go-ethereum/swarm/state" - whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" + "github.com/dexon-foundation/dexon/common" + "github.com/dexon-foundation/dexon/common/hexutil" + "github.com/dexon-foundation/dexon/crypto" + "github.com/dexon-foundation/dexon/log" + "github.com/dexon-foundation/dexon/metrics" + "github.com/dexon-foundation/dexon/metrics/influxdb" + "github.com/dexon-foundation/dexon/node" + "github.com/dexon-foundation/dexon/p2p" + "github.com/dexon-foundation/dexon/p2p/enode" + "github.com/dexon-foundation/dexon/p2p/protocols" + "github.com/dexon-foundation/dexon/p2p/simulations" + "github.com/dexon-foundation/dexon/p2p/simulations/adapters" + "github.com/dexon-foundation/dexon/rpc" + "github.com/dexon-foundation/dexon/swarm/network" + "github.com/dexon-foundation/dexon/swarm/pot" + "github.com/dexon-foundation/dexon/swarm/state" + whisper "github.com/dexon-foundation/dexon/whisper/whisperv6" ) var ( diff --git a/swarm/pss/types.go b/swarm/pss/types.go index 2ce1f5cfb..d66a2d4e3 100644 --- a/swarm/pss/types.go +++ b/swarm/pss/types.go @@ -21,12 +21,12 @@ import ( "fmt" "sync" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/rlp" - "github.com/ethereum/go-ethereum/swarm/storage" - whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" + "github.com/dexon-foundation/dexon/common" + "github.com/dexon-foundation/dexon/common/hexutil" + "github.com/dexon-foundation/dexon/p2p" + "github.com/dexon-foundation/dexon/rlp" + "github.com/dexon-foundation/dexon/swarm/storage" + whisper "github.com/dexon-foundation/dexon/whisper/whisperv6" ) const ( diff --git a/swarm/pss/writeup.md b/swarm/pss/writeup.md index af731fe7f..06f72c4d6 100644 --- a/swarm/pss/writeup.md +++ b/swarm/pss/writeup.md @@ -36,22 +36,22 @@ go test -race -v ./swarm/pss -cpu 4 -run TestNetwork 1 ================== 2 WARNING: DATA RACE 3 Read at 0x00c424d456a0 by goroutine 1089: - 4 github.com/ethereum/go-ethereum/swarm/pss.(*Pss).forward.func1() - 5 /Users/nonsense/code/src/github.com/ethereum/go-ethereum/swarm/pss/pss.go:654 +0x44f - 6 github.com/ethereum/go-ethereum/swarm/network.(*Kademlia).eachConn.func1() - 7 /Users/nonsense/code/src/github.com/ethereum/go-ethereum/swarm/network/kademlia.go:350 +0xc9 - 8 github.com/ethereum/go-ethereum/pot.(*Pot).eachNeighbour.func1() - 9 /Users/nonsense/code/src/github.com/ethereum/go-ethereum/pot/pot.go:599 +0x59 + 4 github.com/dexon-foundation/dexon/swarm/pss.(*Pss).forward.func1() + 5 /Users/nonsense/code/src/github.com/dexon-foundation/dexon/swarm/pss/pss.go:654 +0x44f + 6 github.com/dexon-foundation/dexon/swarm/network.(*Kademlia).eachConn.func1() + 7 /Users/nonsense/code/src/github.com/dexon-foundation/dexon/swarm/network/kademlia.go:350 +0xc9 + 8 github.com/dexon-foundation/dexon/pot.(*Pot).eachNeighbour.func1() + 9 /Users/nonsense/code/src/github.com/dexon-foundation/dexon/pot/pot.go:599 +0x59 ... 28 29 Previous write at 0x00c424d456a0 by goroutine 829: - 30 github.com/ethereum/go-ethereum/swarm/pss.(*Pss).Run() - 31 /Users/nonsense/code/src/github.com/ethereum/go-ethereum/swarm/pss/pss.go:192 +0x16a - 32 github.com/ethereum/go-ethereum/swarm/pss.(*Pss).Run-fm() - 33 /Users/nonsense/code/src/github.com/ethereum/go-ethereum/swarm/pss/pss.go:185 +0x63 - 34 github.com/ethereum/go-ethereum/p2p.(*Peer).startProtocols.func1() - 35 /Users/nonsense/code/src/github.com/ethereum/go-ethereum/p2p/peer.go:347 +0x8b + 30 github.com/dexon-foundation/dexon/swarm/pss.(*Pss).Run() + 31 /Users/nonsense/code/src/github.com/dexon-foundation/dexon/swarm/pss/pss.go:192 +0x16a + 32 github.com/dexon-foundation/dexon/swarm/pss.(*Pss).Run-fm() + 33 /Users/nonsense/code/src/github.com/dexon-foundation/dexon/swarm/pss/pss.go:185 +0x63 + 34 github.com/dexon-foundation/dexon/p2p.(*Peer).startProtocols.func1() + 35 /Users/nonsense/code/src/github.com/dexon-foundation/dexon/p2p/peer.go:347 +0x8b ... ``` -- cgit