diff options
author | Sonic <sonic@dexon.org> | 2019-05-06 14:52:18 +0800 |
---|---|---|
committer | Sonic <sonic@dexon.org> | 2019-05-06 14:52:18 +0800 |
commit | fb9741ac8feeab30be376a1574cb4e935f8d5ae2 (patch) | |
tree | 31dfbf9e565b62e590280f6458baa412e26eafd6 | |
parent | e069e2a2b92afab5cb4b238848225300822e7526 (diff) | |
download | dexon-fb9741ac8feeab30be376a1574cb4e935f8d5ae2.tar dexon-fb9741ac8feeab30be376a1574cb4e935f8d5ae2.tar.gz dexon-fb9741ac8feeab30be376a1574cb4e935f8d5ae2.tar.bz2 dexon-fb9741ac8feeab30be376a1574cb4e935f8d5ae2.tar.lz dexon-fb9741ac8feeab30be376a1574cb4e935f8d5ae2.tar.xz dexon-fb9741ac8feeab30be376a1574cb4e935f8d5ae2.tar.zst dexon-fb9741ac8feeab30be376a1574cb4e935f8d5ae2.zip |
les: rename package to lds
-rw-r--r-- | cmd/faucet/faucet.go | 6 | ||||
-rw-r--r-- | cmd/utils/flags.go | 4 | ||||
-rw-r--r-- | eth/backend.go | 2 | ||||
-rw-r--r-- | ethstats/ethstats.go | 10 | ||||
-rw-r--r-- | lds/api_backend.go (renamed from les/api_backend.go) | 2 | ||||
-rw-r--r-- | lds/backend.go (renamed from les/backend.go) | 2 | ||||
-rw-r--r-- | lds/bloombits.go (renamed from les/bloombits.go) | 2 | ||||
-rw-r--r-- | lds/commons.go (renamed from les/commons.go) | 2 | ||||
-rw-r--r-- | lds/distributor.go (renamed from les/distributor.go) | 2 | ||||
-rw-r--r-- | lds/distributor_test.go (renamed from les/distributor_test.go) | 2 | ||||
-rw-r--r-- | lds/execqueue.go (renamed from les/execqueue.go) | 2 | ||||
-rw-r--r-- | lds/execqueue_test.go (renamed from les/execqueue_test.go) | 2 | ||||
-rw-r--r-- | lds/fetcher.go (renamed from les/fetcher.go) | 2 | ||||
-rw-r--r-- | lds/flowcontrol/control.go (renamed from les/flowcontrol/control.go) | 0 | ||||
-rw-r--r-- | lds/flowcontrol/manager.go (renamed from les/flowcontrol/manager.go) | 0 | ||||
-rw-r--r-- | lds/freeclient.go (renamed from les/freeclient.go) | 2 | ||||
-rw-r--r-- | lds/freeclient_test.go (renamed from les/freeclient_test.go) | 2 | ||||
-rw-r--r-- | lds/handler.go (renamed from les/handler.go) | 2 | ||||
-rw-r--r-- | lds/handler_test.go (renamed from les/handler_test.go) | 2 | ||||
-rw-r--r-- | lds/helper_test.go (renamed from les/helper_test.go) | 4 | ||||
-rw-r--r-- | lds/metrics.go (renamed from les/metrics.go) | 2 | ||||
-rw-r--r-- | lds/odr.go (renamed from les/odr.go) | 2 | ||||
-rw-r--r-- | lds/odr_requests.go (renamed from les/odr_requests.go) | 2 | ||||
-rw-r--r-- | lds/odr_test.go (renamed from les/odr_test.go) | 2 | ||||
-rw-r--r-- | lds/peer.go (renamed from les/peer.go) | 4 | ||||
-rw-r--r-- | lds/protocol.go (renamed from les/protocol.go) | 2 | ||||
-rw-r--r-- | lds/randselect.go (renamed from les/randselect.go) | 2 | ||||
-rw-r--r-- | lds/randselect_test.go (renamed from les/randselect_test.go) | 2 | ||||
-rw-r--r-- | lds/request_test.go (renamed from les/request_test.go) | 2 | ||||
-rw-r--r-- | lds/retrieve.go (renamed from les/retrieve.go) | 2 | ||||
-rw-r--r-- | lds/server.go (renamed from les/server.go) | 4 | ||||
-rw-r--r-- | lds/serverpool.go (renamed from les/serverpool.go) | 2 | ||||
-rw-r--r-- | lds/sync.go (renamed from les/sync.go) | 2 | ||||
-rw-r--r-- | lds/txrelay.go (renamed from les/txrelay.go) | 2 | ||||
-rw-r--r-- | light/odr_test.go | 2 | ||||
-rw-r--r-- | mobile/geth.go | 6 | ||||
-rw-r--r-- | swarm/api/gen_mime.go | 2 |
37 files changed, 47 insertions, 47 deletions
diff --git a/cmd/faucet/faucet.go b/cmd/faucet/faucet.go index 238d6884d..5a3e539e0 100644 --- a/cmd/faucet/faucet.go +++ b/cmd/faucet/faucet.go @@ -50,7 +50,7 @@ import ( "github.com/dexon-foundation/dexon/eth/downloader" "github.com/dexon-foundation/dexon/ethclient" "github.com/dexon-foundation/dexon/ethstats" - "github.com/dexon-foundation/dexon/les" + "github.com/dexon-foundation/dexon/lds" "github.com/dexon-foundation/dexon/log" "github.com/dexon-foundation/dexon/node" "github.com/dexon-foundation/dexon/p2p" @@ -236,14 +236,14 @@ func newFaucet(genesis *core.Genesis, port int, enodes []*discv5.Node, network u cfg.SyncMode = downloader.LightSync cfg.NetworkId = network cfg.Genesis = genesis - return les.New(ctx, &cfg) + return lds.New(ctx, &cfg) }); err != nil { return nil, err } // Assemble the ethstats monitoring and reporting service' if stats != "" { if err := stack.Register(func(ctx *node.ServiceContext) (node.Service, error) { - var serv *les.LightEthereum + var serv *lds.LightEthereum ctx.Service(&serv) return ethstats.New(stats, nil, serv) }); err != nil { diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 6ac26d1fe..9ba6c5d38 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -46,7 +46,7 @@ import ( "github.com/dexon-foundation/dexon/eth/gasprice" "github.com/dexon-foundation/dexon/ethdb" "github.com/dexon-foundation/dexon/ethstats" - "github.com/dexon-foundation/dexon/les" + "github.com/dexon-foundation/dexon/lds" "github.com/dexon-foundation/dexon/log" "github.com/dexon-foundation/dexon/metrics" "github.com/dexon-foundation/dexon/metrics/influxdb" @@ -1398,7 +1398,7 @@ func RegisterEthStatsService(stack *node.Node, url string) { var ethServ *eth.Ethereum ctx.Service(ðServ) - var lesServ *les.LightEthereum + var lesServ *lds.LightEthereum ctx.Service(&lesServ) return ethstats.New(url, ethServ, lesServ) diff --git a/eth/backend.go b/eth/backend.go index f75f2e521..ba7c93f75 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -104,7 +104,7 @@ func (s *Ethereum) AddLesServer(ls LesServer) { func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) { // Ensure configuration values are compatible and sane if config.SyncMode == downloader.LightSync { - return nil, errors.New("can't run eth.Ethereum in light sync mode, use les.LightEthereum") + return nil, errors.New("can't run eth.Ethereum in light sync mode, use lds.LightEthereum") } if !config.SyncMode.IsValid() { return nil, fmt.Errorf("invalid sync mode %d", config.SyncMode) diff --git a/ethstats/ethstats.go b/ethstats/ethstats.go index aae5b9bc0..e027e0fe5 100644 --- a/ethstats/ethstats.go +++ b/ethstats/ethstats.go @@ -37,7 +37,7 @@ import ( "github.com/dexon-foundation/dexon/core/types" "github.com/dexon-foundation/dexon/eth" "github.com/dexon-foundation/dexon/event" - "github.com/dexon-foundation/dexon/les" + "github.com/dexon-foundation/dexon/lds" "github.com/dexon-foundation/dexon/log" "github.com/dexon-foundation/dexon/p2p" "github.com/dexon-foundation/dexon/rpc" @@ -71,7 +71,7 @@ type blockChain interface { type Service struct { server *p2p.Server // Peer-to-peer server to retrieve networking infos eth *eth.Ethereum // Full Ethereum service if monitoring a full node - les *les.LightEthereum // Light Ethereum service if monitoring a light node + les *lds.LightEthereum // Light Ethereum service if monitoring a light node engine consensus.Engine // Consensus engine to retrieve variadic block fields node string // Name of the node to display on the monitoring page @@ -83,7 +83,7 @@ type Service struct { } // New returns a monitoring service ready for stats reporting. -func New(url string, ethServ *eth.Ethereum, lesServ *les.LightEthereum) (*Service, error) { +func New(url string, ethServ *eth.Ethereum, lesServ *lds.LightEthereum) (*Service, error) { // Parse the netstats connection url re := regexp.MustCompile("([^:@]*)(:([^@]*))?@(.+)") parts := re.FindStringSubmatch(url) @@ -377,8 +377,8 @@ func (s *Service) login(conn *websocket.Conn) error { network = fmt.Sprintf("%d", info.(*eth.NodeInfo).Network) protocol = fmt.Sprintf("eth/%d", eth.ProtocolVersions[0]) } else { - network = fmt.Sprintf("%d", infos.Protocols["les"].(*les.NodeInfo).Network) - protocol = fmt.Sprintf("les/%d", les.ClientProtocolVersions[0]) + network = fmt.Sprintf("%d", infos.Protocols["les"].(*lds.NodeInfo).Network) + protocol = fmt.Sprintf("les/%d", lds.ClientProtocolVersions[0]) } auth := &authMsg{ ID: s.node, diff --git a/les/api_backend.go b/lds/api_backend.go index f69e67c60..7b4469bc5 100644 --- a/les/api_backend.go +++ b/lds/api_backend.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. -package les +package lds import ( "context" diff --git a/les/backend.go b/lds/backend.go index b56222bba..62ddb8d4a 100644 --- a/les/backend.go +++ b/lds/backend.go @@ -15,7 +15,7 @@ // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. // Package les implements the Light Ethereum Subprotocol. -package les +package lds import ( "fmt" diff --git a/les/bloombits.go b/lds/bloombits.go index 6d0142c21..9dcfd52fc 100644 --- a/les/bloombits.go +++ b/lds/bloombits.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. -package les +package lds import ( "time" diff --git a/les/commons.go b/lds/commons.go index 0d0dbca7e..df94d35b1 100644 --- a/les/commons.go +++ b/lds/commons.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. -package les +package lds import ( "fmt" diff --git a/les/distributor.go b/lds/distributor.go index f90765b62..e2a2ba719 100644 --- a/les/distributor.go +++ b/lds/distributor.go @@ -16,7 +16,7 @@ // Package light implements on-demand retrieval capable state and chain objects // for the Ethereum Light Client. -package les +package lds import ( "container/list" diff --git a/les/distributor_test.go b/lds/distributor_test.go index 8c7621f26..e25cfa8ff 100644 --- a/les/distributor_test.go +++ b/lds/distributor_test.go @@ -16,7 +16,7 @@ // Package light implements on-demand retrieval capable state and chain objects // for the Ethereum Light Client. -package les +package lds import ( "math/rand" diff --git a/les/execqueue.go b/lds/execqueue.go index 614721bf0..31ed5d754 100644 --- a/les/execqueue.go +++ b/lds/execqueue.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. -package les +package lds import "sync" diff --git a/les/execqueue_test.go b/lds/execqueue_test.go index cd45b03f2..a7b269b4b 100644 --- a/les/execqueue_test.go +++ b/lds/execqueue_test.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. -package les +package lds import ( "testing" diff --git a/les/fetcher.go b/lds/fetcher.go index 5183fdc92..fd1ba19a9 100644 --- a/les/fetcher.go +++ b/lds/fetcher.go @@ -15,7 +15,7 @@ // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. // Package les implements the Light Ethereum Subprotocol. -package les +package lds import ( "math/big" diff --git a/les/flowcontrol/control.go b/lds/flowcontrol/control.go index bb4a73b6d..bb4a73b6d 100644 --- a/les/flowcontrol/control.go +++ b/lds/flowcontrol/control.go diff --git a/les/flowcontrol/manager.go b/lds/flowcontrol/manager.go index ee565c83d..ee565c83d 100644 --- a/les/flowcontrol/manager.go +++ b/lds/flowcontrol/manager.go diff --git a/les/freeclient.go b/lds/freeclient.go index 10c7bba35..34e6006b6 100644 --- a/les/freeclient.go +++ b/lds/freeclient.go @@ -15,7 +15,7 @@ // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. // Package les implements the Light Ethereum Subprotocol. -package les +package lds import ( "io" diff --git a/les/freeclient_test.go b/lds/freeclient_test.go index de879fc12..2d7b676d0 100644 --- a/les/freeclient_test.go +++ b/lds/freeclient_test.go @@ -16,7 +16,7 @@ // Package light implements on-demand retrieval capable state and chain objects // for the Ethereum Light Client. -package les +package lds import ( "fmt" diff --git a/les/handler.go b/lds/handler.go index 9c0aa0c29..1f3513fc8 100644 --- a/les/handler.go +++ b/lds/handler.go @@ -15,7 +15,7 @@ // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. // Package les implements the Light Ethereum Subprotocol. -package les +package lds import ( "encoding/binary" diff --git a/les/handler_test.go b/lds/handler_test.go index 30bf382f1..c148679fa 100644 --- a/les/handler_test.go +++ b/lds/handler_test.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. -package les +package lds import ( "encoding/binary" diff --git a/les/helper_test.go b/lds/helper_test.go index 2ce78f0c9..108d42c9c 100644 --- a/les/helper_test.go +++ b/lds/helper_test.go @@ -17,7 +17,7 @@ // This file contains some shares testing functionality, common to multiple // different files and modules being tested. -package les +package lds import ( "crypto/rand" @@ -35,7 +35,7 @@ import ( "github.com/dexon-foundation/dexon/eth" "github.com/dexon-foundation/dexon/ethdb" "github.com/dexon-foundation/dexon/event" - "github.com/dexon-foundation/dexon/les/flowcontrol" + "github.com/dexon-foundation/dexon/lds/flowcontrol" "github.com/dexon-foundation/dexon/light" "github.com/dexon-foundation/dexon/p2p" "github.com/dexon-foundation/dexon/p2p/enode" diff --git a/les/metrics.go b/lds/metrics.go index a221282a0..84a2f2194 100644 --- a/les/metrics.go +++ b/lds/metrics.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. -package les +package lds import ( "github.com/dexon-foundation/dexon/metrics" diff --git a/les/odr.go b/lds/odr.go index 4c05ce7f9..40cbb9455 100644 --- a/les/odr.go +++ b/lds/odr.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. -package les +package lds import ( "context" diff --git a/les/odr_requests.go b/lds/odr_requests.go index 1a3887141..6146f53fc 100644 --- a/les/odr_requests.go +++ b/lds/odr_requests.go @@ -16,7 +16,7 @@ // Package light implements on-demand retrieval capable state and chain objects // for the Ethereum Light Client. -package les +package lds import ( "encoding/binary" diff --git a/les/odr_test.go b/lds/odr_test.go index 9a6b1ef88..e698895d6 100644 --- a/les/odr_test.go +++ b/lds/odr_test.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. -package les +package lds import ( "bytes" diff --git a/les/peer.go b/lds/peer.go index bd849516b..f8d89089c 100644 --- a/les/peer.go +++ b/lds/peer.go @@ -15,7 +15,7 @@ // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. // Package les implements the Light Ethereum Subprotocol. -package les +package lds import ( "errors" @@ -27,7 +27,7 @@ import ( "github.com/dexon-foundation/dexon/common" "github.com/dexon-foundation/dexon/core/types" "github.com/dexon-foundation/dexon/eth" - "github.com/dexon-foundation/dexon/les/flowcontrol" + "github.com/dexon-foundation/dexon/lds/flowcontrol" "github.com/dexon-foundation/dexon/light" "github.com/dexon-foundation/dexon/p2p" "github.com/dexon-foundation/dexon/rlp" diff --git a/les/protocol.go b/lds/protocol.go index 4d4519a42..eace2a04c 100644 --- a/les/protocol.go +++ b/lds/protocol.go @@ -15,7 +15,7 @@ // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. // Package les implements the Light Ethereum Subprotocol. -package les +package lds import ( "crypto/ecdsa" diff --git a/les/randselect.go b/lds/randselect.go index 1cc1d3d3e..a62e6db4a 100644 --- a/les/randselect.go +++ b/lds/randselect.go @@ -15,7 +15,7 @@ // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. // Package les implements the Light Ethereum Subprotocol. -package les +package lds import ( "math/rand" diff --git a/les/randselect_test.go b/lds/randselect_test.go index 9ae7726dd..c78807f62 100644 --- a/les/randselect_test.go +++ b/lds/randselect_test.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. -package les +package lds import ( "math/rand" diff --git a/les/request_test.go b/lds/request_test.go index c99ebab53..206d09f03 100644 --- a/les/request_test.go +++ b/lds/request_test.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. -package les +package lds import ( "context" diff --git a/les/retrieve.go b/lds/retrieve.go index bc8763f3e..2e5236151 100644 --- a/les/retrieve.go +++ b/lds/retrieve.go @@ -16,7 +16,7 @@ // Package light implements on-demand retrieval capable state and chain objects // for the Ethereum Light Client. -package les +package lds import ( "context" diff --git a/les/server.go b/lds/server.go index d681ba359..f45b0fa44 100644 --- a/les/server.go +++ b/lds/server.go @@ -15,7 +15,7 @@ // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. // Package les implements the Light Ethereum Subprotocol. -package les +package lds import ( "crypto/ecdsa" @@ -29,7 +29,7 @@ import ( "github.com/dexon-foundation/dexon/core/types" "github.com/dexon-foundation/dexon/eth" "github.com/dexon-foundation/dexon/ethdb" - "github.com/dexon-foundation/dexon/les/flowcontrol" + "github.com/dexon-foundation/dexon/lds/flowcontrol" "github.com/dexon-foundation/dexon/light" "github.com/dexon-foundation/dexon/log" "github.com/dexon-foundation/dexon/p2p" diff --git a/les/serverpool.go b/lds/serverpool.go index 5990344f4..8e06b2356 100644 --- a/les/serverpool.go +++ b/lds/serverpool.go @@ -15,7 +15,7 @@ // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. // Package les implements the Light Ethereum Subprotocol. -package les +package lds import ( "crypto/ecdsa" diff --git a/les/sync.go b/lds/sync.go index 42afb3933..7beb06e45 100644 --- a/les/sync.go +++ b/lds/sync.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. -package les +package lds import ( "context" diff --git a/les/txrelay.go b/lds/txrelay.go index 2d57baead..d1fe80dc8 100644 --- a/les/txrelay.go +++ b/lds/txrelay.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. -package les +package lds import ( "sync" diff --git a/light/odr_test.go b/light/odr_test.go index 34e1f6f7c..a98adc860 100644 --- a/light/odr_test.go +++ b/light/odr_test.go @@ -300,7 +300,7 @@ func testChainOdr(t *testing.T, protocol int, fn odrTestFn) { } } - // expect retrievals to fail (except genesis block) without a les peer + // expect retrievals to fail (except genesis block) without a lds peer t.Log("checking without ODR") odr.disable = true test(1) diff --git a/mobile/geth.go b/mobile/geth.go index 358bcf539..d6a3d7f40 100644 --- a/mobile/geth.go +++ b/mobile/geth.go @@ -30,7 +30,7 @@ import ( "github.com/dexon-foundation/dexon/ethclient" "github.com/dexon-foundation/dexon/ethstats" "github.com/dexon-foundation/dexon/internal/debug" - "github.com/dexon-foundation/dexon/les" + "github.com/dexon-foundation/dexon/lds" "github.com/dexon-foundation/dexon/node" "github.com/dexon-foundation/dexon/p2p" "github.com/dexon-foundation/dexon/p2p/nat" @@ -161,14 +161,14 @@ func NewNode(datadir string, config *NodeConfig) (stack *Node, _ error) { ethConf.NetworkId = uint64(config.EthereumNetworkID) ethConf.DatabaseCache = config.EthereumDatabaseCache if err := rawStack.Register(func(ctx *node.ServiceContext) (node.Service, error) { - return les.New(ctx, ðConf) + return lds.New(ctx, ðConf) }); err != nil { return nil, fmt.Errorf("ethereum init: %v", err) } // If netstats reporting is requested, do it if config.EthereumNetStats != "" { if err := rawStack.Register(func(ctx *node.ServiceContext) (node.Service, error) { - var lesServ *les.LightEthereum + var lesServ *lds.LightEthereum ctx.Service(&lesServ) return ethstats.New(config.EthereumNetStats, nil, lesServ) diff --git a/swarm/api/gen_mime.go b/swarm/api/gen_mime.go index b97880198..0334779d4 100644 --- a/swarm/api/gen_mime.go +++ b/swarm/api/gen_mime.go @@ -380,7 +380,7 @@ func init() { ".pkd": "application/vnd.hbci", ".bpd": "application/vnd.hbci", ".hdt": "application/vnd.hdt", - ".les": "application/vnd.hhe.lesson-player", + ".lds": "application/vnd.hhe.lesson-player", ".hpgl": "application/vnd.hp-HPGL", ".hpi": "application/vnd.hp-hpid", ".hpid": "application/vnd.hp-hpid", |