Go fmt -w

This commit is contained in:
kozlov-oleksandr 2018-08-15 15:39:01 +03:00
parent 4d4c67ee5b
commit 198fa243b5
61 changed files with 98 additions and 103 deletions

View file

@ -22,10 +22,10 @@ import (
"sync" "sync"
"time" "time"
"github.com/karalabe/hid"
"github.com/orangeAndSuns/go-ethereum/accounts" "github.com/orangeAndSuns/go-ethereum/accounts"
"github.com/orangeAndSuns/go-ethereum/event" "github.com/orangeAndSuns/go-ethereum/event"
"github.com/orangeAndSuns/go-ethereum/log" "github.com/orangeAndSuns/go-ethereum/log"
"github.com/karalabe/hid"
) )
// LedgerScheme is the protocol scheme prefixing account and wallet URLs. // LedgerScheme is the protocol scheme prefixing account and wallet URLs.

View file

@ -27,13 +27,13 @@ import (
"io" "io"
"math/big" "math/big"
"github.com/golang/protobuf/proto"
"github.com/orangeAndSuns/go-ethereum/accounts" "github.com/orangeAndSuns/go-ethereum/accounts"
"github.com/orangeAndSuns/go-ethereum/accounts/usbwallet/internal/trezor" "github.com/orangeAndSuns/go-ethereum/accounts/usbwallet/internal/trezor"
"github.com/orangeAndSuns/go-ethereum/common" "github.com/orangeAndSuns/go-ethereum/common"
"github.com/orangeAndSuns/go-ethereum/common/hexutil" "github.com/orangeAndSuns/go-ethereum/common/hexutil"
"github.com/orangeAndSuns/go-ethereum/core/types" "github.com/orangeAndSuns/go-ethereum/core/types"
"github.com/orangeAndSuns/go-ethereum/log" "github.com/orangeAndSuns/go-ethereum/log"
"github.com/golang/protobuf/proto"
) )
// ErrTrezorPINNeeded is returned if opening the trezor requires a PIN code. In // ErrTrezorPINNeeded is returned if opening the trezor requires a PIN code. In

View file

@ -25,12 +25,12 @@ import (
"sync" "sync"
"time" "time"
"github.com/karalabe/hid"
ethereum "github.com/orangeAndSuns/go-ethereum" ethereum "github.com/orangeAndSuns/go-ethereum"
"github.com/orangeAndSuns/go-ethereum/accounts" "github.com/orangeAndSuns/go-ethereum/accounts"
"github.com/orangeAndSuns/go-ethereum/common" "github.com/orangeAndSuns/go-ethereum/common"
"github.com/orangeAndSuns/go-ethereum/core/types" "github.com/orangeAndSuns/go-ethereum/core/types"
"github.com/orangeAndSuns/go-ethereum/log" "github.com/orangeAndSuns/go-ethereum/log"
"github.com/karalabe/hid"
) )
// Maximum time between wallet health checks to detect USB unplugs. // Maximum time between wallet health checks to detect USB unplugs.

View file

@ -27,13 +27,13 @@ import (
cli "gopkg.in/urfave/cli.v1" cli "gopkg.in/urfave/cli.v1"
"github.com/naoina/toml"
"github.com/orangeAndSuns/go-ethereum/cmd/utils" "github.com/orangeAndSuns/go-ethereum/cmd/utils"
"github.com/orangeAndSuns/go-ethereum/dashboard" "github.com/orangeAndSuns/go-ethereum/dashboard"
"github.com/orangeAndSuns/go-ethereum/eth" "github.com/orangeAndSuns/go-ethereum/eth"
"github.com/orangeAndSuns/go-ethereum/node" "github.com/orangeAndSuns/go-ethereum/node"
"github.com/orangeAndSuns/go-ethereum/params" "github.com/orangeAndSuns/go-ethereum/params"
whisper "github.com/orangeAndSuns/go-ethereum/whisper/whisperv6" whisper "github.com/orangeAndSuns/go-ethereum/whisper/whisperv6"
"github.com/naoina/toml"
) )
var ( var (

View file

@ -25,10 +25,10 @@ import (
"strings" "strings"
"time" "time"
"github.com/gizak/termui"
"github.com/orangeAndSuns/go-ethereum/cmd/utils" "github.com/orangeAndSuns/go-ethereum/cmd/utils"
"github.com/orangeAndSuns/go-ethereum/node" "github.com/orangeAndSuns/go-ethereum/node"
"github.com/orangeAndSuns/go-ethereum/rpc" "github.com/orangeAndSuns/go-ethereum/rpc"
"github.com/gizak/termui"
"gopkg.in/urfave/cli.v1" "gopkg.in/urfave/cli.v1"
) )

View file

@ -23,9 +23,9 @@ import (
"strings" "strings"
"sync" "sync"
"github.com/olekukonko/tablewriter"
"github.com/orangeAndSuns/go-ethereum/core" "github.com/orangeAndSuns/go-ethereum/core"
"github.com/orangeAndSuns/go-ethereum/log" "github.com/orangeAndSuns/go-ethereum/log"
"github.com/olekukonko/tablewriter"
) )
// networkStats verifies the status of network components and generates a protip // networkStats verifies the status of network components and generates a protip

View file

@ -29,11 +29,11 @@ import (
cli "gopkg.in/urfave/cli.v1" cli "gopkg.in/urfave/cli.v1"
"github.com/naoina/toml"
"github.com/orangeAndSuns/go-ethereum/cmd/utils" "github.com/orangeAndSuns/go-ethereum/cmd/utils"
"github.com/orangeAndSuns/go-ethereum/common" "github.com/orangeAndSuns/go-ethereum/common"
"github.com/orangeAndSuns/go-ethereum/log" "github.com/orangeAndSuns/go-ethereum/log"
"github.com/orangeAndSuns/go-ethereum/node" "github.com/orangeAndSuns/go-ethereum/node"
"github.com/naoina/toml"
bzzapi "github.com/orangeAndSuns/go-ethereum/swarm/api" bzzapi "github.com/orangeAndSuns/go-ethereum/swarm/api"
) )

View file

@ -28,8 +28,8 @@ import (
"testing" "testing"
"time" "time"
"github.com/orangeAndSuns/go-ethereum/log"
colorable "github.com/mattn/go-colorable" colorable "github.com/mattn/go-colorable"
"github.com/orangeAndSuns/go-ethereum/log"
) )
func init() { func init() {

View file

@ -20,8 +20,8 @@ import (
"os" "os"
"sort" "sort"
"github.com/orangeAndSuns/go-ethereum/log"
colorable "github.com/mattn/go-colorable" colorable "github.com/mattn/go-colorable"
"github.com/orangeAndSuns/go-ethereum/log"
cli "gopkg.in/urfave/cli.v1" cli "gopkg.in/urfave/cli.v1"
) )

View file

@ -30,9 +30,9 @@ import (
"testing" "testing"
"time" "time"
colorable "github.com/mattn/go-colorable"
"github.com/orangeAndSuns/go-ethereum/log" "github.com/orangeAndSuns/go-ethereum/log"
swarm "github.com/orangeAndSuns/go-ethereum/swarm/api/client" swarm "github.com/orangeAndSuns/go-ethereum/swarm/api/client"
colorable "github.com/mattn/go-colorable"
) )
var loglevel = flag.Int("loglevel", 3, "verbosity of logs") var loglevel = flag.Int("loglevel", 3, "verbosity of logs")

View file

@ -25,6 +25,7 @@ import (
"sync" "sync"
"time" "time"
lru "github.com/hashicorp/golang-lru"
"github.com/orangeAndSuns/go-ethereum/accounts" "github.com/orangeAndSuns/go-ethereum/accounts"
"github.com/orangeAndSuns/go-ethereum/common" "github.com/orangeAndSuns/go-ethereum/common"
"github.com/orangeAndSuns/go-ethereum/common/hexutil" "github.com/orangeAndSuns/go-ethereum/common/hexutil"
@ -39,7 +40,6 @@ import (
"github.com/orangeAndSuns/go-ethereum/params" "github.com/orangeAndSuns/go-ethereum/params"
"github.com/orangeAndSuns/go-ethereum/rlp" "github.com/orangeAndSuns/go-ethereum/rlp"
"github.com/orangeAndSuns/go-ethereum/rpc" "github.com/orangeAndSuns/go-ethereum/rpc"
lru "github.com/hashicorp/golang-lru"
) )
const ( const (

View file

@ -21,11 +21,11 @@ import (
"encoding/json" "encoding/json"
"sort" "sort"
lru "github.com/hashicorp/golang-lru"
"github.com/orangeAndSuns/go-ethereum/common" "github.com/orangeAndSuns/go-ethereum/common"
"github.com/orangeAndSuns/go-ethereum/core/types" "github.com/orangeAndSuns/go-ethereum/core/types"
"github.com/orangeAndSuns/go-ethereum/ethdb" "github.com/orangeAndSuns/go-ethereum/ethdb"
"github.com/orangeAndSuns/go-ethereum/params" "github.com/orangeAndSuns/go-ethereum/params"
lru "github.com/hashicorp/golang-lru"
) )
// Vote represents a single vote that an authorized signer made to modify the // Vote represents a single vote that an authorized signer made to modify the

View file

@ -33,11 +33,11 @@ import (
"unsafe" "unsafe"
mmap "github.com/edsrzf/mmap-go" mmap "github.com/edsrzf/mmap-go"
"github.com/hashicorp/golang-lru/simplelru"
"github.com/orangeAndSuns/go-ethereum/consensus" "github.com/orangeAndSuns/go-ethereum/consensus"
"github.com/orangeAndSuns/go-ethereum/log" "github.com/orangeAndSuns/go-ethereum/log"
"github.com/orangeAndSuns/go-ethereum/metrics" "github.com/orangeAndSuns/go-ethereum/metrics"
"github.com/orangeAndSuns/go-ethereum/rpc" "github.com/orangeAndSuns/go-ethereum/rpc"
"github.com/hashicorp/golang-lru/simplelru"
) )
var ErrInvalidDumpMagic = errors.New("invalid dump magic") var ErrInvalidDumpMagic = errors.New("invalid dump magic")

View file

@ -28,10 +28,10 @@ import (
"strings" "strings"
"syscall" "syscall"
"github.com/mattn/go-colorable"
"github.com/orangeAndSuns/go-ethereum/internal/jsre" "github.com/orangeAndSuns/go-ethereum/internal/jsre"
"github.com/orangeAndSuns/go-ethereum/internal/web3ext" "github.com/orangeAndSuns/go-ethereum/internal/web3ext"
"github.com/orangeAndSuns/go-ethereum/rpc" "github.com/orangeAndSuns/go-ethereum/rpc"
"github.com/mattn/go-colorable"
"github.com/peterh/liner" "github.com/peterh/liner"
"github.com/robertkrimen/otto" "github.com/robertkrimen/otto"
) )

View file

@ -27,6 +27,7 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"github.com/hashicorp/golang-lru"
"github.com/orangeAndSuns/go-ethereum/common" "github.com/orangeAndSuns/go-ethereum/common"
"github.com/orangeAndSuns/go-ethereum/common/mclock" "github.com/orangeAndSuns/go-ethereum/common/mclock"
"github.com/orangeAndSuns/go-ethereum/consensus" "github.com/orangeAndSuns/go-ethereum/consensus"
@ -42,7 +43,6 @@ import (
"github.com/orangeAndSuns/go-ethereum/params" "github.com/orangeAndSuns/go-ethereum/params"
"github.com/orangeAndSuns/go-ethereum/rlp" "github.com/orangeAndSuns/go-ethereum/rlp"
"github.com/orangeAndSuns/go-ethereum/trie" "github.com/orangeAndSuns/go-ethereum/trie"
"github.com/hashicorp/golang-lru"
"gopkg.in/karalabe/cookiejar.v2/collections/prque" "gopkg.in/karalabe/cookiejar.v2/collections/prque"
) )

View file

@ -26,6 +26,7 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"github.com/hashicorp/golang-lru"
"github.com/orangeAndSuns/go-ethereum/common" "github.com/orangeAndSuns/go-ethereum/common"
"github.com/orangeAndSuns/go-ethereum/consensus" "github.com/orangeAndSuns/go-ethereum/consensus"
"github.com/orangeAndSuns/go-ethereum/core/rawdb" "github.com/orangeAndSuns/go-ethereum/core/rawdb"
@ -33,7 +34,6 @@ import (
"github.com/orangeAndSuns/go-ethereum/ethdb" "github.com/orangeAndSuns/go-ethereum/ethdb"
"github.com/orangeAndSuns/go-ethereum/log" "github.com/orangeAndSuns/go-ethereum/log"
"github.com/orangeAndSuns/go-ethereum/params" "github.com/orangeAndSuns/go-ethereum/params"
"github.com/hashicorp/golang-lru"
) )
const ( const (

View file

@ -20,10 +20,10 @@ import (
"fmt" "fmt"
"sync" "sync"
lru "github.com/hashicorp/golang-lru"
"github.com/orangeAndSuns/go-ethereum/common" "github.com/orangeAndSuns/go-ethereum/common"
"github.com/orangeAndSuns/go-ethereum/ethdb" "github.com/orangeAndSuns/go-ethereum/ethdb"
"github.com/orangeAndSuns/go-ethereum/trie" "github.com/orangeAndSuns/go-ethereum/trie"
lru "github.com/hashicorp/golang-lru"
) )
// Trie cache generation limit after which to evict trie nodes from memory. // Trie cache generation limit after which to evict trie nodes from memory.

View file

@ -35,12 +35,12 @@ import (
"io" "io"
"github.com/elastic/gosigar" "github.com/elastic/gosigar"
"github.com/mohae/deepcopy"
"github.com/orangeAndSuns/go-ethereum/log" "github.com/orangeAndSuns/go-ethereum/log"
"github.com/orangeAndSuns/go-ethereum/metrics" "github.com/orangeAndSuns/go-ethereum/metrics"
"github.com/orangeAndSuns/go-ethereum/p2p" "github.com/orangeAndSuns/go-ethereum/p2p"
"github.com/orangeAndSuns/go-ethereum/params" "github.com/orangeAndSuns/go-ethereum/params"
"github.com/orangeAndSuns/go-ethereum/rpc" "github.com/orangeAndSuns/go-ethereum/rpc"
"github.com/mohae/deepcopy"
"golang.org/x/net/websocket" "golang.org/x/net/websocket"
) )

View file

@ -26,8 +26,8 @@ import (
"sort" "sort"
"time" "time"
"github.com/orangeAndSuns/go-ethereum/log"
"github.com/mohae/deepcopy" "github.com/mohae/deepcopy"
"github.com/orangeAndSuns/go-ethereum/log"
"github.com/rjeczalik/notify" "github.com/rjeczalik/notify"
) )

View file

@ -24,12 +24,12 @@ import (
"os" "os"
"runtime" "runtime"
"github.com/fjl/memsize/memsizeui"
colorable "github.com/mattn/go-colorable"
"github.com/orangeAndSuns/go-ethereum/log" "github.com/orangeAndSuns/go-ethereum/log"
"github.com/orangeAndSuns/go-ethereum/log/term" "github.com/orangeAndSuns/go-ethereum/log/term"
"github.com/orangeAndSuns/go-ethereum/metrics" "github.com/orangeAndSuns/go-ethereum/metrics"
"github.com/orangeAndSuns/go-ethereum/metrics/exp" "github.com/orangeAndSuns/go-ethereum/metrics/exp"
"github.com/fjl/memsize/memsizeui"
colorable "github.com/mattn/go-colorable"
"gopkg.in/urfave/cli.v1" "gopkg.in/urfave/cli.v1"
) )

View file

@ -24,6 +24,7 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"github.com/hashicorp/golang-lru"
"github.com/orangeAndSuns/go-ethereum/common" "github.com/orangeAndSuns/go-ethereum/common"
"github.com/orangeAndSuns/go-ethereum/consensus" "github.com/orangeAndSuns/go-ethereum/consensus"
"github.com/orangeAndSuns/go-ethereum/core" "github.com/orangeAndSuns/go-ethereum/core"
@ -35,7 +36,6 @@ import (
"github.com/orangeAndSuns/go-ethereum/log" "github.com/orangeAndSuns/go-ethereum/log"
"github.com/orangeAndSuns/go-ethereum/params" "github.com/orangeAndSuns/go-ethereum/params"
"github.com/orangeAndSuns/go-ethereum/rlp" "github.com/orangeAndSuns/go-ethereum/rlp"
"github.com/hashicorp/golang-lru"
) )
var ( var (

View file

@ -5,9 +5,9 @@ import (
uurl "net/url" uurl "net/url"
"time" "time"
"github.com/influxdata/influxdb/client"
"github.com/orangeAndSuns/go-ethereum/log" "github.com/orangeAndSuns/go-ethereum/log"
"github.com/orangeAndSuns/go-ethereum/metrics" "github.com/orangeAndSuns/go-ethereum/metrics"
"github.com/influxdata/influxdb/client"
) )
type reporter struct { type reporter struct {

View file

@ -78,11 +78,11 @@ func runDialTest(t *testing.T, test dialtest) {
type fakeTable []*discover.Node type fakeTable []*discover.Node
func (t fakeTable) Self() *discover.Node { return new(discover.Node) } func (t fakeTable) Self() *discover.Node { return new(discover.Node) }
func (t fakeTable) Close() {} func (t fakeTable) Close() {}
func (t fakeTable) Lookup(discover.ESSNodeID) []*discover.Node { return nil } func (t fakeTable) Lookup(discover.ESSNodeID) []*discover.Node { return nil }
func (t fakeTable) Resolve(discover.ESSNodeID) *discover.Node { return nil } func (t fakeTable) Resolve(discover.ESSNodeID) *discover.Node { return nil }
func (t fakeTable) ReadRandomNodes(buf []*discover.Node) int { return copy(buf, t) } func (t fakeTable) ReadRandomNodes(buf []*discover.Node) int { return copy(buf, t) }
// This test checks that dynamic dials are launched from discovery results. // This test checks that dynamic dials are launched from discovery results.
func TestDialStateDynDial(t *testing.T) { func TestDialStateDynDial(t *testing.T) {
@ -689,8 +689,8 @@ func (t *resolveMock) Resolve(id discover.ESSNodeID) *discover.Node {
return t.answer return t.answer
} }
func (t *resolveMock) Self() *discover.Node { return new(discover.Node) } func (t *resolveMock) Self() *discover.Node { return new(discover.Node) }
func (t *resolveMock) Close() {} func (t *resolveMock) Close() {}
func (t *resolveMock) Bootstrap([]*discover.Node) {} func (t *resolveMock) Bootstrap([]*discover.Node) {}
func (t *resolveMock) Lookup(discover.ESSNodeID) []*discover.Node { return nil } func (t *resolveMock) Lookup(discover.ESSNodeID) []*discover.Node { return nil }
func (t *resolveMock) ReadRandomNodes(buf []*discover.Node) int { return 0 } func (t *resolveMock) ReadRandomNodes(buf []*discover.Node) int { return 0 }

View file

@ -39,7 +39,7 @@ import (
) )
var ( var (
nodeDBNilESSNodeID = ESSNodeID{} // Special node ID to use as a nil element. nodeDBNilESSNodeID = ESSNodeID{} // Special node ID to use as a nil element.
nodeDBNodeExpiration = 24 * time.Hour // Time after which an unseen node should be dropped. nodeDBNodeExpiration = 24 * time.Hour // Time after which an unseen node should be dropped.
nodeDBCleanupCycle = time.Hour // Time period for running the expiration task. nodeDBCleanupCycle = time.Hour // Time period for running the expiration task.
nodeDBVersion = 5 nodeDBVersion = 5
@ -48,7 +48,7 @@ var (
// nodeDB stores all nodes we know about. // nodeDB stores all nodes we know about.
type nodeDB struct { type nodeDB struct {
lvl *leveldb.DB // Interface to the database itself lvl *leveldb.DB // Interface to the database itself
self ESSNodeID // Own node id to prevent adding it into the database self ESSNodeID // Own node id to prevent adding it into the database
runner sync.Once // Ensures we can start at most one expirer runner sync.Once // Ensures we can start at most one expirer
quit chan struct{} // Channel to signal the expiring thread to stop quit chan struct{} // Channel to signal the expiring thread to stop
} }

View file

@ -41,8 +41,8 @@ const ESSNodeIDBits = 512
// Node represents a host on the network. // Node represents a host on the network.
// The fields of Node may not be modified. // The fields of Node may not be modified.
type Node struct { type Node struct {
IP net.IP // len 4 for IPv4 or 16 for IPv6 IP net.IP // len 4 for IPv4 or 16 for IPv6
UDP, TCP uint16 // port numbers UDP, TCP uint16 // port numbers
ID ESSNodeID // the node's public key ID ESSNodeID // the node's public key
// This is a cached copy of sha3(ID) which is used for node // This is a cached copy of sha3(ID) which is used for node

View file

@ -570,7 +570,7 @@ func (tn *preminedTestnet) findnode(toid ESSNodeID, toaddr *net.UDPAddr, target
return result, nil return result, nil
} }
func (*preminedTestnet) close() {} func (*preminedTestnet) close() {}
func (*preminedTestnet) waitping(from ESSNodeID) error { return nil } func (*preminedTestnet) waitping(from ESSNodeID) error { return nil }
func (*preminedTestnet) ping(toid ESSNodeID, toaddr *net.UDPAddr) error { return nil } func (*preminedTestnet) ping(toid ESSNodeID, toaddr *net.UDPAddr) error { return nil }

View file

@ -40,7 +40,7 @@ import (
) )
var ( var (
nodeDBNilESSNodeID = ESSNodeID{} // Special node ID to use as a nil element. nodeDBNilESSNodeID = ESSNodeID{} // Special node ID to use as a nil element.
nodeDBNodeExpiration = 24 * time.Hour // Time after which an unseen node should be dropped. nodeDBNodeExpiration = 24 * time.Hour // Time after which an unseen node should be dropped.
nodeDBCleanupCycle = time.Hour // Time period for running the expiration task. nodeDBCleanupCycle = time.Hour // Time period for running the expiration task.
) )
@ -48,7 +48,7 @@ var (
// nodeDB stores all nodes we know about. // nodeDB stores all nodes we know about.
type nodeDB struct { type nodeDB struct {
lvl *leveldb.DB // Interface to the database itself lvl *leveldb.DB // Interface to the database itself
self ESSNodeID // Own node id to prevent adding it into the database self ESSNodeID // Own node id to prevent adding it into the database
runner sync.Once // Ensures we can start at most one expirer runner sync.Once // Ensures we can start at most one expirer
quit chan struct{} // Channel to signal the expiring thread to stop quit chan struct{} // Channel to signal the expiring thread to stop
} }

View file

@ -37,8 +37,8 @@ import (
// Node represents a host on the network. // Node represents a host on the network.
// The public fields of Node may not be modified. // The public fields of Node may not be modified.
type Node struct { type Node struct {
IP net.IP // len 4 for IPv4 or 16 for IPv6 IP net.IP // len 4 for IPv4 or 16 for IPv6
UDP, TCP uint16 // port numbers UDP, TCP uint16 // port numbers
ID ESSNodeID // the node's public key ID ESSNodeID // the node's public key
// Network-related fields are contained in nodeNetGuts. // Network-related fields are contained in nodeNetGuts.

View file

@ -35,7 +35,7 @@ type nullTransport struct{}
func (nullTransport) sendPing(remote *Node, remoteAddr *net.UDPAddr) []byte { return []byte{1} } func (nullTransport) sendPing(remote *Node, remoteAddr *net.UDPAddr) []byte { return []byte{1} }
func (nullTransport) sendPong(remote *Node, pingHash []byte) {} func (nullTransport) sendPong(remote *Node, pingHash []byte) {}
func (nullTransport) sendFindnode(remote *Node, target ESSNodeID) {} func (nullTransport) sendFindnode(remote *Node, target ESSNodeID) {}
func (nullTransport) sendNeighbours(remote *Node, nodes []*Node) {} func (nullTransport) sendNeighbours(remote *Node, nodes []*Node) {}
func (nullTransport) localAddr() *net.UDPAddr { return new(net.UDPAddr) } func (nullTransport) localAddr() *net.UDPAddr { return new(net.UDPAddr) }
func (nullTransport) Close() {} func (nullTransport) Close() {}

View file

@ -25,8 +25,8 @@ import (
"sync" "sync"
"time" "time"
"github.com/orangeAndSuns/go-ethereum/log"
"github.com/jackpal/go-nat-pmp" "github.com/jackpal/go-nat-pmp"
"github.com/orangeAndSuns/go-ethereum/log"
) )
// An implementation of nat.Interface can map local ports to ports // An implementation of nat.Interface can map local ports to ports

View file

@ -90,12 +90,12 @@ const (
// PeerEvent is an event emitted when peers are either added or dropped from // PeerEvent is an event emitted when peers are either added or dropped from
// a p2p.Server or when a message is sent or received on a peer connection // a p2p.Server or when a message is sent or received on a peer connection
type PeerEvent struct { type PeerEvent struct {
Type PeerEventType `json:"type"` Type PeerEventType `json:"type"`
Peer discover.ESSNodeID `json:"peer"` Peer discover.ESSNodeID `json:"peer"`
Error string `json:"error,omitempty"` Error string `json:"error,omitempty"`
Protocol string `json:"protocol,omitempty"` Protocol string `json:"protocol,omitempty"`
MsgCode *uint64 `json:"msg_code,omitempty"` MsgCode *uint64 `json:"msg_code,omitempty"`
MsgSize *uint32 `json:"msg_size,omitempty"` MsgSize *uint32 `json:"msg_size,omitempty"`
} }
// Peer represents a connected remote node. // Peer represents a connected remote node.

View file

@ -38,13 +38,13 @@ import (
"sync" "sync"
"time" "time"
opentracing "github.com/opentracing/opentracing-go"
"github.com/orangeAndSuns/go-ethereum/log" "github.com/orangeAndSuns/go-ethereum/log"
"github.com/orangeAndSuns/go-ethereum/metrics" "github.com/orangeAndSuns/go-ethereum/metrics"
"github.com/orangeAndSuns/go-ethereum/p2p" "github.com/orangeAndSuns/go-ethereum/p2p"
"github.com/orangeAndSuns/go-ethereum/rlp" "github.com/orangeAndSuns/go-ethereum/rlp"
"github.com/orangeAndSuns/go-ethereum/swarm/spancontext" "github.com/orangeAndSuns/go-ethereum/swarm/spancontext"
"github.com/orangeAndSuns/go-ethereum/swarm/tracing" "github.com/orangeAndSuns/go-ethereum/swarm/tracing"
opentracing "github.com/opentracing/opentracing-go"
) )
// error codes used by this protocol scheme // error codes used by this protocol scheme

View file

@ -35,13 +35,13 @@ import (
"sync" "sync"
"time" "time"
"github.com/golang/snappy"
"github.com/orangeAndSuns/go-ethereum/crypto" "github.com/orangeAndSuns/go-ethereum/crypto"
"github.com/orangeAndSuns/go-ethereum/crypto/ecies" "github.com/orangeAndSuns/go-ethereum/crypto/ecies"
"github.com/orangeAndSuns/go-ethereum/crypto/secp256k1" "github.com/orangeAndSuns/go-ethereum/crypto/secp256k1"
"github.com/orangeAndSuns/go-ethereum/crypto/sha3" "github.com/orangeAndSuns/go-ethereum/crypto/sha3"
"github.com/orangeAndSuns/go-ethereum/p2p/discover" "github.com/orangeAndSuns/go-ethereum/p2p/discover"
"github.com/orangeAndSuns/go-ethereum/rlp" "github.com/orangeAndSuns/go-ethereum/rlp"
"github.com/golang/snappy"
) )
const ( const (

View file

@ -200,10 +200,10 @@ type conn struct {
fd net.Conn fd net.Conn
transport transport
flags connFlag flags connFlag
cont chan error // The run loop uses cont to signal errors to SetupConn. cont chan error // The run loop uses cont to signal errors to SetupConn.
id discover.ESSNodeID // valid after the encryption handshake id discover.ESSNodeID // valid after the encryption handshake
caps []Cap // valid after the protocol handshake caps []Cap // valid after the protocol handshake
name string // valid after the protocol handshake name string // valid after the protocol handshake
} }
type transport interface { type transport interface {

View file

@ -29,12 +29,12 @@ import (
"strings" "strings"
"sync" "sync"
"github.com/julienschmidt/httprouter"
"github.com/orangeAndSuns/go-ethereum/event" "github.com/orangeAndSuns/go-ethereum/event"
"github.com/orangeAndSuns/go-ethereum/p2p" "github.com/orangeAndSuns/go-ethereum/p2p"
"github.com/orangeAndSuns/go-ethereum/p2p/discover" "github.com/orangeAndSuns/go-ethereum/p2p/discover"
"github.com/orangeAndSuns/go-ethereum/p2p/simulations/adapters" "github.com/orangeAndSuns/go-ethereum/p2p/simulations/adapters"
"github.com/orangeAndSuns/go-ethereum/rpc" "github.com/orangeAndSuns/go-ethereum/rpc"
"github.com/julienschmidt/httprouter"
"golang.org/x/net/websocket" "golang.org/x/net/websocket"
) )

View file

@ -598,9 +598,9 @@ func (c *Conn) String() string {
type Msg struct { type Msg struct {
One discover.ESSNodeID `json:"one"` One discover.ESSNodeID `json:"one"`
Other discover.ESSNodeID `json:"other"` Other discover.ESSNodeID `json:"other"`
Protocol string `json:"protocol"` Protocol string `json:"protocol"`
Code uint64 `json:"code"` Code uint64 `json:"code"`
Received bool `json:"received"` Received bool `json:"received"`
} }
// String returns a log-friendly string // String returns a log-friendly string

View file

@ -56,25 +56,25 @@ type Exchange struct {
// Trigger is part of the exchange, incoming message for the pivot node // Trigger is part of the exchange, incoming message for the pivot node
// sent by a peer // sent by a peer
type Trigger struct { type Trigger struct {
Msg interface{} // type of message to be sent Msg interface{} // type of message to be sent
Code uint64 // code of message is given Code uint64 // code of message is given
Peer discover.ESSNodeID // the peer to send the message to Peer discover.ESSNodeID // the peer to send the message to
Timeout time.Duration // timeout duration for the sending Timeout time.Duration // timeout duration for the sending
} }
// Expect is part of an exchange, outgoing message from the pivot node // Expect is part of an exchange, outgoing message from the pivot node
// received by a peer // received by a peer
type Expect struct { type Expect struct {
Msg interface{} // type of message to expect Msg interface{} // type of message to expect
Code uint64 // code of message is now given Code uint64 // code of message is now given
Peer discover.ESSNodeID // the peer that expects the message Peer discover.ESSNodeID // the peer that expects the message
Timeout time.Duration // timeout duration for receiving Timeout time.Duration // timeout duration for receiving
} }
// Disconnect represents a disconnect event, used and checked by TestDisconnected // Disconnect represents a disconnect event, used and checked by TestDisconnected
type Disconnect struct { type Disconnect struct {
Peer discover.ESSNodeID // discconnected peer Peer discover.ESSNodeID // discconnected peer
Error error // disconnect reason Error error // disconnect reason
} }
// trigger sends messages from peers // trigger sends messages from peers

View file

@ -22,9 +22,9 @@ import (
"io/ioutil" "io/ioutil"
"testing" "testing"
"github.com/mattn/go-colorable"
"github.com/orangeAndSuns/go-ethereum/common" "github.com/orangeAndSuns/go-ethereum/common"
"github.com/orangeAndSuns/go-ethereum/log" "github.com/orangeAndSuns/go-ethereum/log"
"github.com/mattn/go-colorable"
) )
func TestEncryption(t *testing.T) { func TestEncryption(t *testing.T) {

View file

@ -31,6 +31,7 @@ import (
"path/filepath" "path/filepath"
"time" "time"
opentracing "github.com/opentracing/opentracing-go"
"github.com/orangeAndSuns/go-ethereum/common" "github.com/orangeAndSuns/go-ethereum/common"
"github.com/orangeAndSuns/go-ethereum/contracts/ens" "github.com/orangeAndSuns/go-ethereum/contracts/ens"
"github.com/orangeAndSuns/go-ethereum/core/types" "github.com/orangeAndSuns/go-ethereum/core/types"
@ -40,7 +41,6 @@ import (
"github.com/orangeAndSuns/go-ethereum/swarm/spancontext" "github.com/orangeAndSuns/go-ethereum/swarm/spancontext"
"github.com/orangeAndSuns/go-ethereum/swarm/storage" "github.com/orangeAndSuns/go-ethereum/swarm/storage"
"github.com/orangeAndSuns/go-ethereum/swarm/storage/mru" "github.com/orangeAndSuns/go-ethereum/swarm/storage/mru"
opentracing "github.com/opentracing/opentracing-go"
) )
var ( var (

View file

@ -58,7 +58,7 @@ type Config struct {
Port string Port string
PublicKey string PublicKey string
BzzKey string BzzKey string
ESSNodeID string ESSNodeID string
NetworkID uint64 NetworkID uint64
SwapEnabled bool SwapEnabled bool
SyncEnabled bool SyncEnabled bool

View file

@ -37,6 +37,7 @@ import (
"strings" "strings"
"time" "time"
opentracing "github.com/opentracing/opentracing-go"
"github.com/orangeAndSuns/go-ethereum/common" "github.com/orangeAndSuns/go-ethereum/common"
"github.com/orangeAndSuns/go-ethereum/metrics" "github.com/orangeAndSuns/go-ethereum/metrics"
"github.com/orangeAndSuns/go-ethereum/swarm/api" "github.com/orangeAndSuns/go-ethereum/swarm/api"
@ -44,7 +45,6 @@ import (
"github.com/orangeAndSuns/go-ethereum/swarm/spancontext" "github.com/orangeAndSuns/go-ethereum/swarm/spancontext"
"github.com/orangeAndSuns/go-ethereum/swarm/storage" "github.com/orangeAndSuns/go-ethereum/swarm/storage"
"github.com/orangeAndSuns/go-ethereum/swarm/storage/mru" "github.com/orangeAndSuns/go-ethereum/swarm/storage/mru"
opentracing "github.com/opentracing/opentracing-go"
"github.com/pborman/uuid" "github.com/pborman/uuid"
"github.com/rs/cors" "github.com/rs/cors"

View file

@ -80,7 +80,7 @@ type Peer interface {
// Conn interface represents an live peer connection // Conn interface represents an live peer connection
type Conn interface { type Conn interface {
ID() discover.ESSNodeID // the key that uniquely identifies the Node for the peerPool ID() discover.ESSNodeID // the key that uniquely identifies the Node for the peerPool
Handshake(context.Context, interface{}, func(interface{}) error) (interface{}, error) // can send messages Handshake(context.Context, interface{}, func(interface{}) error) (interface{}, error) // can send messages
Send(context.Context, interface{}) error // can send messages Send(context.Context, interface{}) error // can send messages
Drop(error) // disconnect this peer Drop(error) // disconnect this peer

View file

@ -43,13 +43,13 @@ type Simulation struct {
// of p2p/simulations.Network. // of p2p/simulations.Network.
Net *simulations.Network Net *simulations.Network
serviceNames []string serviceNames []string
cleanupFuncs []func() cleanupFuncs []func()
buckets map[discover.ESSNodeID]*sync.Map buckets map[discover.ESSNodeID]*sync.Map
pivotESSNodeID *discover.ESSNodeID pivotESSNodeID *discover.ESSNodeID
shutdownWG sync.WaitGroup shutdownWG sync.WaitGroup
done chan struct{} done chan struct{}
mu sync.RWMutex mu sync.RWMutex
httpSrv *http.Server //attach a HTTP server via SimulationOptions httpSrv *http.Server //attach a HTTP server via SimulationOptions
handler *simulations.Server //HTTP handler for the server handler *simulations.Server //HTTP handler for the server

View file

@ -24,12 +24,12 @@ import (
"testing" "testing"
"time" "time"
colorable "github.com/mattn/go-colorable"
"github.com/orangeAndSuns/go-ethereum/log" "github.com/orangeAndSuns/go-ethereum/log"
"github.com/orangeAndSuns/go-ethereum/node" "github.com/orangeAndSuns/go-ethereum/node"
"github.com/orangeAndSuns/go-ethereum/p2p" "github.com/orangeAndSuns/go-ethereum/p2p"
"github.com/orangeAndSuns/go-ethereum/p2p/simulations/adapters" "github.com/orangeAndSuns/go-ethereum/p2p/simulations/adapters"
"github.com/orangeAndSuns/go-ethereum/rpc" "github.com/orangeAndSuns/go-ethereum/rpc"
colorable "github.com/mattn/go-colorable"
) )
var ( var (

View file

@ -31,6 +31,7 @@ import (
"testing" "testing"
"time" "time"
colorable "github.com/mattn/go-colorable"
"github.com/orangeAndSuns/go-ethereum/common" "github.com/orangeAndSuns/go-ethereum/common"
"github.com/orangeAndSuns/go-ethereum/log" "github.com/orangeAndSuns/go-ethereum/log"
"github.com/orangeAndSuns/go-ethereum/node" "github.com/orangeAndSuns/go-ethereum/node"
@ -40,7 +41,6 @@ import (
"github.com/orangeAndSuns/go-ethereum/p2p/simulations/adapters" "github.com/orangeAndSuns/go-ethereum/p2p/simulations/adapters"
"github.com/orangeAndSuns/go-ethereum/swarm/network" "github.com/orangeAndSuns/go-ethereum/swarm/network"
"github.com/orangeAndSuns/go-ethereum/swarm/state" "github.com/orangeAndSuns/go-ethereum/swarm/state"
colorable "github.com/mattn/go-colorable"
) )
// serviceName is used with the exec adapter so the exec'd binary knows which // serviceName is used with the exec adapter so the exec'd binary knows which

View file

@ -27,6 +27,7 @@ import (
"sync" "sync"
"time" "time"
colorable "github.com/mattn/go-colorable"
"github.com/orangeAndSuns/go-ethereum/log" "github.com/orangeAndSuns/go-ethereum/log"
"github.com/orangeAndSuns/go-ethereum/node" "github.com/orangeAndSuns/go-ethereum/node"
"github.com/orangeAndSuns/go-ethereum/p2p/discover" "github.com/orangeAndSuns/go-ethereum/p2p/discover"
@ -34,7 +35,6 @@ import (
"github.com/orangeAndSuns/go-ethereum/p2p/simulations/adapters" "github.com/orangeAndSuns/go-ethereum/p2p/simulations/adapters"
"github.com/orangeAndSuns/go-ethereum/swarm/network" "github.com/orangeAndSuns/go-ethereum/swarm/network"
"github.com/orangeAndSuns/go-ethereum/swarm/state" "github.com/orangeAndSuns/go-ethereum/swarm/state"
colorable "github.com/mattn/go-colorable"
) )
var ( var (

View file

@ -29,6 +29,7 @@ import (
"testing" "testing"
"time" "time"
colorable "github.com/mattn/go-colorable"
"github.com/orangeAndSuns/go-ethereum/common" "github.com/orangeAndSuns/go-ethereum/common"
"github.com/orangeAndSuns/go-ethereum/log" "github.com/orangeAndSuns/go-ethereum/log"
"github.com/orangeAndSuns/go-ethereum/node" "github.com/orangeAndSuns/go-ethereum/node"
@ -42,7 +43,6 @@ import (
"github.com/orangeAndSuns/go-ethereum/swarm/storage" "github.com/orangeAndSuns/go-ethereum/swarm/storage"
"github.com/orangeAndSuns/go-ethereum/swarm/storage/mock" "github.com/orangeAndSuns/go-ethereum/swarm/storage/mock"
"github.com/orangeAndSuns/go-ethereum/swarm/storage/mock/db" "github.com/orangeAndSuns/go-ethereum/swarm/storage/mock/db"
colorable "github.com/mattn/go-colorable"
) )
var ( var (

View file

@ -21,6 +21,7 @@ import (
"errors" "errors"
"time" "time"
opentracing "github.com/opentracing/opentracing-go"
"github.com/orangeAndSuns/go-ethereum/common" "github.com/orangeAndSuns/go-ethereum/common"
"github.com/orangeAndSuns/go-ethereum/metrics" "github.com/orangeAndSuns/go-ethereum/metrics"
"github.com/orangeAndSuns/go-ethereum/p2p/discover" "github.com/orangeAndSuns/go-ethereum/p2p/discover"
@ -28,7 +29,6 @@ import (
"github.com/orangeAndSuns/go-ethereum/swarm/network" "github.com/orangeAndSuns/go-ethereum/swarm/network"
"github.com/orangeAndSuns/go-ethereum/swarm/spancontext" "github.com/orangeAndSuns/go-ethereum/swarm/spancontext"
"github.com/orangeAndSuns/go-ethereum/swarm/storage" "github.com/orangeAndSuns/go-ethereum/swarm/storage"
opentracing "github.com/opentracing/opentracing-go"
) )
const ( const (

View file

@ -23,12 +23,12 @@ import (
"sync" "sync"
"time" "time"
opentracing "github.com/opentracing/opentracing-go"
"github.com/orangeAndSuns/go-ethereum/metrics" "github.com/orangeAndSuns/go-ethereum/metrics"
"github.com/orangeAndSuns/go-ethereum/swarm/log" "github.com/orangeAndSuns/go-ethereum/swarm/log"
bv "github.com/orangeAndSuns/go-ethereum/swarm/network/bitvector" bv "github.com/orangeAndSuns/go-ethereum/swarm/network/bitvector"
"github.com/orangeAndSuns/go-ethereum/swarm/spancontext" "github.com/orangeAndSuns/go-ethereum/swarm/spancontext"
"github.com/orangeAndSuns/go-ethereum/swarm/storage" "github.com/orangeAndSuns/go-ethereum/swarm/storage"
opentracing "github.com/opentracing/opentracing-go"
) )
// Stream defines a unique stream identifier. // Stream defines a unique stream identifier.

View file

@ -22,6 +22,7 @@ import (
"sync" "sync"
"time" "time"
opentracing "github.com/opentracing/opentracing-go"
"github.com/orangeAndSuns/go-ethereum/metrics" "github.com/orangeAndSuns/go-ethereum/metrics"
"github.com/orangeAndSuns/go-ethereum/p2p/protocols" "github.com/orangeAndSuns/go-ethereum/p2p/protocols"
"github.com/orangeAndSuns/go-ethereum/swarm/log" "github.com/orangeAndSuns/go-ethereum/swarm/log"
@ -30,7 +31,6 @@ import (
"github.com/orangeAndSuns/go-ethereum/swarm/spancontext" "github.com/orangeAndSuns/go-ethereum/swarm/spancontext"
"github.com/orangeAndSuns/go-ethereum/swarm/state" "github.com/orangeAndSuns/go-ethereum/swarm/state"
"github.com/orangeAndSuns/go-ethereum/swarm/storage" "github.com/orangeAndSuns/go-ethereum/swarm/storage"
opentracing "github.com/opentracing/opentracing-go"
) )
var sendTimeout = 30 * time.Second var sendTimeout = 30 * time.Second

View file

@ -23,6 +23,7 @@ import (
"sync" "sync"
"time" "time"
opentracing "github.com/opentracing/opentracing-go"
"github.com/orangeAndSuns/go-ethereum/metrics" "github.com/orangeAndSuns/go-ethereum/metrics"
"github.com/orangeAndSuns/go-ethereum/p2p" "github.com/orangeAndSuns/go-ethereum/p2p"
"github.com/orangeAndSuns/go-ethereum/p2p/discover" "github.com/orangeAndSuns/go-ethereum/p2p/discover"
@ -35,7 +36,6 @@ import (
"github.com/orangeAndSuns/go-ethereum/swarm/spancontext" "github.com/orangeAndSuns/go-ethereum/swarm/spancontext"
"github.com/orangeAndSuns/go-ethereum/swarm/state" "github.com/orangeAndSuns/go-ethereum/swarm/state"
"github.com/orangeAndSuns/go-ethereum/swarm/storage" "github.com/orangeAndSuns/go-ethereum/swarm/storage"
opentracing "github.com/opentracing/opentracing-go"
) )
const ( const (

View file

@ -28,6 +28,7 @@ import (
"testing" "testing"
"time" "time"
colorable "github.com/mattn/go-colorable"
"github.com/orangeAndSuns/go-ethereum/crypto" "github.com/orangeAndSuns/go-ethereum/crypto"
"github.com/orangeAndSuns/go-ethereum/log" "github.com/orangeAndSuns/go-ethereum/log"
"github.com/orangeAndSuns/go-ethereum/node" "github.com/orangeAndSuns/go-ethereum/node"
@ -37,7 +38,6 @@ import (
"github.com/orangeAndSuns/go-ethereum/swarm/network" "github.com/orangeAndSuns/go-ethereum/swarm/network"
"github.com/orangeAndSuns/go-ethereum/swarm/network/simulation" "github.com/orangeAndSuns/go-ethereum/swarm/network/simulation"
"github.com/orangeAndSuns/go-ethereum/swarm/storage" "github.com/orangeAndSuns/go-ethereum/swarm/storage"
colorable "github.com/mattn/go-colorable"
) )
var ( var (

View file

@ -24,11 +24,11 @@ import (
"sync" "sync"
"time" "time"
opentracing "github.com/opentracing/opentracing-go"
olog "github.com/opentracing/opentracing-go/log"
"github.com/orangeAndSuns/go-ethereum/metrics" "github.com/orangeAndSuns/go-ethereum/metrics"
"github.com/orangeAndSuns/go-ethereum/swarm/log" "github.com/orangeAndSuns/go-ethereum/swarm/log"
"github.com/orangeAndSuns/go-ethereum/swarm/spancontext" "github.com/orangeAndSuns/go-ethereum/swarm/spancontext"
opentracing "github.com/opentracing/opentracing-go"
olog "github.com/opentracing/opentracing-go/log"
) )
/* /*

View file

@ -27,8 +27,8 @@ import (
"testing" "testing"
"time" "time"
"github.com/orangeAndSuns/go-ethereum/log"
colorable "github.com/mattn/go-colorable" colorable "github.com/mattn/go-colorable"
"github.com/orangeAndSuns/go-ethereum/log"
) )
var ( var (

View file

@ -20,9 +20,9 @@ import (
"context" "context"
"time" "time"
opentracing "github.com/opentracing/opentracing-go"
"github.com/orangeAndSuns/go-ethereum/swarm/log" "github.com/orangeAndSuns/go-ethereum/swarm/log"
"github.com/orangeAndSuns/go-ethereum/swarm/spancontext" "github.com/orangeAndSuns/go-ethereum/swarm/spancontext"
opentracing "github.com/opentracing/opentracing-go"
) )
var ( var (

2
vendor/bazil.org/fuse/fuse.go generated vendored
View file

@ -286,7 +286,7 @@ const RootID ESSNodeID = rootID
type Header struct { type Header struct {
Conn *Conn `json:"-"` // connection this request was received on Conn *Conn `json:"-"` // connection this request was received on
ID RequestID // unique ID for request ID RequestID // unique ID for request
Node ESSNodeID // file or directory the request is about Node ESSNodeID // file or directory the request is about
Uid uint32 // user ID of process making request Uid uint32 // user ID of process making request
Gid uint32 // group ID of process making request Gid uint32 // group ID of process making request
Pid uint32 // process ID of process making request Pid uint32 // process ID of process making request

View file

@ -89,8 +89,8 @@ func SkipDefaultDepth(prot TProtocol, typeId TType) (err error) {
// Skips over the next data element from the provided input TProtocol object. // Skips over the next data element from the provided input TProtocol object.
func Skip(self TProtocol, fieldType TType, maxDepth int) (err error) { func Skip(self TProtocol, fieldType TType, maxDepth int) (err error) {
if maxDepth <= 0 { if maxDepth <= 0 {
return NewTProtocolExceptionWithType( DEPTH_LIMIT, errors.New("Depth limit exceeded")) return NewTProtocolExceptionWithType(DEPTH_LIMIT, errors.New("Depth limit exceeded"))
} }
switch fieldType { switch fieldType {

View file

@ -60,7 +60,7 @@ func NewTProtocolException(err error) TProtocolException {
if err == nil { if err == nil {
return nil return nil
} }
if e,ok := err.(TProtocolException); ok { if e, ok := err.(TProtocolException); ok {
return e return e
} }
if _, ok := err.(base64.CorruptInputError); ok { if _, ok := err.(base64.CorruptInputError); ok {
@ -75,4 +75,3 @@ func NewTProtocolExceptionWithType(errType int, err error) TProtocolException {
} }
return &tProtocolException{errType, err.Error()} return &tProtocolException{errType, err.Error()}
} }

View file

@ -66,4 +66,3 @@ func writeByte(w io.Writer, c byte) error {
_, err := w.Write(v[0:1]) _, err := w.Write(v[0:1])
return err return err
} }

View file

@ -34,7 +34,6 @@ type ReadSizeProvider interface {
RemainingBytes() (num_bytes uint64) RemainingBytes() (num_bytes uint64)
} }
// Encapsulates the I/O layer // Encapsulates the I/O layer
type TTransport interface { type TTransport interface {
io.ReadWriteCloser io.ReadWriteCloser
@ -52,7 +51,6 @@ type stringWriter interface {
WriteString(s string) (n int, err error) WriteString(s string) (n int, err error)
} }
// This is "enchanced" transport with extra capabilities. You need to use one of these // This is "enchanced" transport with extra capabilities. You need to use one of these
// to construct protocol. // to construct protocol.
// Notably, TSocket does not implement this interface, and it is always a mistake to use // Notably, TSocket does not implement this interface, and it is always a mistake to use
@ -65,4 +63,3 @@ type TRichTransport interface {
Flusher Flusher
ReadSizeProvider ReadSizeProvider
} }