diff --git a/.gitignore b/.gitignore index 3b34d32c28..48077ede1c 100644 --- a/.gitignore +++ b/.gitignore @@ -25,7 +25,7 @@ Godeps/_workspace/bin deploy/osx/Mist.app deploy/osx/Mist\ Installer.dmg -cmd/mist/assets/ext/ethereum.js/ +cmd/mist/assets/ext/expanse.js/ # used by the Makefile /build/_workspace/ diff --git a/.gitmodules b/.gitmodules index 219564eb7b..fbd82891d0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "cmd/mist/assets/ext/ethereum.js"] - path = cmd/mist/assets/ext/ethereum.js - url = https://github.com/ethereum/web3.js +[submodule "cmd/mist/assets/ext/expanse.js"] + path = cmd/mist/assets/ext/expanse.js + url = https://github.com/expanse-project/web3.js diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000000..2adf87fbaf --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +go-expanse \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000000..d82104827f --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/go-expanse.iml b/.idea/go-expanse.iml new file mode 100644 index 0000000000..c956989b29 --- /dev/null +++ b/.idea/go-expanse.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000000..2318fdd1a3 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml new file mode 100644 index 0000000000..922003b843 --- /dev/null +++ b/.idea/scopes/scope_settings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000000..94a25f7f4c --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000000..b88a882863 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,1143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1438971860269 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.mailmap b/.mailmap index 704d397486..527178eba1 100644 --- a/.mailmap +++ b/.mailmap @@ -1,7 +1,7 @@ -Jeffrey Wilcke -Jeffrey Wilcke -Jeffrey Wilcke -Jeffrey Wilcke +Jeffrey Wilcke +Jeffrey Wilcke +Jeffrey Wilcke +Jeffrey Wilcke Viktor Trón @@ -12,7 +12,7 @@ Nick Savers Maran Hidskes Taylor Gerring -Taylor Gerring +Taylor Gerring Bas van Kervel Bas van Kervel @@ -57,5 +57,5 @@ Nick Dodson Jason Carver Jason Carver -Joseph Chow -Joseph Chow ethers +Joseph Chow +Joseph Chow ethers diff --git a/AUTHORS b/AUTHORS index 0c5b547d7a..0e67eac1fb 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,4 +1,4 @@ -# This is the official list of go-ethereum authors for copyright purposes. +# This is the official list of go-expanse authors for copyright purposes. Alex Leverington Alexandre Van de Sande @@ -10,8 +10,8 @@ Felix Lange Gustav Simonsson Jae Kwon Jason Carver -Jeffrey Wilcke -Joseph Chow +Jeffrey Wilcke +Joseph Chow Kobi Gurkan Maran Hidskes Marek Kotewicz diff --git a/COPYING b/COPYING index 8d66e87723..593b66738e 100644 --- a/COPYING +++ b/COPYING @@ -1,7 +1,7 @@ GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - Copyright (C) 2014 The go-ethereum Authors. + Copyright (C) 2015 The go-expanse Authors. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index d5c41227dc..25b3793337 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1,5 +1,5 @@ { - "ImportPath": "github.com/ethereum/go-ethereum", + "ImportPath": "github.com/expanse-project/go-expanse", "GoVersion": "go1.4", "Packages": [ "./..." @@ -20,7 +20,7 @@ "Rev": "3e6e67c4dcea3ac2f25fd4731abc0e1deaf36216" }, { - "ImportPath": "github.com/ethereum/ethash", + "ImportPath": "github.com/expanse-project/ethash", "Comment": "v23.1-227-g8f6ccaa", "Rev": "8f6ccaaef9b418553807a73a95cb5f49cd3ea39f" }, diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/.travis.yml b/Godeps/_workspace/src/github.com/ethereum/ethash/.travis.yml index b83b02bf3c..a6d979e02e 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/.travis.yml +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/.travis.yml @@ -6,12 +6,12 @@ before_install: # for g++4.8 and C++11 - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - # Set up go-ethereum + # Set up go-expanse - sudo apt-get update -y -qq - sudo apt-get install -yqq libgmp3-dev - - git clone --depth=10 https://github.com/ethereum/go-ethereum ${GOPATH}/src/github.com/ethereum/go-ethereum - # use canned dependencies from the go-ethereum repository - - export GOPATH=$GOPATH:$GOPATH/src/github.com/ethereum/go-ethereum/Godeps/_workspace/ + - git clone --depth=10 https://github.com/expanse-project/go-expanse ${GOPATH}/src/github.com/expanse-project/go-expanse + # use canned dependencies from the go-expanse repository + - export GOPATH=$GOPATH:$GOPATH/src/github.com/expanse-project/go-expanse/Godeps/_workspace/ - echo $GOPATH install: diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/README.md b/Godeps/_workspace/src/github.com/ethereum/ethash/README.md index 2b2c3b544c..a0004a373f 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/README.md +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/README.md @@ -1,14 +1,14 @@ -[![Build Status](https://travis-ci.org/ethereum/ethash.svg?branch=master)](https://travis-ci.org/ethereum/ethash) +[![Build Status](https://travis-ci.org/expanse/ethash.svg?branch=master)](https://travis-ci.org/expanse/ethash) [![Windows Build Status](https://ci.appveyor.com/api/projects/status/github/debris/ethash?branch=master&svg=true)](https://ci.appveyor.com/project/debris/ethash-nr37r/branch/master) # Ethash -For details on this project, please see the Ethereum wiki: -https://github.com/ethereum/wiki/wiki/Ethash +For details on this project, please see the Expanse wiki: +https://github.com/expanse-project/wiki/wiki/Ethash ### Coding Style for C++ code: -Follow the same exact style as in [cpp-ethereum](https://github.com/ethereum/cpp-ethereum/blob/develop/CodingStandards.txt) +Follow the same exact style as in [cpp-expanse](https://github.com/expanse-project/cpp-expanse/blob/develop/CodingStandards.txt) ### Coding Style for C code: diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go index d0864da7f7..5904a0f21d 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go @@ -22,11 +22,11 @@ import ( "time" "unsafe" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/pow" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/pow" ) var ( @@ -110,7 +110,7 @@ func (l *Light) Verify(block pow.Block) bool { /* Cannot happen if block header diff is validated prior to PoW, but can happen if PoW is checked first due to parallel PoW checking. We could check the minimum valid difficulty but for SoC we avoid (duplicating) - Ethereum protocol consensus rules here which are not in scope of Ethash + Expanse protocol consensus rules here which are not in scope of Ethash */ if difficulty.Cmp(common.Big0) == 0 { glog.V(logger.Debug).Infof("invalid block difficulty") @@ -308,7 +308,7 @@ func (pow *Full) Search(block pow.Block, stop <-chan struct{}) (nonce uint64, mi ret := C.ethash_full_compute(dag.ptr, hash, C.uint64_t(nonce)) result := h256ToHash(ret.result).Big() - // TODO: disagrees with the spec https://github.com/ethereum/wiki/wiki/Ethash#mining + // TODO: disagrees with the spec https://github.com/expanse-project/wiki/wiki/Ethash#mining if ret.success && result.Cmp(target) <= 0 { mixDigest = C.GoBytes(unsafe.Pointer(&ret.mix_hash), C.int(32)) atomic.AddInt32(&pow.hashRate, -previousHashrate) diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash_test.go b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash_test.go index 1e1de989d1..4d9cdc11b6 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash_test.go +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash_test.go @@ -10,8 +10,8 @@ import ( "sync" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" ) func init() { @@ -69,30 +69,30 @@ var invalidZeroDiffBlock = testBlock{ } func TestEthashVerifyValid(t *testing.T) { - eth := New() + exp := New() for i, block := range validBlocks { - if !eth.Verify(block) { + if !exp.Verify(block) { t.Errorf("block %d (%x) did not validate.", i, block.hashNoNonce[:6]) } } } func TestEthashVerifyInvalid(t *testing.T) { - eth := New() - if eth.Verify(&invalidZeroDiffBlock) { + exp := New() + if exp.Verify(&invalidZeroDiffBlock) { t.Errorf("should not validate - we just ensure it does not panic on this block") } } func TestEthashConcurrentVerify(t *testing.T) { - eth, err := NewForTesting() + exp, err := NewForTesting() if err != nil { t.Fatal(err) } - defer os.RemoveAll(eth.Full.Dir) + defer os.RemoveAll(exp.Full.Dir) block := &testBlock{difficulty: big.NewInt(10)} - nonce, md := eth.Search(block, nil) + nonce, md := exp.Search(block, nil) block.nonce = nonce block.mixDigest = common.BytesToHash(md) @@ -101,7 +101,7 @@ func TestEthashConcurrentVerify(t *testing.T) { wg.Add(100) for i := 0; i < 100; i++ { go func() { - if !eth.Verify(block) { + if !exp.Verify(block) { t.Error("Block could not be verified") } wg.Done() @@ -111,12 +111,12 @@ func TestEthashConcurrentVerify(t *testing.T) { } func TestEthashConcurrentSearch(t *testing.T) { - eth, err := NewForTesting() + exp, err := NewForTesting() if err != nil { t.Fatal(err) } - eth.Turbo(true) - defer os.RemoveAll(eth.Full.Dir) + exp.Turbo(true) + defer os.RemoveAll(exp.Full.Dir) type searchRes struct { n uint64 @@ -135,7 +135,7 @@ func TestEthashConcurrentSearch(t *testing.T) { // launch n searches concurrently. for i := 0; i < nsearch; i++ { go func() { - nonce, md := eth.Search(block, stop) + nonce, md := exp.Search(block, stop) select { case found <- searchRes{n: nonce, md: md}: case <-stop: @@ -152,25 +152,25 @@ func TestEthashConcurrentSearch(t *testing.T) { block.nonce = res.n block.mixDigest = common.BytesToHash(res.md) - if !eth.Verify(block) { + if !exp.Verify(block) { t.Error("Block could not be verified") } } func TestEthashSearchAcrossEpoch(t *testing.T) { - eth, err := NewForTesting() + exp, err := NewForTesting() if err != nil { t.Fatal(err) } - defer os.RemoveAll(eth.Full.Dir) + defer os.RemoveAll(exp.Full.Dir) for i := epochLength - 40; i < epochLength+40; i++ { block := &testBlock{number: i, difficulty: big.NewInt(90)} rand.Read(block.hashNoNonce[:]) - nonce, md := eth.Search(block, nil) + nonce, md := exp.Search(block, nil) block.nonce = nonce block.mixDigest = common.BytesToHash(md) - if !eth.Verify(block) { + if !exp.Verify(block) { t.Fatalf("Block could not be verified") } } diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/setup.py b/Godeps/_workspace/src/github.com/ethereum/ethash/setup.py index 18aa20f6db..51ac2e39f5 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/setup.py +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/setup.py @@ -39,9 +39,9 @@ setup( author_email="matthew.wampler.doty@gmail.com", license='GPL', version='0.1.23', - url='https://github.com/ethereum/ethash', - download_url='https://github.com/ethereum/ethash/tarball/v23', - description=('Python wrappers for ethash, the ethereum proof of work' + url='https://github.com/expanse-project/ethash', + download_url='https://github.com/expanse-project/ethash/tarball/v23', + description=('Python wrappers for ethash, the expanse proof of work' 'hashing function'), ext_modules=[pyethash], ) diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/benchmark/benchmark.cpp b/Godeps/_workspace/src/github.com/ethereum/ethash/src/benchmark/benchmark.cpp index 1a648edf42..dae4124824 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/benchmark/benchmark.cpp +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/src/benchmark/benchmark.cpp @@ -1,18 +1,18 @@ /* - This file is part of cpp-ethereum. + This file is part of cpp-expanse. - cpp-ethereum is free software: you can redistribute it and/or modify + cpp-expanse is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - cpp-ethereum is distributed in the hope that it will be useful, + cpp-expanse is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with cpp-ethereum. If not, see . + along with cpp-expanse. If not, see . */ /** @file benchmark.cpp * @author Tim Hughes diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/compiler.h b/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/compiler.h index 9695871cdc..7750ab9b7c 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/compiler.h +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/compiler.h @@ -1,18 +1,18 @@ /* - This file is part of cpp-ethereum. + This file is part of cpp-expanse. - cpp-ethereum is free software: you can redistribute it and/or modify + cpp-expanse is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - cpp-ethereum is distributed in the hope that it will be useful, + cpp-expanse is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with cpp-ethereum. If not, see . + along with cpp-expanse. If not, see . */ /** @file compiler.h * @date 2014 diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/data_sizes.h b/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/data_sizes.h index 83cc30bcba..4eadea6127 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/data_sizes.h +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/data_sizes.h @@ -1,18 +1,18 @@ /* - This file is part of cpp-ethereum. + This file is part of cpp-expanse. - cpp-ethereum is free software: you can redistribute it and/or modify + cpp-expanse is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software FoundationUUU,either version 3 of the LicenseUUU,or (at your option) any later version. - cpp-ethereum is distributed in the hope that it will be usefulU, + cpp-expanse is distributed in the hope that it will be usefulU, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with cpp-ethereum. If notUUU,see . + along with cpp-expanse. If notUUU,see . */ /** @file data_sizes.h diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/fnv.h b/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/fnv.h index d23c4e2474..ee5252b5b3 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/fnv.h +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/fnv.h @@ -1,18 +1,18 @@ /* - This file is part of cpp-ethereum. + This file is part of cpp-expanse. - cpp-ethereum is free software: you can redistribute it and/or modify + cpp-expanse is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - cpp-ethereum is distributed in the hope that it will be useful, + cpp-expanse is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with cpp-ethereum. If not, see . + along with cpp-expanse. If not, see . */ /** @file fnv.h * @author Matthew Wampler-Doty diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/internal.c b/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/internal.c index 338aa5ecd3..20ef8a9afc 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/internal.c +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/internal.c @@ -12,7 +12,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with cpp-ethereum. If not, see . + along with cpp-expanse. If not, see . */ /** @file internal.c * @author Tim Hughes diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io.h b/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io.h index 7a27089c7d..0febbe1b9e 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io.h +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io.h @@ -38,7 +38,7 @@ extern "C" { // 10 is for maximum number of digits of a uint32_t (for REVISION) // 1 is for - and 16 is for the first 16 hex digits for first 8 bytes of // the seedhash and last 1 is for the null terminating character -// Reference: https://github.com/ethereum/wiki/wiki/Ethash-DAG +// Reference: https://github.com/expanse-project/wiki/wiki/Ethash-DAG #define DAG_MUTABLE_NAME_MAX_SIZE (6 + 10 + 1 + 16 + 1) /// Possible return values of @see ethash_io_prepare enum ethash_io_rc { @@ -80,7 +80,7 @@ enum ethash_io_rc { * data directory. If it does not exist it's created. * @param[in] seedhash The seedhash of the current block number, used in the * naming of the file as can be seen from the spec at: - * https://github.com/ethereum/wiki/wiki/Ethash-DAG + * https://github.com/expanse-project/wiki/wiki/Ethash-DAG * @param[out] output_file If there was no failure then this will point to an open * file descriptor. User is responsible for closing it. * In the case of memo match then the file is open on read @@ -175,7 +175,7 @@ char* ethash_io_create_filename( /** * Gets the default directory name for the DAG depending on the system * - * The spec defining this directory is here: https://github.com/ethereum/wiki/wiki/Ethash-DAG + * The spec defining this directory is here: https://github.com/expanse-project/wiki/wiki/Ethash-DAG * * @param[out] strbuf A string buffer of sufficient size to keep the * null termninated string of the directory name diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/util_win32.c b/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/util_win32.c index 268e6db056..6f2e69e6d1 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/util_win32.c +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/util_win32.c @@ -1,18 +1,18 @@ /* - This file is part of cpp-ethereum. + This file is part of cpp-expanse. - cpp-ethereum is free software: you can redistribute it and/or modify + cpp-expanse is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - cpp-ethereum is distributed in the hope that it will be useful, + cpp-expanse is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with cpp-ethereum. If not, see . + along with cpp-expanse. If not, see . */ /** @file util.c * @author Tim Hughes diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/python/core.c b/Godeps/_workspace/src/github.com/ethereum/ethash/src/python/core.c index c66e03c549..b84d6c7504 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/python/core.c +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/src/python/core.c @@ -172,7 +172,7 @@ mine(PyObject *self, PyObject *args) { // TODO: Multi threading? do { ethash_full(&out, (void *) full_bytes, ¶ms, (const ethash_h256_t *) header, nonce++); - // TODO: disagrees with the spec https://github.com/ethereum/wiki/wiki/Ethash#mining + // TODO: disagrees with the spec https://github.com/expanse-project/wiki/wiki/Ethash#mining } while (!ethash_check_difficulty(&out.result, (const ethash_h256_t *) difficulty)); return Py_BuildValue("{" PY_CONST_STRING_FORMAT ":" PY_STRING_FORMAT ", " PY_CONST_STRING_FORMAT ":" PY_STRING_FORMAT ", " PY_CONST_STRING_FORMAT ":K}", @@ -233,7 +233,7 @@ static struct PyModuleDef PyethashModule = { PyMODINIT_FUNC PyInit_pyethash(void) { PyObject *module = PyModule_Create(&PyethashModule); - // Following Spec: https://github.com/ethereum/wiki/wiki/Ethash#definitions + // Following Spec: https://github.com/expanse-project/wiki/wiki/Ethash#definitions PyModule_AddIntConstant(module, "REVISION", (long) ETHASH_REVISION); PyModule_AddIntConstant(module, "DATASET_BYTES_INIT", (long) ETHASH_DATASET_BYTES_INIT); PyModule_AddIntConstant(module, "DATASET_BYTES_GROWTH", (long) ETHASH_DATASET_BYTES_GROWTH); @@ -251,7 +251,7 @@ PyMODINIT_FUNC PyInit_pyethash(void) { PyMODINIT_FUNC initpyethash(void) { PyObject *module = Py_InitModule("pyethash", PyethashMethods); - // Following Spec: https://github.com/ethereum/wiki/wiki/Ethash#definitions + // Following Spec: https://github.com/expanse-project/wiki/wiki/Ethash#definitions PyModule_AddIntConstant(module, "REVISION", (long) ETHASH_REVISION); PyModule_AddIntConstant(module, "DATASET_BYTES_INIT", (long) ETHASH_DATASET_BYTES_INIT); PyModule_AddIntConstant(module, "DATASET_BYTES_GROWTH", (long) ETHASH_DATASET_BYTES_GROWTH); diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/test/c/test.cpp b/Godeps/_workspace/src/github.com/ethereum/ethash/test/c/test.cpp index 44e0c385bb..ffcf105186 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/test/c/test.cpp +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/test/c/test.cpp @@ -36,7 +36,7 @@ namespace fs = boost::filesystem; #define our_alloca(param__) alloca((size_t)(param__)) -// some functions taken from eth::dev for convenience. +// some functions taken from exp::dev for convenience. std::string bytesToHexString(const uint8_t *str, const uint64_t s) { std::ostringstream ret; diff --git a/Godeps/_workspace/src/golang.org/x/net/html/entity.go b/Godeps/_workspace/src/golang.org/x/net/html/entity.go index a50c04c60e..f285b78f6d 100644 --- a/Godeps/_workspace/src/golang.org/x/net/html/entity.go +++ b/Godeps/_workspace/src/golang.org/x/net/html/entity.go @@ -975,7 +975,7 @@ var entity = map[string]rune{ "esdot;": '\U00002250', "esim;": '\U00002242', "eta;": '\U000003B7', - "eth;": '\U000000F0', + "exp;": '\U000000F0', "euml;": '\U000000EB', "euro;": '\U000020AC', "excl;": '\U00000021', @@ -2102,7 +2102,7 @@ var entity = map[string]rune{ "eacute": '\U000000E9', "ecirc": '\U000000EA', "egrave": '\U000000E8', - "eth": '\U000000F0', + "exp": '\U000000F0', "euml": '\U000000EB', "frac12": '\U000000BD', "frac14": '\U000000BC', diff --git a/Makefile b/Makefile index 3478b54333..3539c4c965 100644 --- a/Makefile +++ b/Makefile @@ -2,13 +2,13 @@ # with Go source code. If you know what GOPATH is then you probably # don't need to bother with make. -.PHONY: geth evm mist all test travis-test-with-coverage clean +.PHONY: gexp evm mist all test travis-test-with-coverage clean GOBIN = build/bin -geth: - build/env.sh go install -v $(shell build/ldflags.sh) ./cmd/geth +gexp: + build/env.sh go install -v $(shell build/ldflags.sh) ./cmd/gexp @echo "Done building." - @echo "Run \"$(GOBIN)/geth\" to launch geth." + @echo "Run \"$(GOBIN)/gexp\" to launch gexp." evm: build/env.sh $(GOROOT)/bin/go install -v $(shell build/ldflags.sh) ./cmd/evm diff --git a/README.md b/README.md index 717e726e34..842f8238ac 100644 --- a/README.md +++ b/README.md @@ -1,73 +1,74 @@ -## Ethereum Go +## Expanse Go -Official golang implementation of the Ethereum protocol +Expanse Go Client, by Christopher Franko (forked from Jeffrey Wilcke (and some other people)'s Expanse Go client). | Linux | OSX | ARM | Windows | Tests ----------|---------|-----|-----|---------|------ -develop | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=Linux%20Go%20develop%20branch)](https://build.ethdev.com/builders/Linux%20Go%20develop%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=Linux%20Go%20develop%20branch)](https://build.ethdev.com/builders/OSX%20Go%20develop%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=ARM%20Go%20develop%20branch)](https://build.ethdev.com/builders/ARM%20Go%20develop%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=Windows%20Go%20develop%20branch)](https://build.ethdev.com/builders/Windows%20Go%20develop%20branch/builds/-1) | [![Buildr+Status](https://travis-ci.org/ethereum/go-ethereum.svg?branch=develop)](https://travis-ci.org/ethereum/go-ethereum) [![codecov.io](http://codecov.io/github/ethereum/go-ethereum/coverage.svg?branch=develop)](http://codecov.io/github/ethereum/go-ethereum?branch=develop) -master | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=Linux%20Go%20master%20branch)](https://build.ethdev.com/builders/Linux%20Go%20master%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=OSX%20Go%20master%20branch)](https://build.ethdev.com/builders/OSX%20Go%20master%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=ARM%20Go%20master%20branch)](https://build.ethdev.com/builders/ARM%20Go%20master%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=Windows%20Go%20master%20branch)](https://build.ethdev.com/builders/Windows%20Go%20master%20branch/builds/-1) | [![Buildr+Status](https://travis-ci.org/ethereum/go-ethereum.svg?branch=master)](https://travis-ci.org/ethereum/go-ethereum) [![codecov.io](http://codecov.io/github/ethereum/go-ethereum/coverage.svg?branch=master)](http://codecov.io/github/ethereum/go-ethereum?branch=master) +develop | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=Linux%20Go%20develop%20branch)](https://build.ethdev.com/builders/Linux%20Go%20develop%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=Linux%20Go%20develop%20branch)](https://build.ethdev.com/builders/OSX%20Go%20develop%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=ARM%20Go%20develop%20branch)](https://build.ethdev.com/builders/ARM%20Go%20develop%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=Windows%20Go%20develop%20branch)](https://build.ethdev.com/builders/Windows%20Go%20develop%20branch/builds/-1) | [![Buildr+Status](https://travis-ci.org/expanse/go-expanse.svg?branch=develop)](https://travis-ci.org/expanse/go-expanse) [![Coverage Status](https://coveralls.io/repos/expanse/go-expanse/badge.svg?branch=develop)](https://coveralls.io/r/expanse/go-expanse?branch=develop) +master | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=Linux%20Go%20master%20branch)](https://build.ethdev.com/builders/Linux%20Go%20master%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=OSX%20Go%20master%20branch)](https://build.ethdev.com/builders/OSX%20Go%20master%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=ARM%20Go%20master%20branch)](https://build.ethdev.com/builders/ARM%20Go%20master%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=Windows%20Go%20master%20branch)](https://build.ethdev.com/builders/Windows%20Go%20master%20branch/builds/-1) | [![Buildr+Status](https://travis-ci.org/expanse/go-expanse.svg?branch=master)](https://travis-ci.org/expanse/go-expanse) [![Coverage Status](https://coveralls.io/repos/expanse/go-expanse/badge.svg?branch=master)](https://coveralls.io/r/expanse/go-expanse?branch=master) -[![API Reference]( -https://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/68747470733a2f2f676f646f632e6f72672f6769746875622e636f6d2f676f6c616e672f6764646f3f7374617475732e737667 -)](https://godoc.org/github.com/ethereum/go-ethereum) -[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ethereum/go-ethereum?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) +[![Bugs](https://badge.waffle.io/expanse/go-expanse.png?label=bug&title=Bugs)](https://waffle.io/expanse/go-expanse) +[![Stories in Ready](https://badge.waffle.io/expanse/go-expanse.png?label=ready&title=Ready)](https://waffle.io/expanse/go-expanse) +[![Stories in Progress](https://badge.waffle.io/expanse/go-expanse.svg?label=in%20progress&title=In Progress)](http://waffle.io/expanse/go-expanse) +[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/expanse/go-expanse?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) ## Automated development builds -The following builds are build automatically by our build servers after each push to the [develop](https://github.com/ethereum/go-ethereum/tree/develop) branch. +The following builds are build automatically by our build servers after each push to the [develop](https://github.com/expanse-project/go-expanse/tree/develop) branch. -* [Docker](https://registry.hub.docker.com/u/ethereum/client-go/) +* [Docker](https://registry.hub.docker.com/u/expanse/client-go/) * [OS X](http://build.ethdev.com/builds/OSX%20Go%20develop%20branch/Mist-OSX-latest.dmg) * Ubuntu [trusty](https://build.ethdev.com/builds/Linux%20Go%20develop%20deb%20i386-trusty/latest/) | [utopic](https://build.ethdev.com/builds/Linux%20Go%20develop%20deb%20i386-utopic/latest/) * [Windows 64-bit](https://build.ethdev.com/builds/Windows%20Go%20develop%20branch/Geth-Win64-latest.zip) -* [ARM](https://build.ethdev.com/builds/ARM%20Go%20develop%20branch/geth-ARM-latest.tar.bz2) +* [ARM](https://build.ethdev.com/builds/ARM%20Go%20develop%20branch/gexp-ARM-latest.tar.bz2) ## Building the source For prerequisites and detailed build instructions please read the -[Installation Instructions](https://github.com/ethereum/go-ethereum/wiki/Building-Ethereum) +[Installation Instructions](https://github.com/expanse-project/go-expanse/wiki/Building-Expanse) on the wiki. -Building geth requires two external dependencies, Go and GMP. +Building gexp requires two external dependencies, Go and GMP. You can install them using your favourite package manager. Once the dependencies are installed, run - make geth + make gexp ## Executables -Go Ethereum comes with several wrappers/executables found in -[the `cmd` directory](https://github.com/ethereum/go-ethereum/tree/develop/cmd): +Go Expanse comes with several wrappers/executables found in +[the `cmd` directory](https://github.com/expanse-project/go-expanse/tree/develop/cmd): - Command | | -----------|---------| -`geth` | Ethereum CLI (ethereum command line interface client) | -`bootnode` | runs a bootstrap node for the Discovery Protocol | -`ethtest` | test tool which runs with the [tests](https://github.com/ethereum/tests) suite: `/path/to/test.json > ethtest --test BlockTests --stdin`. -`evm` | is a generic Ethereum Virtual Machine: `evm -code 60ff60ff -gas 10000 -price 0 -dump`. See `-h` for a detailed description. | -`disasm` | disassembles EVM code: `echo "6001" | disasm` | -`rlpdump` | prints RLP structures | +* `gexp` Expanse CLI (expanse command line interface client) +* `bootnode` runs a bootstrap node for the Discovery Protocol +* `ethtest` test tool which runs with the [tests](https://github.com/expanse-project/tests) suite: + `/path/to/test.json > ethtest --test BlockTests --stdin`. +* `evm` is a generic Expanse Virtual Machine: `evm -code 60ff60ff -gas + 10000 -price 0 -dump`. See `-h` for a detailed description. +* `disasm` disassembles EVM code: `echo "6001" | disasm` +* `rlpdump` prints RLP structures ## Command line options -`geth` can be configured via command line options, environment variables and config files. +`gexp` can be configured via command line options, environment variables and config files. To get the options available: +<<<<<<< HEAD geth help -For further details on options, see the [wiki](https://github.com/ethereum/go-ethereum/wiki/Command-Line-Options) +For further details on options, see the [wiki](https://github.com/expanse-project/go-expanse/wiki/Command-Line-Options) ## Contribution -If you'd like to contribute to go-ethereum please fork, fix, commit and +If you'd like to contribute to go-expanse please fork, fix, commit and send a pull request. Commits who do not comply with the coding standards are ignored (use gofmt!). If you send pull requests make absolute sure that you commit on the `develop` branch and that you do not merge to master. Commits that are directly based on master are simply ignored. -See [Developers' Guide](https://github.com/ethereum/go-ethereum/wiki/Developers'-Guide) +See [Developers' Guide](https://github.com/expanse-project/go-expanse/wiki/Developers'-Guide) for more details on configuring your environment, testing, and dependency management. diff --git a/accounts/abi/abi.go b/accounts/abi/abi.go index de3128902b..d50015707f 100644 --- a/accounts/abi/abi.go +++ b/accounts/abi/abi.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package abi @@ -22,7 +22,7 @@ import ( "io" "strings" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/crypto" ) // Callable method given a `Name` and whether the method is a constant. diff --git a/accounts/abi/abi_test.go b/accounts/abi/abi_test.go index 7706de05d9..42510dbaec 100644 --- a/accounts/abi/abi_test.go +++ b/accounts/abi/abi_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package abi @@ -23,7 +23,7 @@ import ( "strings" "testing" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/crypto" ) const jsondata = ` diff --git a/accounts/abi/doc.go b/accounts/abi/doc.go index 8242068582..419fb17403 100644 --- a/accounts/abi/doc.go +++ b/accounts/abi/doc.go @@ -1,23 +1,23 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -// Package abi implements the Ethereum ABI (Application Binary +// Package abi implements the Expanse ABI (Application Binary // Interface). // -// The Ethereum ABI is strongly typed, known at compile time +// The Expanse ABI is strongly typed, known at compile time // and static. This ABI will handle basic type casting; unsigned // to signed and visa versa. It does not handle slice casting such // as unsigned slice to signed slice. Bit size type casting is also diff --git a/accounts/abi/numbers.go b/accounts/abi/numbers.go index 2a7049425a..da77e7b9bb 100644 --- a/accounts/abi/numbers.go +++ b/accounts/abi/numbers.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package abi @@ -20,7 +20,7 @@ import ( "math/big" "reflect" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) var big_t = reflect.TypeOf(&big.Int{}) diff --git a/accounts/abi/numbers_test.go b/accounts/abi/numbers_test.go index 78dc57543b..827f2abb37 100644 --- a/accounts/abi/numbers_test.go +++ b/accounts/abi/numbers_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package abi diff --git a/accounts/abi/type.go b/accounts/abi/type.go index b16822d3ba..fc3aa075cd 100644 --- a/accounts/abi/type.go +++ b/accounts/abi/type.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package abi @@ -22,7 +22,7 @@ import ( "regexp" "strconv" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) const ( diff --git a/accounts/account_manager.go b/accounts/account_manager.go index 2781be656f..bffe782ba6 100644 --- a/accounts/account_manager.go +++ b/accounts/account_manager.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Package implements a private key management facility. // @@ -31,8 +31,8 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" ) var ( diff --git a/accounts/accounts_test.go b/accounts/accounts_test.go index d7a8a2b85f..f6df012fb6 100644 --- a/accounts/accounts_test.go +++ b/accounts/accounts_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package accounts @@ -22,7 +22,7 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/crypto" ) var testSigData = make([]byte, 32) @@ -142,7 +142,7 @@ func TestSignRace(t *testing.T) { } func tmpKeyStore(t *testing.T, new func(string) crypto.KeyStore) (string, crypto.KeyStore) { - d, err := ioutil.TempDir("", "eth-keystore-test") + d, err := ioutil.TempDir("", "exp-keystore-test") if err != nil { t.Fatal(err) } diff --git a/build/env.sh b/build/env.sh index 04401a3e17..1ba0936131 100755 --- a/build/env.sh +++ b/build/env.sh @@ -10,23 +10,23 @@ fi # Create fake Go workspace if it doesn't exist yet. workspace="$PWD/build/_workspace" root="$PWD" -ethdir="$workspace/src/github.com/ethereum" -if [ ! -L "$ethdir/go-ethereum" ]; then +ethdir="$workspace/src/github.com/expanse" +if [ ! -L "$ethdir/go-expanse" ]; then mkdir -p "$ethdir" cd "$ethdir" - ln -s ../../../../../. go-ethereum + ln -s ../../../../../. go-expanse cd "$root" fi # Set up the environment to use the workspace. # Also add Godeps workspace so we build using canned dependencies. -GOPATH="$ethdir/go-ethereum/Godeps/_workspace:$workspace" +GOPATH="$ethdir/go-expanse/Godeps/_workspace:$workspace" GOBIN="$PWD/build/bin" export GOPATH GOBIN # Run the command inside the workspace. -cd "$ethdir/go-ethereum" -PWD="$ethdir/go-ethereum" +cd "$ethdir/go-expanse" +PWD="$ethdir/go-expanse" # Launch the arguments with the configured environment. exec "$@" diff --git a/build/test-global-coverage.sh b/build/test-global-coverage.sh index a51b6a9e57..227cd1287d 100755 --- a/build/test-global-coverage.sh +++ b/build/test-global-coverage.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash set -e +<<<<<<< HEAD echo "" > coverage.txt for d in $(find ./* -maxdepth 10 -type d -not -path "./build" -not -path "./Godeps/*" ); do diff --git a/build/update-license.go b/build/update-license.go index e28005cbd7..5c19d50be8 100644 --- a/build/update-license.go +++ b/build/update-license.go @@ -59,13 +59,13 @@ var ( licenseCommentRE = regexp.MustCompile(`^//\s*(Copyright|This file is part of).*?\n(?://.*?\n)*\n*`) // this text appears at the start of AUTHORS - authorsFileHeader = "# This is the official list of go-ethereum authors for copyright purposes.\n\n" + authorsFileHeader = "# This is the official list of go-expanse authors for copyright purposes.\n\n" ) // this template generates the license comment. // its input is an info structure. var licenseT = template.Must(template.New("").Parse(` -// Copyright {{.Year}} The go-ethereum Authors +// Copyright {{.Year}} The go-expanse Authors // This file is part of {{.Whole false}}. // // {{.Whole true}} is free software: you can redistribute it and/or modify @@ -104,12 +104,12 @@ func (i info) ShortLicense() string { func (i info) Whole(startOfSentence bool) string { if i.gpl() { - return "go-ethereum" + return "go-expanse" } if startOfSentence { - return "The go-ethereum library" + return "The go-expanse library" } - return "the go-ethereum library" + return "the go-expanse library" } func (i info) gpl() bool { diff --git a/cmd/bootnode/main.go b/cmd/bootnode/main.go index 0cad5321b9..d8989b2385 100644 --- a/cmd/bootnode/main.go +++ b/cmd/bootnode/main.go @@ -1,20 +1,20 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2015 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . -// bootnode runs a bootstrap node for the Ethereum Discovery Protocol. +// bootnode runs a bootstrap node for the Expanse Discovery Protocol. package main import ( @@ -26,10 +26,10 @@ import ( "log" "os" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/p2p/discover" - "github.com/ethereum/go-ethereum/p2p/nat" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/p2p/discover" + "github.com/expanse-project/go-expanse/p2p/nat" ) func main() { diff --git a/cmd/disasm/main.go b/cmd/disasm/main.go index ba1295ba1f..223747f049 100644 --- a/cmd/disasm/main.go +++ b/cmd/disasm/main.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2015 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . // disasm is a pretty-printer for EVM bytecode. package main @@ -22,8 +22,8 @@ import ( "io/ioutil" "os" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/vm" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/vm" ) func main() { diff --git a/cmd/ethtest/.gitignore b/cmd/ethtest/.gitignore index 399b6dc882..6eeba6f0f0 100644 --- a/cmd/ethtest/.gitignore +++ b/cmd/ethtest/.gitignore @@ -10,7 +10,7 @@ *un~ .DS_Store */**/.DS_Store -ethereum/ethereum +expanse/expanse ethereal/ethereal example/js node_modules diff --git a/cmd/ethtest/main.go b/cmd/ethtest/main.go index 67b9653960..41edb08dbe 100644 --- a/cmd/ethtest/main.go +++ b/cmd/ethtest/main.go @@ -1,20 +1,20 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2014 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . -// ethtest executes Ethereum JSON tests. +// ethtest executes Expanse JSON tests. package main import ( @@ -205,10 +205,10 @@ func main() { app := cli.NewApp() app.Name = "ethtest" - app.Usage = "go-ethereum test interface" + app.Usage = "go-expanse test interface" app.Action = setupApp app.Version = "0.2.0" - app.Author = "go-ethereum team" + app.Author = "go-expanse team" app.Flags = []cli.Flag{ TestFlag, diff --git a/cmd/evm/main.go b/cmd/evm/main.go index 243dd62669..6c23e785bd 100644 --- a/cmd/evm/main.go +++ b/cmd/evm/main.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2014 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . // evm executes EVM code snippets. package main diff --git a/cmd/geth/blocktestcmd.go b/cmd/geth/blocktestcmd.go index 4eff82e3d1..58d3c60e0c 100644 --- a/cmd/geth/blocktestcmd.go +++ b/cmd/geth/blocktestcmd.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2015 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . package main @@ -21,11 +21,11 @@ import ( "os" "github.com/codegangsta/cli" - "github.com/ethereum/go-ethereum/cmd/utils" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/tests" + "github.com/expanse-project/go-expanse/cmd/utils" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/tests" ) var blocktestCommand = cli.Command{ @@ -57,7 +57,7 @@ func runBlockTest(ctx *cli.Context) { file, testname = args[0], args[1] rpc = true default: - utils.Fatalf(`Usage: ethereum blocktest [ [ "rpc" ] ]`) + utils.Fatalf(`Usage: expanse blocktest [ [ "rpc" ] ]`) } bt, err := tests.LoadBlockTests(file) if err != nil { @@ -69,15 +69,15 @@ func runBlockTest(ctx *cli.Context) { ecode := 0 for name, test := range bt { fmt.Printf("----------------- Running Block Test %q\n", name) - ethereum, err := runOneBlockTest(ctx, test) + expanse, err := runOneBlockTest(ctx, test) if err != nil { fmt.Println(err) fmt.Println("FAIL") ecode = 1 } - if ethereum != nil { - ethereum.Stop() - ethereum.WaitForShutdown() + if expanse != nil { + expanse.Stop() + expanse.WaitForShutdown() } } os.Exit(ecode) @@ -88,49 +88,49 @@ func runBlockTest(ctx *cli.Context) { if !ok { utils.Fatalf("Test file does not contain test named %q", testname) } - ethereum, err := runOneBlockTest(ctx, test) + expanse, err := runOneBlockTest(ctx, test) if err != nil { utils.Fatalf("%v", err) } - defer ethereum.Stop() + defer expanse.Stop() if rpc { fmt.Println("Block Test post state validated, starting RPC interface.") - startEth(ctx, ethereum) - utils.StartRPC(ethereum, ctx) - ethereum.WaitForShutdown() + startEth(ctx, expanse) + utils.StartRPC(expanse, ctx) + expanse.WaitForShutdown() } } -func runOneBlockTest(ctx *cli.Context, test *tests.BlockTest) (*eth.Ethereum, error) { +func runOneBlockTest(ctx *cli.Context, test *tests.BlockTest) (*exp.Expanse, error) { cfg := utils.MakeEthConfig(ClientIdentifier, Version, ctx) cfg.NewDB = func(path string) (common.Database, error) { return ethdb.NewMemDatabase() } cfg.MaxPeers = 0 // disable network cfg.Shh = false // disable whisper cfg.NAT = nil // disable port mapping - ethereum, err := eth.New(cfg) + expanse, err := exp.New(cfg) if err != nil { return nil, err } - // if err := ethereum.Start(); err != nil { + // if err := expanse.Start(); err != nil { // return nil, err // } // import the genesis block - ethereum.ResetWithGenesisBlock(test.Genesis) + expanse.ResetWithGenesisBlock(test.Genesis) // import pre accounts - statedb, err := test.InsertPreState(ethereum) + statedb, err := test.InsertPreState(expanse) if err != nil { - return ethereum, fmt.Errorf("InsertPreState: %v", err) + return expanse, fmt.Errorf("InsertPreState: %v", err) } - if err := test.TryBlocksInsert(ethereum.ChainManager()); err != nil { - return ethereum, fmt.Errorf("Block Test load error: %v", err) + if err := test.TryBlocksInsert(expanse.ChainManager()); err != nil { + return expanse, fmt.Errorf("Block Test load error: %v", err) } if err := test.ValidatePostState(statedb); err != nil { - return ethereum, fmt.Errorf("post state validation failed: %v", err) + return expanse, fmt.Errorf("post state validation failed: %v", err) } - return ethereum, nil + return expanse, nil } diff --git a/cmd/geth/chaincmd.go b/cmd/geth/chaincmd.go index c420459189..3ba3a5f663 100644 --- a/cmd/geth/chaincmd.go +++ b/cmd/geth/chaincmd.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2015 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . package main @@ -24,12 +24,12 @@ import ( "time" "github.com/codegangsta/cli" - "github.com/ethereum/go-ethereum/cmd/utils" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/cmd/utils" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/logger/glog" ) var ( @@ -65,7 +65,7 @@ if already existing. Usage: `dump a specific block from storage`, Description: ` The arguments are interpreted as block numbers or hashes. -Use "ethereum dump 0" to dump the genesis block. +Use "expanse dump 0" to dump the genesis block. `, } ) diff --git a/cmd/geth/js.go b/cmd/geth/js.go index c31deefdd9..860cd36faa 100644 --- a/cmd/geth/js.go +++ b/cmd/geth/js.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2014 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . package main @@ -28,19 +28,19 @@ import ( "sort" - "github.com/ethereum/go-ethereum/cmd/utils" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/docserver" - "github.com/ethereum/go-ethereum/common/natspec" - "github.com/ethereum/go-ethereum/common/registrar" - "github.com/ethereum/go-ethereum/eth" - re "github.com/ethereum/go-ethereum/jsre" - "github.com/ethereum/go-ethereum/rpc" - "github.com/ethereum/go-ethereum/rpc/api" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/comms" - "github.com/ethereum/go-ethereum/rpc/shared" - "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/go-expanse/cmd/utils" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/common/docserver" + "github.com/expanse-project/go-expanse/common/natspec" + "github.com/expanse-project/go-expanse/common/registrar" + "github.com/expanse-project/go-expanse/exp" + re "github.com/expanse-project/go-expanse/jsre" + "github.com/expanse-project/go-expanse/rpc" + "github.com/expanse-project/go-expanse/rpc/api" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/comms" + "github.com/expanse-project/go-expanse/rpc/shared" + "github.com/expanse-project/go-expanse/xeth" "github.com/peterh/liner" "github.com/robertkrimen/otto" ) @@ -76,13 +76,13 @@ func (r dumbterm) AppendHistory(string) {} type jsre struct { ds *docserver.DocServer re *re.JSRE - ethereum *eth.Ethereum + expanse *exp.Expanse xeth *xeth.XEth wait chan *big.Int ps1 string atexit func() corsDomain string - client comms.EthereumClient + client comms.ExpanseClient prompter } @@ -176,19 +176,19 @@ func newLightweightJSRE(libPath string, client comms.EthereumClient, interactive return js } -func newJSRE(ethereum *eth.Ethereum, libPath, corsDomain string, client comms.EthereumClient, interactive bool, f xeth.Frontend) *jsre { - js := &jsre{ethereum: ethereum, ps1: "> "} +func newJSRE(expanse *exp.Expanse, libPath, corsDomain string, client comms.ExpanseClient, interactive bool, f xeth.Frontend) *jsre { + js := &jsre{expanse: expanse, ps1: "> "} // set default cors domain used by startRpc from CLI flag js.corsDomain = corsDomain if f == nil { f = js } js.ds = docserver.New("/") - js.xeth = xeth.New(ethereum, f) + js.xeth = xeth.New(expanse, f) js.wait = js.xeth.UpdateState() js.client = client if clt, ok := js.client.(*comms.InProcClient); ok { - if offeredApis, err := api.ParseApiString(shared.AllApis, codec.JSON, js.xeth, ethereum); err == nil { + if offeredApis, err := api.ParseApiString(shared.AllApis, codec.JSON, js.xeth, expanse); err == nil { clt.Initialize(api.Merge(offeredApis...)) } } @@ -241,7 +241,7 @@ func (self *jsre) batch(statement string) { self.re.Stop(false) } -// show summary of current geth instance +// show summary of current gexp instance func (self *jsre) welcome() { self.re.Run(` (function () { @@ -277,7 +277,7 @@ func (js *jsre) apiBindings(f xeth.Frontend) error { apiNames = append(apiNames, a) } - apiImpl, err := api.ParseApiString(strings.Join(apiNames, ","), codec.JSON, js.xeth, js.ethereum) + apiImpl, err := api.ParseApiString(strings.Join(apiNames, ","), codec.JSON, js.xeth, js.expanse) if err != nil { utils.Fatalf("Unable to determine supported api's: %v", err) } @@ -295,7 +295,7 @@ func (js *jsre) apiBindings(f xeth.Frontend) error { utils.Fatalf("Error loading bignumber.js: %v", err) } - err = js.re.Compile("ethereum.js", re.Web3_JS) + err = js.re.Compile("expanse.js", re.Web3_JS) if err != nil { utils.Fatalf("Error loading web3.js: %v", err) } @@ -311,7 +311,7 @@ func (js *jsre) apiBindings(f xeth.Frontend) error { } // load only supported API's in javascript runtime - shortcuts := "var eth = web3.eth; " + shortcuts := "var exp = web3.exp; " for _, apiName := range apiNames { if apiName == shared.Web3ApiName { continue // manually mapped @@ -335,7 +335,7 @@ func (js *jsre) apiBindings(f xeth.Frontend) error { } func (self *jsre) ConfirmTransaction(tx string) bool { - if self.ethereum.NatSpec { + if self.expanse.NatSpec { notice := natspec.GetNotice(self.xeth, tx, self.ds) fmt.Println(notice) answer, _ := self.Prompt("Confirm Transaction [y/n]") @@ -352,7 +352,7 @@ func (self *jsre) UnlockAccount(addr []byte) bool { return false } // TODO: allow retry - if err := self.ethereum.AccountManager().Unlock(common.BytesToAddress(addr), pass); err != nil { + if err := self.expanse.AccountManager().Unlock(common.BytesToAddress(addr), pass); err != nil { return false } else { fmt.Println("Account is now unlocked for this session.") @@ -435,8 +435,8 @@ func hidepassword(input string) string { func (self *jsre) withHistory(op func(*os.File)) { datadir := common.DefaultDataDir() - if self.ethereum != nil { - datadir = self.ethereum.DataDir + if self.expanse != nil { + datadir = self.expanse.DataDir } hist, err := os.OpenFile(filepath.Join(datadir, "history"), os.O_RDWR|os.O_CREATE, os.ModePerm) diff --git a/cmd/geth/js_test.go b/cmd/geth/js_test.go index 67c36dfe71..5772a0beac 100644 --- a/cmd/geth/js_test.go +++ b/cmd/geth/js_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2015 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . package main @@ -28,18 +28,18 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/accounts" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/compiler" - "github.com/ethereum/go-ethereum/common/docserver" - "github.com/ethereum/go-ethereum/common/natspec" - "github.com/ethereum/go-ethereum/common/registrar" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/comms" + "github.com/expanse-project/go-expanse/accounts" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/common/compiler" + "github.com/expanse-project/go-expanse/common/docserver" + "github.com/expanse-project/go-expanse/common/natspec" + "github.com/expanse-project/go-expanse/common/registrar" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/comms" ) const ( @@ -66,7 +66,7 @@ type testjethre struct { } func (self *testjethre) UnlockAccount(acc []byte) bool { - err := self.ethereum.AccountManager().Unlock(common.BytesToAddress(acc), "") + err := self.expanse.AccountManager().Unlock(common.BytesToAddress(acc), "") if err != nil { panic("unable to unlock") } @@ -74,18 +74,18 @@ func (self *testjethre) UnlockAccount(acc []byte) bool { } func (self *testjethre) ConfirmTransaction(tx string) bool { - if self.ethereum.NatSpec { + if self.expanse.NatSpec { self.lastConfirm = natspec.GetNotice(self.xeth, tx, self.ds) } return true } -func testJEthRE(t *testing.T) (string, *testjethre, *eth.Ethereum) { +func testJEthRE(t *testing.T) (string, *testjethre, *exp.Expanse) { return testREPL(t, nil) } -func testREPL(t *testing.T, config func(*eth.Config)) (string, *testjethre, *eth.Ethereum) { - tmp, err := ioutil.TempDir("", "geth-test") +func testREPL(t *testing.T, config func(*exp.Config)) (string, *testjethre, *exp.Expanse) { + tmp, err := ioutil.TempDir("", "gexp-test") if err != nil { t.Fatal(err) } @@ -95,7 +95,7 @@ func testREPL(t *testing.T, config func(*eth.Config)) (string, *testjethre, *eth core.WriteGenesisBlockForTesting(db, common.HexToAddress(testAddress), common.String2Big(testBalance)) ks := crypto.NewKeyStorePlain(filepath.Join(tmp, "keystore")) am := accounts.NewManager(ks) - conf := ð.Config{ + conf := &exp.Config{ NodeKey: testNodeKey, DataDir: tmp, AccountManager: am, @@ -108,7 +108,7 @@ func testREPL(t *testing.T, config func(*eth.Config)) (string, *testjethre, *eth if config != nil { config(conf) } - ethereum, err := eth.New(conf) + expanse, err := exp.New(conf) if err != nil { t.Fatal("%v", err) } @@ -128,22 +128,22 @@ func testREPL(t *testing.T, config func(*eth.Config)) (string, *testjethre, *eth t.Fatal(err) } - assetPath := filepath.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "cmd", "mist", "assets", "ext") + assetPath := filepath.Join(os.Getenv("GOPATH"), "src", "github.com", "expanse", "go-expanse", "cmd", "mist", "assets", "ext") client := comms.NewInProcClient(codec.JSON) ds := docserver.New("/") tf := &testjethre{ds: ds} - repl := newJSRE(ethereum, assetPath, "", client, false, tf) + repl := newJSRE(expanse, assetPath, "", client, false, tf) tf.jsre = repl - return tmp, tf, ethereum + return tmp, tf, expanse } func TestNodeInfo(t *testing.T) { t.Skip("broken after p2p update") - tmp, repl, ethereum := testJEthRE(t) - if err := ethereum.Start(); err != nil { - t.Fatalf("error starting ethereum: %v", err) + tmp, repl, expanse := testJEthRE(t) + if err := expanse.Start(); err != nil { + t.Fatalf("error starting expanse: %v", err) } - defer ethereum.Stop() + defer expanse.Stop() defer os.RemoveAll(tmp) want := `{"DiscPort":0,"IP":"0.0.0.0","ListenAddr":"","Name":"test","NodeID":"4cb2fc32924e94277bf94b5e4c983beedb2eabd5a0bc941db32202735c6625d020ca14a5963d1738af43b6ac0a711d61b1a06de931a499fe2aa0b1a132a902b5","NodeUrl":"enode://4cb2fc32924e94277bf94b5e4c983beedb2eabd5a0bc941db32202735c6625d020ca14a5963d1738af43b6ac0a711d61b1a06de931a499fe2aa0b1a132a902b5@0.0.0.0:0","TCPPort":0,"Td":"131072"}` @@ -151,15 +151,15 @@ func TestNodeInfo(t *testing.T) { } func TestAccounts(t *testing.T) { - tmp, repl, ethereum := testJEthRE(t) - if err := ethereum.Start(); err != nil { - t.Fatalf("error starting ethereum: %v", err) + tmp, repl, expanse := testJEthRE(t) + if err := expanse.Start(); err != nil { + t.Fatalf("error starting expanse: %v", err) } - defer ethereum.Stop() + defer expanse.Stop() defer os.RemoveAll(tmp) - checkEvalJSON(t, repl, `eth.accounts`, `["`+testAddress+`"]`) - checkEvalJSON(t, repl, `eth.coinbase`, `"`+testAddress+`"`) + checkEvalJSON(t, repl, `exp.accounts`, `["`+testAddress+`"]`) + checkEvalJSON(t, repl, `exp.coinbase`, `"`+testAddress+`"`) val, err := repl.re.Run(`personal.newAccount("password")`) if err != nil { t.Errorf("expected no error, got %v", err) @@ -169,26 +169,26 @@ func TestAccounts(t *testing.T) { t.Errorf("address not hex: %q", addr) } - checkEvalJSON(t, repl, `eth.accounts`, `["`+testAddress+`","`+addr+`"]`) + checkEvalJSON(t, repl, `exp.accounts`, `["`+testAddress+`","`+addr+`"]`) } func TestBlockChain(t *testing.T) { - tmp, repl, ethereum := testJEthRE(t) - if err := ethereum.Start(); err != nil { - t.Fatalf("error starting ethereum: %v", err) + tmp, repl, expanse := testJEthRE(t) + if err := expanse.Start(); err != nil { + t.Fatalf("error starting expanse: %v", err) } - defer ethereum.Stop() + defer expanse.Stop() defer os.RemoveAll(tmp) // get current block dump before export/import. - val, err := repl.re.Run("JSON.stringify(debug.dumpBlock(eth.blockNumber))") + val, err := repl.re.Run("JSON.stringify(debug.dumpBlock(exp.blockNumber))") if err != nil { t.Errorf("expected no error, got %v", err) } beforeExport := val.String() // do the export - extmp, err := ioutil.TempDir("", "geth-test-export") + extmp, err := ioutil.TempDir("", "gexp-test-export") if err != nil { t.Fatal(err) } @@ -196,7 +196,7 @@ func TestBlockChain(t *testing.T) { tmpfile := filepath.Join(extmp, "export.chain") tmpfileq := strconv.Quote(tmpfile) - ethereum.ChainManager().Reset() + expanse.ChainManager().Reset() checkEvalJSON(t, repl, `admin.exportChain(`+tmpfileq+`)`, `true`) if _, err := os.Stat(tmpfile); err != nil { @@ -205,57 +205,57 @@ func TestBlockChain(t *testing.T) { // check import, verify that dumpBlock gives the same result. checkEvalJSON(t, repl, `admin.importChain(`+tmpfileq+`)`, `true`) - checkEvalJSON(t, repl, `debug.dumpBlock(eth.blockNumber)`, beforeExport) + checkEvalJSON(t, repl, `debug.dumpBlock(exp.blockNumber)`, beforeExport) } func TestMining(t *testing.T) { - tmp, repl, ethereum := testJEthRE(t) - if err := ethereum.Start(); err != nil { - t.Fatalf("error starting ethereum: %v", err) + tmp, repl, expanse := testJEthRE(t) + if err := expanse.Start(); err != nil { + t.Fatalf("error starting expanse: %v", err) } - defer ethereum.Stop() + defer expanse.Stop() defer os.RemoveAll(tmp) - checkEvalJSON(t, repl, `eth.mining`, `false`) + checkEvalJSON(t, repl, `exp.mining`, `false`) } func TestRPC(t *testing.T) { - tmp, repl, ethereum := testJEthRE(t) - if err := ethereum.Start(); err != nil { - t.Errorf("error starting ethereum: %v", err) + tmp, repl, expanse := testJEthRE(t) + if err := expanse.Start(); err != nil { + t.Errorf("error starting expanse: %v", err) return } - defer ethereum.Stop() + defer expanse.Stop() defer os.RemoveAll(tmp) - checkEvalJSON(t, repl, `admin.startRPC("127.0.0.1", 5004, "*", "web3,eth,net")`, `true`) + checkEvalJSON(t, repl, `admin.startRPC("127.0.0.1", 5004, "*", "web3,exp,net")`, `true`) } func TestCheckTestAccountBalance(t *testing.T) { t.Skip() // i don't think it tests the correct behaviour here. it's actually testing // internals which shouldn't be tested. This now fails because of a change in the core // and i have no means to fix this, sorry - @obscuren - tmp, repl, ethereum := testJEthRE(t) - if err := ethereum.Start(); err != nil { - t.Errorf("error starting ethereum: %v", err) + tmp, repl, expanse := testJEthRE(t) + if err := expanse.Start(); err != nil { + t.Errorf("error starting expanse: %v", err) return } - defer ethereum.Stop() + defer expanse.Stop() defer os.RemoveAll(tmp) repl.re.Run(`primary = "` + testAddress + `"`) - checkEvalJSON(t, repl, `eth.getBalance(primary)`, `"`+testBalance+`"`) + checkEvalJSON(t, repl, `exp.getBalance(primary)`, `"`+testBalance+`"`) } func TestSignature(t *testing.T) { - tmp, repl, ethereum := testJEthRE(t) - if err := ethereum.Start(); err != nil { - t.Errorf("error starting ethereum: %v", err) + tmp, repl, expanse := testJEthRE(t) + if err := expanse.Start(); err != nil { + t.Errorf("error starting expanse: %v", err) return } - defer ethereum.Stop() + defer expanse.Stop() defer os.RemoveAll(tmp) - val, err := repl.re.Run(`eth.sign("` + testAddress + `", "` + testHash + `")`) + val, err := repl.re.Run(`exp.sign("` + testAddress + `", "` + testHash + `")`) // This is a very preliminary test, lacking actual signature verification if err != nil { @@ -275,15 +275,15 @@ func TestSignature(t *testing.T) { func TestContract(t *testing.T) { t.Skip("contract testing is implemented with mining in ethash test mode. This takes about 7seconds to run. Unskip and run on demand") coinbase := common.HexToAddress(testAddress) - tmp, repl, ethereum := testREPL(t, func(conf *eth.Config) { + tmp, repl, expanse := testREPL(t, func(conf *exp.Config) { conf.Etherbase = coinbase conf.PowTest = true }) - if err := ethereum.Start(); err != nil { - t.Errorf("error starting ethereum: %v", err) + if err := expanse.Start(); err != nil { + t.Errorf("error starting expanse: %v", err) return } - defer ethereum.Stop() + defer expanse.Stop() defer os.RemoveAll(tmp) reg := registrar.New(repl.xeth) @@ -321,7 +321,7 @@ func TestContract(t *testing.T) { if err != nil { t.Fatalf("%v", err) } - if checkEvalJSON(t, repl, `primary = eth.accounts[0]`, `"`+testAddress+`"`) != nil { + if checkEvalJSON(t, repl, `primary = exp.accounts[0]`, `"`+testAddress+`"`) != nil { return } if checkEvalJSON(t, repl, `source = "`+source+`"`, `"`+source+`"`) != nil { @@ -346,7 +346,7 @@ func TestContract(t *testing.T) { t.Errorf("%v", err) } } else { - if checkEvalJSON(t, repl, `contract = eth.compile.solidity(source).test`, string(contractInfo)) != nil { + if checkEvalJSON(t, repl, `contract = exp.compile.solidity(source).test`, string(contractInfo)) != nil { return } } @@ -357,7 +357,7 @@ func TestContract(t *testing.T) { if checkEvalJSON( t, repl, - `contractaddress = eth.sendTransaction({from: primary, data: contract.code})`, + `contractaddress = exp.sendTransaction({from: primary, data: contract.code})`, `"0x46d69d55c3c4b86a924a92c9fc4720bb7bce1d74"`, ) != nil { return @@ -368,7 +368,7 @@ func TestContract(t *testing.T) { } callSetup := `abiDef = JSON.parse('[{"constant":false,"inputs":[{"name":"a","type":"uint256"}],"name":"multiply","outputs":[{"name":"d","type":"uint256"}],"type":"function"}]'); -Multiply7 = eth.contract(abiDef); +Multiply7 = exp.contract(abiDef); multiply7 = Multiply7.at(contractaddress); ` _, err = repl.re.Run(callSetup) @@ -443,7 +443,7 @@ multiply7 = Multiply7.at(contractaddress); } func pendingTransactions(repl *testjethre, t *testing.T) (txc int64, err error) { - txs := repl.ethereum.TxPool().GetTransactions() + txs := repl.expanse.TxPool().GetTransactions() return int64(len(txs)), nil } @@ -469,12 +469,12 @@ func processTxs(repl *testjethre, t *testing.T, expTxc int) bool { return false } - err = repl.ethereum.StartMining(runtime.NumCPU()) + err = repl.expanse.StartMining(runtime.NumCPU()) if err != nil { t.Errorf("unexpected error mining: %v", err) return false } - defer repl.ethereum.StopMining() + defer repl.expanse.StopMining() timer := time.NewTimer(100 * time.Second) height := new(big.Int).Add(repl.xeth.CurrentBlock().Number(), big.NewInt(1)) diff --git a/cmd/geth/main.go b/cmd/geth/main.go index ff556c984e..c2f7ad9486 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -1,20 +1,20 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2014 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . -// geth is the official command-line client for Ethereum. +// gexp is the official command-line client for Expanse. package main import ( @@ -29,21 +29,22 @@ import ( "time" "github.com/codegangsta/cli" - "github.com/ethereum/ethash" - "github.com/ethereum/go-ethereum/accounts" - "github.com/ethereum/go-ethereum/cmd/utils" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/metrics" - "github.com/ethereum/go-ethereum/params" - "github.com/ethereum/go-ethereum/rlp" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/comms" + "github.com/expanse-project/ethash" + "github.com/expanse-project/go-expanse/accounts" + "github.com/expanse-project/go-expanse/cmd/utils" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/fdtrack" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/metrics" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/comms" + "github.com/mattn/go-colorable" + "github.com/mattn/go-isatty" ) const ( @@ -67,7 +68,7 @@ func init() { nodeNameVersion = Version + "-" + gitCommit[:8] } - app = utils.NewApp(Version, "the go-ethereum command line interface") + app = utils.NewApp(Version, "the go-expanse command line interface") app.Action = run app.HideVersion = true // we have a command to print the version app.Commands = []cli.Command{ @@ -104,7 +105,7 @@ Regular users do not need to execute it. { Action: version, Name: "version", - Usage: "print ethereum version numbers", + Usage: "print expanse version numbers", Description: ` The output of this command is supposed to be machine-readable. `, @@ -112,12 +113,12 @@ The output of this command is supposed to be machine-readable. { Name: "wallet", - Usage: "ethereum presale wallet", + Usage: "expanse presale wallet", Subcommands: []cli.Command{ { Action: importWallet, Name: "import", - Usage: "import ethereum presale wallet", + Usage: "import expanse presale wallet", }, }, Description: ` @@ -152,7 +153,7 @@ Note that exporting your key in unencrypted format is NOT supported. Keys are stored under /keys. It is safe to transfer the entire directory or the individual keys therein -between ethereum nodes by simply copying. +between expanse nodes by simply copying. Make sure you backup your keys regularly. In order to use your account to send transactions, you need to unlock them using the @@ -172,7 +173,7 @@ And finally. DO NOT FORGET YOUR PASSWORD. Usage: "create a new account", Description: ` - ethereum account new + expanse account new Creates a new account. Prints the address. @@ -182,7 +183,7 @@ You must remember this passphrase to unlock your account in the future. For non-interactive use the passphrase can be specified with the --password flag: - ethereum --password account new + expanse --password account new Note, this is meant to be used for testing only, it is a bad idea to save your password to file or expose in any other way. @@ -194,7 +195,7 @@ password to file or expose in any other way. Usage: "update an existing account", Description: ` - ethereum account update
+ expanse account update
Update an existing account. @@ -206,7 +207,7 @@ format to the newest format or change the password for an account. For non-interactive use the passphrase can be specified with the --password flag: - ethereum --password account new + expanse --password account new Since only one password can be given, only format update can be performed, changing your password is only possible interactively. @@ -221,7 +222,7 @@ changes. Usage: "import a private key into a new account", Description: ` - ethereum account import + expanse account import Imports an unencrypted private key from and creates a new account. Prints the address. @@ -234,10 +235,10 @@ You must remember this passphrase to unlock your account in the future. For non-interactive use the passphrase can be specified with the -password flag: - ethereum --password account import + expanse --password account import Note: -As you can directly copy your encrypted accounts to another ethereum instance, +As you can directly copy your encrypted accounts to another expanse instance, this import mechanism is not needed when you transfer an account between nodes. `, @@ -251,7 +252,7 @@ nodes. Description: ` The Geth console is an interactive shell for the JavaScript runtime environment which exposes a node admin interface as well as the Ðapp JavaScript API. -See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Console +See https://github.com/expanse-project/go-expanse/wiki/Javascipt-Console `}, { Action: attach, @@ -260,8 +261,8 @@ See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Console Description: ` The Geth console is an interactive shell for the JavaScript runtime environment which exposes a node admin interface as well as the Ðapp JavaScript API. -See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Console. -This command allows to open a console on a running geth node. +See https://github.com/expanse-project/go-expanse/wiki/Javascipt-Console. +This command allows to open a console on a running gexp node. `, }, { @@ -270,7 +271,7 @@ This command allows to open a console on a running geth node. Usage: `executes the given JavaScript files in the Geth JavaScript VM`, Description: ` The JavaScript VM exposes a node admin interface as well as the Ðapp -JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Console +JavaScript API. See https://github.com/expanse-project/go-expanse/wiki/Javascipt-Console `, }, } @@ -386,15 +387,27 @@ func run(ctx *cli.Context) { utils.Fatalf("%v", err) } - startEth(ctx, ethereum) + startEth(ctx, expanse) // this blocks the thread - ethereum.WaitForShutdown() + expanse.WaitForShutdown() } func attach(ctx *cli.Context) { utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name)) +<<<<<<< HEAD var client comms.EthereumClient +======= + // Wrap the standard output with a colorified stream (windows) + if isatty.IsTerminal(os.Stdout.Fd()) { + if pr, pw, err := os.Pipe(); err == nil { + go io.Copy(colorable.NewColorableStdout(), pr) + os.Stdout = pw + } + } + + var client comms.ExpanseClient +>>>>>>> test change lol var err error if ctx.Args().Present() { client, err = comms.ClientFromEndpoint(ctx.Args().First(), codec.JSON) @@ -406,7 +419,7 @@ func attach(ctx *cli.Context) { } if err != nil { - utils.Fatalf("Unable to attach to geth node - %v", err) + utils.Fatalf("Unable to attach to gexp node - %v", err) } repl := newLightweightJSRE( @@ -427,16 +440,16 @@ func console(ctx *cli.Context) { utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name)) cfg := utils.MakeEthConfig(ClientIdentifier, nodeNameVersion, ctx) - ethereum, err := eth.New(cfg) + expanse, err := exp.New(cfg) if err != nil { utils.Fatalf("%v", err) } client := comms.NewInProcClient(codec.JSON) - startEth(ctx, ethereum) + startEth(ctx, expanse) repl := newJSRE( - ethereum, + expanse, ctx.GlobalString(utils.JSpathFlag.Name), ctx.GlobalString(utils.RPCCORSDomainFlag.Name), client, @@ -451,23 +464,23 @@ func console(ctx *cli.Context) { repl.interactive() } - ethereum.Stop() - ethereum.WaitForShutdown() + expanse.Stop() + expanse.WaitForShutdown() } func execJSFiles(ctx *cli.Context) { utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name)) cfg := utils.MakeEthConfig(ClientIdentifier, nodeNameVersion, ctx) - ethereum, err := eth.New(cfg) + expanse, err := exp.New(cfg) if err != nil { utils.Fatalf("%v", err) } client := comms.NewInProcClient(codec.JSON) - startEth(ctx, ethereum) + startEth(ctx, expanse) repl := newJSRE( - ethereum, + expanse, ctx.GlobalString(utils.JSpathFlag.Name), ctx.GlobalString(utils.RPCCORSDomainFlag.Name), client, @@ -478,8 +491,8 @@ func execJSFiles(ctx *cli.Context) { repl.exec(file) } - ethereum.Stop() - ethereum.WaitForShutdown() + expanse.Stop() + expanse.WaitForShutdown() } func unlockAccount(ctx *cli.Context, am *accounts.Manager, addr string, i int) (addrHex, auth string) { @@ -541,11 +554,18 @@ func blockRecovery(ctx *cli.Context) { glog.Infof("Recovery succesful. New HEAD %x\n", block.Hash()) } -func startEth(ctx *cli.Context, eth *eth.Ethereum) { - // Start Ethereum itself - utils.StartEthereum(eth) +func startEth(ctx *cli.Context, exp *exp.Expanse) { + // Start Expanse itself + utils.StartExpanse(exp) +<<<<<<< HEAD am := eth.AccountManager() +======= + // Start logging file descriptor stats. + fdtrack.Start() + + am := exp.AccountManager() +>>>>>>> test change lol account := ctx.GlobalString(utils.UnlockedAccountFlag.Name) accounts := strings.Split(account, " ") for i, account := range accounts { @@ -558,17 +578,17 @@ func startEth(ctx *cli.Context, eth *eth.Ethereum) { } // Start auxiliary services if enabled. if !ctx.GlobalBool(utils.IPCDisabledFlag.Name) { - if err := utils.StartIPC(eth, ctx); err != nil { + if err := utils.StartIPC(exp, ctx); err != nil { utils.Fatalf("Error string IPC: %v", err) } } if ctx.GlobalBool(utils.RPCEnabledFlag.Name) { - if err := utils.StartRPC(eth, ctx); err != nil { + if err := utils.StartRPC(exp, ctx); err != nil { utils.Fatalf("Error starting RPC: %v", err) } } if ctx.GlobalBool(utils.MiningEnabledFlag.Name) { - if err := eth.StartMining(ctx.GlobalInt(utils.MinerThreadsFlag.Name)); err != nil { + if err := exp.StartMining(ctx.GlobalInt(utils.MinerThreadsFlag.Name)); err != nil { utils.Fatalf("%v", err) } } @@ -696,7 +716,7 @@ func makedag(ctx *cli.Context) { args := ctx.Args() wrongArgs := func() { - utils.Fatalf(`Usage: geth makedag `) + utils.Fatalf(`Usage: gexp makedag `) } switch { case len(args) == 2: @@ -728,7 +748,7 @@ func version(c *cli.Context) { if gitCommit != "" { fmt.Println("Git Commit:", gitCommit) } - fmt.Println("Protocol Versions:", eth.ProtocolVersions) + fmt.Println("Protocol Versions:", exp.ProtocolVersions) fmt.Println("Network Id:", c.GlobalInt(utils.NetworkIdFlag.Name)) fmt.Println("Go Version:", runtime.Version()) fmt.Println("OS:", runtime.GOOS) diff --git a/cmd/geth/monitorcmd.go b/cmd/geth/monitorcmd.go index a7c099532c..4634ce5184 100644 --- a/cmd/geth/monitorcmd.go +++ b/cmd/geth/monitorcmd.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2015 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . package main @@ -26,11 +26,11 @@ import ( "time" "github.com/codegangsta/cli" - "github.com/ethereum/go-ethereum/cmd/utils" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/rpc" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/comms" + "github.com/expanse-project/go-expanse/cmd/utils" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/rpc" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/comms" "github.com/gizak/termui" ) @@ -70,13 +70,13 @@ to display multiple metrics simultaneously. // monitor starts a terminal UI based monitoring tool for the requested metrics. func monitor(ctx *cli.Context) { var ( - client comms.EthereumClient + client comms.ExpanseClient err error ) - // Attach to an Ethereum node over IPC or RPC + // Attach to an Expanse node over IPC or RPC endpoint := ctx.String(monitorCommandAttachFlag.Name) if client, err = comms.ClientFromEndpoint(endpoint, codec.JSON); err != nil { - utils.Fatalf("Unable to attach to geth node: %v", err) + utils.Fatalf("Unable to attach to gexp node: %v", err) } defer client.Close() @@ -95,7 +95,7 @@ func monitor(ctx *cli.Context) { if len(list) > 0 { utils.Fatalf("No metrics specified.\n\nAvailable:\n - %s", strings.Join(list, "\n - ")) } else { - utils.Fatalf("No metrics collected by geth (--%s).\n", utils.MetricsEnabledFlag.Name) + utils.Fatalf("No metrics collected by gexp (--%s).\n", utils.MetricsEnabledFlag.Name) } } sort.Strings(monitored) @@ -162,7 +162,7 @@ func monitor(ctx *cli.Context) { } } -// retrieveMetrics contacts the attached geth node and retrieves the entire set +// retrieveMetrics contacts the attached gexp node and retrieves the entire set // of collected system metrics. func retrieveMetrics(xeth *rpc.Xeth) (map[string]interface{}, error) { return xeth.Call("debug_metrics", []interface{}{true}) diff --git a/cmd/rlpdump/main.go b/cmd/rlpdump/main.go index 10eea1fde0..e2dd152be7 100644 --- a/cmd/rlpdump/main.go +++ b/cmd/rlpdump/main.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2015 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . // rlpdump is a pretty-printer for RLP data. package main @@ -26,7 +26,7 @@ import ( "os" "strings" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/rlp" ) var ( diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go index 983762db8f..a03a50d629 100644 --- a/cmd/utils/cmd.go +++ b/cmd/utils/cmd.go @@ -1,20 +1,20 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2014 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . -// Package utils contains internal helper functions for go-ethereum commands. +// Package utils contains internal helper functions for go-expanse commands. package utils import ( @@ -28,14 +28,14 @@ import ( "regexp" "strings" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/params" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/params" + "github.com/expanse-project/go-expanse/rlp" "github.com/peterh/liner" ) @@ -121,10 +121,10 @@ func Fatalf(format string, args ...interface{}) { os.Exit(1) } -func StartEthereum(ethereum *eth.Ethereum) { - glog.V(logger.Info).Infoln("Starting", ethereum.Name()) - if err := ethereum.Start(); err != nil { - Fatalf("Error starting Ethereum: %v", err) +func StartExpanse(expanse *exp.Expanse) { + glog.V(logger.Info).Infoln("Starting", expanse.Name()) + if err := expanse.Start(); err != nil { + Fatalf("Error starting Expanse: %v", err) } go func() { sigc := make(chan os.Signal, 1) @@ -132,7 +132,7 @@ func StartEthereum(ethereum *eth.Ethereum) { defer signal.Stop(sigc) <-sigc glog.V(logger.Info).Infoln("Got interrupt, shutting down...") - go ethereum.Stop() + go expanse.Stop() logger.Flush() for i := 10; i > 0; i-- { <-sigc diff --git a/cmd/utils/customflags.go b/cmd/utils/customflags.go index 4450065c14..63351bec83 100644 --- a/cmd/utils/customflags.go +++ b/cmd/utils/customflags.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2015 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . package utils @@ -44,7 +44,7 @@ func (self *DirectoryString) Set(value string) error { } // Custom cli.Flag type which expand the received string to an absolute path. -// e.g. ~/.ethereum -> /home/username/.ethereum +// e.g. ~/.expanse -> /home/username/.expanse type DirectoryFlag struct { cli.GenericFlag Name string diff --git a/cmd/utils/customflags_test.go b/cmd/utils/customflags_test.go index de39ca36a1..24c6cff635 100644 --- a/cmd/utils/customflags_test.go +++ b/cmd/utils/customflags_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2015 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . package utils diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index af2929d102..bfbc99bf59 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2015 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . package utils @@ -28,26 +28,24 @@ import ( "runtime" "strconv" + "github.com/expanse-project/go-expanse/metrics" + "github.com/codegangsta/cli" - "github.com/ethereum/ethash" - "github.com/ethereum/go-ethereum/accounts" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/vm" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/metrics" - "github.com/ethereum/go-ethereum/p2p/nat" - "github.com/ethereum/go-ethereum/rpc/api" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/comms" - "github.com/ethereum/go-ethereum/rpc/shared" - "github.com/ethereum/go-ethereum/rpc/useragent" - "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/ethash" + "github.com/expanse-project/go-expanse/accounts" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/event" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/p2p/nat" + "github.com/expanse-project/go-expanse/rpc/api" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/comms" + "github.com/expanse-project/go-expanse/xeth" ) func init() { @@ -105,7 +103,7 @@ var ( NetworkIdFlag = cli.IntFlag{ Name: "networkid", Usage: "Network Id (integer)", - Value: eth.NetworkId, + Value: exp.NetworkId, } BlockchainVersionFlag = cli.IntFlag{ Name: "blockchainversion", @@ -250,7 +248,7 @@ var ( RPCPortFlag = cli.IntFlag{ Name: "rpcport", Usage: "Port on which the JSON-RPC server should listen", - Value: 8545, + Value: 9656, } RPCCORSDomainFlag = cli.StringFlag{ Name: "rpccorsdomain", @@ -294,7 +292,7 @@ var ( ListenPortFlag = cli.IntFlag{ Name: "port", Usage: "Network listening port", - Value: 30303, + Value: 60606, } BootnodesFlag = cli.StringFlag{ Name: "bootnodes", @@ -393,8 +391,8 @@ func MakeNodeKey(ctx *cli.Context) (key *ecdsa.PrivateKey) { return key } -// MakeEthConfig creates ethereum options from set command line flags. -func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config { +// MakeEthConfig creates expanse options from set command line flags. +func MakeEthConfig(clientID, version string, ctx *cli.Context) *exp.Config { customName := ctx.GlobalString(IdentityFlag.Name) if len(customName) > 0 { clientID += "/" + customName @@ -405,7 +403,7 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config { glog.V(logger.Error).Infoln("WARNING: No etherbase set and no accounts found as default") } - return ð.Config{ + return &exp.Config{ Name: common.MakeName(clientID, version), DataDir: ctx.GlobalString(DataDirFlag.Name), GenesisNonce: ctx.GlobalInt(GenesisNonceFlag.Name), @@ -505,7 +503,7 @@ func IpcSocketPath(ctx *cli.Context) (ipcpath string) { } else { ipcpath = common.DefaultIpcPath() if ctx.GlobalIsSet(DataDirFlag.Name) { - ipcpath = filepath.Join(ctx.GlobalString(DataDirFlag.Name), "geth.ipc") + ipcpath = filepath.Join(ctx.GlobalString(DataDirFlag.Name), "gexp.ipc") } if ctx.GlobalIsSet(IPCPathFlag.Name) { ipcpath = ctx.GlobalString(IPCPathFlag.Name) @@ -515,7 +513,7 @@ func IpcSocketPath(ctx *cli.Context) (ipcpath string) { return } -func StartIPC(eth *eth.Ethereum, ctx *cli.Context) error { +func StartIPC(exp *exp.Expanse, ctx *cli.Context) error { config := comms.IpcConfig{ Endpoint: IpcSocketPath(ctx), } @@ -536,17 +534,17 @@ func StartIPC(eth *eth.Ethereum, ctx *cli.Context) error { return comms.StartIpc(config, codec.JSON, initializer) } -func StartRPC(eth *eth.Ethereum, ctx *cli.Context) error { +func StartRPC(exp *exp.Expanse, ctx *cli.Context) error { config := comms.HttpConfig{ ListenAddress: ctx.GlobalString(RPCListenAddrFlag.Name), ListenPort: uint(ctx.GlobalInt(RPCPortFlag.Name)), CorsDomain: ctx.GlobalString(RPCCORSDomainFlag.Name), } - xeth := xeth.New(eth, nil) + xeth := xeth.New(exp, nil) codec := codec.JSON - apis, err := api.ParseApiString(ctx.GlobalString(RpcApiFlag.Name), codec, xeth, eth) + apis, err := api.ParseApiString(ctx.GlobalString(RpcApiFlag.Name), codec, xeth, exp) if err != nil { return err } diff --git a/cmd/utils/legalese.go b/cmd/utils/legalese.go index 09e687c17b..4779849015 100644 --- a/cmd/utils/legalese.go +++ b/cmd/utils/legalese.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2015 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . package utils diff --git a/common/README.md b/common/README.md index 1ed56b71ba..a1ddd98cc6 100644 --- a/common/README.md +++ b/common/README.md @@ -1,22 +1,22 @@ # ethutil [![Build -Status](https://travis-ci.org/ethereum/go-ethereum.png?branch=master)](https://travis-ci.org/ethereum/go-ethereum) +Status](https://travis-ci.org/expanse/go-expanse.png?branch=master)](https://travis-ci.org/expanse/go-expanse) -The ethutil package contains the ethereum utility library. +The ethutil package contains the expanse utility library. # Installation -`go get github.com/ethereum/ethutil-go` +`go get github.com/expanse-project/ethutil-go` # Usage ## RLP (Recursive Linear Prefix) Encoding -RLP Encoding is an encoding scheme utilized by the Ethereum project. It +RLP Encoding is an encoding scheme utilized by the Expanse project. It encodes any native value or list to string. -More in depth information about the Encoding scheme see the [Wiki](http://wiki.ethereum.org/index.php/RLP) +More in depth information about the Encoding scheme see the [Wiki](http://wiki.expanse.org/index.php/RLP) article. ```go @@ -31,10 +31,10 @@ fmt.Println(decoded) // => ["dog" "cat"] ## Patricia Trie -Patricie Tree is a merkle trie utilized by the Ethereum project. +Patricie Tree is a merkle trie utilized by the Expanse project. More in depth information about the (modified) Patricia Trie can be -found on the [Wiki](http://wiki.ethereum.org/index.php/Patricia_Tree). +found on the [Wiki](http://wiki.expanse.org/index.php/Patricia_Tree). The patricia trie uses a db as backend and could be anything as long as it satisfies the Database interface found in `ethutil/db.go`. diff --git a/common/big.go b/common/big.go index a5d512d0dc..9dce0d70cb 100644 --- a/common/big.go +++ b/common/big.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common diff --git a/common/big_test.go b/common/big_test.go index 1eb0c0c1fd..e45c98ff3d 100644 --- a/common/big_test.go +++ b/common/big_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common diff --git a/common/bytes.go b/common/bytes.go index ba6987a9ec..11dc2665ec 100644 --- a/common/bytes.go +++ b/common/bytes.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Package common contains various helper functions. package common diff --git a/common/bytes_test.go b/common/bytes_test.go index 816d2082b8..f2b40e9463 100644 --- a/common/bytes_test.go +++ b/common/bytes_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common diff --git a/common/compiler/solidity.go b/common/compiler/solidity.go index 56928ac27d..d3d0a2a57b 100644 --- a/common/compiler/solidity.go +++ b/common/compiler/solidity.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package compiler @@ -27,10 +27,10 @@ import ( "regexp" "strings" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" ) const ( diff --git a/common/compiler/solidity_test.go b/common/compiler/solidity_test.go index 3303bc15a1..cf9aec4407 100644 --- a/common/compiler/solidity_test.go +++ b/common/compiler/solidity_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package compiler @@ -23,7 +23,7 @@ import ( "path" "testing" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) const solcVersion = "0.9.23" @@ -111,4 +111,4 @@ func TestSaveInfo(t *testing.T) { if cinfohash != infohash { t.Errorf("content hash for info is incorrect. expected %v, got %v", infohash.Hex(), cinfohash.Hex()) } -} \ No newline at end of file +} diff --git a/common/db.go b/common/db.go index 60c090cdce..2aee774304 100644 --- a/common/db.go +++ b/common/db.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common diff --git a/common/debug.go b/common/debug.go index fa93d7bda5..0ba3e3b303 100644 --- a/common/debug.go +++ b/common/debug.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common @@ -24,7 +24,7 @@ import ( ) func Report(extra ...interface{}) { - fmt.Fprintln(os.Stderr, "You've encountered a sought after, hard to reproduce bug. Please report this to the developers <3 https://github.com/ethereum/go-ethereum/issues") + fmt.Fprintln(os.Stderr, "You've encountered a sought after, hard to reproduce bug. Please report this to the developers <3 https://github.com/expanse-project/go-expanse/issues") fmt.Fprintln(os.Stderr, extra...) _, file, line, _ := runtime.Caller(1) diff --git a/common/docserver/docserver.go b/common/docserver/docserver.go index dac542ba7e..bc865b0a5c 100644 --- a/common/docserver/docserver.go +++ b/common/docserver/docserver.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package docserver @@ -22,8 +22,8 @@ import ( "net/http" "path/filepath" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" ) type DocServer struct { diff --git a/common/docserver/docserver_test.go b/common/docserver/docserver_test.go index 632603addb..70e20e8bde 100644 --- a/common/docserver/docserver_test.go +++ b/common/docserver/docserver_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package docserver @@ -23,8 +23,8 @@ import ( "path" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" ) func TestGetAuthContent(t *testing.T) { @@ -74,4 +74,4 @@ func TestRegisterScheme(t *testing.T) { if !ds.HasScheme("scheme") { t.Errorf("expected scheme to be registered") } -} \ No newline at end of file +} diff --git a/common/list.go b/common/list.go index 07b2f17f53..395519b921 100644 --- a/common/list.go +++ b/common/list.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common diff --git a/common/main_test.go b/common/main_test.go index 149d09928a..95e10f0c3c 100644 --- a/common/main_test.go +++ b/common/main_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common diff --git a/common/math/dist.go b/common/math/dist.go index 913fbfbd47..5df1fc2d1c 100644 --- a/common/math/dist.go +++ b/common/math/dist.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package math @@ -20,7 +20,7 @@ import ( "math/big" "sort" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) type Summer interface { diff --git a/common/math/dist_test.go b/common/math/dist_test.go index 1eacfbcaf2..41d5175561 100644 --- a/common/math/dist_test.go +++ b/common/math/dist_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package math diff --git a/common/natspec/natspec.go b/common/natspec/natspec.go index 0265c2e13f..7907f21b61 100644 --- a/common/natspec/natspec.go +++ b/common/natspec/natspec.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package natspec @@ -22,11 +22,11 @@ import ( "fmt" "strings" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/docserver" - "github.com/ethereum/go-ethereum/common/registrar" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/common/docserver" + "github.com/expanse-project/go-expanse/common/registrar" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/xeth" "github.com/robertkrimen/otto" ) diff --git a/common/natspec/natspec_e2e_test.go b/common/natspec/natspec_e2e_test.go index fc8ca6af2e..8c063f6259 100644 --- a/common/natspec/natspec_e2e_test.go +++ b/common/natspec/natspec_e2e_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package natspec @@ -26,15 +26,15 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/accounts" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/docserver" - "github.com/ethereum/go-ethereum/common/registrar" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/ethdb" - xe "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/go-expanse/accounts" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/common/docserver" + "github.com/expanse-project/go-expanse/common/registrar" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/ethdb" + xe "github.com/expanse-project/go-expanse/xeth" ) const ( @@ -93,7 +93,7 @@ const ( type testFrontend struct { t *testing.T - ethereum *eth.Ethereum + expanse *exp.Expanse xeth *xe.XEth wait chan *big.Int lastConfirm string @@ -101,7 +101,7 @@ type testFrontend struct { } func (self *testFrontend) UnlockAccount(acc []byte) bool { - self.ethereum.AccountManager().Unlock(common.BytesToAddress(acc), "password") + self.expanse.AccountManager().Unlock(common.BytesToAddress(acc), "password") return true } @@ -113,17 +113,17 @@ func (self *testFrontend) ConfirmTransaction(tx string) bool { return true } -func testEth(t *testing.T) (ethereum *eth.Ethereum, err error) { +func testEth(t *testing.T) (expanse *exp.Expanse, err error) { - os.RemoveAll("/tmp/eth-natspec/") + os.RemoveAll("/tmp/exp-natspec/") - err = os.MkdirAll("/tmp/eth-natspec/keystore", os.ModePerm) + err = os.MkdirAll("/tmp/exp-natspec/keystore", os.ModePerm) if err != nil { panic(err) } // create a testAddress - ks := crypto.NewKeyStorePassphrase("/tmp/eth-natspec/keystore") + ks := crypto.NewKeyStorePassphrase("/tmp/exp-natspec/keystore") am := accounts.NewManager(ks) testAccount, err := am.NewAccount("password") if err != nil { @@ -137,8 +137,8 @@ func testEth(t *testing.T) (ethereum *eth.Ethereum, err error) { core.WriteGenesisBlockForTesting(db, common.HexToAddress(testAddress), common.String2Big(testBalance)) // only use minimalistic stack with no networking - ethereum, err = eth.New(ð.Config{ - DataDir: "/tmp/eth-natspec", + expanse, err = exp.New(&exp.Config{ + DataDir: "/tmp/exp-natspec", AccountManager: am, MaxPeers: 0, PowTest: true, @@ -154,23 +154,23 @@ func testEth(t *testing.T) (ethereum *eth.Ethereum, err error) { } func testInit(t *testing.T) (self *testFrontend) { - // initialise and start minimal ethereum stack - ethereum, err := testEth(t) + // initialise and start minimal expanse stack + expanse, err := testEth(t) if err != nil { - t.Errorf("error creating ethereum: %v", err) + t.Errorf("error creating expanse: %v", err) return } - err = ethereum.Start() + err = expanse.Start() if err != nil { - t.Errorf("error starting ethereum: %v", err) + t.Errorf("error starting expanse: %v", err) return } // mock frontend - self = &testFrontend{t: t, ethereum: ethereum} - self.xeth = xe.New(ethereum, self) + self = &testFrontend{t: t, expanse: expanse} + self.xeth = xe.New(expanse, self) self.wait = self.xeth.UpdateState() - addr, _ := self.ethereum.Etherbase() + addr, _ := self.expanse.Etherbase() // initialise the registry contracts reg := registrar.New(self.xeth) @@ -211,8 +211,8 @@ func TestNatspecE2E(t *testing.T) { t.Skip() tf := testInit(t) - defer tf.ethereum.Stop() - addr, _ := tf.ethereum.Etherbase() + defer tf.expanse.Stop() + addr, _ := tf.expanse.Etherbase() // create a contractInfo file (mock cloud-deployed contract metadocs) // incidentally this is the info for the registry contract itself @@ -280,7 +280,7 @@ func TestNatspecE2E(t *testing.T) { } func pendingTransactions(repl *testFrontend, t *testing.T) (txc int64, err error) { - txs := repl.ethereum.TxPool().GetTransactions() + txs := repl.expanse.TxPool().GetTransactions() return int64(len(txs)), nil } @@ -306,12 +306,12 @@ func processTxs(repl *testFrontend, t *testing.T, expTxc int) bool { return false } - err = repl.ethereum.StartMining(runtime.NumCPU()) + err = repl.expanse.StartMining(runtime.NumCPU()) if err != nil { t.Errorf("unexpected error mining: %v", err) return false } - defer repl.ethereum.StopMining() + defer repl.expanse.StopMining() timer := time.NewTimer(100 * time.Second) height := new(big.Int).Add(repl.xeth.CurrentBlock().Number(), big.NewInt(1)) diff --git a/common/natspec/natspec_e2e_test.go.orig b/common/natspec/natspec_e2e_test.go.orig index ae8e17ad9a..bd89d9c546 100644 --- a/common/natspec/natspec_e2e_test.go.orig +++ b/common/natspec/natspec_e2e_test.go.orig @@ -7,15 +7,15 @@ import ( "strings" "testing" - "github.com/ethereum/go-ethereum/accounts" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/docserver" - "github.com/ethereum/go-ethereum/common/registrar" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/eth" - xe "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/go-expanse/accounts" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/common/docserver" + "github.com/expanse-project/go-expanse/common/registrar" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/exp" + xe "github.com/expanse-project/go-expanse/xeth" ) const ( @@ -74,7 +74,7 @@ const ( type testFrontend struct { t *testing.T - ethereum *eth.Ethereum + expanse *exp.Expanse xeth *xe.XEth coinbase common.Address stateDb *state.StateDB @@ -84,7 +84,7 @@ type testFrontend struct { } func (self *testFrontend) UnlockAccount(acc []byte) bool { - self.ethereum.AccountManager().Unlock(common.BytesToAddress(acc), "password") + self.expanse.AccountManager().Unlock(common.BytesToAddress(acc), "password") return true } @@ -96,17 +96,17 @@ func (self *testFrontend) ConfirmTransaction(tx string) bool { return true } -func testEth(t *testing.T) (ethereum *eth.Ethereum, err error) { +func testEth(t *testing.T) (expanse *exp.Expanse, err error) { - os.RemoveAll("/tmp/eth-natspec/") + os.RemoveAll("/tmp/exp-natspec/") - err = os.MkdirAll("/tmp/eth-natspec/keystore", os.ModePerm) + err = os.MkdirAll("/tmp/exp-natspec/keystore", os.ModePerm) if err != nil { panic(err) } // create a testAddress - ks := crypto.NewKeyStorePassphrase("/tmp/eth-natspec/keystore") + ks := crypto.NewKeyStorePassphrase("/tmp/exp-natspec/keystore") am := accounts.NewManager(ks) testAccount, err := am.NewAccount("password") if err != nil { @@ -120,8 +120,8 @@ func testEth(t *testing.T) (ethereum *eth.Ethereum, err error) { }`) // only use minimalistic stack with no networking - ethereum, err = eth.New(ð.Config{ - DataDir: "/tmp/eth-natspec", + expanse, err = exp.New(&exp.Config{ + DataDir: "/tmp/exp-natspec", AccountManager: am, MaxPeers: 0, }) @@ -134,25 +134,25 @@ func testEth(t *testing.T) (ethereum *eth.Ethereum, err error) { } func testInit(t *testing.T) (self *testFrontend) { - // initialise and start minimal ethereum stack - ethereum, err := testEth(t) + // initialise and start minimal expanse stack + expanse, err := testEth(t) if err != nil { - t.Errorf("error creating ethereum: %v", err) + t.Errorf("error creating expanse: %v", err) return } - err = ethereum.Start() + err = expanse.Start() if err != nil { - t.Errorf("error starting ethereum: %v", err) + t.Errorf("error starting expanse: %v", err) return } // mock frontend - self = &testFrontend{t: t, ethereum: ethereum} - self.xeth = xe.New(ethereum, self) + self = &testFrontend{t: t, expanse: expanse} + self.xeth = xe.New(expanse, self) - addr, _ := ethereum.Etherbase() + addr, _ := expanse.Etherbase() self.coinbase = addr - self.stateDb = self.ethereum.ChainManager().State().Copy() + self.stateDb = self.expanse.ChainManager().State().Copy() // initialise the registry contracts reg := registrar.New(self.xeth) @@ -185,7 +185,7 @@ func TestNatspecE2E(t *testing.T) { t.Skip() tf := testInit(t) - defer tf.ethereum.Stop() + defer tf.expanse.Stop() // create a contractInfo file (mock cloud-deployed contract metadocs) // incidentally this is the info for the registry contract itself diff --git a/common/natspec/natspec_js.go b/common/natspec/natspec_js.go index 2b30d31d35..7af296bbe1 100644 --- a/common/natspec/natspec_js.go +++ b/common/natspec/natspec_js.go @@ -1,41 +1,41 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package natspec -const natspecJS = //`require=function t(e,n,r){function i(f,u){if(!n[f]){if(!e[f]){var s="function"==typeof require&&require;if(!u&&s)return s(f,!0);if(o)return o(f,!0);var c=new Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c}var a=n[f]={exports:{}};e[f][0].call(a.exports,function(t){var n=e[f][1][t];return i(n?n:t)},a,a.exports,t,e,n,r)}return n[f].exports}for(var o="function"==typeof require&&require,f=0;fv;v++)d.push(g(e.slice(0,s))),e=e.slice(s);n.push(d)}else r.prefixedType("string")(t[c].type)?(a=a.slice(s),n.push(g(e.slice(0,s))),e=e.slice(s)):(n.push(g(e.slice(0,s))),e=e.slice(s))}),n},g=function(t){var e={};return t.forEach(function(t){var r=n.extractDisplayName(t.name),i=n.extractTypeName(t.name),o=function(){var e=Array.prototype.slice.call(arguments);return a(t.inputs,e)};void 0===e[r]&&(e[r]=o),e[r][i]=o}),e},m=function(t){var e={};return t.forEach(function(t){var r=n.extractDisplayName(t.name),i=n.extractTypeName(t.name),o=function(e){return h(t.outputs,e)};void 0===e[r]&&(e[r]=o),e[r][i]=o}),e};e.exports={inputParser:g,outputParser:m,formatInput:a,formatOutput:h}},{"./const":4,"./formatters":5,"./types":6,"./utils":7}],4:[function(t,e){(function(n){if("build"!==n.env.NODE_ENV)var r=t("bignumber.js");var i=["wei","Kwei","Mwei","Gwei","szabo","finney","ether","grand","Mether","Gether","Tether","Pether","Eether","Zether","Yether","Nether","Dether","Vether","Uether"];e.exports={ETH_PADDING:32,ETH_SIGNATURE_LENGTH:4,ETH_UNITS:i,ETH_BIGNUMBER_ROUNDING_MODE:{ROUNDING_MODE:r.ROUND_DOWN},ETH_POLLING_TIMEOUT:1e3}}).call(this,t("_process"))},{_process:2,"bignumber.js":8}],5:[function(t,e){(function(n){if("build"!==n.env.NODE_ENV)var r=t("bignumber.js");var i=t("./utils"),o=t("./const"),f=function(t,e,n){return new Array(e-t.length+1).join(n?n:"0")+t},u=function(t){var e=2*o.ETH_PADDING;return t instanceof r||"number"==typeof t?("number"==typeof t&&(t=new r(t)),r.config(o.ETH_BIGNUMBER_ROUNDING_MODE),t=t.round(),t.lessThan(0)&&(t=new r("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16).plus(t).plus(1)),t=t.toString(16)):t=0===t.indexOf("0x")?t.substr(2):"string"==typeof t?u(new r(t)):(+t).toString(16),f(t,e)},s=function(t){return i.fromAscii(t,o.ETH_PADDING).substr(2)},c=function(t){return"000000000000000000000000000000000000000000000000000000000000000"+(t?"1":"0")},a=function(t){return u(new r(t).times(new r(2).pow(128)))},l=function(t){return"1"===new r(t.substr(0,1),16).toString(2).substr(0,1)},p=function(t){return t=t||"0",l(t)?new r(t,16).minus(new r("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16)).minus(1):new r(t,16)},h=function(t){return t=t||"0",new r(t,16)},g=function(t){return p(t).dividedBy(new r(2).pow(128))},m=function(t){return h(t).dividedBy(new r(2).pow(128))},d=function(t){return"0x"+t},v=function(t){return"0000000000000000000000000000000000000000000000000000000000000001"===t?!0:!1},w=function(t){return i.toAscii(t)},y=function(t){return"0x"+t.slice(t.length-40,t.length)};e.exports={formatInputInt:u,formatInputString:s,formatInputBool:c,formatInputReal:a,formatOutputInt:p,formatOutputUInt:h,formatOutputReal:g,formatOutputUReal:m,formatOutputHash:d,formatOutputBool:v,formatOutputString:w,formatOutputAddress:y}}).call(this,t("_process"))},{"./const":4,"./utils":7,_process:2,"bignumber.js":8}],6:[function(t,e){var n=t("./formatters"),r=function(t){return function(e){return 0===e.indexOf(t)}},i=function(t){return function(e){return t===e}},o=function(){return[{type:r("uint"),format:n.formatInputInt},{type:r("int"),format:n.formatInputInt},{type:r("hash"),format:n.formatInputInt},{type:r("string"),format:n.formatInputString},{type:r("real"),format:n.formatInputReal},{type:r("ureal"),format:n.formatInputReal},{type:i("address"),format:n.formatInputInt},{type:i("bool"),format:n.formatInputBool}]},f=function(){return[{type:r("uint"),format:n.formatOutputUInt},{type:r("int"),format:n.formatOutputInt},{type:r("hash"),format:n.formatOutputHash},{type:r("string"),format:n.formatOutputString},{type:r("real"),format:n.formatOutputReal},{type:r("ureal"),format:n.formatOutputUReal},{type:i("address"),format:n.formatOutputAddress},{type:i("bool"),format:n.formatOutputBool}]};e.exports={prefixedType:r,namedType:i,inputTypes:o,outputTypes:f}},{"./formatters":5}],7:[function(t,e){var n=t("./const"),r=function(t,e){for(var n=!1,r=0;rn;n+=2){var i=parseInt(t.substr(n,2),16);if(0===i)break;e+=String.fromCharCode(i)}return e},o=function(t){for(var e="",n=0;n3e3&&rr?"i":"").test(c))return m(a,c,u,r);u?(a.s=0>1/t?(c=c.slice(1),-1):1,$&&c.replace(/^0\.0*|\./,"").length>15&&U(L,O,t),u=!1):a.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1,c=n(c,10,r,a.s)}else{if(t instanceof e)return a.s=t.s,a.e=t.e,a.c=(t=t.c)?t.slice():t,void(L=0);if((u="number"==typeof t)&&0*t==0){if(a.s=0>1/t?(t=-t,-1):1,t===~~t){for(o=0,f=t;f>=10;f/=10,o++);return a.e=o,a.c=[t],void(L=0)}c=t+""}else{if(!d.test(c=t+""))return m(a,c,u);a.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1}}for((o=c.indexOf("."))>-1&&(c=c.replace(".","")),(f=c.search(/e/i))>0?(0>o&&(o=f),o+=+c.slice(f+1),c=c.substring(0,f)):0>o&&(o=c.length),f=0;48===c.charCodeAt(f);f++);for(s=c.length;48===c.charCodeAt(--s););if(c=c.slice(f,s+1))if(s=c.length,u&&$&&s>15&&U(L,O,a.s*t),o=o-f-1,o>q)a.c=a.e=null;else if(k>o)a.c=[a.e=0];else{if(a.e=o,a.c=[],f=(o+1)%I,0>o&&(f+=I),s>f){for(f&&a.c.push(+c.slice(0,f)),s-=I;s>f;)a.c.push(+c.slice(f,f+=I));c=c.slice(f),f=I-c.length}else f-=s;for(;f--;c+="0");a.c.push(+c)}else a.c=[a.e=0];L=0}function n(t,n,r,i){var f,u,s,a,p,h,g,m=t.indexOf("."),d=B,v=H;for(37>r&&(t=t.toLowerCase()),m>=0&&(s=Y,Y=0,t=t.replace(".",""),g=new e(r),p=g.pow(t.length-m),Y=s,g.c=c(l(o(p.c),p.e),10,n),g.e=g.c.length),h=c(t,r,n),u=s=h.length;0==h[--s];h.pop());if(!h[0])return"0";if(0>m?--u:(p.c=h,p.e=u,p.s=i,p=G(p,g,d,v,n),h=p.c,a=p.r,u=p.e),f=u+d+1,m=h[f],s=n/2,a=a||0>f||null!=h[f+1],a=4>v?(null!=m||a)&&(0==v||v==(p.s<0?3:2)):m>s||m==s&&(4==v||a||6==v&&1&h[f-1]||v==(p.s<0?8:7)),1>f||!h[0])t=a?l("1",-d):"0";else{if(h.length=f,a)for(--n;++h[--f]>n;)h[f]=0,f||(++u,h.unshift(1));for(s=h.length;!h[--s];);for(m=0,t="";s>=m;t+=N.charAt(h[m++]));t=l(t,u)}return t}function h(t,n,r,i){var f,u,s,c,p;if(r=null!=r&&z(r,0,8,i,b)?0|r:H,!t.c)return t.toString();if(f=t.c[0],s=t.e,null==n)p=o(t.c),p=19==i||24==i&&C>=s?a(p,s):l(p,s);else if(t=F(new e(t),n,r),u=t.e,p=o(t.c),c=p.length,19==i||24==i&&(u>=n||C>=u)){for(;n>c;p+="0",c++);p=a(p,u)}else if(n-=s,p=l(p,u),u+1>c){if(--n>0)for(p+=".";n--;p+="0");}else if(n+=u-c,n>0)for(u+1==c&&(p+=".");n--;p+="0");return t.s<0&&f?"-"+p:p}function S(t,n){var r,i,o=0;for(s(t[0])&&(t=t[0]),r=new e(t[0]);++ot||t>n||t!=p(t))&&U(r,(i||"decimal places")+(e>t||t>n?" out of range":" not an integer"),t),!0}function R(t,e,n){for(var r=1,i=e.length;!e[--i];e.pop());for(i=e[0];i>=10;i/=10,r++);return(n=r+n*I-1)>q?t.c=t.e=null:k>n?t.c=[t.e=0]:(t.e=n,t.c=e),t}function U(t,e,n){var r=new Error(["new BigNumber","cmp","config","div","divToInt","eq","gt","gte","lt","lte","minus","mod","plus","precision","random","round","shift","times","toDigits","toExponential","toFixed","toFormat","toFraction","pow","toPrecision","toString","BigNumber"][t]+"() "+e+": "+n);throw r.name="BigNumber Error",L=0,r}function F(t,e,n,r){var i,o,f,u,s,c,a,l=t.c,p=_;if(l){t:{for(i=1,u=l[0];u>=10;u/=10,i++);if(o=e-i,0>o)o+=I,f=e,s=l[c=0],a=s/p[i-f-1]%10|0;else if(c=v((o+1)/I),c>=l.length){if(!r)break t;for(;l.length<=c;l.push(0));s=a=0,i=1,o%=I,f=o-I+1}else{for(s=u=l[c],i=1;u>=10;u/=10,i++);o%=I,f=o-I+i,a=0>f?0:s/p[i-f-1]%10|0}if(r=r||0>e||null!=l[c+1]||(0>f?s:s%p[i-f-1]),r=4>n?(a||r)&&(0==n||n==(t.s<0?3:2)):a>5||5==a&&(4==n||r||6==n&&(o>0?f>0?s/p[i-f]:0:l[c-1])%10&1||n==(t.s<0?8:7)),1>e||!l[0])return l.length=0,r?(e-=t.e+1,l[0]=p[e%I],t.e=-e||0):l[0]=t.e=0,t;if(0==o?(l.length=c,u=1,c--):(l.length=c+1,u=p[I-o],l[c]=f>0?w(s/p[i-f]%p[f])*u:0),r)for(;;){if(0==c){for(o=1,f=l[0];f>=10;f/=10,o++);for(f=l[0]+=u,u=1;f>=10;f/=10,u++);o!=u&&(t.e++,l[0]==E&&(l[0]=1));break}if(l[c]+=u,l[c]!=E)break;l[c--]=0,u=1}for(o=l.length;0===l[--o];l.pop());}t.e>q?t.c=t.e=null:t.en?null!=(t=i[n++]):void 0};return f(e="DECIMAL_PLACES")&&z(t,0,D,2,e)&&(B=0|t),r[e]=B,f(e="ROUNDING_MODE")&&z(t,0,8,2,e)&&(H=0|t),r[e]=H,f(e="EXPONENTIAL_AT")&&(s(t)?z(t[0],-D,0,2,e)&&z(t[1],0,D,2,e)&&(C=0|t[0],j=0|t[1]):z(t,-D,D,2,e)&&(C=-(j=0|(0>t?-t:t)))),r[e]=[C,j],f(e="RANGE")&&(s(t)?z(t[0],-D,-1,2,e)&&z(t[1],1,D,2,e)&&(k=0|t[0],q=0|t[1]):z(t,-D,D,2,e)&&(0|t?k=-(q=0|(0>t?-t:t)):$&&U(2,e+" cannot be zero",t))),r[e]=[k,q],f(e="ERRORS")&&(t===!!t||1===t||0===t?(L=0,z=($=!!t)?A:u):$&&U(2,e+y,t)),r[e]=$,f(e="CRYPTO")&&(t===!!t||1===t||0===t?(V=!(!t||!g||"object"!=typeof g),t&&!V&&$&&U(2,"crypto unavailable",g)):$&&U(2,e+y,t)),r[e]=V,f(e="MODULO_MODE")&&z(t,0,9,2,e)&&(W=0|t),r[e]=W,f(e="POW_PRECISION")&&z(t,0,D,2,e)&&(Y=0|t),r[e]=Y,f(e="FORMAT")&&("object"==typeof t?Z=t:$&&U(2,e+" not an object",t)),r[e]=Z,r},e.max=function(){return S(arguments,M.lt)},e.min=function(){return S(arguments,M.gt)},e.random=function(){var t=9007199254740992,n=Math.random()*t&2097151?function(){return w(Math.random()*t)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(t){var r,i,o,f,u,s=0,c=[],a=new e(P);if(t=null!=t&&z(t,0,D,14)?0|t:B,f=v(t/I),V)if(g&&g.getRandomValues){for(r=g.getRandomValues(new Uint32Array(f*=2));f>s;)u=131072*r[s]+(r[s+1]>>>11),u>=9e15?(i=g.getRandomValues(new Uint32Array(2)),r[s]=i[0],r[s+1]=i[1]):(c.push(u%1e14),s+=2);s=f/2}else if(g&&g.randomBytes){for(r=g.randomBytes(f*=7);f>s;)u=281474976710656*(31&r[s])+1099511627776*r[s+1]+4294967296*r[s+2]+16777216*r[s+3]+(r[s+4]<<16)+(r[s+5]<<8)+r[s+6],u>=9e15?g.randomBytes(7).copy(r,s):(c.push(u%1e14),s+=7);s=f/7}else $&&U(14,"crypto unavailable",g);if(!s)for(;f>s;)u=n(),9e15>u&&(c[s++]=u%1e14);for(f=c[--s],t%=I,f&&t&&(u=_[I-t],c[s]=w(f/u)*u);0===c[s];c.pop(),s--);if(0>s)c=[o=0];else{for(o=-1;0===c[0];c.shift(),o-=I);for(s=1,u=c[0];u>=10;u/=10,s++);I>s&&(o-=I-s)}return a.e=o,a.c=c,a}}(),G=function(){function t(t,e,n){var r,i,o,f,u=0,s=t.length,c=e%T,a=e/T|0;for(t=t.slice();s--;)o=t[s]%T,f=t[s]/T|0,r=a*o+f*c,i=c*o+r%T*T+u,u=(i/n|0)+(r/T|0)+a*f,t[s]=i%n;return u&&t.unshift(u),t}function n(t,e,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;n>i;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function r(t,e,n,r){for(var i=0;n--;)t[n]-=i,i=t[n]1;t.shift());}return function(o,f,u,s,c){var a,l,p,h,g,m,d,v,y,b,O,N,x,_,T,D,S,A=o.s==f.s?1:-1,R=o.c,U=f.c;if(!(R&&R[0]&&U&&U[0]))return new e(o.s&&f.s&&(R?!U||R[0]!=U[0]:U)?R&&0==R[0]||!U?0*A:A/0:0/0);for(v=new e(A),y=v.c=[],l=o.e-f.e,A=u+l+1,c||(c=E,l=i(o.e/I)-i(f.e/I),A=A/I|0),p=0;U[p]==(R[p]||0);p++);if(U[p]>(R[p]||0)&&l--,0>A)y.push(1),h=!0;else{for(_=R.length,D=U.length,p=0,A+=2,g=w(c/(U[0]+1)),g>1&&(U=t(U,g,c),R=t(R,g,c),D=U.length,_=R.length),x=D,b=R.slice(0,D),O=b.length;D>O;b[O++]=0);S=U.slice(),S.unshift(0),T=U[0],U[1]>=c/2&&T++;do g=0,a=n(U,b,D,O),0>a?(N=b[0],D!=O&&(N=N*c+(b[1]||0)),g=w(N/T),g>1?(g>=c&&(g=c-1),m=t(U,g,c),d=m.length,O=b.length,a=n(m,b,d,O),1==a&&(g--,r(m,d>D?S:U,d,c))):(0==g&&(a=g=1),m=U.slice()),d=m.length,O>d&&m.unshift(0),r(b,m,O,c),-1==a&&(O=b.length,a=n(U,b,D,O),1>a&&(g++,r(b,O>D?S:U,O,c))),O=b.length):0===a&&(g++,b=[0]),y[p++]=g,a&&b[0]?b[O++]=R[x]||0:(b=[R[x]],O=1);while((x++<_||null!=b[0])&&A--);h=null!=b[0],y[0]||y.shift()}if(c==E){for(p=1,A=y[0];A>=10;A/=10,p++);F(v,u+(v.e=p+l*I-1)+1,s,h)}else v.e=l,v.r=+h;return v}}(),m==function(){var t=/^(-?)0([xbo])(\w[\w.]*$)/i,n=/^([^.]+)\.$/,r=/^\.([^.]+)$/,i=/^-?(Infinity|NaN)$/,o=/^\s*\+([\w.])|^\s+|\s+$/g;return function(f,u,s,c){var a,l=s?u:u.replace(o,"$1");if(i.test(l))f.s=isNaN(l)?null:0>l?-1:1;else{if(!s&&(l=l.replace(t,function(t,e,n){return a="x"==(n=n.toLowerCase())?16:"b"==n?2:8,c&&c!=a?t:e}),c&&(a=c,l=l.replace(n,"$1").replace(r,"0.$1")),u!=l))return new e(l,a);$&&U(L,"not a"+(c?" base "+c:"")+" number",u),f.s=null}f.c=f.e=null,L=0}}(),M.absoluteValue=M.abs=function(){var t=new e(this);return t.s<0&&(t.s=1),t},M.ceil=function(){return F(new e(this),this.e+1,2)},M.comparedTo=M.cmp=function(t,n){return L=1,f(this,new e(t,n))},M.decimalPlaces=M.dp=function(){var t,e,n=this.c;if(!n)return null;if(t=((e=n.length-1)-i(this.e/I))*I,e=n[e])for(;e%10==0;e/=10,t--);return 0>t&&(t=0),t},M.dividedBy=M.div=function(t,n){return L=3,G(this,new e(t,n),B,H)},M.dividedToIntegerBy=M.divToInt=function(t,n){return L=4,G(this,new e(t,n),0,1)},M.equals=M.eq=function(t,n){return L=5,0===f(this,new e(t,n))},M.floor=function(){return F(new e(this),this.e+1,3)},M.greaterThan=M.gt=function(t,n){return L=6,f(this,new e(t,n))>0},M.greaterThanOrEqualTo=M.gte=function(t,n){return L=7,1===(n=f(this,new e(t,n)))||0===n},M.isFinite=function(){return!!this.c},M.isInteger=M.isInt=function(){return!!this.c&&i(this.e/I)>this.c.length-2},M.isNaN=function(){return!this.s},M.isNegative=M.isNeg=function(){return this.s<0},M.isZero=function(){return!!this.c&&0==this.c[0]},M.lessThan=M.lt=function(t,n){return L=8,f(this,new e(t,n))<0},M.lessThanOrEqualTo=M.lte=function(t,n){return L=9,-1===(n=f(this,new e(t,n)))||0===n},M.minus=M.sub=function(t,n){var r,o,f,u,s=this,c=s.s;if(L=10,t=new e(t,n),n=t.s,!c||!n)return new e(0/0);if(c!=n)return t.s=-n,s.plus(t);var a=s.e/I,l=t.e/I,p=s.c,h=t.c;if(!a||!l){if(!p||!h)return p?(t.s=-n,t):new e(h?s:0/0);if(!p[0]||!h[0])return h[0]?(t.s=-n,t):new e(p[0]?s:3==H?-0:0)}if(a=i(a),l=i(l),p=p.slice(),c=a-l){for((u=0>c)?(c=-c,f=p):(l=a,f=h),f.reverse(),n=c;n--;f.push(0));f.reverse()}else for(o=(u=(c=p.length)<(n=h.length))?c:n,c=n=0;o>n;n++)if(p[n]!=h[n]){u=p[n]0)for(;n--;p[r++]=0);for(n=E-1;o>c;){if(p[--o]0?(s=u,r=a):(f=-f,r=c),r.reverse();f--;r.push(0));r.reverse()}for(f=c.length,n=a.length,0>f-n&&(r=a,a=c,c=r,n=f),f=0;n;)f=(c[--n]=c[n]+a[n]+f)/E|0,c[n]%=E;return f&&(c.unshift(f),++s),R(t,c,s)},M.precision=M.sd=function(t){var e,n,r=this,i=r.c;if(null!=t&&t!==!!t&&1!==t&&0!==t&&($&&U(13,"argument"+y,t),t!=!!t&&(t=null)),!i)return null;if(n=i.length-1,e=n*I+1,n=i[n]){for(;n%10==0;n/=10,e--);for(n=i[0];n>=10;n/=10,e++);}return t&&r.e+1>e&&(e=r.e+1),e},M.round=function(t,n){var r=new e(this);return(null==t||z(t,0,D,15))&&F(r,~~t+this.e+1,null!=n&&z(n,0,8,15,b)?0|n:H),r},M.shift=function(t){var n=this;return z(t,-x,x,16,"argument")?n.times("1e"+p(t)):new e(n.c&&n.c[0]&&(-x>t||t>x)?n.s*(0>t?0:1/0):n)},M.squareRoot=M.sqrt=function(){var t,n,r,f,u,s=this,c=s.c,a=s.s,l=s.e,p=B+4,h=new e("0.5");if(1!==a||!c||!c[0])return new e(!a||0>a&&(!c||c[0])?0/0:c?s:1/0);if(a=Math.sqrt(+s),0==a||a==1/0?(n=o(c),(n.length+l)%2==0&&(n+="0"),a=Math.sqrt(n),l=i((l+1)/2)-(0>l||l%2),a==1/0?n="1e"+l:(n=a.toExponential(),n=n.slice(0,n.indexOf("e")+1)+l),r=new e(n)):r=new e(a+""),r.c[0])for(l=r.e,a=l+p,3>a&&(a=0);;)if(u=r,r=h.times(u.plus(G(s,u,p,1))),o(u.c).slice(0,a)===(n=o(r.c)).slice(0,a)){if(r.ea&&(d=b,b=O,O=d,f=a,a=h,h=f),f=a+h,d=[];f--;d.push(0));for(v=E,w=T,f=h;--f>=0;){for(r=0,g=O[f]%w,m=O[f]/w|0,s=a,u=f+s;u>f;)l=b[--s]%w,p=b[s]/w|0,c=m*l+p*g,l=g*l+c%w*w+d[u]+r,r=(l/v|0)+(c/w|0)+m*p,d[u--]=l%v;d[u]=r}return r?++o:d.shift(),R(t,d,o)},M.toDigits=function(t,n){var r=new e(this);return t=null!=t&&z(t,1,D,18,"precision")?0|t:null,n=null!=n&&z(n,0,8,18,b)?0|n:H,t?F(r,t,n):r},M.toExponential=function(t,e){return h(this,null!=t&&z(t,0,D,19)?~~t+1:null,e,19)},M.toFixed=function(t,e){return h(this,null!=t&&z(t,0,D,20)?~~t+this.e+1:null,e,20)},M.toFormat=function(t,e){var n=h(this,null!=t&&z(t,0,D,21)?~~t+this.e+1:null,e,21);if(this.c){var r,i=n.split("."),o=+Z.groupSize,f=+Z.secondaryGroupSize,u=Z.groupSeparator,s=i[0],c=i[1],a=this.s<0,l=a?s.slice(1):s,p=l.length;if(f&&(r=o,o=f,f=r,p-=r),o>0&&p>0){for(r=p%o||o,s=l.substr(0,r);p>r;r+=o)s+=u+l.substr(r,o);f>0&&(s+=u+l.slice(r)),a&&(s="-"+s)}n=c?s+Z.decimalSeparator+((f=+Z.fractionGroupSize)?c.replace(new RegExp("\\d{"+f+"}\\B","g"),"$&"+Z.fractionGroupSeparator):c):s}return n},M.toFraction=function(t){var n,r,i,f,u,s,c,a,l,p=$,h=this,g=h.c,m=new e(P),d=r=new e(P),v=c=new e(P);if(null!=t&&($=!1,s=new e(t),$=p,(!(p=s.isInt())||s.lt(P))&&($&&U(22,"max denominator "+(p?"out of range":"not an integer"),t),t=!p&&s.c&&F(s,s.e+1,1).gte(P)?s:null)),!g)return h.toString();for(l=o(g),f=m.e=l.length-h.e-1,m.c[0]=_[(u=f%I)<0?I+u:u],t=!t||s.cmp(m)>0?f>0?m:d:s,u=q,q=1/0,s=new e(l),c.c[0]=0;a=G(s,m,0,1),i=r.plus(a.times(v)),1!=i.cmp(t);)r=v,v=i,d=c.plus(a.times(i=d)),c=i,m=s.minus(a.times(i=m)),s=i;return i=G(t.minus(r),v,0,1),c=c.plus(i.times(d)),r=r.plus(i.times(v)),c.s=d.s=h.s,f*=2,n=G(d,v,f,H).minus(h).abs().cmp(G(c,r,f,H).minus(h).abs())<1?[d.toString(),v.toString()]:[c.toString(),r.toString()],q=u,n},M.toNumber=function(){var t=this;return+t||(t.s?0*t.s:0/0)},M.toPower=M.pow=function(t){var n,r,i=w(0>t?-t:+t),o=this;if(!z(t,-x,x,23,"exponent")&&(!isFinite(t)||i>x&&(t/=0)||parseFloat(t)!=t&&!(t=0/0)))return new e(Math.pow(+o,t));for(n=Y?v(Y/I+2):0,r=new e(P);;){if(i%2){if(r=r.times(o),!r.c)break;n&&r.c.length>n&&(r.c.length=n)}if(i=w(i/2),!i)break;o=o.times(o),n&&o.c&&o.c.length>n&&(o.c.length=n)}return 0>t&&(r=P.div(r)),n?F(r,Y,H):r},M.toPrecision=function(t,e){return h(this,null!=t&&z(t,1,D,24,"precision")?0|t:null,e,24)},M.toString=function(t){var e,r=this,i=r.s,f=r.e;return null===f?i?(e="Infinity",0>i&&(e="-"+e)):e="NaN":(e=o(r.c),e=null!=t&&z(t,2,64,25,"base")?n(l(e,f),0|t,10,i):C>=f||f>=j?a(e,f):l(e,f),0>i&&r.c[0]&&(e="-"+e)),e},M.truncated=M.trunc=function(){return F(new e(this),this.e+1,1)},M.valueOf=M.toJSON=function(){return this.toString()},null!=t&&e.config(t),e}function i(t){var e=0|t;return t>0||t===e?e:e-1}function o(t){for(var e,n,r=1,i=t.length,o=t[0]+"";i>r;){for(e=t[r++]+"",n=I-e.length;n--;e="0"+e);o+=e}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function f(t,e){var n,r,i=t.c,o=e.c,f=t.s,u=e.s,s=t.e,c=e.e;if(!f||!u)return null;if(n=i&&!i[0],r=o&&!o[0],n||r)return n?r?0:-u:f;if(f!=u)return f;if(n=0>f,r=s==c,!i||!o)return r?0:!i^n?1:-1;if(!r)return s>c^n?1:-1;for(u=(s=i.length)<(c=o.length)?s:c,f=0;u>f;f++)if(i[f]!=o[f])return i[f]>o[f]^n?1:-1;return s==c?0:s>c^n?1:-1}function u(t,e,n){return(t=p(t))>=e&&n>=t}function s(t){return"[object Array]"==Object.prototype.toString.call(t)}function c(t,e,n){for(var r,i,o=[0],f=0,u=t.length;u>f;){for(i=o.length;i--;o[i]*=e);for(o[r=0]+=N.indexOf(t.charAt(f++));rn-1&&(null==o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}function a(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(0>e?"e":"e+")+e}function l(t,e){var n,r;if(0>e){for(r="0.";++e;r+="0");t=r+t}else if(n=t.length,++e>n){for(r="0",e-=n;--e;r+="0");t+=r}else n>e&&(t=t.slice(0,e)+"."+t.slice(e));return t}function p(t){return t=parseFloat(t),0>t?v(t):w(t)}var h,g,m,d=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,v=Math.ceil,w=Math.floor,y=" not a boolean or binary digit",b="rounding mode",O="number type has more than 15 significant digits",N="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",E=1e14,I=14,x=9007199254740991,_=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],T=1e7,D=1e9;if(h=r(),"function"==typeof define&&define.amd)define(function(){return h});else if("undefined"!=typeof e&&e.exports){if(e.exports=h,!g)try{g=t("crypto")}catch(S){}}else n.BigNumber=h}(this)},{crypto:1}],natspec:[function(t,e){var n=t("./node_modules/ethereum.js/lib/abi.js"),r=function(){var t=function(t,e){Object.keys(t).forEach(function(n){e[n]=t[n]})},e=function(t){return Object.keys(t).reduce(function(t,e){return t+"var "+e+" = context['"+e+"'];\n"},"")},r=function(t,e){return t.filter(function(t){return t.name===e})[0]},i=function(t,e){var r=n.formatOutput(t.inputs,"0x"+e.params[0].data.slice(10));return t.inputs.reduce(function(t,e,n){return t[e.name]=r[n],t},{})},o=function(t,e){var n,r="",i=/\` + "`" + `(?:\\.|[^` + "`" + `\\])*\` + "`" + `/gim,o=0;try{for(;null!==(n=i.exec(t));){var f=i.lastIndex-n[0].length,u=n[0].slice(1,n[0].length-1);r+=t.slice(o,f);var s=e(u);r+=s,o=i.lastIndex}r+=t.slice(o)}catch(c){throw new Error("Natspec evaluation failed, wrong input params")}return r},f=function(n,f){var u={};if(f)try{var s=r(f.abi,f.method),c=i(s,f.transaction);t(c,u)}catch(a){throw new Error("Natspec evaluation failed, method does not exist")}var l=e(u),p=o(n,function(t){var e=new Function("context",l+"return "+t+";");return e(u).toString()});return p},u=function(t,e){try{return f(t,e)}catch(n){return n.message}};return{evaluateExpression:f,evaluateExpressionSafe:u}}();e.exports=r},{"./node_modules/ethereum.js/lib/abi.js":3}]},{},[]); +const natspecJS = //`require=function t(e,n,r){function i(f,u){if(!n[f]){if(!e[f]){var s="function"==typeof require&&require;if(!u&&s)return s(f,!0);if(o)return o(f,!0);var c=new Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c}var a=n[f]={exports:{}};e[f][0].call(a.exports,function(t){var n=e[f][1][t];return i(n?n:t)},a,a.exports,t,e,n,r)}return n[f].exports}for(var o="function"==typeof require&&require,f=0;fv;v++)d.push(g(e.slice(0,s))),e=e.slice(s);n.push(d)}else r.prefixedType("string")(t[c].type)?(a=a.slice(s),n.push(g(e.slice(0,s))),e=e.slice(s)):(n.push(g(e.slice(0,s))),e=e.slice(s))}),n},g=function(t){var e={};return t.forEach(function(t){var r=n.extractDisplayName(t.name),i=n.extractTypeName(t.name),o=function(){var e=Array.prototype.slice.call(arguments);return a(t.inputs,e)};void 0===e[r]&&(e[r]=o),e[r][i]=o}),e},m=function(t){var e={};return t.forEach(function(t){var r=n.extractDisplayName(t.name),i=n.extractTypeName(t.name),o=function(e){return h(t.outputs,e)};void 0===e[r]&&(e[r]=o),e[r][i]=o}),e};e.exports={inputParser:g,outputParser:m,formatInput:a,formatOutput:h}},{"./const":4,"./formatters":5,"./types":6,"./utils":7}],4:[function(t,e){(function(n){if("build"!==n.env.NODE_ENV)var r=t("bignumber.js");var i=["wei","Kwei","Mwei","Gwei","szabo","finney","ether","grand","Mether","Gether","Tether","Pether","Eether","Zether","Yether","Nether","Dether","Vether","Uether"];e.exports={ETH_PADDING:32,ETH_SIGNATURE_LENGTH:4,ETH_UNITS:i,ETH_BIGNUMBER_ROUNDING_MODE:{ROUNDING_MODE:r.ROUND_DOWN},ETH_POLLING_TIMEOUT:1e3}}).call(this,t("_process"))},{_process:2,"bignumber.js":8}],5:[function(t,e){(function(n){if("build"!==n.env.NODE_ENV)var r=t("bignumber.js");var i=t("./utils"),o=t("./const"),f=function(t,e,n){return new Array(e-t.length+1).join(n?n:"0")+t},u=function(t){var e=2*o.ETH_PADDING;return t instanceof r||"number"==typeof t?("number"==typeof t&&(t=new r(t)),r.config(o.ETH_BIGNUMBER_ROUNDING_MODE),t=t.round(),t.lessThan(0)&&(t=new r("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16).plus(t).plus(1)),t=t.toString(16)):t=0===t.indexOf("0x")?t.substr(2):"string"==typeof t?u(new r(t)):(+t).toString(16),f(t,e)},s=function(t){return i.fromAscii(t,o.ETH_PADDING).substr(2)},c=function(t){return"000000000000000000000000000000000000000000000000000000000000000"+(t?"1":"0")},a=function(t){return u(new r(t).times(new r(2).pow(128)))},l=function(t){return"1"===new r(t.substr(0,1),16).toString(2).substr(0,1)},p=function(t){return t=t||"0",l(t)?new r(t,16).minus(new r("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16)).minus(1):new r(t,16)},h=function(t){return t=t||"0",new r(t,16)},g=function(t){return p(t).dividedBy(new r(2).pow(128))},m=function(t){return h(t).dividedBy(new r(2).pow(128))},d=function(t){return"0x"+t},v=function(t){return"0000000000000000000000000000000000000000000000000000000000000001"===t?!0:!1},w=function(t){return i.toAscii(t)},y=function(t){return"0x"+t.slice(t.length-40,t.length)};e.exports={formatInputInt:u,formatInputString:s,formatInputBool:c,formatInputReal:a,formatOutputInt:p,formatOutputUInt:h,formatOutputReal:g,formatOutputUReal:m,formatOutputHash:d,formatOutputBool:v,formatOutputString:w,formatOutputAddress:y}}).call(this,t("_process"))},{"./const":4,"./utils":7,_process:2,"bignumber.js":8}],6:[function(t,e){var n=t("./formatters"),r=function(t){return function(e){return 0===e.indexOf(t)}},i=function(t){return function(e){return t===e}},o=function(){return[{type:r("uint"),format:n.formatInputInt},{type:r("int"),format:n.formatInputInt},{type:r("hash"),format:n.formatInputInt},{type:r("string"),format:n.formatInputString},{type:r("real"),format:n.formatInputReal},{type:r("ureal"),format:n.formatInputReal},{type:i("address"),format:n.formatInputInt},{type:i("bool"),format:n.formatInputBool}]},f=function(){return[{type:r("uint"),format:n.formatOutputUInt},{type:r("int"),format:n.formatOutputInt},{type:r("hash"),format:n.formatOutputHash},{type:r("string"),format:n.formatOutputString},{type:r("real"),format:n.formatOutputReal},{type:r("ureal"),format:n.formatOutputUReal},{type:i("address"),format:n.formatOutputAddress},{type:i("bool"),format:n.formatOutputBool}]};e.exports={prefixedType:r,namedType:i,inputTypes:o,outputTypes:f}},{"./formatters":5}],7:[function(t,e){var n=t("./const"),r=function(t,e){for(var n=!1,r=0;rn;n+=2){var i=parseInt(t.substr(n,2),16);if(0===i)break;e+=String.fromCharCode(i)}return e},o=function(t){for(var e="",n=0;n3e3&&rr?"i":"").test(c))return m(a,c,u,r);u?(a.s=0>1/t?(c=c.slice(1),-1):1,$&&c.replace(/^0\.0*|\./,"").length>15&&U(L,O,t),u=!1):a.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1,c=n(c,10,r,a.s)}else{if(t instanceof e)return a.s=t.s,a.e=t.e,a.c=(t=t.c)?t.slice():t,void(L=0);if((u="number"==typeof t)&&0*t==0){if(a.s=0>1/t?(t=-t,-1):1,t===~~t){for(o=0,f=t;f>=10;f/=10,o++);return a.e=o,a.c=[t],void(L=0)}c=t+""}else{if(!d.test(c=t+""))return m(a,c,u);a.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1}}for((o=c.indexOf("."))>-1&&(c=c.replace(".","")),(f=c.search(/e/i))>0?(0>o&&(o=f),o+=+c.slice(f+1),c=c.substring(0,f)):0>o&&(o=c.length),f=0;48===c.charCodeAt(f);f++);for(s=c.length;48===c.charCodeAt(--s););if(c=c.slice(f,s+1))if(s=c.length,u&&$&&s>15&&U(L,O,a.s*t),o=o-f-1,o>q)a.c=a.e=null;else if(k>o)a.c=[a.e=0];else{if(a.e=o,a.c=[],f=(o+1)%I,0>o&&(f+=I),s>f){for(f&&a.c.push(+c.slice(0,f)),s-=I;s>f;)a.c.push(+c.slice(f,f+=I));c=c.slice(f),f=I-c.length}else f-=s;for(;f--;c+="0");a.c.push(+c)}else a.c=[a.e=0];L=0}function n(t,n,r,i){var f,u,s,a,p,h,g,m=t.indexOf("."),d=B,v=H;for(37>r&&(t=t.toLowerCase()),m>=0&&(s=Y,Y=0,t=t.replace(".",""),g=new e(r),p=g.pow(t.length-m),Y=s,g.c=c(l(o(p.c),p.e),10,n),g.e=g.c.length),h=c(t,r,n),u=s=h.length;0==h[--s];h.pop());if(!h[0])return"0";if(0>m?--u:(p.c=h,p.e=u,p.s=i,p=G(p,g,d,v,n),h=p.c,a=p.r,u=p.e),f=u+d+1,m=h[f],s=n/2,a=a||0>f||null!=h[f+1],a=4>v?(null!=m||a)&&(0==v||v==(p.s<0?3:2)):m>s||m==s&&(4==v||a||6==v&&1&h[f-1]||v==(p.s<0?8:7)),1>f||!h[0])t=a?l("1",-d):"0";else{if(h.length=f,a)for(--n;++h[--f]>n;)h[f]=0,f||(++u,h.unshift(1));for(s=h.length;!h[--s];);for(m=0,t="";s>=m;t+=N.charAt(h[m++]));t=l(t,u)}return t}function h(t,n,r,i){var f,u,s,c,p;if(r=null!=r&&z(r,0,8,i,b)?0|r:H,!t.c)return t.toString();if(f=t.c[0],s=t.e,null==n)p=o(t.c),p=19==i||24==i&&C>=s?a(p,s):l(p,s);else if(t=F(new e(t),n,r),u=t.e,p=o(t.c),c=p.length,19==i||24==i&&(u>=n||C>=u)){for(;n>c;p+="0",c++);p=a(p,u)}else if(n-=s,p=l(p,u),u+1>c){if(--n>0)for(p+=".";n--;p+="0");}else if(n+=u-c,n>0)for(u+1==c&&(p+=".");n--;p+="0");return t.s<0&&f?"-"+p:p}function S(t,n){var r,i,o=0;for(s(t[0])&&(t=t[0]),r=new e(t[0]);++ot||t>n||t!=p(t))&&U(r,(i||"decimal places")+(e>t||t>n?" out of range":" not an integer"),t),!0}function R(t,e,n){for(var r=1,i=e.length;!e[--i];e.pop());for(i=e[0];i>=10;i/=10,r++);return(n=r+n*I-1)>q?t.c=t.e=null:k>n?t.c=[t.e=0]:(t.e=n,t.c=e),t}function U(t,e,n){var r=new Error(["new BigNumber","cmp","config","div","divToInt","eq","gt","gte","lt","lte","minus","mod","plus","precision","random","round","shift","times","toDigits","toExponential","toFixed","toFormat","toFraction","pow","toPrecision","toString","BigNumber"][t]+"() "+e+": "+n);throw r.name="BigNumber Error",L=0,r}function F(t,e,n,r){var i,o,f,u,s,c,a,l=t.c,p=_;if(l){t:{for(i=1,u=l[0];u>=10;u/=10,i++);if(o=e-i,0>o)o+=I,f=e,s=l[c=0],a=s/p[i-f-1]%10|0;else if(c=v((o+1)/I),c>=l.length){if(!r)break t;for(;l.length<=c;l.push(0));s=a=0,i=1,o%=I,f=o-I+1}else{for(s=u=l[c],i=1;u>=10;u/=10,i++);o%=I,f=o-I+i,a=0>f?0:s/p[i-f-1]%10|0}if(r=r||0>e||null!=l[c+1]||(0>f?s:s%p[i-f-1]),r=4>n?(a||r)&&(0==n||n==(t.s<0?3:2)):a>5||5==a&&(4==n||r||6==n&&(o>0?f>0?s/p[i-f]:0:l[c-1])%10&1||n==(t.s<0?8:7)),1>e||!l[0])return l.length=0,r?(e-=t.e+1,l[0]=p[e%I],t.e=-e||0):l[0]=t.e=0,t;if(0==o?(l.length=c,u=1,c--):(l.length=c+1,u=p[I-o],l[c]=f>0?w(s/p[i-f]%p[f])*u:0),r)for(;;){if(0==c){for(o=1,f=l[0];f>=10;f/=10,o++);for(f=l[0]+=u,u=1;f>=10;f/=10,u++);o!=u&&(t.e++,l[0]==E&&(l[0]=1));break}if(l[c]+=u,l[c]!=E)break;l[c--]=0,u=1}for(o=l.length;0===l[--o];l.pop());}t.e>q?t.c=t.e=null:t.en?null!=(t=i[n++]):void 0};return f(e="DECIMAL_PLACES")&&z(t,0,D,2,e)&&(B=0|t),r[e]=B,f(e="ROUNDING_MODE")&&z(t,0,8,2,e)&&(H=0|t),r[e]=H,f(e="EXPONENTIAL_AT")&&(s(t)?z(t[0],-D,0,2,e)&&z(t[1],0,D,2,e)&&(C=0|t[0],j=0|t[1]):z(t,-D,D,2,e)&&(C=-(j=0|(0>t?-t:t)))),r[e]=[C,j],f(e="RANGE")&&(s(t)?z(t[0],-D,-1,2,e)&&z(t[1],1,D,2,e)&&(k=0|t[0],q=0|t[1]):z(t,-D,D,2,e)&&(0|t?k=-(q=0|(0>t?-t:t)):$&&U(2,e+" cannot be zero",t))),r[e]=[k,q],f(e="ERRORS")&&(t===!!t||1===t||0===t?(L=0,z=($=!!t)?A:u):$&&U(2,e+y,t)),r[e]=$,f(e="CRYPTO")&&(t===!!t||1===t||0===t?(V=!(!t||!g||"object"!=typeof g),t&&!V&&$&&U(2,"crypto unavailable",g)):$&&U(2,e+y,t)),r[e]=V,f(e="MODULO_MODE")&&z(t,0,9,2,e)&&(W=0|t),r[e]=W,f(e="POW_PRECISION")&&z(t,0,D,2,e)&&(Y=0|t),r[e]=Y,f(e="FORMAT")&&("object"==typeof t?Z=t:$&&U(2,e+" not an object",t)),r[e]=Z,r},e.max=function(){return S(arguments,M.lt)},e.min=function(){return S(arguments,M.gt)},e.random=function(){var t=9007199254740992,n=Math.random()*t&2097151?function(){return w(Math.random()*t)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(t){var r,i,o,f,u,s=0,c=[],a=new e(P);if(t=null!=t&&z(t,0,D,14)?0|t:B,f=v(t/I),V)if(g&&g.getRandomValues){for(r=g.getRandomValues(new Uint32Array(f*=2));f>s;)u=131072*r[s]+(r[s+1]>>>11),u>=9e15?(i=g.getRandomValues(new Uint32Array(2)),r[s]=i[0],r[s+1]=i[1]):(c.push(u%1e14),s+=2);s=f/2}else if(g&&g.randomBytes){for(r=g.randomBytes(f*=7);f>s;)u=281474976710656*(31&r[s])+1099511627776*r[s+1]+4294967296*r[s+2]+16777216*r[s+3]+(r[s+4]<<16)+(r[s+5]<<8)+r[s+6],u>=9e15?g.randomBytes(7).copy(r,s):(c.push(u%1e14),s+=7);s=f/7}else $&&U(14,"crypto unavailable",g);if(!s)for(;f>s;)u=n(),9e15>u&&(c[s++]=u%1e14);for(f=c[--s],t%=I,f&&t&&(u=_[I-t],c[s]=w(f/u)*u);0===c[s];c.pop(),s--);if(0>s)c=[o=0];else{for(o=-1;0===c[0];c.shift(),o-=I);for(s=1,u=c[0];u>=10;u/=10,s++);I>s&&(o-=I-s)}return a.e=o,a.c=c,a}}(),G=function(){function t(t,e,n){var r,i,o,f,u=0,s=t.length,c=e%T,a=e/T|0;for(t=t.slice();s--;)o=t[s]%T,f=t[s]/T|0,r=a*o+f*c,i=c*o+r%T*T+u,u=(i/n|0)+(r/T|0)+a*f,t[s]=i%n;return u&&t.unshift(u),t}function n(t,e,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;n>i;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function r(t,e,n,r){for(var i=0;n--;)t[n]-=i,i=t[n]1;t.shift());}return function(o,f,u,s,c){var a,l,p,h,g,m,d,v,y,b,O,N,x,_,T,D,S,A=o.s==f.s?1:-1,R=o.c,U=f.c;if(!(R&&R[0]&&U&&U[0]))return new e(o.s&&f.s&&(R?!U||R[0]!=U[0]:U)?R&&0==R[0]||!U?0*A:A/0:0/0);for(v=new e(A),y=v.c=[],l=o.e-f.e,A=u+l+1,c||(c=E,l=i(o.e/I)-i(f.e/I),A=A/I|0),p=0;U[p]==(R[p]||0);p++);if(U[p]>(R[p]||0)&&l--,0>A)y.push(1),h=!0;else{for(_=R.length,D=U.length,p=0,A+=2,g=w(c/(U[0]+1)),g>1&&(U=t(U,g,c),R=t(R,g,c),D=U.length,_=R.length),x=D,b=R.slice(0,D),O=b.length;D>O;b[O++]=0);S=U.slice(),S.unshift(0),T=U[0],U[1]>=c/2&&T++;do g=0,a=n(U,b,D,O),0>a?(N=b[0],D!=O&&(N=N*c+(b[1]||0)),g=w(N/T),g>1?(g>=c&&(g=c-1),m=t(U,g,c),d=m.length,O=b.length,a=n(m,b,d,O),1==a&&(g--,r(m,d>D?S:U,d,c))):(0==g&&(a=g=1),m=U.slice()),d=m.length,O>d&&m.unshift(0),r(b,m,O,c),-1==a&&(O=b.length,a=n(U,b,D,O),1>a&&(g++,r(b,O>D?S:U,O,c))),O=b.length):0===a&&(g++,b=[0]),y[p++]=g,a&&b[0]?b[O++]=R[x]||0:(b=[R[x]],O=1);while((x++<_||null!=b[0])&&A--);h=null!=b[0],y[0]||y.shift()}if(c==E){for(p=1,A=y[0];A>=10;A/=10,p++);F(v,u+(v.e=p+l*I-1)+1,s,h)}else v.e=l,v.r=+h;return v}}(),m==function(){var t=/^(-?)0([xbo])(\w[\w.]*$)/i,n=/^([^.]+)\.$/,r=/^\.([^.]+)$/,i=/^-?(Infinity|NaN)$/,o=/^\s*\+([\w.])|^\s+|\s+$/g;return function(f,u,s,c){var a,l=s?u:u.replace(o,"$1");if(i.test(l))f.s=isNaN(l)?null:0>l?-1:1;else{if(!s&&(l=l.replace(t,function(t,e,n){return a="x"==(n=n.toLowerCase())?16:"b"==n?2:8,c&&c!=a?t:e}),c&&(a=c,l=l.replace(n,"$1").replace(r,"0.$1")),u!=l))return new e(l,a);$&&U(L,"not a"+(c?" base "+c:"")+" number",u),f.s=null}f.c=f.e=null,L=0}}(),M.absoluteValue=M.abs=function(){var t=new e(this);return t.s<0&&(t.s=1),t},M.ceil=function(){return F(new e(this),this.e+1,2)},M.comparedTo=M.cmp=function(t,n){return L=1,f(this,new e(t,n))},M.decimalPlaces=M.dp=function(){var t,e,n=this.c;if(!n)return null;if(t=((e=n.length-1)-i(this.e/I))*I,e=n[e])for(;e%10==0;e/=10,t--);return 0>t&&(t=0),t},M.dividedBy=M.div=function(t,n){return L=3,G(this,new e(t,n),B,H)},M.dividedToIntegerBy=M.divToInt=function(t,n){return L=4,G(this,new e(t,n),0,1)},M.equals=M.eq=function(t,n){return L=5,0===f(this,new e(t,n))},M.floor=function(){return F(new e(this),this.e+1,3)},M.greaterThan=M.gt=function(t,n){return L=6,f(this,new e(t,n))>0},M.greaterThanOrEqualTo=M.gte=function(t,n){return L=7,1===(n=f(this,new e(t,n)))||0===n},M.isFinite=function(){return!!this.c},M.isInteger=M.isInt=function(){return!!this.c&&i(this.e/I)>this.c.length-2},M.isNaN=function(){return!this.s},M.isNegative=M.isNeg=function(){return this.s<0},M.isZero=function(){return!!this.c&&0==this.c[0]},M.lessThan=M.lt=function(t,n){return L=8,f(this,new e(t,n))<0},M.lessThanOrEqualTo=M.lte=function(t,n){return L=9,-1===(n=f(this,new e(t,n)))||0===n},M.minus=M.sub=function(t,n){var r,o,f,u,s=this,c=s.s;if(L=10,t=new e(t,n),n=t.s,!c||!n)return new e(0/0);if(c!=n)return t.s=-n,s.plus(t);var a=s.e/I,l=t.e/I,p=s.c,h=t.c;if(!a||!l){if(!p||!h)return p?(t.s=-n,t):new e(h?s:0/0);if(!p[0]||!h[0])return h[0]?(t.s=-n,t):new e(p[0]?s:3==H?-0:0)}if(a=i(a),l=i(l),p=p.slice(),c=a-l){for((u=0>c)?(c=-c,f=p):(l=a,f=h),f.reverse(),n=c;n--;f.push(0));f.reverse()}else for(o=(u=(c=p.length)<(n=h.length))?c:n,c=n=0;o>n;n++)if(p[n]!=h[n]){u=p[n]0)for(;n--;p[r++]=0);for(n=E-1;o>c;){if(p[--o]0?(s=u,r=a):(f=-f,r=c),r.reverse();f--;r.push(0));r.reverse()}for(f=c.length,n=a.length,0>f-n&&(r=a,a=c,c=r,n=f),f=0;n;)f=(c[--n]=c[n]+a[n]+f)/E|0,c[n]%=E;return f&&(c.unshift(f),++s),R(t,c,s)},M.precision=M.sd=function(t){var e,n,r=this,i=r.c;if(null!=t&&t!==!!t&&1!==t&&0!==t&&($&&U(13,"argument"+y,t),t!=!!t&&(t=null)),!i)return null;if(n=i.length-1,e=n*I+1,n=i[n]){for(;n%10==0;n/=10,e--);for(n=i[0];n>=10;n/=10,e++);}return t&&r.e+1>e&&(e=r.e+1),e},M.round=function(t,n){var r=new e(this);return(null==t||z(t,0,D,15))&&F(r,~~t+this.e+1,null!=n&&z(n,0,8,15,b)?0|n:H),r},M.shift=function(t){var n=this;return z(t,-x,x,16,"argument")?n.times("1e"+p(t)):new e(n.c&&n.c[0]&&(-x>t||t>x)?n.s*(0>t?0:1/0):n)},M.squareRoot=M.sqrt=function(){var t,n,r,f,u,s=this,c=s.c,a=s.s,l=s.e,p=B+4,h=new e("0.5");if(1!==a||!c||!c[0])return new e(!a||0>a&&(!c||c[0])?0/0:c?s:1/0);if(a=Math.sqrt(+s),0==a||a==1/0?(n=o(c),(n.length+l)%2==0&&(n+="0"),a=Math.sqrt(n),l=i((l+1)/2)-(0>l||l%2),a==1/0?n="1e"+l:(n=a.toExponential(),n=n.slice(0,n.indexOf("e")+1)+l),r=new e(n)):r=new e(a+""),r.c[0])for(l=r.e,a=l+p,3>a&&(a=0);;)if(u=r,r=h.times(u.plus(G(s,u,p,1))),o(u.c).slice(0,a)===(n=o(r.c)).slice(0,a)){if(r.ea&&(d=b,b=O,O=d,f=a,a=h,h=f),f=a+h,d=[];f--;d.push(0));for(v=E,w=T,f=h;--f>=0;){for(r=0,g=O[f]%w,m=O[f]/w|0,s=a,u=f+s;u>f;)l=b[--s]%w,p=b[s]/w|0,c=m*l+p*g,l=g*l+c%w*w+d[u]+r,r=(l/v|0)+(c/w|0)+m*p,d[u--]=l%v;d[u]=r}return r?++o:d.shift(),R(t,d,o)},M.toDigits=function(t,n){var r=new e(this);return t=null!=t&&z(t,1,D,18,"precision")?0|t:null,n=null!=n&&z(n,0,8,18,b)?0|n:H,t?F(r,t,n):r},M.toExponential=function(t,e){return h(this,null!=t&&z(t,0,D,19)?~~t+1:null,e,19)},M.toFixed=function(t,e){return h(this,null!=t&&z(t,0,D,20)?~~t+this.e+1:null,e,20)},M.toFormat=function(t,e){var n=h(this,null!=t&&z(t,0,D,21)?~~t+this.e+1:null,e,21);if(this.c){var r,i=n.split("."),o=+Z.groupSize,f=+Z.secondaryGroupSize,u=Z.groupSeparator,s=i[0],c=i[1],a=this.s<0,l=a?s.slice(1):s,p=l.length;if(f&&(r=o,o=f,f=r,p-=r),o>0&&p>0){for(r=p%o||o,s=l.substr(0,r);p>r;r+=o)s+=u+l.substr(r,o);f>0&&(s+=u+l.slice(r)),a&&(s="-"+s)}n=c?s+Z.decimalSeparator+((f=+Z.fractionGroupSize)?c.replace(new RegExp("\\d{"+f+"}\\B","g"),"$&"+Z.fractionGroupSeparator):c):s}return n},M.toFraction=function(t){var n,r,i,f,u,s,c,a,l,p=$,h=this,g=h.c,m=new e(P),d=r=new e(P),v=c=new e(P);if(null!=t&&($=!1,s=new e(t),$=p,(!(p=s.isInt())||s.lt(P))&&($&&U(22,"max denominator "+(p?"out of range":"not an integer"),t),t=!p&&s.c&&F(s,s.e+1,1).gte(P)?s:null)),!g)return h.toString();for(l=o(g),f=m.e=l.length-h.e-1,m.c[0]=_[(u=f%I)<0?I+u:u],t=!t||s.cmp(m)>0?f>0?m:d:s,u=q,q=1/0,s=new e(l),c.c[0]=0;a=G(s,m,0,1),i=r.plus(a.times(v)),1!=i.cmp(t);)r=v,v=i,d=c.plus(a.times(i=d)),c=i,m=s.minus(a.times(i=m)),s=i;return i=G(t.minus(r),v,0,1),c=c.plus(i.times(d)),r=r.plus(i.times(v)),c.s=d.s=h.s,f*=2,n=G(d,v,f,H).minus(h).abs().cmp(G(c,r,f,H).minus(h).abs())<1?[d.toString(),v.toString()]:[c.toString(),r.toString()],q=u,n},M.toNumber=function(){var t=this;return+t||(t.s?0*t.s:0/0)},M.toPower=M.pow=function(t){var n,r,i=w(0>t?-t:+t),o=this;if(!z(t,-x,x,23,"exponent")&&(!isFinite(t)||i>x&&(t/=0)||parseFloat(t)!=t&&!(t=0/0)))return new e(Math.pow(+o,t));for(n=Y?v(Y/I+2):0,r=new e(P);;){if(i%2){if(r=r.times(o),!r.c)break;n&&r.c.length>n&&(r.c.length=n)}if(i=w(i/2),!i)break;o=o.times(o),n&&o.c&&o.c.length>n&&(o.c.length=n)}return 0>t&&(r=P.div(r)),n?F(r,Y,H):r},M.toPrecision=function(t,e){return h(this,null!=t&&z(t,1,D,24,"precision")?0|t:null,e,24)},M.toString=function(t){var e,r=this,i=r.s,f=r.e;return null===f?i?(e="Infinity",0>i&&(e="-"+e)):e="NaN":(e=o(r.c),e=null!=t&&z(t,2,64,25,"base")?n(l(e,f),0|t,10,i):C>=f||f>=j?a(e,f):l(e,f),0>i&&r.c[0]&&(e="-"+e)),e},M.truncated=M.trunc=function(){return F(new e(this),this.e+1,1)},M.valueOf=M.toJSON=function(){return this.toString()},null!=t&&e.config(t),e}function i(t){var e=0|t;return t>0||t===e?e:e-1}function o(t){for(var e,n,r=1,i=t.length,o=t[0]+"";i>r;){for(e=t[r++]+"",n=I-e.length;n--;e="0"+e);o+=e}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function f(t,e){var n,r,i=t.c,o=e.c,f=t.s,u=e.s,s=t.e,c=e.e;if(!f||!u)return null;if(n=i&&!i[0],r=o&&!o[0],n||r)return n?r?0:-u:f;if(f!=u)return f;if(n=0>f,r=s==c,!i||!o)return r?0:!i^n?1:-1;if(!r)return s>c^n?1:-1;for(u=(s=i.length)<(c=o.length)?s:c,f=0;u>f;f++)if(i[f]!=o[f])return i[f]>o[f]^n?1:-1;return s==c?0:s>c^n?1:-1}function u(t,e,n){return(t=p(t))>=e&&n>=t}function s(t){return"[object Array]"==Object.prototype.toString.call(t)}function c(t,e,n){for(var r,i,o=[0],f=0,u=t.length;u>f;){for(i=o.length;i--;o[i]*=e);for(o[r=0]+=N.indexOf(t.charAt(f++));rn-1&&(null==o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}function a(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(0>e?"e":"e+")+e}function l(t,e){var n,r;if(0>e){for(r="0.";++e;r+="0");t=r+t}else if(n=t.length,++e>n){for(r="0",e-=n;--e;r+="0");t+=r}else n>e&&(t=t.slice(0,e)+"."+t.slice(e));return t}function p(t){return t=parseFloat(t),0>t?v(t):w(t)}var h,g,m,d=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,v=Math.ceil,w=Math.floor,y=" not a boolean or binary digit",b="rounding mode",O="number type has more than 15 significant digits",N="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",E=1e14,I=14,x=9007199254740991,_=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],T=1e7,D=1e9;if(h=r(),"function"==typeof define&&define.amd)define(function(){return h});else if("undefined"!=typeof e&&e.exports){if(e.exports=h,!g)try{g=t("crypto")}catch(S){}}else n.BigNumber=h}(this)},{crypto:1}],natspec:[function(t,e){var n=t("./node_modules/expanse.js/lib/abi.js"),r=function(){var t=function(t,e){Object.keys(t).forEach(function(n){e[n]=t[n]})},e=function(t){return Object.keys(t).reduce(function(t,e){return t+"var "+e+" = context['"+e+"'];\n"},"")},r=function(t,e){return t.filter(function(t){return t.name===e})[0]},i=function(t,e){var r=n.formatOutput(t.inputs,"0x"+e.params[0].data.slice(10));return t.inputs.reduce(function(t,e,n){return t[e.name]=r[n],t},{})},o=function(t,e){var n,r="",i=/\` + "`" + `(?:\\.|[^` + "`" + `\\])*\` + "`" + `/gim,o=0;try{for(;null!==(n=i.exec(t));){var f=i.lastIndex-n[0].length,u=n[0].slice(1,n[0].length-1);r+=t.slice(o,f);var s=e(u);r+=s,o=i.lastIndex}r+=t.slice(o)}catch(c){throw new Error("Natspec evaluation failed, wrong input params")}return r},f=function(n,f){var u={};if(f)try{var s=r(f.abi,f.method),c=i(s,f.transaction);t(c,u)}catch(a){throw new Error("Natspec evaluation failed, method does not exist")}var l=e(u),p=o(n,function(t){var e=new Function("context",l+"return "+t+";");return e(u).toString()});return p},u=function(t,e){try{return f(t,e)}catch(n){return n.message}};return{evaluateExpression:f,evaluateExpressionSafe:u}}();e.exports=r},{"./node_modules/expanse.js/lib/abi.js":3}]},{},[]); ` require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o. + along with expanse.js. If not, see . */ /** * @file abi.js @@ -282,20 +282,20 @@ module.exports = { },{"../utils/config":6,"../utils/utils":7,"./formatters":3,"./types":4,"./utils":5}],3:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** @file formatters.js * @authors: @@ -482,20 +482,20 @@ module.exports = { },{"../utils/config":6,"../utils/utils":7,"bignumber.js":8}],4:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** @file types.js * @authors: @@ -561,20 +561,20 @@ module.exports = { },{"./formatters":3}],5:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file utils.js @@ -631,20 +631,20 @@ module.exports = { },{}],6:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** @file config.js * @authors: @@ -702,20 +702,20 @@ module.exports = { },{"bignumber.js":8}],7:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** @file utils.js * @authors: diff --git a/common/natspec/natspec_test.go b/common/natspec/natspec_test.go index 9ec14829a9..581bdd16f8 100644 --- a/common/natspec/natspec_test.go +++ b/common/natspec/natspec_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package natspec diff --git a/common/number/int.go b/common/number/int.go index 6dab2436de..2fb06fa5eb 100644 --- a/common/number/int.go +++ b/common/number/int.go @@ -1,25 +1,25 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package number import ( "math/big" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) var tt256 = new(big.Int).Lsh(big.NewInt(1), 256) diff --git a/common/number/uint_test.go b/common/number/uint_test.go index 3ab9e4c344..0ea54fa8a4 100644 --- a/common/number/uint_test.go +++ b/common/number/uint_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package number @@ -20,7 +20,7 @@ import ( "math/big" "testing" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) func TestSet(t *testing.T) { diff --git a/common/package.go b/common/package.go index 4e8780c08a..1b2e270e55 100644 --- a/common/package.go +++ b/common/package.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common @@ -93,7 +93,7 @@ func FindFileInArchive(fn string, files []*zip.File) (index int) { // Open package // -// Opens a prepared ethereum package +// Opens a prepared expanse package // Reads the manifest file and determines file contents and returns and // the external package. func OpenPackage(fn string) (*ExtPackage, error) { diff --git a/common/path.go b/common/path.go index 8b3c7d14b8..ecc64ecbfa 100644 --- a/common/path.go +++ b/common/path.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common @@ -27,7 +27,7 @@ import ( "github.com/kardianos/osext" ) -// MakeName creates a node name that follows the ethereum convention +// MakeName creates a node name that follows the expanse convention // for such names. It adds the operation system name and Go runtime version // the name. func MakeName(name, version string) string { @@ -68,9 +68,9 @@ func AbsolutePath(Datadir string, filename string) string { func DefaultAssetPath() string { var assetPath string pwd, _ := os.Getwd() - srcdir := filepath.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "cmd", "mist") + srcdir := filepath.Join(os.Getenv("GOPATH"), "src", "github.com", "expanse", "go-expanse", "cmd", "mist") - // If the current working directory is the go-ethereum dir + // If the current working directory is the go-expanse dir // assume a debug build and use the source directory as // asset directory. if pwd == srcdir { @@ -102,17 +102,17 @@ func DefaultAssetPath() string { func DefaultDataDir() string { usr, _ := user.Current() if runtime.GOOS == "darwin" { - return filepath.Join(usr.HomeDir, "Library", "Ethereum") + return filepath.Join(usr.HomeDir, "Library", "Expanse") } else if runtime.GOOS == "windows" { - return filepath.Join(usr.HomeDir, "AppData", "Roaming", "Ethereum") + return filepath.Join(usr.HomeDir, "AppData", "Roaming", "Expanse") } else { - return filepath.Join(usr.HomeDir, ".ethereum") + return filepath.Join(usr.HomeDir, ".expanse") } } func DefaultIpcPath() string { if runtime.GOOS == "windows" { - return `\\.\pipe\geth.ipc` + return `\\.\pipe\gexp.ipc` } - return filepath.Join(DefaultDataDir(), "geth.ipc") + return filepath.Join(DefaultDataDir(), "gexp.ipc") } diff --git a/common/path_test.go b/common/path_test.go new file mode 100644 index 0000000000..0929fc50cb --- /dev/null +++ b/common/path_test.go @@ -0,0 +1,52 @@ +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. +// +// The go-expanse library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-expanse library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-expanse library. If not, see . + +package common + +import ( + "os" + // "testing" + + checker "gopkg.in/check.v1" +) + +type CommonSuite struct{} + +var _ = checker.Suite(&CommonSuite{}) + +func (s *CommonSuite) TestOS(c *checker.C) { + expwin := (os.PathSeparator == '\\' && os.PathListSeparator == ';') + res := IsWindows() + + if !expwin { + c.Assert(res, checker.Equals, expwin, checker.Commentf("IsWindows is", res, "but path is", os.PathSeparator)) + } else { + c.Assert(res, checker.Not(checker.Equals), expwin, checker.Commentf("IsWindows is", res, "but path is", os.PathSeparator)) + } +} + +func (s *CommonSuite) TestWindonziePath(c *checker.C) { + iswindowspath := os.PathSeparator == '\\' + path := "/opt/exp/test/file.ext" + res := WindonizePath(path) + ressep := string(res[0]) + + if !iswindowspath { + c.Assert(ressep, checker.Equals, "/") + } else { + c.Assert(ressep, checker.Not(checker.Equals), "/") + } +} diff --git a/common/registrar/contracts.go b/common/registrar/contracts.go index cd80dfcaba..afd6eac4cd 100644 --- a/common/registrar/contracts.go +++ b/common/registrar/contracts.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package registrar diff --git a/common/registrar/ethreg/ethreg.go b/common/registrar/ethreg/ethreg.go index 626ebe1d74..aee131a1f7 100644 --- a/common/registrar/ethreg/ethreg.go +++ b/common/registrar/ethreg/ethreg.go @@ -1,26 +1,26 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package ethreg import ( "math/big" - "github.com/ethereum/go-ethereum/common/registrar" - "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/go-expanse/common/registrar" + "github.com/expanse-project/go-expanse/xeth" ) // implements a versioned Registrar on an archiving full node diff --git a/common/registrar/registrar.go b/common/registrar/registrar.go index d891e161e7..9d09d8c6e8 100644 --- a/common/registrar/registrar.go +++ b/common/registrar/registrar.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package registrar @@ -22,15 +22,15 @@ import ( "math/big" "regexp" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" ) /* -Registrar implements the Ethereum name registrar services mapping -- arbitrary strings to ethereum addresses +Registrar implements the Expanse name registrar services mapping +- arbitrary strings to expanse addresses - hashes to hashes - hashes to arbitrary strings (likely will provide lookup service for all three) diff --git a/common/registrar/registrar_test.go b/common/registrar/registrar_test.go index 63f2835638..2aeb4df52d 100644 --- a/common/registrar/registrar_test.go +++ b/common/registrar/registrar_test.go @@ -1,26 +1,26 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package registrar import ( "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" ) type testBackend struct { diff --git a/common/rlp.go b/common/rlp.go index 481b451b1b..5c76413a5d 100644 --- a/common/rlp.go +++ b/common/rlp.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common diff --git a/common/rlp_test.go b/common/rlp_test.go index 2320ffe3c2..aeb232f605 100644 --- a/common/rlp_test.go +++ b/common/rlp_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common @@ -22,7 +22,7 @@ import ( "reflect" "testing" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/rlp" ) func TestNonInterfaceSlice(t *testing.T) { diff --git a/common/size.go b/common/size.go index 9653b36298..62e4358e86 100644 --- a/common/size.go +++ b/common/size.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common diff --git a/common/size_test.go b/common/size_test.go index ce19cab69f..60133d0e45 100644 --- a/common/size_test.go +++ b/common/size_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common diff --git a/common/test_utils.go b/common/test_utils.go index a848642f77..063b696e36 100644 --- a/common/test_utils.go +++ b/common/test_utils.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common diff --git a/common/types.go b/common/types.go index 624f4b8265..908ed8245d 100644 --- a/common/types.go +++ b/common/types.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common diff --git a/common/types_template.go b/common/types_template.go index 8048f9cc3f..748e5dea83 100644 --- a/common/types_template.go +++ b/common/types_template.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // +build none //sed -e 's/_N_/Hash/g' -e 's/_S_/32/g' -e '1d' types_template.go | gofmt -w hash.go diff --git a/common/types_test.go b/common/types_test.go index edf8d4d142..9b710a1ead 100644 --- a/common/types_test.go +++ b/common/types_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common diff --git a/common/value.go b/common/value.go index 7abbf67b15..b76d5d1b0b 100644 --- a/common/value.go +++ b/common/value.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common @@ -24,7 +24,7 @@ import ( "reflect" "strconv" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/rlp" ) // Value can hold values of certain basic types and provides ways to diff --git a/common/value_test.go b/common/value_test.go index ac2ef02a70..23d329d263 100644 --- a/common/value_test.go +++ b/common/value_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common diff --git a/compression/rle/read_write.go b/compression/rle/read_write.go index 19133119b3..b7698ea435 100644 --- a/compression/rle/read_write.go +++ b/compression/rle/read_write.go @@ -1,27 +1,27 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -// Package rle implements the run-length encoding used for Ethereum data. +// Package rle implements the run-length encoding used for Expanse data. package rle import ( "bytes" "errors" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/crypto" ) const ( diff --git a/compression/rle/read_write_test.go b/compression/rle/read_write_test.go index ba39650256..c19fd796d1 100644 --- a/compression/rle/read_write_test.go +++ b/compression/rle/read_write_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package rle diff --git a/core/asm.go b/core/asm.go index a86a2c44c3..acbf6d9372 100644 --- a/core/asm.go +++ b/core/asm.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -20,8 +20,8 @@ import ( "fmt" "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/vm" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/vm" ) func Disassemble(script []byte) (asm []string) { diff --git a/core/bad_block.go b/core/bad_block.go index cd3fb575a8..1239431b42 100644 --- a/core/bad_block.go +++ b/core/bad_block.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -22,11 +22,11 @@ import ( "io/ioutil" "net/http" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/rlp" ) // DisabledBadBlockReporting can be set to prevent blocks being reported. diff --git a/core/bench_test.go b/core/bench_test.go index baae8a7a5e..e9c89fb5ea 100644 --- a/core/bench_test.go +++ b/core/bench_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -23,12 +23,12 @@ import ( "os" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/params" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/event" + "github.com/expanse-project/go-expanse/params" ) func BenchmarkInsertChain_empty_memdb(b *testing.B) { @@ -148,7 +148,7 @@ func benchInsertChain(b *testing.B, disk bool, gen func(int, *BlockGen)) { if !disk { db, _ = ethdb.NewMemDatabase() } else { - dir, err := ioutil.TempDir("", "eth-core-bench") + dir, err := ioutil.TempDir("", "exp-core-bench") if err != nil { b.Fatalf("cannot create temporary directory: %v", err) } diff --git a/core/block_cache.go b/core/block_cache.go index 0fd7114488..6c8a5bf67f 100644 --- a/core/block_cache.go +++ b/core/block_cache.go @@ -1,26 +1,26 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core import ( "sync" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/types" ) // BlockCache implements a caching mechanism specifically for blocks and uses FILO to pop diff --git a/core/block_cache_test.go b/core/block_cache_test.go index ef826d5bda..33b76296fc 100644 --- a/core/block_cache_test.go +++ b/core/block_cache_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -20,8 +20,8 @@ import ( "math/big" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/types" ) func newChain(size int) (chain []*types.Block) { diff --git a/core/block_processor.go b/core/block_processor.go index 99d27fa717..a47ee24000 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -22,15 +22,15 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/params" - "github.com/ethereum/go-ethereum/pow" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/event" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/params" + "github.com/expanse-project/go-expanse/pow" "gopkg.in/fatih/set.v0" ) diff --git a/core/block_processor_test.go b/core/block_processor_test.go index e0b2d3313f..3af0926bf1 100644 --- a/core/block_processor_test.go +++ b/core/block_processor_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -21,12 +21,12 @@ import ( "math/big" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/pow/ezp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/event" + "github.com/expanse-project/go-expanse/pow/ezp" ) func proc() (*BlockProcessor, *ChainManager) { diff --git a/core/blocks.go b/core/blocks.go index ecccc541f0..f01e6f1bf4 100644 --- a/core/blocks.go +++ b/core/blocks.go @@ -1,22 +1,22 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core -import "github.com/ethereum/go-ethereum/common" +import "github.com/expanse-project/go-expanse/common" // Set of manually tracked bad hashes (usually hard forks) var BadHashes = map[common.Hash]bool{ diff --git a/core/canary.go b/core/canary.go index 69db18e582..be853e6acb 100644 --- a/core/canary.go +++ b/core/canary.go @@ -1,26 +1,26 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core import ( "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" ) var ( diff --git a/core/chain_makers.go b/core/chain_makers.go index b009e0c28c..2a9be36c91 100644 --- a/core/chain_makers.go +++ b/core/chain_makers.go @@ -1,29 +1,29 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core import ( "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/pow" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/event" + "github.com/expanse-project/go-expanse/pow" ) // FakePow is a non-validating proof of work implementation. diff --git a/core/chain_makers_test.go b/core/chain_makers_test.go index 1c868624df..807db53d44 100644 --- a/core/chain_makers_test.go +++ b/core/chain_makers_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -20,11 +20,11 @@ import ( "fmt" "math/big" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/params" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/event" + "github.com/expanse-project/go-expanse/params" ) func ExampleGenerateChain() { diff --git a/core/chain_manager.go b/core/chain_manager.go index c8127951ea..25515dbd4c 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -1,20 +1,20 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -// Package core implements the Ethereum consensus protocol. +// Package core implements the Expanse consensus protocol. package core import ( @@ -27,14 +27,14 @@ import ( "sync/atomic" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/metrics" - "github.com/ethereum/go-ethereum/pow" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/event" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/metrics" + "github.com/expanse-project/go-expanse/pow" "github.com/hashicorp/golang-lru" ) @@ -103,7 +103,7 @@ func NewChainManager(chainDb common.Database, pow pow.PoW, mux *event.TypeMux) ( if err != nil { return nil, err } - glog.V(logger.Info).Infoln("WARNING: Wrote default ethereum genesis block") + glog.V(logger.Info).Infoln("WARNING: Wrote default expanse genesis block") } if err := bc.setLastState(); err != nil { diff --git a/core/chain_manager_test.go b/core/chain_manager_test.go index 002dcbe446..b33d5dde7f 100644 --- a/core/chain_manager_test.go +++ b/core/chain_manager_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -26,14 +26,14 @@ import ( "strconv" "testing" - "github.com/ethereum/ethash" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/pow" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/ethash" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/event" + "github.com/expanse-project/go-expanse/pow" + "github.com/expanse-project/go-expanse/rlp" "github.com/hashicorp/golang-lru" ) diff --git a/core/chain_util.go b/core/chain_util.go index 84b462ce3d..4412137e33 100644 --- a/core/chain_util.go +++ b/core/chain_util.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -21,12 +21,12 @@ import ( "math/big" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/params" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/params" + "github.com/expanse-project/go-expanse/rlp" ) var ( diff --git a/core/chain_util_test.go b/core/chain_util_test.go index 4bbe811942..095e4b2735 100644 --- a/core/chain_util_test.go +++ b/core/chain_util_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -22,7 +22,7 @@ import ( "os" "testing" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) type diffTest struct { diff --git a/core/default_genesis.go b/core/default_genesis.go index f8acda9fb6..8d0b70fdc1 100644 --- a/core/default_genesis.go +++ b/core/default_genesis.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core diff --git a/core/error.go b/core/error.go index 09eea22d6d..c7e023733d 100644 --- a/core/error.go +++ b/core/error.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -21,7 +21,7 @@ import ( "fmt" "math/big" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) var ( diff --git a/core/events.go b/core/events.go index a487fc51d4..1ca656c5c5 100644 --- a/core/events.go +++ b/core/events.go @@ -1,27 +1,27 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core import ( "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" ) // TxPreEvent is posted when a transaction enters the transaction pool. diff --git a/core/execution.go b/core/execution.go index 3a136515df..91f63d0366 100644 --- a/core/execution.go +++ b/core/execution.go @@ -1,29 +1,29 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core import ( "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/vm" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/params" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/vm" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/params" ) // Execution is the execution environment for the given call or create action. @@ -61,7 +61,7 @@ func (self *Execution) Create(caller vm.ContextRef) (ret []byte, err error, acco self.input = nil ret, err = self.exec(nil, code, caller) // Here we get an error if we run into maximum stack depth, - // See: https://github.com/ethereum/yellowpaper/pull/131 + // See: https://github.com/expanse-project/yellowpaper/pull/131 // and YP definitions for CREATE instruction if err != nil { return nil, err, nil diff --git a/core/fees.go b/core/fees.go index 0bb26f0552..98adc603d9 100644 --- a/core/fees.go +++ b/core/fees.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -20,4 +20,4 @@ import ( "math/big" ) -var BlockReward *big.Int = big.NewInt(5e+18) +var BlockReward *big.Int = big.NewInt(6e+18) diff --git a/core/filter.go b/core/filter.go index c34d6ff6cc..2a16131a87 100644 --- a/core/filter.go +++ b/core/filter.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -32,7 +32,7 @@ type AccountChange struct { // Filtering interface type Filter struct { - eth Backend + exp Backend earliest int64 latest int64 skip int @@ -47,8 +47,8 @@ type Filter struct { // Create a new filter which uses a bloom filter on blocks to figure out whether a particular block // is interesting or not. -func NewFilter(eth Backend) *Filter { - return &Filter{eth: eth} +func NewFilter(exp Backend) *Filter { + return &Filter{exp: exp} } // Set the earliest and latest block for filtering. @@ -80,7 +80,7 @@ func (self *Filter) SetSkip(skip int) { // Run filters logs with the current parameters set func (self *Filter) Find() state.Logs { - earliestBlock := self.eth.ChainManager().CurrentBlock() + earliestBlock := self.exp.ChainManager().CurrentBlock() var earliestBlockNo uint64 = uint64(self.earliest) if self.earliest == -1 { earliestBlockNo = earliestBlock.NumberU64() @@ -92,7 +92,7 @@ func (self *Filter) Find() state.Logs { var ( logs state.Logs - block = self.eth.ChainManager().GetBlockByNumber(latestBlockNo) + block = self.exp.ChainManager().GetBlockByNumber(latestBlockNo) ) done: @@ -111,7 +111,7 @@ done: // current parameters if self.bloomFilter(block) { // Get the logs of the block - unfiltered, err := self.eth.BlockProcessor().GetLogs(block) + unfiltered, err := self.exp.BlockProcessor().GetLogs(block) if err != nil { glog.V(logger.Warn).Infoln("err: filter get logs ", err) @@ -121,7 +121,7 @@ done: logs = append(logs, self.FilterLogs(unfiltered)...) } - block = self.eth.ChainManager().GetBlock(block.ParentHash()) + block = self.exp.ChainManager().GetBlock(block.ParentHash()) } skip := int(math.Min(float64(len(logs)), float64(self.skip))) diff --git a/core/filter_test.go b/core/filter_test.go index 58e71e305d..693bf7c10a 100644 --- a/core/filter_test.go +++ b/core/filter_test.go @@ -1,17 +1,17 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core diff --git a/core/genesis.go b/core/genesis.go index 7d4e03c990..ac5ddeed3a 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -24,12 +24,12 @@ import ( "math/big" "strings" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/params" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/params" ) // WriteGenesisBlock writes the genesis block to the database as block number 0 diff --git a/core/helper_test.go b/core/helper_test.go index b21f31d7c8..1b9fdefe58 100644 --- a/core/helper_test.go +++ b/core/helper_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -20,11 +20,11 @@ import ( "container/list" "fmt" - "github.com/ethereum/go-ethereum/core/types" - // "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/event" + "github.com/expanse-project/go-expanse/core/types" + // "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/event" ) // Implement our EthTest Manager diff --git a/core/manager.go b/core/manager.go index 8b0401b031..ce62e63059 100644 --- a/core/manager.go +++ b/core/manager.go @@ -1,25 +1,25 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core import ( - "github.com/ethereum/go-ethereum/accounts" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/event" + "github.com/expanse-project/go-expanse/accounts" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/event" ) // TODO move this to types? diff --git a/core/state/dump.go b/core/state/dump.go index 9acb8a0244..a507b1a750 100644 --- a/core/state/dump.go +++ b/core/state/dump.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package state @@ -20,7 +20,7 @@ import ( "encoding/json" "fmt" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) type Account struct { diff --git a/core/state/errors.go b/core/state/errors.go index a08ed2d23d..1d120e8970 100644 --- a/core/state/errors.go +++ b/core/state/errors.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package state diff --git a/core/state/log.go b/core/state/log.go index 5d7d7357dd..9433c4d447 100644 --- a/core/state/log.go +++ b/core/state/log.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package state @@ -20,8 +20,8 @@ import ( "fmt" "io" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/rlp" ) type Log struct { diff --git a/core/state/main_test.go b/core/state/main_test.go index cd9661031f..1d01867c37 100644 --- a/core/state/main_test.go +++ b/core/state/main_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package state diff --git a/core/state/managed_state.go b/core/state/managed_state.go index 4df0479791..38038186b6 100644 --- a/core/state/managed_state.go +++ b/core/state/managed_state.go @@ -1,25 +1,25 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package state import ( "sync" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) type account struct { diff --git a/core/state/managed_state_test.go b/core/state/managed_state_test.go index 58e77d842b..34b32564f7 100644 --- a/core/state/managed_state_test.go +++ b/core/state/managed_state_test.go @@ -1,26 +1,26 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package state import ( "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/ethdb" ) var addr = common.BytesToAddress([]byte("test")) diff --git a/core/state/state_object.go b/core/state/state_object.go index c76feb7743..62988ae31d 100644 --- a/core/state/state_object.go +++ b/core/state/state_object.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package state @@ -21,12 +21,12 @@ import ( "fmt" "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/rlp" - "github.com/ethereum/go-ethereum/trie" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/rlp" + "github.com/expanse-project/go-expanse/trie" ) type Code []byte diff --git a/core/state/state_test.go b/core/state/state_test.go index 5972d266a9..293ed6cc18 100644 --- a/core/state/state_test.go +++ b/core/state/state_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package state @@ -22,8 +22,8 @@ import ( checker "gopkg.in/check.v1" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/ethdb" ) type StateSuite struct { diff --git a/core/state/statedb.go b/core/state/statedb.go index 577f7162eb..d4f22877ab 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -1,33 +1,33 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -// Package state provides a caching layer atop the Ethereum state trie. +// Package state provides a caching layer atop the Expanse state trie. package state import ( "bytes" "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/trie" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/trie" ) -// StateDBs within the ethereum protocol are used to store anything +// StateDBs within the expanse protocol are used to store anything // within the merkle trie. StateDBs take care of caching and storing // nested states. It's the general query interface to retrieve: // * Contracts diff --git a/core/state_transition.go b/core/state_transition.go index a5d4fc19b9..b2f305c6cc 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -20,12 +20,12 @@ import ( "fmt" "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/vm" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/params" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/vm" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/params" ) /* diff --git a/core/transaction_pool.go b/core/transaction_pool.go index 42e26b3b38..0fd1230b76 100644 --- a/core/transaction_pool.go +++ b/core/transaction_pool.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -23,12 +23,12 @@ import ( "sort" "sync" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/event" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" ) var ( diff --git a/core/transaction_pool_test.go b/core/transaction_pool_test.go index 7d09847401..edbc1e03c0 100644 --- a/core/transaction_pool_test.go +++ b/core/transaction_pool_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -21,12 +21,12 @@ import ( "math/big" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/event" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/event" ) func transaction(nonce uint64, gaslimit *big.Int, key *ecdsa.PrivateKey) *types.Transaction { diff --git a/core/transaction_util.go b/core/transaction_util.go index ce2ceac463..625ffcf158 100644 --- a/core/transaction_util.go +++ b/core/transaction_util.go @@ -1,28 +1,28 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core import ( - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/rlp" "github.com/syndtr/goleveldb/leveldb" ) diff --git a/core/types/block.go b/core/types/block.go index 2188e6d4da..7cf9aae5d5 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -1,20 +1,20 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -// Package types contains data types related to Ethereum consensus. +// Package types contains data types related to Expanse consensus. package types import ( @@ -28,9 +28,9 @@ import ( "sync/atomic" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto/sha3" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto/sha3" + "github.com/expanse-project/go-expanse/rlp" ) // A BlockNonce is a 64-bit hash which proves (combined with the @@ -131,7 +131,7 @@ type Block struct { // of the chain up to and including the block. Td *big.Int - // ReceivedAt is used by package eth to track block propagation time. + // ReceivedAt is used by package exp to track block propagation time. ReceivedAt time.Time } @@ -140,7 +140,7 @@ type Block struct { // would otherwise need to be recomputed. type StorageBlock Block -// "external" block encoding. used for eth protocol, etc. +// "external" block encoding. used for exp protocol, etc. type extblock struct { Header *Header Txs []*Transaction diff --git a/core/types/block_test.go b/core/types/block_test.go index cdd8431f4d..ea2436c02b 100644 --- a/core/types/block_test.go +++ b/core/types/block_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package types @@ -22,8 +22,8 @@ import ( "reflect" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/rlp" ) // from bcValidBlockTest.json, "SimpleTx" diff --git a/core/types/bloom9.go b/core/types/bloom9.go index 0629b31d45..a02f716c09 100644 --- a/core/types/bloom9.go +++ b/core/types/bloom9.go @@ -1,27 +1,27 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package types import ( "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/crypto" ) type bytesBacked interface { diff --git a/core/types/bloom9_test.go b/core/types/bloom9_test.go index f020670b1c..1691fc89b9 100644 --- a/core/types/bloom9_test.go +++ b/core/types/bloom9_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package types @@ -20,7 +20,7 @@ package types import ( "testing" - "github.com/ethereum/go-ethereum/core/state" + "github.com/expanse-project/go-expanse/core/state" ) func TestBloom9(t *testing.T) { diff --git a/core/types/common.go b/core/types/common.go index de6efcd86b..65a6d4a992 100644 --- a/core/types/common.go +++ b/core/types/common.go @@ -1,26 +1,26 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package types import ( "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" "fmt" ) diff --git a/core/types/derive_sha.go b/core/types/derive_sha.go index 478edb0e81..99bcd1b407 100644 --- a/core/types/derive_sha.go +++ b/core/types/derive_sha.go @@ -1,26 +1,26 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package types import ( - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/rlp" - "github.com/ethereum/go-ethereum/trie" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/rlp" + "github.com/expanse-project/go-expanse/trie" ) type DerivableList interface { diff --git a/core/types/receipt.go b/core/types/receipt.go index e01d690052..57e6912e45 100644 --- a/core/types/receipt.go +++ b/core/types/receipt.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package types @@ -22,9 +22,9 @@ import ( "io" "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/rlp" ) type Receipt struct { diff --git a/core/types/transaction.go b/core/types/transaction.go index 28a7e02b31..b9246ad456 100644 --- a/core/types/transaction.go +++ b/core/types/transaction.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package types @@ -24,11 +24,11 @@ import ( "math/big" "sync/atomic" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/rlp" ) var ErrInvalidSig = errors.New("invalid v, r, s values") diff --git a/core/types/transaction_test.go b/core/types/transaction_test.go index 1c0e27d9a4..54a417a82b 100644 --- a/core/types/transaction_test.go +++ b/core/types/transaction_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package types @@ -22,13 +22,13 @@ import ( "math/big" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/rlp" ) // The values in those tests are from the Transaction Tests -// at github.com/ethereum/tests. +// at github.com/expanse-project/tests. var ( emptyTx = NewTransaction( diff --git a/core/vm/analysis.go b/core/vm/analysis.go index a0f6158217..c064d95355 100644 --- a/core/vm/analysis.go +++ b/core/vm/analysis.go @@ -1,25 +1,25 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm import ( "math/big" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) var bigMaxUint64 = new(big.Int).SetUint64(^uint64(0)) diff --git a/core/vm/asm.go b/core/vm/asm.go index 639201e50b..a4dddf52d8 100644 --- a/core/vm/asm.go +++ b/core/vm/asm.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm @@ -20,7 +20,7 @@ import ( "fmt" "math/big" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) func Disassemble(script []byte) (asm []string) { diff --git a/core/vm/common.go b/core/vm/common.go index 2e03ec80bb..718fd9a9f7 100644 --- a/core/vm/common.go +++ b/core/vm/common.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm @@ -20,8 +20,8 @@ import ( "math" "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/logger/glog" ) // Global Debug flag indicating Debug VM (full logging) diff --git a/core/vm/context.go b/core/vm/context.go index d17934ba59..26205f5e0b 100644 --- a/core/vm/context.go +++ b/core/vm/context.go @@ -1,25 +1,25 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm import ( "math/big" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) type ContextRef interface { diff --git a/core/vm/contracts.go b/core/vm/contracts.go index b965fa095c..8d2c74dd03 100644 --- a/core/vm/contracts.go +++ b/core/vm/contracts.go @@ -1,29 +1,29 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm import ( "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/params" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/params" ) type Address interface { diff --git a/core/vm/disasm.go b/core/vm/disasm.go index 2bfea5cbda..616a4521b8 100644 --- a/core/vm/disasm.go +++ b/core/vm/disasm.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm diff --git a/core/vm/environment.go b/core/vm/environment.go index 916081f513..08ebdc875c 100644 --- a/core/vm/environment.go +++ b/core/vm/environment.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm @@ -20,8 +20,8 @@ import ( "errors" "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" ) // Environment is is required by the virtual machine to get information from diff --git a/core/vm/errors.go b/core/vm/errors.go index 24567e9a1e..b9a211b821 100644 --- a/core/vm/errors.go +++ b/core/vm/errors.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm @@ -20,7 +20,7 @@ import ( "errors" "fmt" - "github.com/ethereum/go-ethereum/params" + "github.com/expanse-project/go-expanse/params" ) var OutOfGasError = errors.New("Out of gas") diff --git a/core/vm/gas.go b/core/vm/gas.go index b2f068e6e1..bd52ba43ed 100644 --- a/core/vm/gas.go +++ b/core/vm/gas.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm @@ -20,7 +20,7 @@ import ( "fmt" "math/big" - "github.com/ethereum/go-ethereum/params" + "github.com/expanse-project/go-expanse/params" ) var ( diff --git a/core/vm/logger.go b/core/vm/logger.go index 736f595f6b..6d4cb26833 100644 --- a/core/vm/logger.go +++ b/core/vm/logger.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm @@ -21,7 +21,7 @@ import ( "os" "unicode" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) func StdErrFormat(logs []StructLog) { diff --git a/core/vm/memory.go b/core/vm/memory.go index 0109050d7c..7ebd244a19 100644 --- a/core/vm/memory.go +++ b/core/vm/memory.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm diff --git a/core/vm/opcodes.go b/core/vm/opcodes.go index ecced3650b..f7abce5f79 100644 --- a/core/vm/opcodes.go +++ b/core/vm/opcodes.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm diff --git a/core/vm/settings.go b/core/vm/settings.go index f9296f6c8b..1c6d579f92 100644 --- a/core/vm/settings.go +++ b/core/vm/settings.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm diff --git a/core/vm/stack.go b/core/vm/stack.go index 009ac9e1b6..13bd53a5df 100644 --- a/core/vm/stack.go +++ b/core/vm/stack.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm diff --git a/core/vm/virtual_machine.go b/core/vm/virtual_machine.go index 047723744e..4b87e1f731 100644 --- a/core/vm/virtual_machine.go +++ b/core/vm/virtual_machine.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm diff --git a/core/vm/vm.go b/core/vm/vm.go index d9e1a0ce50..73160617ba 100644 --- a/core/vm/vm.go +++ b/core/vm/vm.go @@ -1,20 +1,20 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -// Package vm implements the Ethereum Virtual Machine. +// Package vm implements the Expanse Virtual Machine. package vm import ( diff --git a/core/vm/vm_jit.go b/core/vm/vm_jit.go index 339cb8ea8a..103faa8c0b 100644 --- a/core/vm/vm_jit.go +++ b/core/vm/vm_jit.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // +build evmjit @@ -25,7 +25,7 @@ int evmjit_run(void* _jit, void* _data, void* _env); void evmjit_destroy(void* _jit); // Shared library evmjit (e.g. libevmjit.so) is expected to be installed in /usr/local/lib -// More: https://github.com/ethereum/evmjit +// More: https://github.com/expanse-project/evmjit #cgo LDFLAGS: -levmjit */ import "C" @@ -37,9 +37,9 @@ import ( "math/big" "unsafe" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/params" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/params" ) type JitVm struct { diff --git a/core/vm/vm_jit_fake.go b/core/vm/vm_jit_fake.go index 456fcb8d4b..ebb382238f 100644 --- a/core/vm/vm_jit_fake.go +++ b/core/vm/vm_jit_fake.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // +build !evmjit diff --git a/core/vm_env.go b/core/vm_env.go index a08f024fe7..77eb5ec012 100644 --- a/core/vm_env.go +++ b/core/vm_env.go @@ -1,28 +1,28 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core import ( "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/core/vm" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/core/vm" ) type VMEnv struct { diff --git a/crypto/crypto.go b/crypto/crypto.go index a474d6f13f..04102e0487 100644 --- a/crypto/crypto.go +++ b/crypto/crypto.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package crypto @@ -34,11 +34,11 @@ import ( "errors" "code.google.com/p/go-uuid/uuid" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto/ecies" - "github.com/ethereum/go-ethereum/crypto/secp256k1" - "github.com/ethereum/go-ethereum/crypto/sha3" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto/ecies" + "github.com/expanse-project/go-expanse/crypto/secp256k1" + "github.com/expanse-project/go-expanse/crypto/sha3" + "github.com/expanse-project/go-expanse/rlp" "golang.org/x/crypto/pbkdf2" "golang.org/x/crypto/ripemd160" ) @@ -68,7 +68,7 @@ func Sha3Hash(data ...[]byte) (h common.Hash) { return h } -// Creates an ethereum address given the bytes and the nonce +// Creates an expanse address given the bytes and the nonce func CreateAddress(b common.Address, nonce uint64) common.Address { data, _ := rlp.EncodeToBytes([]interface{}{b, nonce}) return common.BytesToAddress(Sha3(data)[12:]) @@ -250,7 +250,7 @@ func decryptPreSaleKey(fileContent []byte, password string) (key *Key, err error iv := encSeedBytes[:16] cipherText := encSeedBytes[16:] /* - See https://github.com/ethereum/pyethsaletool + See https://github.com/expanse-project/pyethsaletool pyethsaletool generates the encryption key from password by 2000 rounds of PBKDF2 with HMAC-SHA-256 using password as salt (:(). diff --git a/crypto/crypto_test.go b/crypto/crypto_test.go index b891f41a9a..c73c88bb9d 100644 --- a/crypto/crypto_test.go +++ b/crypto/crypto_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package crypto @@ -23,8 +23,8 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto/secp256k1" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto/secp256k1" ) // These tests are sanity checks. diff --git a/crypto/encrypt_decrypt_test.go b/crypto/encrypt_decrypt_test.go index fcf40b70fd..d1366cc48f 100644 --- a/crypto/encrypt_decrypt_test.go +++ b/crypto/encrypt_decrypt_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package crypto @@ -21,7 +21,7 @@ import ( "fmt" "testing" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) func TestBox(t *testing.T) { diff --git a/crypto/key.go b/crypto/key.go index d80b997598..024266f6ea 100644 --- a/crypto/key.go +++ b/crypto/key.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package crypto @@ -24,7 +24,7 @@ import ( "io" "code.google.com/p/go-uuid/uuid" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) const ( diff --git a/crypto/key_store_passphrase.go b/crypto/key_store_passphrase.go index f21af8dd9f..d1edac838f 100644 --- a/crypto/key_store_passphrase.go +++ b/crypto/key_store_passphrase.go @@ -1,25 +1,25 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . /* This key store behaves as KeyStorePlain with the difference that the private key is encrypted and on disk uses another JSON encoding. -The crypto is documented at https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition +The crypto is documented at https://github.com/expanse-project/wiki/wiki/Web3-Secret-Storage-Definition */ @@ -37,8 +37,8 @@ import ( "reflect" "code.google.com/p/go-uuid/uuid" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto/randentropy" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto/randentropy" "golang.org/x/crypto/pbkdf2" "golang.org/x/crypto/scrypt" ) diff --git a/crypto/key_store_plain.go b/crypto/key_store_plain.go index c1c23f8b8b..31cc283baa 100644 --- a/crypto/key_store_plain.go +++ b/crypto/key_store_plain.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package crypto @@ -26,7 +26,7 @@ import ( "path/filepath" "time" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) type KeyStore interface { diff --git a/crypto/key_store_test.go b/crypto/key_store_test.go index fda87ddc87..55d843f7d1 100644 --- a/crypto/key_store_test.go +++ b/crypto/key_store_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package crypto @@ -22,8 +22,8 @@ import ( "reflect" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto/randentropy" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto/randentropy" ) func TestKeyStorePlain(t *testing.T) { @@ -117,7 +117,7 @@ func TestImportPreSaleKey(t *testing.T) { } } -// Test and utils for the key store tests in the Ethereum JSON tests; +// Test and utils for the key store tests in the Expanse JSON tests; // tests/KeyStoreTests/basic_tests.json type KeyStoreTestV3 struct { Json encryptedKeyJSONV3 diff --git a/crypto/keypair.go b/crypto/keypair.go new file mode 100644 index 0000000000..913369c7ec --- /dev/null +++ b/crypto/keypair.go @@ -0,0 +1,66 @@ +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. +// +// The go-expanse library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-expanse library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-expanse library. If not, see . + +package crypto + +import ( + "strings" + + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto/secp256k1" +) + +type KeyPair struct { + PrivateKey []byte + PublicKey []byte + address []byte + mnemonic string + // The associated account + // account *StateObject +} + +func GenerateNewKeyPair() *KeyPair { + _, prv := secp256k1.GenerateKeyPair() + keyPair, _ := NewKeyPairFromSec(prv) // swallow error, this one cannot err + return keyPair +} + +func NewKeyPairFromSec(seckey []byte) (*KeyPair, error) { + pubkey, err := secp256k1.GeneratePubKey(seckey) + if err != nil { + return nil, err + } + + return &KeyPair{PrivateKey: seckey, PublicKey: pubkey}, nil +} + +func (k *KeyPair) Address() []byte { + if k.address == nil { + k.address = Sha3(k.PublicKey[1:])[12:] + } + return k.address +} + +func (k *KeyPair) Mnemonic() string { + if k.mnemonic == "" { + k.mnemonic = strings.Join(MnemonicEncode(common.Bytes2Hex(k.PrivateKey)), " ") + } + return k.mnemonic +} + +func (k *KeyPair) AsStrings() (string, string, string, string) { + return k.Mnemonic(), common.Bytes2Hex(k.Address()), common.Bytes2Hex(k.PrivateKey), common.Bytes2Hex(k.PublicKey) +} diff --git a/crypto/mnemonic.go b/crypto/mnemonic.go new file mode 100644 index 0000000000..a1c08dd48c --- /dev/null +++ b/crypto/mnemonic.go @@ -0,0 +1,76 @@ +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. +// +// The go-expanse library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-expanse library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-expanse library. If not, see . + +package crypto + +import ( + "fmt" + "strconv" +) + +// TODO: See if we can refactor this into a shared util lib if we need it multiple times +func IndexOf(slice []string, value string) int64 { + for p, v := range slice { + if v == value { + return int64(p) + } + } + return -1 +} + +func MnemonicEncode(message string) []string { + var out []string + n := int64(len(MnemonicWords)) + + for i := 0; i < len(message); i += (len(message) / 8) { + x := message[i : i+8] + bit, _ := strconv.ParseInt(x, 16, 64) + w1 := (bit % n) + w2 := ((bit / n) + w1) % n + w3 := ((bit / n / n) + w2) % n + out = append(out, MnemonicWords[w1], MnemonicWords[w2], MnemonicWords[w3]) + } + return out +} + +func MnemonicDecode(wordsar []string) string { + var out string + n := int64(len(MnemonicWords)) + + for i := 0; i < len(wordsar); i += 3 { + word1 := wordsar[i] + word2 := wordsar[i+1] + word3 := wordsar[i+2] + w1 := IndexOf(MnemonicWords, word1) + w2 := IndexOf(MnemonicWords, word2) + w3 := IndexOf(MnemonicWords, word3) + + y := (w2 - w1) % n + z := (w3 - w2) % n + + // Golang handles modulo with negative numbers different then most languages + // The modulo can be negative, we don't want that. + if z < 0 { + z += n + } + if y < 0 { + y += n + } + x := w1 + n*(y) + n*n*(z) + out += fmt.Sprintf("%08x", x) + } + return out +} diff --git a/crypto/mnemonic_test.go b/crypto/mnemonic_test.go new file mode 100644 index 0000000000..9a9036f527 --- /dev/null +++ b/crypto/mnemonic_test.go @@ -0,0 +1,90 @@ +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. +// +// The go-expanse library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-expanse library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-expanse library. If not, see . + +package crypto + +import ( + "testing" +) + +func TestMnDecode(t *testing.T) { + words := []string{ + "ink", + "balance", + "gain", + "fear", + "happen", + "melt", + "mom", + "surface", + "stir", + "bottle", + "unseen", + "expression", + "important", + "curl", + "grant", + "fairy", + "across", + "back", + "figure", + "breast", + "nobody", + "scratch", + "worry", + "yesterday", + } + encode := "c61d43dc5bb7a4e754d111dae8105b6f25356492df5e50ecb33b858d94f8c338" + result := MnemonicDecode(words) + if encode != result { + t.Error("We expected", encode, "got", result, "instead") + } +} +func TestMnEncode(t *testing.T) { + encode := "c61d43dc5bb7a4e754d111dae8105b6f25356492df5e50ecb33b858d94f8c338" + result := []string{ + "ink", + "balance", + "gain", + "fear", + "happen", + "melt", + "mom", + "surface", + "stir", + "bottle", + "unseen", + "expression", + "important", + "curl", + "grant", + "fairy", + "across", + "back", + "figure", + "breast", + "nobody", + "scratch", + "worry", + "yesterday", + } + words := MnemonicEncode(encode) + for i, word := range words { + if word != result[i] { + t.Error("Mnenonic does not match:", words, result) + } + } +} diff --git a/crypto/mnemonic_words.go b/crypto/mnemonic_words.go new file mode 100644 index 0000000000..3b412cc35a --- /dev/null +++ b/crypto/mnemonic_words.go @@ -0,0 +1,1646 @@ +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. +// +// The go-expanse library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-expanse library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-expanse library. If not, see . + +package crypto + +var MnemonicWords []string = []string{ + "like", + "just", + "love", + "know", + "never", + "want", + "time", + "out", + "there", + "make", + "look", + "eye", + "down", + "only", + "think", + "heart", + "back", + "then", + "into", + "about", + "more", + "away", + "still", + "them", + "take", + "thing", + "even", + "through", + "long", + "always", + "world", + "too", + "friend", + "tell", + "try", + "hand", + "thought", + "over", + "here", + "other", + "need", + "smile", + "again", + "much", + "cry", + "been", + "night", + "ever", + "little", + "said", + "end", + "some", + "those", + "around", + "mind", + "people", + "girl", + "leave", + "dream", + "left", + "turn", + "myself", + "give", + "nothing", + "really", + "off", + "before", + "something", + "find", + "walk", + "wish", + "good", + "once", + "place", + "ask", + "stop", + "keep", + "watch", + "seem", + "everything", + "wait", + "got", + "yet", + "made", + "remember", + "start", + "alone", + "run", + "hope", + "maybe", + "believe", + "body", + "hate", + "after", + "close", + "talk", + "stand", + "own", + "each", + "hurt", + "help", + "home", + "god", + "soul", + "new", + "many", + "two", + "inside", + "should", + "true", + "first", + "fear", + "mean", + "better", + "play", + "another", + "gone", + "change", + "use", + "wonder", + "someone", + "hair", + "cold", + "open", + "best", + "any", + "behind", + "happen", + "water", + "dark", + "laugh", + "stay", + "forever", + "name", + "work", + "show", + "sky", + "break", + "came", + "deep", + "door", + "put", + "black", + "together", + "upon", + "happy", + "such", + "great", + "white", + "matter", + "fill", + "past", + "please", + "burn", + "cause", + "enough", + "touch", + "moment", + "soon", + "voice", + "scream", + "anything", + "stare", + "sound", + "red", + "everyone", + "hide", + "kiss", + "truth", + "death", + "beautiful", + "mine", + "blood", + "broken", + "very", + "pass", + "next", + "forget", + "tree", + "wrong", + "air", + "mother", + "understand", + "lip", + "hit", + "wall", + "memory", + "sleep", + "free", + "high", + "realize", + "school", + "might", + "skin", + "sweet", + "perfect", + "blue", + "kill", + "breath", + "dance", + "against", + "fly", + "between", + "grow", + "strong", + "under", + "listen", + "bring", + "sometimes", + "speak", + "pull", + "person", + "become", + "family", + "begin", + "ground", + "real", + "small", + "father", + "sure", + "feet", + "rest", + "young", + "finally", + "land", + "across", + "today", + "different", + "guy", + "line", + "fire", + "reason", + "reach", + "second", + "slowly", + "write", + "eat", + "smell", + "mouth", + "step", + "learn", + "three", + "floor", + "promise", + "breathe", + "darkness", + "push", + "earth", + "guess", + "save", + "song", + "above", + "along", + "both", + "color", + "house", + "almost", + "sorry", + "anymore", + "brother", + "okay", + "dear", + "game", + "fade", + "already", + "apart", + "warm", + "beauty", + "heard", + "notice", + "question", + "shine", + "began", + "piece", + "whole", + "shadow", + "secret", + "street", + "within", + "finger", + "point", + "morning", + "whisper", + "child", + "moon", + "green", + "story", + "glass", + "kid", + "silence", + "since", + "soft", + "yourself", + "empty", + "shall", + "angel", + "answer", + "baby", + "bright", + "dad", + "path", + "worry", + "hour", + "drop", + "follow", + "power", + "war", + "half", + "flow", + "heaven", + "act", + "chance", + "fact", + "least", + "tired", + "children", + "near", + "quite", + "afraid", + "rise", + "sea", + "taste", + "window", + "cover", + "nice", + "trust", + "lot", + "sad", + "cool", + "force", + "peace", + "return", + "blind", + "easy", + "ready", + "roll", + "rose", + "drive", + "held", + "music", + "beneath", + "hang", + "mom", + "paint", + "emotion", + "quiet", + "clear", + "cloud", + "few", + "pretty", + "bird", + "outside", + "paper", + "picture", + "front", + "rock", + "simple", + "anyone", + "meant", + "reality", + "road", + "sense", + "waste", + "bit", + "leaf", + "thank", + "happiness", + "meet", + "men", + "smoke", + "truly", + "decide", + "self", + "age", + "book", + "form", + "alive", + "carry", + "escape", + "damn", + "instead", + "able", + "ice", + "minute", + "throw", + "catch", + "leg", + "ring", + "course", + "goodbye", + "lead", + "poem", + "sick", + "corner", + "desire", + "known", + "problem", + "remind", + "shoulder", + "suppose", + "toward", + "wave", + "drink", + "jump", + "woman", + "pretend", + "sister", + "week", + "human", + "joy", + "crack", + "grey", + "pray", + "surprise", + "dry", + "knee", + "less", + "search", + "bleed", + "caught", + "clean", + "embrace", + "future", + "king", + "son", + "sorrow", + "chest", + "hug", + "remain", + "sat", + "worth", + "blow", + "daddy", + "final", + "parent", + "tight", + "also", + "create", + "lonely", + "safe", + "cross", + "dress", + "evil", + "silent", + "bone", + "fate", + "perhaps", + "anger", + "class", + "scar", + "snow", + "tiny", + "tonight", + "continue", + "control", + "dog", + "edge", + "mirror", + "month", + "suddenly", + "comfort", + "given", + "loud", + "quickly", + "gaze", + "plan", + "rush", + "stone", + "town", + "battle", + "ignore", + "spirit", + "stood", + "stupid", + "yours", + "brown", + "build", + "dust", + "hey", + "kept", + "pay", + "phone", + "twist", + "although", + "ball", + "beyond", + "hidden", + "nose", + "taken", + "fail", + "float", + "pure", + "somehow", + "wash", + "wrap", + "angry", + "cheek", + "creature", + "forgotten", + "heat", + "rip", + "single", + "space", + "special", + "weak", + "whatever", + "yell", + "anyway", + "blame", + "job", + "choose", + "country", + "curse", + "drift", + "echo", + "figure", + "grew", + "laughter", + "neck", + "suffer", + "worse", + "yeah", + "disappear", + "foot", + "forward", + "knife", + "mess", + "somewhere", + "stomach", + "storm", + "beg", + "idea", + "lift", + "offer", + "breeze", + "field", + "five", + "often", + "simply", + "stuck", + "win", + "allow", + "confuse", + "enjoy", + "except", + "flower", + "seek", + "strength", + "calm", + "grin", + "gun", + "heavy", + "hill", + "large", + "ocean", + "shoe", + "sigh", + "straight", + "summer", + "tongue", + "accept", + "crazy", + "everyday", + "exist", + "grass", + "mistake", + "sent", + "shut", + "surround", + "table", + "ache", + "brain", + "destroy", + "heal", + "nature", + "shout", + "sign", + "stain", + "choice", + "doubt", + "glance", + "glow", + "mountain", + "queen", + "stranger", + "throat", + "tomorrow", + "city", + "either", + "fish", + "flame", + "rather", + "shape", + "spin", + "spread", + "ash", + "distance", + "finish", + "image", + "imagine", + "important", + "nobody", + "shatter", + "warmth", + "became", + "feed", + "flesh", + "funny", + "lust", + "shirt", + "trouble", + "yellow", + "attention", + "bare", + "bite", + "money", + "protect", + "amaze", + "appear", + "born", + "choke", + "completely", + "daughter", + "fresh", + "friendship", + "gentle", + "probably", + "six", + "deserve", + "expect", + "grab", + "middle", + "nightmare", + "river", + "thousand", + "weight", + "worst", + "wound", + "barely", + "bottle", + "cream", + "regret", + "relationship", + "stick", + "test", + "crush", + "endless", + "fault", + "itself", + "rule", + "spill", + "art", + "circle", + "join", + "kick", + "mask", + "master", + "passion", + "quick", + "raise", + "smooth", + "unless", + "wander", + "actually", + "broke", + "chair", + "deal", + "favorite", + "gift", + "note", + "number", + "sweat", + "box", + "chill", + "clothes", + "lady", + "mark", + "park", + "poor", + "sadness", + "tie", + "animal", + "belong", + "brush", + "consume", + "dawn", + "forest", + "innocent", + "pen", + "pride", + "stream", + "thick", + "clay", + "complete", + "count", + "draw", + "faith", + "press", + "silver", + "struggle", + "surface", + "taught", + "teach", + "wet", + "bless", + "chase", + "climb", + "enter", + "letter", + "melt", + "metal", + "movie", + "stretch", + "swing", + "vision", + "wife", + "beside", + "crash", + "forgot", + "guide", + "haunt", + "joke", + "knock", + "plant", + "pour", + "prove", + "reveal", + "steal", + "stuff", + "trip", + "wood", + "wrist", + "bother", + "bottom", + "crawl", + "crowd", + "fix", + "forgive", + "frown", + "grace", + "loose", + "lucky", + "party", + "release", + "surely", + "survive", + "teacher", + "gently", + "grip", + "speed", + "suicide", + "travel", + "treat", + "vein", + "written", + "cage", + "chain", + "conversation", + "date", + "enemy", + "however", + "interest", + "million", + "page", + "pink", + "proud", + "sway", + "themselves", + "winter", + "church", + "cruel", + "cup", + "demon", + "experience", + "freedom", + "pair", + "pop", + "purpose", + "respect", + "shoot", + "softly", + "state", + "strange", + "bar", + "birth", + "curl", + "dirt", + "excuse", + "lord", + "lovely", + "monster", + "order", + "pack", + "pants", + "pool", + "scene", + "seven", + "shame", + "slide", + "ugly", + "among", + "blade", + "blonde", + "closet", + "creek", + "deny", + "drug", + "eternity", + "gain", + "grade", + "handle", + "key", + "linger", + "pale", + "prepare", + "swallow", + "swim", + "tremble", + "wheel", + "won", + "cast", + "cigarette", + "claim", + "college", + "direction", + "dirty", + "gather", + "ghost", + "hundred", + "loss", + "lung", + "orange", + "present", + "swear", + "swirl", + "twice", + "wild", + "bitter", + "blanket", + "doctor", + "everywhere", + "flash", + "grown", + "knowledge", + "numb", + "pressure", + "radio", + "repeat", + "ruin", + "spend", + "unknown", + "buy", + "clock", + "devil", + "early", + "false", + "fantasy", + "pound", + "precious", + "refuse", + "sheet", + "teeth", + "welcome", + "add", + "ahead", + "block", + "bury", + "caress", + "content", + "depth", + "despite", + "distant", + "marry", + "purple", + "threw", + "whenever", + "bomb", + "dull", + "easily", + "grasp", + "hospital", + "innocence", + "normal", + "receive", + "reply", + "rhyme", + "shade", + "someday", + "sword", + "toe", + "visit", + "asleep", + "bought", + "center", + "consider", + "flat", + "hero", + "history", + "ink", + "insane", + "muscle", + "mystery", + "pocket", + "reflection", + "shove", + "silently", + "smart", + "soldier", + "spot", + "stress", + "train", + "type", + "view", + "whether", + "bus", + "energy", + "explain", + "holy", + "hunger", + "inch", + "magic", + "mix", + "noise", + "nowhere", + "prayer", + "presence", + "shock", + "snap", + "spider", + "study", + "thunder", + "trail", + "admit", + "agree", + "bag", + "bang", + "bound", + "butterfly", + "cute", + "exactly", + "explode", + "familiar", + "fold", + "further", + "pierce", + "reflect", + "scent", + "selfish", + "sharp", + "sink", + "spring", + "stumble", + "universe", + "weep", + "women", + "wonderful", + "action", + "ancient", + "attempt", + "avoid", + "birthday", + "branch", + "chocolate", + "core", + "depress", + "drunk", + "especially", + "focus", + "fruit", + "honest", + "match", + "palm", + "perfectly", + "pillow", + "pity", + "poison", + "roar", + "shift", + "slightly", + "thump", + "truck", + "tune", + "twenty", + "unable", + "wipe", + "wrote", + "coat", + "constant", + "dinner", + "drove", + "egg", + "eternal", + "flight", + "flood", + "frame", + "freak", + "gasp", + "glad", + "hollow", + "motion", + "peer", + "plastic", + "root", + "screen", + "season", + "sting", + "strike", + "team", + "unlike", + "victim", + "volume", + "warn", + "weird", + "attack", + "await", + "awake", + "built", + "charm", + "crave", + "despair", + "fought", + "grant", + "grief", + "horse", + "limit", + "message", + "ripple", + "sanity", + "scatter", + "serve", + "split", + "string", + "trick", + "annoy", + "blur", + "boat", + "brave", + "clearly", + "cling", + "connect", + "fist", + "forth", + "imagination", + "iron", + "jock", + "judge", + "lesson", + "milk", + "misery", + "nail", + "naked", + "ourselves", + "poet", + "possible", + "princess", + "sail", + "size", + "snake", + "society", + "stroke", + "torture", + "toss", + "trace", + "wise", + "bloom", + "bullet", + "cell", + "check", + "cost", + "darling", + "during", + "footstep", + "fragile", + "hallway", + "hardly", + "horizon", + "invisible", + "journey", + "midnight", + "mud", + "nod", + "pause", + "relax", + "shiver", + "sudden", + "value", + "youth", + "abuse", + "admire", + "blink", + "breast", + "bruise", + "constantly", + "couple", + "creep", + "curve", + "difference", + "dumb", + "emptiness", + "gotta", + "honor", + "plain", + "planet", + "recall", + "rub", + "ship", + "slam", + "soar", + "somebody", + "tightly", + "weather", + "adore", + "approach", + "bond", + "bread", + "burst", + "candle", + "coffee", + "cousin", + "crime", + "desert", + "flutter", + "frozen", + "grand", + "heel", + "hello", + "language", + "level", + "movement", + "pleasure", + "powerful", + "random", + "rhythm", + "settle", + "silly", + "slap", + "sort", + "spoken", + "steel", + "threaten", + "tumble", + "upset", + "aside", + "awkward", + "bee", + "blank", + "board", + "button", + "card", + "carefully", + "complain", + "crap", + "deeply", + "discover", + "drag", + "dread", + "effort", + "entire", + "fairy", + "giant", + "gotten", + "greet", + "illusion", + "jeans", + "leap", + "liquid", + "march", + "mend", + "nervous", + "nine", + "replace", + "rope", + "spine", + "stole", + "terror", + "accident", + "apple", + "balance", + "boom", + "childhood", + "collect", + "demand", + "depression", + "eventually", + "faint", + "glare", + "goal", + "group", + "honey", + "kitchen", + "laid", + "limb", + "machine", + "mere", + "mold", + "murder", + "nerve", + "painful", + "poetry", + "prince", + "rabbit", + "shelter", + "shore", + "shower", + "soothe", + "stair", + "steady", + "sunlight", + "tangle", + "tease", + "treasure", + "uncle", + "begun", + "bliss", + "canvas", + "cheer", + "claw", + "clutch", + "commit", + "crimson", + "crystal", + "delight", + "doll", + "existence", + "express", + "fog", + "football", + "gay", + "goose", + "guard", + "hatred", + "illuminate", + "mass", + "math", + "mourn", + "rich", + "rough", + "skip", + "stir", + "student", + "style", + "support", + "thorn", + "tough", + "yard", + "yearn", + "yesterday", + "advice", + "appreciate", + "autumn", + "bank", + "beam", + "bowl", + "capture", + "carve", + "collapse", + "confusion", + "creation", + "dove", + "feather", + "girlfriend", + "glory", + "government", + "harsh", + "hop", + "inner", + "loser", + "moonlight", + "neighbor", + "neither", + "peach", + "pig", + "praise", + "screw", + "shield", + "shimmer", + "sneak", + "stab", + "subject", + "throughout", + "thrown", + "tower", + "twirl", + "wow", + "army", + "arrive", + "bathroom", + "bump", + "cease", + "cookie", + "couch", + "courage", + "dim", + "guilt", + "howl", + "hum", + "husband", + "insult", + "led", + "lunch", + "mock", + "mostly", + "natural", + "nearly", + "needle", + "nerd", + "peaceful", + "perfection", + "pile", + "price", + "remove", + "roam", + "sanctuary", + "serious", + "shiny", + "shook", + "sob", + "stolen", + "tap", + "vain", + "void", + "warrior", + "wrinkle", + "affection", + "apologize", + "blossom", + "bounce", + "bridge", + "cheap", + "crumble", + "decision", + "descend", + "desperately", + "dig", + "dot", + "flip", + "frighten", + "heartbeat", + "huge", + "lazy", + "lick", + "odd", + "opinion", + "process", + "puzzle", + "quietly", + "retreat", + "score", + "sentence", + "separate", + "situation", + "skill", + "soak", + "square", + "stray", + "taint", + "task", + "tide", + "underneath", + "veil", + "whistle", + "anywhere", + "bedroom", + "bid", + "bloody", + "burden", + "careful", + "compare", + "concern", + "curtain", + "decay", + "defeat", + "describe", + "double", + "dreamer", + "driver", + "dwell", + "evening", + "flare", + "flicker", + "grandma", + "guitar", + "harm", + "horrible", + "hungry", + "indeed", + "lace", + "melody", + "monkey", + "nation", + "object", + "obviously", + "rainbow", + "salt", + "scratch", + "shown", + "shy", + "stage", + "stun", + "third", + "tickle", + "useless", + "weakness", + "worship", + "worthless", + "afternoon", + "beard", + "boyfriend", + "bubble", + "busy", + "certain", + "chin", + "concrete", + "desk", + "diamond", + "doom", + "drawn", + "due", + "felicity", + "freeze", + "frost", + "garden", + "glide", + "harmony", + "hopefully", + "hunt", + "jealous", + "lightning", + "mama", + "mercy", + "peel", + "physical", + "position", + "pulse", + "punch", + "quit", + "rant", + "respond", + "salty", + "sane", + "satisfy", + "savior", + "sheep", + "slept", + "social", + "sport", + "tuck", + "utter", + "valley", + "wolf", + "aim", + "alas", + "alter", + "arrow", + "awaken", + "beaten", + "belief", + "brand", + "ceiling", + "cheese", + "clue", + "confidence", + "connection", + "daily", + "disguise", + "eager", + "erase", + "essence", + "everytime", + "expression", + "fan", + "flag", + "flirt", + "foul", + "fur", + "giggle", + "glorious", + "ignorance", + "law", + "lifeless", + "measure", + "mighty", + "muse", + "north", + "opposite", + "paradise", + "patience", + "patient", + "pencil", + "petal", + "plate", + "ponder", + "possibly", + "practice", + "slice", + "spell", + "stock", + "strife", + "strip", + "suffocate", + "suit", + "tender", + "tool", + "trade", + "velvet", + "verse", + "waist", + "witch", + "aunt", + "bench", + "bold", + "cap", + "certainly", + "click", + "companion", + "creator", + "dart", + "delicate", + "determine", + "dish", + "dragon", + "drama", + "drum", + "dude", + "everybody", + "feast", + "forehead", + "former", + "fright", + "fully", + "gas", + "hook", + "hurl", + "invite", + "juice", + "manage", + "moral", + "possess", + "raw", + "rebel", + "royal", + "scale", + "scary", + "several", + "slight", + "stubborn", + "swell", + "talent", + "tea", + "terrible", + "thread", + "torment", + "trickle", + "usually", + "vast", + "violence", + "weave", + "acid", + "agony", + "ashamed", + "awe", + "belly", + "blend", + "blush", + "character", + "cheat", + "common", + "company", + "coward", + "creak", + "danger", + "deadly", + "defense", + "define", + "depend", + "desperate", + "destination", + "dew", + "duck", + "dusty", + "embarrass", + "engine", + "example", + "explore", + "foe", + "freely", + "frustrate", + "generation", + "glove", + "guilty", + "health", + "hurry", + "idiot", + "impossible", + "inhale", + "jaw", + "kingdom", + "mention", + "mist", + "moan", + "mumble", + "mutter", + "observe", + "ode", + "pathetic", + "pattern", + "pie", + "prefer", + "puff", + "rape", + "rare", + "revenge", + "rude", + "scrape", + "spiral", + "squeeze", + "strain", + "sunset", + "suspend", + "sympathy", + "thigh", + "throne", + "total", + "unseen", + "weapon", + "weary", +} diff --git a/crypto/randentropy/rand_entropy.go b/crypto/randentropy/rand_entropy.go index 0c2e3c051d..1282974fb4 100644 --- a/crypto/randentropy/rand_entropy.go +++ b/crypto/randentropy/rand_entropy.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package randentropy @@ -20,7 +20,7 @@ import ( crand "crypto/rand" "io" - "github.com/ethereum/go-ethereum/crypto/sha3" + "github.com/expanse-project/go-expanse/crypto/sha3" ) var Reader io.Reader = &randEntropy{} diff --git a/crypto/secp256k1/notes.go b/crypto/secp256k1/notes.go index 93e6d1902f..2834cc3562 100644 --- a/crypto/secp256k1/notes.go +++ b/crypto/secp256k1/notes.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package secp256k1 diff --git a/crypto/secp256k1/secp256.go b/crypto/secp256k1/secp256.go index 7baa456bff..b7aa97b5ec 100644 --- a/crypto/secp256k1/secp256.go +++ b/crypto/secp256k1/secp256.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package secp256k1 @@ -42,7 +42,7 @@ import ( "errors" "unsafe" - "github.com/ethereum/go-ethereum/crypto/randentropy" + "github.com/expanse-project/go-expanse/crypto/randentropy" ) //#define USE_FIELD_5X64 diff --git a/crypto/secp256k1/secp256_test.go b/crypto/secp256k1/secp256_test.go index deeec98d50..48c5a4bc0d 100644 --- a/crypto/secp256k1/secp256_test.go +++ b/crypto/secp256k1/secp256_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package secp256k1 @@ -22,7 +22,7 @@ import ( "log" "testing" - "github.com/ethereum/go-ethereum/crypto/randentropy" + "github.com/expanse-project/go-expanse/crypto/randentropy" ) const TESTS = 10000 // how many tests diff --git a/docker/Dockerfile b/docker/Dockerfile index b608e4ab6d..b31368c291 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -11,12 +11,12 @@ RUN apt-get dist-upgrade -q -y # Let our containers upgrade themselves RUN apt-get install -q -y unattended-upgrades -# Install Ethereum +# Install Expanse RUN apt-get install -q -y software-properties-common -RUN add-apt-repository ppa:ethereum/ethereum -RUN add-apt-repository ppa:ethereum/ethereum-dev +RUN add-apt-repository ppa:expanse/expanse +RUN add-apt-repository ppa:expanse/expanse-dev RUN apt-get update -RUN apt-get install -q -y geth +RUN apt-get install -q -y gexp # Install supervisor RUN apt-get install -q -y supervisor @@ -24,8 +24,8 @@ RUN apt-get install -q -y supervisor # Add supervisor configs ADD supervisord.conf supervisord.conf -EXPOSE 8545 -EXPOSE 30303 +EXPOSE 9656 +EXPOSE 60606 CMD ["-n", "-c", "/supervisord.conf"] ENTRYPOINT ["/usr/bin/supervisord"] diff --git a/docker/supervisord.conf b/docker/supervisord.conf index 33cba0c140..d5d1da6fd4 100644 --- a/docker/supervisord.conf +++ b/docker/supervisord.conf @@ -1,17 +1,17 @@ [supervisord] nodaemon=false -[program:geth] +[program:gexp] priority=30 directory=/ -command=geth --rpc +command=gexp --rpc user=root autostart=true autorestart=true startsecs=10 stopsignal=QUIT -stdout_logfile=/var/log/geth.log -stderr_logfile=/var/log/geth.err +stdout_logfile=/var/log/gexp.log +stderr_logfile=/var/log/gexp.err [unix_http_server] file=%(here)s/supervisor.sock diff --git a/errs/errors.go b/errs/errors.go index 675649efa2..f77aa96cb0 100644 --- a/errs/errors.go +++ b/errs/errors.go @@ -1,26 +1,26 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package errs import ( "fmt" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" ) /* diff --git a/errs/errors_test.go b/errs/errors_test.go index d6d14b45ea..7f22ea15c4 100644 --- a/errs/errors_test.go +++ b/errs/errors_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package errs @@ -20,7 +20,7 @@ import ( "fmt" "testing" - "github.com/ethereum/go-ethereum/logger" + "github.com/expanse-project/go-expanse/logger" ) func testErrors() *Errors { diff --git a/eth/backend.go b/eth/backend.go index 2b21a7c960..e1982794ec 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -1,21 +1,21 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -// Package eth implements the Ethereum protocol. -package eth +// Package exp implements the Expanse protocol. +package exp import ( "crypto/ecdsa" @@ -61,11 +61,10 @@ var ( defaultBootNodes = []*discover.Node{ // ETH/DEV Go Bootnodes - discover.MustParseNode("enode://a979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3331163c@52.16.188.185:30303"), // IE - discover.MustParseNode("enode://de471bccee3d042261d52e9bff31458daecc406142b401d4cd848f677479f73104b9fdeb090af9583d3391b7f10cb2ba9e26865dd5fca4fcdc0fb1e3b723c786@54.94.239.50:30303"), // BR - discover.MustParseNode("enode://1118980bf48b0a3640bdba04e0fe78b1add18e1cd99bf22d53daac1fd9972ad650df52176e7c7d89d1114cfef2bc23a2959aa54998a46afcf7d91809f0855082@52.74.57.123:30303"), // SG - // ETH/DEV cpp-ethereum (poc-9.ethdev.com) - discover.MustParseNode("enode://979b7fa28feeb35a4741660a16076f1943202cb72b6af70d327f053e248bab9ba81760f39d0701ef1d8f89cc1fbd2cacba0710a12cd5314d5e0c9021aa3637f9@5.1.83.226:30303"), + discover.MustParseNode("enode://a979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3331163c@52.16.188.185:60606"), + discover.MustParseNode("enode://de471bccee3d042261d52e9bff31458daecc406142b401d4cd848f677479f73104b9fdeb090af9583d3391b7f10cb2ba9e26865dd5fca4fcdc0fb1e3b723c786@54.94.239.50:60606"), + // ETH/DEV cpp-expanse (poc-9.ethdev.com) + discover.MustParseNode("enode://487611428e6c99a11a9795a6abe7b529e81315ca6aad66e2a2fc76e3adf263faba0d35466c2f8f68d561dbefa8878d4df5f1f2ddb1fbeab7f42ffb8cd328bd4a@5.1.83.226:60606"), } staticNodes = "static-nodes.json" // Path within to search for the static node list @@ -202,8 +201,8 @@ func (cfg *Config) nodeKey() (*ecdsa.PrivateKey, error) { return key, nil } -type Ethereum struct { - // Channel for shutting down the ethereum +type Expanse struct { + // Channel for shutting down the expanse shutdownChan chan bool // DB interfaces @@ -251,7 +250,7 @@ type Ethereum struct { shhVersionId int } -func New(config *Config) (*Ethereum, error) { +func New(config *Config) (*Expanse, error) { // Bootstrap database logger.New(config.DataDir, config.LogFile, config.Verbosity) if len(config.LogJSON) > 0 { @@ -321,13 +320,13 @@ func New(config *Config) (*Ethereum, error) { b, _ := chainDb.Get([]byte("BlockchainVersion")) bcVersion := int(common.NewValue(b).Uint()) if bcVersion != config.BlockChainVersion && bcVersion != 0 { - return nil, fmt.Errorf("Blockchain DB version mismatch (%d / %d). Run geth upgradedb.\n", bcVersion, config.BlockChainVersion) + return nil, fmt.Errorf("Blockchain DB version mismatch (%d / %d). Run gexp upgradedb.\n", bcVersion, config.BlockChainVersion) } saveBlockchainVersion(chainDb, config.BlockChainVersion) } glog.V(logger.Info).Infof("Blockchain DB Version: %d", config.BlockChainVersion) - eth := &Ethereum{ + exp := &Expanse{ shutdownChan: make(chan bool), databasesClosed: make(chan bool), chainDb: chainDb, @@ -353,15 +352,15 @@ func New(config *Config) (*Ethereum, error) { if config.PowTest { glog.V(logger.Info).Infof("ethash used in test mode") - eth.pow, err = ethash.NewForTesting() + exp.pow, err = ethash.NewForTesting() if err != nil { return nil, err } } else { - eth.pow = ethash.New() + exp.pow = ethash.New() } //genesis := core.GenesisBlock(uint64(config.GenesisNonce), stateDb) - eth.chainManager, err = core.NewChainManager(chainDb, eth.pow, eth.EventMux()) + exp.chainManager, err = core.NewChainManager(chainDb, exp.pow, exp.EventMux()) if err != nil { if err == core.ErrNoGenesis { return nil, fmt.Errorf(`Genesis block not found. Please supply a genesis block with the "--genesis /path/to/file" argument`) @@ -369,30 +368,31 @@ func New(config *Config) (*Ethereum, error) { return nil, err } - eth.txPool = core.NewTxPool(eth.EventMux(), eth.chainManager.State, eth.chainManager.GasLimit) + exp.txPool = core.NewTxPool(exp.EventMux(), exp.chainManager.State, exp.chainManager.GasLimit) - eth.blockProcessor = core.NewBlockProcessor(chainDb, eth.pow, eth.chainManager, eth.EventMux()) - eth.chainManager.SetProcessor(eth.blockProcessor) - eth.protocolManager = NewProtocolManager(config.NetworkId, eth.eventMux, eth.txPool, eth.pow, eth.chainManager) +<<<<<<< HEAD + exp.blockProcessor = core.NewBlockProcessor(chainDb, exp.pow, exp.chainManager, exp.EventMux()) + exp.chainManager.SetProcessor(exp.blockProcessor) + exp.protocolManager = NewProtocolManager(config.NetworkId, exp.eventMux, eth.txPool, exp.pow, exp.chainManager) eth.miner = miner.New(eth, eth.EventMux(), eth.pow) eth.miner.SetGasPrice(config.GasPrice) eth.miner.SetExtra(config.ExtraData) if config.Shh { - eth.whisper = whisper.New() - eth.shhVersionId = int(eth.whisper.Version()) + exp.whisper = whisper.New() + exp.shhVersionId = int(exp.whisper.Version()) } netprv, err := config.nodeKey() if err != nil { return nil, err } - protocols := append([]p2p.Protocol{}, eth.protocolManager.SubProtocols...) + protocols := append([]p2p.Protocol{}, exp.protocolManager.SubProtocols...) if config.Shh { - protocols = append(protocols, eth.whisper.Protocol()) + protocols = append(protocols, exp.whisper.Protocol()) } - eth.net = &p2p.Server{ + exp.net = &p2p.Server{ PrivateKey: netprv, Name: config.Name, MaxPeers: config.MaxPeers, @@ -407,12 +407,12 @@ func New(config *Config) (*Ethereum, error) { NodeDatabase: nodeDb, } if len(config.Port) > 0 { - eth.net.ListenAddr = ":" + config.Port + exp.net.ListenAddr = ":" + config.Port } vm.Debug = config.VmDebug - return eth, nil + return exp, nil } type NodeInfo struct { @@ -426,7 +426,7 @@ type NodeInfo struct { ListenAddr string } -func (s *Ethereum) NodeInfo() *NodeInfo { +func (s *Expanse) NodeInfo() *NodeInfo { node := s.net.Self() return &NodeInfo{ @@ -464,7 +464,7 @@ func newPeerInfo(peer *p2p.Peer) *PeerInfo { } // PeersInfo returns an array of PeerInfo objects describing connected peers -func (s *Ethereum) PeersInfo() (peersinfo []*PeerInfo) { +func (s *Expanse) PeersInfo() (peersinfo []*PeerInfo) { for _, peer := range s.net.Peers() { if peer != nil { peersinfo = append(peersinfo, newPeerInfo(peer)) @@ -473,11 +473,11 @@ func (s *Ethereum) PeersInfo() (peersinfo []*PeerInfo) { return } -func (s *Ethereum) ResetWithGenesisBlock(gb *types.Block) { +func (s *Expanse) ResetWithGenesisBlock(gb *types.Block) { s.chainManager.ResetWithGenesisBlock(gb) } -func (s *Ethereum) StartMining(threads int) error { +func (s *Expanse) StartMining(threads int) error { eb, err := s.Etherbase() if err != nil { err = fmt.Errorf("Cannot start mining without etherbase address: %v", err) @@ -489,7 +489,7 @@ func (s *Ethereum) StartMining(threads int) error { return nil } -func (s *Ethereum) Etherbase() (eb common.Address, err error) { +func (s *Expanse) Etherbase() (eb common.Address, err error) { eb = s.etherbase if (eb == common.Address{}) { addr, e := s.AccountManager().AddressByIndex(0) @@ -502,37 +502,37 @@ func (s *Ethereum) Etherbase() (eb common.Address, err error) { } // set in js console via admin interface or wrapper from cli flags -func (self *Ethereum) SetEtherbase(etherbase common.Address) { +func (self *Expanse) SetEtherbase(etherbase common.Address) { self.etherbase = etherbase self.miner.SetEtherbase(etherbase) } -func (s *Ethereum) StopMining() { s.miner.Stop() } -func (s *Ethereum) IsMining() bool { return s.miner.Mining() } -func (s *Ethereum) Miner() *miner.Miner { return s.miner } +func (s *Expanse) StopMining() { s.miner.Stop() } +func (s *Expanse) IsMining() bool { return s.miner.Mining() } +func (s *Expanse) Miner() *miner.Miner { return s.miner } -// func (s *Ethereum) Logger() logger.LogSystem { return s.logger } -func (s *Ethereum) Name() string { return s.net.Name } -func (s *Ethereum) AccountManager() *accounts.Manager { return s.accountManager } -func (s *Ethereum) ChainManager() *core.ChainManager { return s.chainManager } -func (s *Ethereum) BlockProcessor() *core.BlockProcessor { return s.blockProcessor } -func (s *Ethereum) TxPool() *core.TxPool { return s.txPool } -func (s *Ethereum) Whisper() *whisper.Whisper { return s.whisper } -func (s *Ethereum) EventMux() *event.TypeMux { return s.eventMux } -func (s *Ethereum) ChainDb() common.Database { return s.chainDb } -func (s *Ethereum) DappDb() common.Database { return s.dappDb } -func (s *Ethereum) IsListening() bool { return true } // Always listening -func (s *Ethereum) PeerCount() int { return s.net.PeerCount() } -func (s *Ethereum) Peers() []*p2p.Peer { return s.net.Peers() } -func (s *Ethereum) MaxPeers() int { return s.net.MaxPeers } -func (s *Ethereum) ClientVersion() string { return s.clientVersion } -func (s *Ethereum) EthVersion() int { return int(s.protocolManager.SubProtocols[0].Version) } -func (s *Ethereum) NetVersion() int { return s.netVersionId } -func (s *Ethereum) ShhVersion() int { return s.shhVersionId } -func (s *Ethereum) Downloader() *downloader.Downloader { return s.protocolManager.downloader } +// func (s *Expanse) Logger() logger.LogSystem { return s.logger } +func (s *Expanse) Name() string { return s.net.Name } +func (s *Expanse) AccountManager() *accounts.Manager { return s.accountManager } +func (s *Expanse) ChainManager() *core.ChainManager { return s.chainManager } +func (s *Expanse) BlockProcessor() *core.BlockProcessor { return s.blockProcessor } +func (s *Expanse) TxPool() *core.TxPool { return s.txPool } +func (s *Expanse) Whisper() *whisper.Whisper { return s.whisper } +func (s *Expanse) EventMux() *event.TypeMux { return s.eventMux } +func (s *Expanse) ChainDb() common.Database { return s.chainDb } +func (s *Expanse) DappDb() common.Database { return s.dappDb } +func (s *Expanse) IsListening() bool { return true } // Always listening +func (s *Expanse) PeerCount() int { return s.net.PeerCount() } +func (s *Expanse) Peers() []*p2p.Peer { return s.net.Peers() } +func (s *Expanse) MaxPeers() int { return s.net.MaxPeers } +func (s *Expanse) ClientVersion() string { return s.clientVersion } +func (s *Expanse) EthVersion() int { return int(s.protocolManager.SubProtocols[0].Version) } +func (s *Expanse) NetVersion() int { return s.netVersionId } +func (s *Expanse) ShhVersion() int { return s.shhVersionId } +func (s *Expanse) Downloader() *downloader.Downloader { return s.protocolManager.downloader } // Start the ethereum -func (s *Ethereum) Start() error { +func (s *Expanse) Start() error { jsonlogger.LogJson(&logger.LogStarting{ ClientString: s.net.Name, ProtocolVersion: s.EthVersion(), @@ -560,7 +560,7 @@ func (s *Ethereum) Start() error { // sync databases every minute. If flushing fails we exit immediatly. The system // may not continue under any circumstances. -func (s *Ethereum) syncDatabases() { +func (s *Expanse) syncDatabases() { ticker := time.NewTicker(1 * time.Minute) done: for { @@ -584,7 +584,7 @@ done: close(s.databasesClosed) } -func (s *Ethereum) StartForTest() { +func (s *Expanse) StartForTest() { jsonlogger.LogJson(&logger.LogStarting{ ClientString: s.net.Name, ProtocolVersion: s.EthVersion(), @@ -594,7 +594,7 @@ func (s *Ethereum) StartForTest() { // AddPeer connects to the given node and maintains the connection until the // server is shut down. If the connection fails for any reason, the server will // attempt to reconnect the peer. -func (self *Ethereum) AddPeer(nodeURL string) error { +func (self *Expanse) AddPeer(nodeURL string) error { n, err := discover.ParseNode(nodeURL) if err != nil { return fmt.Errorf("invalid node URL: %v", err) @@ -603,7 +603,7 @@ func (self *Ethereum) AddPeer(nodeURL string) error { return nil } -func (s *Ethereum) Stop() { +func (s *Expanse) Stop() { s.net.Stop() s.chainManager.Stop() s.protocolManager.Stop() @@ -618,7 +618,7 @@ func (s *Ethereum) Stop() { } // This function will wait for a shutdown and resumes main thread execution -func (s *Ethereum) WaitForShutdown() { +func (s *Expanse) WaitForShutdown() { <-s.databasesClosed <-s.shutdownChan } @@ -632,7 +632,7 @@ func (s *Ethereum) WaitForShutdown() { // stop any number of times. // For any more sophisticated pattern of DAG generation, use CLI subcommand // makedag -func (self *Ethereum) StartAutoDAG() { +func (self *Expanse) StartAutoDAG() { if self.autodagquit != nil { return // already started } @@ -678,7 +678,7 @@ func (self *Ethereum) StartAutoDAG() { } // stopAutoDAG stops automatic DAG pregeneration by quitting the loop -func (self *Ethereum) StopAutoDAG() { +func (self *Expanse) StopAutoDAG() { if self.autodagquit != nil { close(self.autodagquit) self.autodagquit = nil diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index e3e22a7848..bca84cc182 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Package downloader contains the manual full chain synchronisation. package downloader @@ -27,12 +27,12 @@ import ( "sync/atomic" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/event" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" "gopkg.in/fatih/set.v0" ) @@ -319,10 +319,10 @@ func (d *Downloader) syncWithPeer(p *peer, hash common.Hash, td *big.Int) (err e } }() - glog.V(logger.Debug).Infof("Synchronizing with the network using: %s, eth/%d", p.id, p.version) + glog.V(logger.Debug).Infof("Synchronizing with the network using: %s, exp/%d", p.id, p.version) switch p.version { case eth60: - // Old eth/60 version, use reverse hash retrieval algorithm + // Old exp/60 version, use reverse hash retrieval algorithm if err = d.fetchHashes60(p, hash); err != nil { return err } @@ -330,7 +330,7 @@ func (d *Downloader) syncWithPeer(p *peer, hash common.Hash, td *big.Int) (err e return err } case eth61: - // New eth/61, use forward, concurrent hash and block retrieval algorithm + // New exp/61, use forward, concurrent hash and block retrieval algorithm number, err := d.findAncestor(p) if err != nil { return err @@ -349,7 +349,7 @@ func (d *Downloader) syncWithPeer(p *peer, hash common.Hash, td *big.Int) (err e default: // Something very wrong, stop right here - glog.V(logger.Error).Infof("Unsupported eth protocol: %d", p.version) + glog.V(logger.Error).Infof("Unsupported exp protocol: %d", p.version) return errBadPeer } glog.V(logger.Debug).Infoln("Synchronization completed") diff --git a/eth/downloader/downloader_test.go b/eth/downloader/downloader_test.go index 61fc7827b6..5b4cb7d994 100644 --- a/eth/downloader/downloader_test.go +++ b/eth/downloader/downloader_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package downloader @@ -25,11 +25,11 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/event" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/event" ) var ( @@ -215,7 +215,7 @@ func (dl *downloadTester) peerGetRelHashesFn(id string, delay time.Duration) fun // a particular peer in the download tester. The returned function can be used to // retrieve batches of hashes from the particularly requested peer. func (dl *downloadTester) peerGetAbsHashesFn(id string, version int, delay time.Duration) func(uint64, int) error { - // If the simulated peer runs eth/60, this message is not supported + // If the simulated peer runs exp/60, this message is not supported if version == eth60 { return func(uint64, int) error { return nil } } diff --git a/eth/downloader/events.go b/eth/downloader/events.go index 64905b8f2a..8bd052ec91 100644 --- a/eth/downloader/events.go +++ b/eth/downloader/events.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package downloader diff --git a/eth/downloader/peer.go b/eth/downloader/peer.go index 4273b91682..0d23233efe 100644 --- a/eth/downloader/peer.go +++ b/eth/downloader/peer.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Contains the active peer-set of the downloader, maintaining both failures // as well as reputation metrics to prioritize the block retrievals. @@ -27,7 +27,7 @@ import ( "sync/atomic" "time" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" "gopkg.in/fatih/set.v0" ) @@ -58,7 +58,7 @@ type peer struct { getAbsHashes absoluteHashFetcherFn // Method to retrieve a batch of hashes from an absolute position getBlocks blockFetcherFn // Method to retrieve a batch of blocks - version int // Eth protocol version number to switch strategies + version int // Exp protocol version number to switch strategies } // newPeer create a new downloader peer, with specific hash and block retrieval diff --git a/eth/downloader/queue.go b/eth/downloader/queue.go index 96e08e1440..e35df3eb31 100644 --- a/eth/downloader/queue.go +++ b/eth/downloader/queue.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Contains the block download scheduler to collect download tasks and schedule // them in an ordered, and throttled way. @@ -25,10 +25,10 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" "gopkg.in/karalabe/cookiejar.v2/collections/prque" ) diff --git a/eth/fetcher/fetcher.go b/eth/fetcher/fetcher.go index 55b6c5c1c5..77fdd4c9f6 100644 --- a/eth/fetcher/fetcher.go +++ b/eth/fetcher/fetcher.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Package fetcher contains the block announcement based synchonisation. package fetcher @@ -23,11 +23,11 @@ import ( "math/rand" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" "gopkg.in/karalabe/cookiejar.v2/collections/prque" ) diff --git a/eth/fetcher/fetcher_test.go b/eth/fetcher/fetcher_test.go index ecbb3f868c..b994206180 100644 --- a/eth/fetcher/fetcher_test.go +++ b/eth/fetcher/fetcher_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package fetcher @@ -24,11 +24,11 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/params" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/params" ) var ( diff --git a/eth/fetcher/metrics.go b/eth/fetcher/metrics.go index 76cc492269..7bb8cd5c4b 100644 --- a/eth/fetcher/metrics.go +++ b/eth/fetcher/metrics.go @@ -1,32 +1,32 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Contains the metrics collected by the fetcher. package fetcher import ( - "github.com/ethereum/go-ethereum/metrics" + "github.com/expanse-project/go-expanse/metrics" ) var ( - announceMeter = metrics.NewMeter("eth/sync/RemoteAnnounces") - announceTimer = metrics.NewTimer("eth/sync/LocalAnnounces") - broadcastMeter = metrics.NewMeter("eth/sync/RemoteBroadcasts") - broadcastTimer = metrics.NewTimer("eth/sync/LocalBroadcasts") - discardMeter = metrics.NewMeter("eth/sync/DiscardedBlocks") - futureMeter = metrics.NewMeter("eth/sync/FutureBlocks") + announceMeter = metrics.NewMeter("exp/sync/RemoteAnnounces") + announceTimer = metrics.NewTimer("exp/sync/LocalAnnounces") + broadcastMeter = metrics.NewMeter("exp/sync/RemoteBroadcasts") + broadcastTimer = metrics.NewTimer("exp/sync/LocalBroadcasts") + discardMeter = metrics.NewMeter("exp/sync/DiscardedBlocks") + futureMeter = metrics.NewMeter("exp/sync/FutureBlocks") ) diff --git a/eth/gasprice.go b/eth/gasprice.go index 3caad73c6c..d3a2185410 100644 --- a/eth/gasprice.go +++ b/eth/gasprice.go @@ -1,31 +1,31 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -package eth +package exp import ( "math/big" "math/rand" "sync" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/event" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" ) const gpoProcessPastBlocks = 100 @@ -35,7 +35,7 @@ type blockPriceInfo struct { } type GasPriceOracle struct { - eth *Ethereum + exp *Expanse chain *core.ChainManager events event.Subscription blocks map[uint64]*blockPriceInfo @@ -44,12 +44,12 @@ type GasPriceOracle struct { lastBase, minBase *big.Int } -func NewGasPriceOracle(eth *Ethereum) (self *GasPriceOracle) { +func NewGasPriceOracle(exp *Expanse) (self *GasPriceOracle) { self = &GasPriceOracle{} self.blocks = make(map[uint64]*blockPriceInfo) - self.eth = eth - self.chain = eth.chainManager - self.events = eth.EventMux().Subscribe( + self.exp = exp + self.chain = exp.chainManager + self.events = exp.EventMux().Subscribe( core.ChainEvent{}, core.ChainSplitEvent{}, ) @@ -105,7 +105,7 @@ func (self *GasPriceOracle) processBlock(block *types.Block) { self.lastProcessed = i } - lastBase := self.eth.GpoMinGasPrice + lastBase := self.exp.GpoMinGasPrice bpl := self.blocks[i-1] if bpl != nil { lastBase = bpl.baseGasPrice @@ -121,9 +121,9 @@ func (self *GasPriceOracle) processBlock(block *types.Block) { } if lastBase.Cmp(lp) < 0 { - corr = self.eth.GpobaseStepUp + corr = self.exp.GpobaseStepUp } else { - corr = -self.eth.GpobaseStepDown + corr = -self.exp.GpobaseStepDown } crand := int64(corr * (900 + rand.Intn(201))) @@ -151,7 +151,7 @@ func (self *GasPriceOracle) processBlock(block *types.Block) { func (self *GasPriceOracle) lowestPrice(block *types.Block) *big.Int { gasUsed := big.NewInt(0) - receipts := self.eth.BlockProcessor().GetBlockReceipts(block.Hash()) + receipts := self.exp.BlockProcessor().GetBlockReceipts(block.Hash()) if len(receipts) > 0 { if cgu := receipts[len(receipts)-1].CumulativeGasUsed; cgu != nil { gasUsed = receipts[len(receipts)-1].CumulativeGasUsed @@ -159,7 +159,7 @@ func (self *GasPriceOracle) lowestPrice(block *types.Block) *big.Int { } if new(big.Int).Mul(gasUsed, big.NewInt(100)).Cmp(new(big.Int).Mul(block.GasLimit(), - big.NewInt(int64(self.eth.GpoFullBlockRatio)))) < 0 { + big.NewInt(int64(self.exp.GpoFullBlockRatio)))) < 0 { // block is not full, could have posted a tx with MinGasPrice return big.NewInt(0) } @@ -185,21 +185,21 @@ func (self *GasPriceOracle) SuggestPrice() *big.Int { self.lastBaseMutex.Unlock() if base == nil { - base = self.eth.GpoMinGasPrice + base = self.exp.GpoMinGasPrice } if base == nil { return big.NewInt(10000000000000) // apparently MinGasPrice is not initialized during some tests } - baseCorr := new(big.Int).Mul(base, big.NewInt(int64(self.eth.GpobaseCorrectionFactor))) + baseCorr := new(big.Int).Mul(base, big.NewInt(int64(self.exp.GpobaseCorrectionFactor))) baseCorr.Div(baseCorr, big.NewInt(100)) - if baseCorr.Cmp(self.eth.GpoMinGasPrice) < 0 { - return self.eth.GpoMinGasPrice + if baseCorr.Cmp(self.exp.GpoMinGasPrice) < 0 { + return self.exp.GpoMinGasPrice } - if baseCorr.Cmp(self.eth.GpoMaxGasPrice) > 0 { - return self.eth.GpoMaxGasPrice + if baseCorr.Cmp(self.exp.GpoMaxGasPrice) > 0 { + return self.exp.GpoMaxGasPrice } return baseCorr diff --git a/eth/handler.go b/eth/handler.go index 4f3d1f34cf..19826a12c1 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -1,20 +1,20 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -package eth +package exp import ( "fmt" @@ -23,17 +23,17 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/eth/downloader" - "github.com/ethereum/go-ethereum/eth/fetcher" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/pow" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/exp/downloader" + "github.com/expanse-project/go-expanse/exp/fetcher" + "github.com/expanse-project/go-expanse/event" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/p2p" + "github.com/expanse-project/go-expanse/pow" + "github.com/expanse-project/go-expanse/rlp" ) // This is the target maximum size of returned blocks for the @@ -83,8 +83,8 @@ type ProtocolManager struct { quit bool } -// NewProtocolManager returns a new ethereum sub protocol manager. The Ethereum sub protocol manages peers capable -// with the ethereum network. +// NewProtocolManager returns a new expanse sub protocol manager. The Expanse sub protocol manages peers capable +// with the expanse network. func NewProtocolManager(networkId int, mux *event.TypeMux, txpool txPool, pow pow.PoW, chainman *core.ChainManager) *ProtocolManager { // Create the protocol manager with the base fields manager := &ProtocolManager{ @@ -103,7 +103,7 @@ func NewProtocolManager(networkId int, mux *event.TypeMux, txpool txPool, pow po version := ProtocolVersions[i] manager.SubProtocols[i] = p2p.Protocol{ - Name: "eth", + Name: "exp", Version: version, Length: ProtocolLengths[i], Run: func(p *p2p.Peer, rw p2p.MsgReadWriter) error { @@ -135,7 +135,7 @@ func (pm *ProtocolManager) removePeer(id string) { } glog.V(logger.Debug).Infoln("Removing peer", id) - // Unregister the peer from the downloader and Ethereum peer set + // Unregister the peer from the downloader and Expanse peer set pm.downloader.UnregisterPeer(id) if err := pm.peers.Unregister(id); err != nil { glog.V(logger.Error).Infoln("Removal failed:", err) @@ -162,7 +162,7 @@ func (pm *ProtocolManager) Start() { func (pm *ProtocolManager) Stop() { // Showing a log message. During download / process this could actually // take between 5 to 10 seconds and therefor feedback is required. - glog.V(logger.Info).Infoln("Stopping ethereum protocol handler...") + glog.V(logger.Info).Infoln("Stopping expanse protocol handler...") pm.quit = true pm.txSub.Unsubscribe() // quits txBroadcastLoop @@ -172,19 +172,19 @@ func (pm *ProtocolManager) Stop() { // Wait for any process action pm.wg.Wait() - glog.V(logger.Info).Infoln("Ethereum protocol handler stopped") + glog.V(logger.Info).Infoln("Expanse protocol handler stopped") } func (pm *ProtocolManager) newPeer(pv, nv int, p *p2p.Peer, rw p2p.MsgReadWriter) *peer { return newPeer(pv, nv, p, rw) } -// handle is the callback invoked to manage the life cycle of an eth peer. When +// handle is the callback invoked to manage the life cycle of an exp peer. When // this function terminates, the peer is disconnected. func (pm *ProtocolManager) handle(p *peer) error { glog.V(logger.Debug).Infof("%v: peer connected [%s]", p, p.Name()) - // Execute the Ethereum handshake + // Execute the Expanse handshake td, head, genesis := pm.chainman.Status() if err := p.Handshake(td, head, genesis); err != nil { glog.V(logger.Debug).Infof("%v: handshake failed: %v", p, err) diff --git a/eth/metrics.go b/eth/metrics.go index 625b90b671..2bce1e89da 100644 --- a/eth/metrics.go +++ b/eth/metrics.go @@ -1,44 +1,44 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -package eth +package exp import ( - "github.com/ethereum/go-ethereum/metrics" + "github.com/expanse-project/go-expanse/metrics" ) var ( - propTxnInPacketsMeter = metrics.NewMeter("eth/prop/txns/in/packets") - propTxnInTrafficMeter = metrics.NewMeter("eth/prop/txns/in/traffic") - propTxnOutPacketsMeter = metrics.NewMeter("eth/prop/txns/out/packets") - propTxnOutTrafficMeter = metrics.NewMeter("eth/prop/txns/out/traffic") - propHashInPacketsMeter = metrics.NewMeter("eth/prop/hashes/in/packets") - propHashInTrafficMeter = metrics.NewMeter("eth/prop/hashes/in/traffic") - propHashOutPacketsMeter = metrics.NewMeter("eth/prop/hashes/out/packets") - propHashOutTrafficMeter = metrics.NewMeter("eth/prop/hashes/out/traffic") - propBlockInPacketsMeter = metrics.NewMeter("eth/prop/blocks/in/packets") - propBlockInTrafficMeter = metrics.NewMeter("eth/prop/blocks/in/traffic") - propBlockOutPacketsMeter = metrics.NewMeter("eth/prop/blocks/out/packets") - propBlockOutTrafficMeter = metrics.NewMeter("eth/prop/blocks/out/traffic") - reqHashInPacketsMeter = metrics.NewMeter("eth/req/hashes/in/packets") - reqHashInTrafficMeter = metrics.NewMeter("eth/req/hashes/in/traffic") - reqHashOutPacketsMeter = metrics.NewMeter("eth/req/hashes/out/packets") - reqHashOutTrafficMeter = metrics.NewMeter("eth/req/hashes/out/traffic") - reqBlockInPacketsMeter = metrics.NewMeter("eth/req/blocks/in/packets") - reqBlockInTrafficMeter = metrics.NewMeter("eth/req/blocks/in/traffic") - reqBlockOutPacketsMeter = metrics.NewMeter("eth/req/blocks/out/packets") - reqBlockOutTrafficMeter = metrics.NewMeter("eth/req/blocks/out/traffic") + propTxnInPacketsMeter = metrics.NewMeter("exp/prop/txns/in/packets") + propTxnInTrafficMeter = metrics.NewMeter("exp/prop/txns/in/traffic") + propTxnOutPacketsMeter = metrics.NewMeter("exp/prop/txns/out/packets") + propTxnOutTrafficMeter = metrics.NewMeter("exp/prop/txns/out/traffic") + propHashInPacketsMeter = metrics.NewMeter("exp/prop/hashes/in/packets") + propHashInTrafficMeter = metrics.NewMeter("exp/prop/hashes/in/traffic") + propHashOutPacketsMeter = metrics.NewMeter("exp/prop/hashes/out/packets") + propHashOutTrafficMeter = metrics.NewMeter("exp/prop/hashes/out/traffic") + propBlockInPacketsMeter = metrics.NewMeter("exp/prop/blocks/in/packets") + propBlockInTrafficMeter = metrics.NewMeter("exp/prop/blocks/in/traffic") + propBlockOutPacketsMeter = metrics.NewMeter("exp/prop/blocks/out/packets") + propBlockOutTrafficMeter = metrics.NewMeter("exp/prop/blocks/out/traffic") + reqHashInPacketsMeter = metrics.NewMeter("exp/req/hashes/in/packets") + reqHashInTrafficMeter = metrics.NewMeter("exp/req/hashes/in/traffic") + reqHashOutPacketsMeter = metrics.NewMeter("exp/req/hashes/out/packets") + reqHashOutTrafficMeter = metrics.NewMeter("exp/req/hashes/out/traffic") + reqBlockInPacketsMeter = metrics.NewMeter("exp/req/blocks/in/packets") + reqBlockInTrafficMeter = metrics.NewMeter("exp/req/blocks/in/traffic") + reqBlockOutPacketsMeter = metrics.NewMeter("exp/req/blocks/out/packets") + reqBlockOutTrafficMeter = metrics.NewMeter("exp/req/blocks/out/traffic") ) diff --git a/eth/peer.go b/eth/peer.go index ade1f37eaa..0953981a65 100644 --- a/eth/peer.go +++ b/eth/peer.go @@ -1,20 +1,20 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -package eth +package exp import ( "errors" @@ -22,12 +22,12 @@ import ( "math/big" "sync" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/eth/downloader" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/p2p" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/exp/downloader" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/p2p" "gopkg.in/fatih/set.v0" ) @@ -195,7 +195,7 @@ func (p *peer) RequestBlocks(hashes []common.Hash) error { return p2p.Send(p.rw, GetBlocksMsg, hashes) } -// Handshake executes the eth protocol handshake, negotiating version number, +// Handshake executes the exp protocol handshake, negotiating version number, // network IDs, difficulties, head and genesis blocks. func (p *peer) Handshake(td *big.Int, head common.Hash, genesis common.Hash) error { // Send out own handshake in a new thread @@ -242,12 +242,12 @@ func (p *peer) Handshake(td *big.Int, head common.Hash, genesis common.Hash) err // String implements fmt.Stringer. func (p *peer) String() string { return fmt.Sprintf("Peer %s [%s]", p.id, - fmt.Sprintf("eth/%2d", p.version), + fmt.Sprintf("exp/%2d", p.version), ) } // peerSet represents the collection of active peers currently participating in -// the Ethereum sub-protocol. +// the Expanse sub-protocol. type peerSet struct { peers map[string]*peer lock sync.RWMutex diff --git a/eth/protocol.go b/eth/protocol.go index b8c9b50d0e..4fe0d920cc 100644 --- a/eth/protocol.go +++ b/eth/protocol.go @@ -1,29 +1,29 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -package eth +package exp import ( "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/types" ) -// Supported versions of the eth protocol (first is primary). +// Supported versions of the exp protocol (first is primary). var ProtocolVersions = []uint{61, 60} // Number of implemented message corresponding to different protocol versions. @@ -34,7 +34,7 @@ const ( ProtocolMaxMsgSize = 10 * 1024 * 1024 // Maximum cap on the size of a protocol message ) -// eth protocol message codes +// exp protocol message codes const ( StatusMsg = iota NewBlockHashesMsg diff --git a/eth/protocol_test.go b/eth/protocol_test.go index 08c9b6a063..ad47d0bb4c 100644 --- a/eth/protocol_test.go +++ b/eth/protocol_test.go @@ -1,20 +1,20 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -package eth +package exp import ( "crypto/rand" @@ -23,14 +23,14 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/p2p/discover" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/event" + "github.com/expanse-project/go-expanse/p2p" + "github.com/expanse-project/go-expanse/p2p/discover" ) func init() { diff --git a/eth/sync.go b/eth/sync.go index b4dea4b0ff..4221fcc760 100644 --- a/eth/sync.go +++ b/eth/sync.go @@ -1,30 +1,30 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -package eth +package exp import ( "math/rand" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/p2p/discover" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/p2p/discover" ) const ( diff --git a/ethdb/README.md b/ethdb/README.md index 5bed8eedc6..fbc451595b 100644 --- a/ethdb/README.md +++ b/ethdb/README.md @@ -1,10 +1,10 @@ # ethdb -The ethdb package contains the ethereum database interfaces +The ethdb package contains the expanse database interfaces # Installation -`go get github.com/ethereum/ethdb-go` +`go get github.com/expanse-project/ethdb-go` # Usage diff --git a/ethdb/database.go b/ethdb/database.go index 9e80e54091..144472ff19 100644 --- a/ethdb/database.go +++ b/ethdb/database.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package ethdb @@ -23,9 +23,9 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/metrics" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/metrics" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/errors" "github.com/syndtr/goleveldb/leveldb/iterator" diff --git a/ethdb/database_test.go b/ethdb/database_test.go index ae49061660..38b3eb2769 100644 --- a/ethdb/database_test.go +++ b/ethdb/database_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package ethdb @@ -20,7 +20,7 @@ import ( "os" "path/filepath" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) func newDb() *LDBDatabase { diff --git a/ethdb/memory_database.go b/ethdb/memory_database.go index 70b03dfade..a5445c2c51 100644 --- a/ethdb/memory_database.go +++ b/ethdb/memory_database.go @@ -1,25 +1,25 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package ethdb import ( "fmt" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) /* diff --git a/event/event.go b/event/event.go index ce74e52862..cbbb3ad1bb 100644 --- a/event/event.go +++ b/event/event.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Package event implements an event multiplexer. package event diff --git a/event/event_test.go b/event/event_test.go index 465af38cd9..562ee665eb 100644 --- a/event/event_test.go +++ b/event/event_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package event diff --git a/event/example_test.go b/event/example_test.go index d4642ef2f5..e23d0afe2b 100644 --- a/event/example_test.go +++ b/event/example_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package event diff --git a/event/filter/eth_filter.go b/event/filter/eth_filter.go index 6f61e2b608..d1066f1f38 100644 --- a/event/filter/eth_filter.go +++ b/event/filter/eth_filter.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package filter @@ -21,9 +21,9 @@ package filter import ( "sync" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/event" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/event" ) type FilterManager struct { diff --git a/event/filter/filter.go b/event/filter/filter.go index b1fbf30ee4..d985402e2e 100644 --- a/event/filter/filter.go +++ b/event/filter/filter.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Package filter implements event filters. package filter diff --git a/event/filter/filter_test.go b/event/filter/filter_test.go index 0cd26bfc9b..c09255b24b 100644 --- a/event/filter/filter_test.go +++ b/event/filter/filter_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package filter diff --git a/event/filter/generic_filter.go b/event/filter/generic_filter.go index 27f35920d4..497176829b 100644 --- a/event/filter/generic_filter.go +++ b/event/filter/generic_filter.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package filter diff --git a/fdtrack/fdtrack.go b/fdtrack/fdtrack.go new file mode 100644 index 0000000000..6a552be6bc --- /dev/null +++ b/fdtrack/fdtrack.go @@ -0,0 +1,112 @@ +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. +// +// The go-expanse library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-expanse library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-expanse library. If not, see . + +// Package fdtrack logs statistics about open file descriptors. +package fdtrack + +import ( + "fmt" + "net" + "sort" + "sync" + "time" + + "github.com/expanse-project/go-expanse/logger/glog" +) + +var ( + mutex sync.Mutex + all = make(map[string]int) +) + +func Open(desc string) { + mutex.Lock() + all[desc] += 1 + mutex.Unlock() +} + +func Close(desc string) { + mutex.Lock() + defer mutex.Unlock() + if c, ok := all[desc]; ok { + if c == 1 { + delete(all, desc) + } else { + all[desc]-- + } + } +} + +func WrapListener(desc string, l net.Listener) net.Listener { + Open(desc) + return &wrappedListener{l, desc} +} + +type wrappedListener struct { + net.Listener + desc string +} + +func (w *wrappedListener) Accept() (net.Conn, error) { + c, err := w.Listener.Accept() + if err == nil { + c = WrapConn(w.desc, c) + } + return c, err +} + +func (w *wrappedListener) Close() error { + err := w.Listener.Close() + if err == nil { + Close(w.desc) + } + return err +} + +func WrapConn(desc string, conn net.Conn) net.Conn { + Open(desc) + return &wrappedConn{conn, desc} +} + +type wrappedConn struct { + net.Conn + desc string +} + +func (w *wrappedConn) Close() error { + err := w.Conn.Close() + if err == nil { + Close(w.desc) + } + return err +} + +func Start() { + go func() { + for range time.Tick(15 * time.Second) { + mutex.Lock() + var sum, tracked = 0, []string{} + for what, n := range all { + sum += n + tracked = append(tracked, fmt.Sprintf("%s:%d", what, n)) + } + mutex.Unlock() + used, _ := fdusage() + sort.Strings(tracked) + glog.Infof("fd usage %d/%d, tracked %d %v", used, fdlimit(), sum, tracked) + } + }() +} diff --git a/fdtrack/fdusage_darwin.go b/fdtrack/fdusage_darwin.go new file mode 100644 index 0000000000..094a2b6c2c --- /dev/null +++ b/fdtrack/fdusage_darwin.go @@ -0,0 +1,72 @@ +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. +// +// The go-expanse library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-expanse library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-expanse library. If not, see . + +// +build darwin + +package fdtrack + +import ( + "os" + "syscall" + "unsafe" +) + +// #cgo CFLAGS: -lproc +// #include +// #include +import "C" + +func fdlimit() int { + var nofile syscall.Rlimit + if err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &nofile); err != nil { + return 0 + } + return int(nofile.Cur) +} + +func fdusage() (int, error) { + pid := C.int(os.Getpid()) + // Query for a rough estimate on the amout of data that + // proc_pidinfo will return. + rlen, err := C.proc_pidinfo(pid, C.PROC_PIDLISTFDS, 0, nil, 0) + if rlen <= 0 { + return 0, err + } + // Load the list of file descriptors. We don't actually care about + // the content, only about the size. Since the number of fds can + // change while we're reading them, the loop enlarges the buffer + // until proc_pidinfo says the result fitted. + var buf unsafe.Pointer + defer func() { + if buf != nil { + C.free(buf) + } + }() + for buflen := rlen; ; buflen *= 2 { + buf, err = C.reallocf(buf, C.size_t(buflen)) + if buf == nil { + return 0, err + } + rlen, err = C.proc_pidinfo(pid, C.PROC_PIDLISTFDS, 0, buf, buflen) + if rlen <= 0 { + return 0, err + } else if rlen == buflen { + continue + } + return int(rlen / C.PROC_PIDLISTFD_SIZE), nil + } + panic("unreachable") +} diff --git a/generators/defaults.go b/generators/defaults.go index 386c6743d9..18a0d2fad4 100644 --- a/generators/defaults.go +++ b/generators/defaults.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . //go:generate go run defaults.go default.json defs.go @@ -51,7 +51,7 @@ func main() { m := make(map[string]setting) json.Unmarshal(content, &m) - filepath := filepath.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "params", os.Args[2]) + filepath := filepath.Join(os.Getenv("GOPATH"), "src", "github.com", "expanse", "go-expanse", "params", os.Args[2]) output, err := os.OpenFile(filepath, os.O_RDWR|os.O_CREATE, os.ModePerm /*0777*/) if err != nil { fatal("error opening file for writing %v\n", err) diff --git a/jsre/bignumber_js.go b/jsre/bignumber_js.go index 2e9c74c9f2..8e0fd5f92e 100644 --- a/jsre/bignumber_js.go +++ b/jsre/bignumber_js.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package jsre diff --git a/jsre/ethereum_js.go b/jsre/ethereum_js.go index f33bb7c25a..e7a8989e73 100644 --- a/jsre/ethereum_js.go +++ b/jsre/ethereum_js.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package jsre @@ -635,20 +635,20 @@ module.exports = SolidityTypeBytes; },{"./formatters":9,"./type":14}],7:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file coder.js @@ -923,20 +923,20 @@ module.exports = SolidityTypeDynamicBytes; },{"./formatters":9,"./type":14}],9:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file formatters.js @@ -1213,20 +1213,20 @@ module.exports = SolidityTypeInt; },{"./formatters":9,"./type":14}],11:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file param.js @@ -1845,20 +1845,20 @@ module.exports = { },{"bignumber.js":"bignumber.js"}],19:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file sha3.js @@ -1874,7 +1874,7 @@ module.exports = function (str, isNew) { if (str.substr(0, 2) === '0x' && !isNew) { console.warn('requirement of using web3.fromAscii before sha3 is deprecated'); console.warn('new usage: \'web3.sha3("hello")\''); - console.warn('see https://github.com/ethereum/web3.js/pull/205'); + console.warn('see https://github.com/expanse-project/web3.js/pull/205'); console.warn('if you need to hash hex value, you can do \'sha3("0xfff", true)\''); str = utils.toAscii(str); } @@ -1887,20 +1887,20 @@ module.exports = function (str, isNew) { },{"./utils":20,"crypto-js/sha3":47}],20:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file utils.js @@ -2394,20 +2394,20 @@ module.exports={ },{}],22:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** @file web3.js * @authors: @@ -2420,11 +2420,11 @@ module.exports={ */ var version = require('./version.json'); -var net = require('./web3/methods/net'); -var eth = require('./web3/methods/eth'); -var db = require('./web3/methods/db'); -var shh = require('./web3/methods/shh'); -var watches = require('./web3/methods/watches'); +var net = require('./web3/net'); +var exp = require('./web3/exp'); +var db = require('./web3/db'); +var shh = require('./web3/shh'); +var watches = require('./web3/watches'); var Filter = require('./web3/filter'); var utils = require('./utils/utils'); var formatters = require('./web3/formatters'); @@ -2445,7 +2445,7 @@ var web3Properties = [ inputFormatter: utils.toDecimal }), new Property({ - name: 'version.ethereum', + name: 'version.expanse', getter: 'eth_protocolVersion', inputFormatter: utils.toDecimal }), @@ -2478,11 +2478,11 @@ web3.providers = {}; web3.currentProvider = null; web3.version = {}; web3.version.api = version.version; -web3.eth = {}; +web3.exp = {}; /*jshint maxparams:4 */ -web3.eth.filter = function (fil, callback) { - return new Filter(fil, watches.eth(), formatters.outputLogFormatter, callback); +web3.exp.filter = function (fil, callback) { + return new Filter(fil, watches.exp(), formatters.outputLogFormatter, callback); }; /*jshint maxparams:3 */ @@ -2520,7 +2520,7 @@ web3.createBatch = function () { }; // ADD defaultblock -Object.defineProperty(web3.eth, 'defaultBlock', { +Object.defineProperty(web3.exp, 'defaultBlock', { get: function () { return c.defaultBlock; }, @@ -2530,7 +2530,7 @@ Object.defineProperty(web3.eth, 'defaultBlock', { } }); -Object.defineProperty(web3.eth, 'defaultAccount', { +Object.defineProperty(web3.exp, 'defaultAccount', { get: function () { return c.defaultAccount; }, @@ -2561,8 +2561,8 @@ web3._extend.Property = require('./web3/property'); setupProperties(web3, web3Properties); setupMethods(web3.net, net.methods); setupProperties(web3.net, net.properties); -setupMethods(web3.eth, eth.methods); -setupProperties(web3.eth, eth.properties); +setupMethods(web3.exp, exp.methods); +setupProperties(web3.exp, exp.properties); setupMethods(web3.db, db.methods); setupMethods(web3.shh, shh.methods); @@ -2571,20 +2571,20 @@ module.exports = web3; },{"./utils/config":18,"./utils/sha3":19,"./utils/utils":20,"./version.json":21,"./web3/batch":24,"./web3/filter":28,"./web3/formatters":29,"./web3/method":35,"./web3/methods/db":36,"./web3/methods/eth":37,"./web3/methods/net":38,"./web3/methods/shh":39,"./web3/methods/watches":40,"./web3/property":42,"./web3/requestmanager":43}],23:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file allevents.js @@ -2647,7 +2647,7 @@ AllSolidityEvents.prototype.execute = function (options, callback) { var o = this.encode(options); var formatter = this.decode.bind(this); - return new Filter(o, watches.eth(), formatter, callback); + return new Filter(o, watches.exp(), formatter, callback); }; AllSolidityEvents.prototype.attachToContract = function (contract) { @@ -2660,20 +2660,20 @@ module.exports = AllSolidityEvents; },{"../utils/sha3":19,"../utils/utils":20,"./event":27,"./filter":28,"./formatters":29,"./methods/watches":40}],24:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file batch.js @@ -2728,20 +2728,20 @@ module.exports = Batch; },{"./errors":26,"./jsonrpc":34,"./requestmanager":43}],25:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file contract.js @@ -2838,7 +2838,7 @@ var checkForContractAddress = function(contract, abi, callback){ callbackFired = false; // wait for receipt - var filter = web3.eth.filter('latest', function(e){ + var filter = web3.exp.filter('latest', function(e){ if(!e && !callbackFired) { count++; @@ -2858,10 +2858,10 @@ var checkForContractAddress = function(contract, abi, callback){ } else { - web3.eth.getTransactionReceipt(contract.transactionHash, function(e, receipt){ + web3.exp.getTransactionReceipt(contract.transactionHash, function(e, receipt){ if(receipt && !callbackFired) { - web3.eth.getCode(receipt.contractAddress, function(e, code){ + web3.exp.getCode(receipt.contractAddress, function(e, code){ /*jshint maxcomplexity: 5 */ if(callbackFired) @@ -2945,7 +2945,7 @@ ContractFactory.prototype.new = function () { if(callback) { // wait for the contract address adn check if the code was deployed - web3.eth.sendTransaction(options, function (err, hash) { + web3.exp.sendTransaction(options, function (err, hash) { if (err) { callback(err); } else { @@ -2959,7 +2959,7 @@ ContractFactory.prototype.new = function () { } }); } else { - var hash = web3.eth.sendTransaction(options); + var hash = web3.exp.sendTransaction(options); // add the transaction hash contract.transactionHash = hash; checkForContractAddress(contract, _this.abi); @@ -3007,20 +3007,20 @@ module.exports = contract; },{"../solidity/coder":7,"../utils/utils":20,"../web3":22,"./allevents":23,"./event":27,"./function":30}],26:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file errors.js @@ -3047,20 +3047,20 @@ module.exports = { },{}],27:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file event.js @@ -3253,23 +3253,22 @@ SolidityEvent.prototype.attachToContract = function (contract) { module.exports = SolidityEvent; - },{"../solidity/coder":7,"../utils/sha3":19,"../utils/utils":20,"./filter":28,"./formatters":29,"./methods/watches":40}],28:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** @file filter.js * @authors: @@ -3468,20 +3467,20 @@ module.exports = Filter; },{"../utils/utils":20,"./formatters":29,"./requestmanager":43}],29:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file formatters.js @@ -3757,20 +3756,20 @@ module.exports = { },{"../utils/config":18,"../utils/utils":20,"./iban":32}],30:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file function.js @@ -3867,12 +3866,12 @@ SolidityFunction.prototype.call = function () { if (!callback) { - var output = web3.eth.call(payload, defaultBlock); + var output = web3.exp.call(payload, defaultBlock); return this.unpackOutput(output); } var self = this; - web3.eth.call(payload, defaultBlock, function (error, output) { + web3.exp.call(payload, defaultBlock, function (error, output) { callback(error, self.unpackOutput(output)); }); }; @@ -3889,10 +3888,10 @@ SolidityFunction.prototype.sendTransaction = function () { var payload = this.toPayload(args); if (!callback) { - return web3.eth.sendTransaction(payload); + return web3.exp.sendTransaction(payload); } - web3.eth.sendTransaction(payload, callback); + web3.exp.sendTransaction(payload, callback); }; /** @@ -3907,10 +3906,10 @@ SolidityFunction.prototype.estimateGas = function () { var payload = this.toPayload(args); if (!callback) { - return web3.eth.estimateGas(payload); + return web3.exp.estimateGas(payload); } - web3.eth.estimateGas(payload, callback); + web3.exp.estimateGas(payload, callback); }; /** @@ -3994,20 +3993,20 @@ module.exports = SolidityFunction; },{"../solidity/coder":7,"../utils/sha3":19,"../utils/utils":20,"../web3":22,"./formatters":29}],31:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** @file httpprovider.js * @authors: @@ -4041,7 +4040,7 @@ if (typeof Meteor !== 'undefined' && Meteor.isServer) { // jshint ignore: line * HttpProvider should be used to send rpc calls over http */ var HttpProvider = function (host) { - this.host = host || 'http://localhost:8545'; + this.host = host || 'http://localhost:9656'; }; /** @@ -4142,20 +4141,20 @@ module.exports = HttpProvider; },{"./errors":26,"xmlhttprequest":17}],32:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file iban.js @@ -5209,20 +5208,20 @@ module.exports = { },{"../../utils/utils":20,"../formatters":29,"../method":35,"../property":42}],38:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** @file eth.js * @authors: @@ -5259,20 +5258,20 @@ module.exports = { },{"../../utils/utils":20,"../property":42}],39:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** @file shh.js * @authors: @@ -5329,20 +5328,20 @@ module.exports = { },{"../formatters":29,"../method":35}],40:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** @file watches.js * @authors: @@ -5445,20 +5444,20 @@ module.exports = { },{"../method":35}],41:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file namereg.js @@ -5481,20 +5480,20 @@ module.exports = { },{"../contracts/GlobalRegistrar.json":1,"../contracts/ICAPRegistrar.json":2,"./contract":25}],42:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file property.js @@ -5633,20 +5632,20 @@ module.exports = Property; },{"../utils/utils":20,"./requestmanager":43}],43:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file requestmanager.js @@ -5665,7 +5664,7 @@ var errors = require('./errors'); /** * It's responsible for passing messages to providers - * It's also responsible for polling the ethereum node for incoming messages + * It's also responsible for polling the expanse node for incoming messages * Default poll timeout is 1 second * Singleton */ @@ -5895,20 +5894,20 @@ module.exports = RequestManager; },{"../utils/config":18,"../utils/utils":20,"./errors":26,"./jsonrpc":34}],44:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file transfer.js @@ -5991,7 +5990,6 @@ module.exports = transfer; },{"../contracts/SmartExchange.json":3,"../web3":22,"./contract":25,"./iban":32,"./namereg":41}],45:[function(require,module,exports){ - },{}],46:[function(require,module,exports){ ;(function (root, factory) { if (typeof exports === "object") { @@ -7377,11 +7375,11 @@ var namereg = require('./lib/web3/namereg'); web3.providers.HttpProvider = require('./lib/web3/httpprovider'); web3.providers.IpcProvider = require('./lib/web3/ipcprovider'); -web3.eth.contract = require('./lib/web3/contract'); -web3.eth.namereg = namereg.namereg; -web3.eth.ibanNamereg = namereg.ibanNamereg; -web3.eth.sendIBANTransaction = require('./lib/web3/transfer'); -web3.eth.iban = require('./lib/web3/iban'); +web3.exp.contract = require('./lib/web3/contract'); +web3.exp.namereg = namereg.namereg; +web3.exp.ibanNamereg = namereg.ibanNamereg; +web3.exp.sendIBANTransaction = require('./lib/web3/transfer'); +web3.exp.iban = require('./lib/web3/iban'); // dont override global variable if (typeof window !== 'undefined' && typeof window.web3 === 'undefined') { diff --git a/jsre/jsre.go b/jsre/jsre.go index 0db9e33fc5..4efbaa3dce 100644 --- a/jsre/jsre.go +++ b/jsre/jsre.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Package jsre provides execution environment for JavaScript. package jsre @@ -23,7 +23,7 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" "github.com/robertkrimen/otto" ) diff --git a/jsre/jsre_test.go b/jsre/jsre_test.go index 8450f546c3..570e92ed08 100644 --- a/jsre/jsre_test.go +++ b/jsre/jsre_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package jsre diff --git a/jsre/pp_js.go b/jsre/pp_js.go new file mode 100644 index 0000000000..ad07f6c53f --- /dev/null +++ b/jsre/pp_js.go @@ -0,0 +1,137 @@ +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. +// +// The go-expanse library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-expanse library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-expanse library. If not, see . + +package jsre + +const pp_js = ` +function pp(object, indent) { + try { + JSON.stringify(object) + } catch(e) { + return pp(e, indent); + } + + var str = ""; + if(object instanceof Array) { + str += "["; + for(var i = 0, l = object.length; i < l; i++) { + str += pp(object[i], indent); + + if(i < l-1) { + str += ", "; + } + } + str += " ]"; + } else if (object instanceof Error) { + str += "\033[31m" + "Error:\033[0m " + object.message; + } else if (isBigNumber(object)) { + str += "\033[32m'" + object.toString(10) + "'"; + } else if(typeof(object) === "object") { + str += "{\n"; + indent += " "; + + var fields = getFields(object); + var last = fields[fields.length - 1]; + fields.forEach(function (key) { + str += indent + key + ": "; + try { + str += pp(object[key], indent); + } catch (e) { + str += pp(e, indent); + } + if(key !== last) { + str += ","; + } + str += "\n"; + }); + str += indent.substr(2, indent.length) + "}"; + } else if(typeof(object) === "string") { + str += "\033[32m'" + object + "'"; + } else if(typeof(object) === "undefined") { + str += "\033[1m\033[30m" + object; + } else if(typeof(object) === "number") { + str += "\033[31m" + object; + } else if(typeof(object) === "function") { + str += "\033[35m" + object.toString().split(" {")[0]; + } else { + str += object; + } + + str += "\033[0m"; + + return str; +} + +var redundantFields = [ + 'valueOf', + 'toString', + 'toLocaleString', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' +]; + +var getFields = function (object) { + var members = Object.getOwnPropertyNames(object); + if (object.constructor && object.constructor.prototype) { + members = members.concat(Object.getOwnPropertyNames(object.constructor.prototype)); + } + + var fields = members.filter(function (member) { + return !isMemberFunction(object, member) + }).sort() + var funcs = members.filter(function (member) { + return isMemberFunction(object, member) + }).sort() + + var results = fields.concat(funcs); + return results.filter(function (field) { + return redundantFields.indexOf(field) === -1; + }); +}; + +var isMemberFunction = function(object, member) { + try { + return typeof(object[member]) === "function"; + } catch(e) { + return false; + } +} + +var isBigNumber = function (object) { + var result = typeof BigNumber !== 'undefined' && object instanceof BigNumber; + + if (!result) { + if (typeof(object) === "object" && object.constructor != null) { + result = object.constructor.toString().indexOf("function BigNumber(") == 0; + } + } + + return result +}; + +function prettyPrint(/* */) { + var args = arguments; + var ret = ""; + for(var i = 0, l = args.length; i < l; i++) { + ret += pp(args[i], "") + "\n"; + } + return ret; +} + +var print = prettyPrint; +` diff --git a/logger/example_test.go b/logger/example_test.go index ce5f9da67f..d25aec715b 100644 --- a/logger/example_test.go +++ b/logger/example_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package logger diff --git a/logger/log.go b/logger/log.go index 38a6ce1391..9364aac347 100644 --- a/logger/log.go +++ b/logger/log.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package logger @@ -22,7 +22,7 @@ import ( "log" "os" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) func openLogFile(datadir string, filename string) *os.File { diff --git a/logger/loggers.go b/logger/loggers.go index e63355d0bf..4c2be388b5 100644 --- a/logger/loggers.go +++ b/logger/loggers.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . /* Package logger implements a multi-output leveled logger. @@ -47,7 +47,7 @@ const ( ) // A Logger prints messages prefixed by a given tag. It provides named -// Printf and Println style methods for all loglevels. Each ethereum +// Printf and Println style methods for all loglevels. Each expanse // component should have its own logger with a unique prefix. type Logger struct { tag string diff --git a/logger/loggers_test.go b/logger/loggers_test.go index 85564698bc..3dd23a494c 100644 --- a/logger/loggers_test.go +++ b/logger/loggers_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package logger diff --git a/logger/logsystem.go b/logger/logsystem.go index 24f4351d49..e36d1c6953 100644 --- a/logger/logsystem.go +++ b/logger/logsystem.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package logger diff --git a/logger/sys.go b/logger/sys.go index 18d4ea641c..1f5aafd793 100644 --- a/logger/sys.go +++ b/logger/sys.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package logger diff --git a/logger/types.go b/logger/types.go index ee7e845de8..23fd332c6b 100644 --- a/logger/types.go +++ b/logger/types.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package logger @@ -83,7 +83,7 @@ type EthMinerNewBlock struct { } func (l *EthMinerNewBlock) EventName() string { - return "eth.miner.new_block" + return "exp.miner.new_block" } type EthChainReceivedNewBlock struct { @@ -96,7 +96,7 @@ type EthChainReceivedNewBlock struct { } func (l *EthChainReceivedNewBlock) EventName() string { - return "eth.chain.received.new_block" + return "exp.chain.received.new_block" } type EthChainNewHead struct { @@ -108,7 +108,7 @@ type EthChainNewHead struct { } func (l *EthChainNewHead) EventName() string { - return "eth.chain.new_head" + return "exp.chain.new_head" } type EthTxReceived struct { @@ -118,7 +118,7 @@ type EthTxReceived struct { } func (l *EthTxReceived) EventName() string { - return "eth.tx.received" + return "exp.tx.received" } // @@ -212,7 +212,7 @@ func (l *EthTxReceived) EventName() string { // } // func (l *P2PEthDisconnectingBadBlock) EventName() string { -// return "p2p.eth.disconnecting.bad_block" +// return "p2p.exp.disconnecting.bad_block" // } // type P2PEthDisconnectingBadTx struct { @@ -223,7 +223,7 @@ func (l *EthTxReceived) EventName() string { // } // func (l *P2PEthDisconnectingBadTx) EventName() string { -// return "p2p.eth.disconnecting.bad_tx" +// return "p2p.exp.disconnecting.bad_tx" // } // type EthNewBlockBroadcasted struct { @@ -236,7 +236,7 @@ func (l *EthTxReceived) EventName() string { // } // func (l *EthNewBlockBroadcasted) EventName() string { -// return "eth.newblock.broadcasted" +// return "exp.newblock.broadcasted" // } // type EthNewBlockIsKnown struct { @@ -249,7 +249,7 @@ func (l *EthTxReceived) EventName() string { // } // func (l *EthNewBlockIsKnown) EventName() string { -// return "eth.newblock.is_known" +// return "exp.newblock.is_known" // } // type EthNewBlockIsNew struct { @@ -262,7 +262,7 @@ func (l *EthTxReceived) EventName() string { // } // func (l *EthNewBlockIsNew) EventName() string { -// return "eth.newblock.is_new" +// return "exp.newblock.is_new" // } // type EthNewBlockMissingParent struct { @@ -275,7 +275,7 @@ func (l *EthTxReceived) EventName() string { // } // func (l *EthNewBlockMissingParent) EventName() string { -// return "eth.newblock.missing_parent" +// return "exp.newblock.missing_parent" // } // type EthNewBlockIsInvalid struct { @@ -288,7 +288,7 @@ func (l *EthTxReceived) EventName() string { // } // func (l *EthNewBlockIsInvalid) EventName() string { -// return "eth.newblock.is_invalid" +// return "exp.newblock.is_invalid" // } // type EthNewBlockChainIsOlder struct { @@ -301,7 +301,7 @@ func (l *EthTxReceived) EventName() string { // } // func (l *EthNewBlockChainIsOlder) EventName() string { -// return "eth.newblock.chain.is_older" +// return "exp.newblock.chain.is_older" // } // type EthNewBlockChainIsCanonical struct { @@ -314,7 +314,7 @@ func (l *EthTxReceived) EventName() string { // } // func (l *EthNewBlockChainIsCanonical) EventName() string { -// return "eth.newblock.chain.is_cannonical" +// return "exp.newblock.chain.is_cannonical" // } // type EthNewBlockChainNotCanonical struct { @@ -327,7 +327,7 @@ func (l *EthTxReceived) EventName() string { // } // func (l *EthNewBlockChainNotCanonical) EventName() string { -// return "eth.newblock.chain.not_cannonical" +// return "exp.newblock.chain.not_cannonical" // } // type EthTxCreated struct { @@ -340,7 +340,7 @@ func (l *EthTxReceived) EventName() string { // } // func (l *EthTxCreated) EventName() string { -// return "eth.tx.created" +// return "exp.tx.created" // } // type EthTxBroadcasted struct { @@ -352,7 +352,7 @@ func (l *EthTxReceived) EventName() string { // } // func (l *EthTxBroadcasted) EventName() string { -// return "eth.tx.broadcasted" +// return "exp.tx.broadcasted" // } // type EthTxValidated struct { @@ -364,7 +364,7 @@ func (l *EthTxReceived) EventName() string { // } // func (l *EthTxValidated) EventName() string { -// return "eth.tx.validated" +// return "exp.tx.validated" // } // type EthTxIsInvalid struct { @@ -377,5 +377,5 @@ func (l *EthTxReceived) EventName() string { // } // func (l *EthTxIsInvalid) EventName() string { -// return "eth.tx.is_invalid" +// return "exp.tx.is_invalid" // } diff --git a/logger/verbosity.go b/logger/verbosity.go index aa3d59c30d..713ad1c65a 100644 --- a/logger/verbosity.go +++ b/logger/verbosity.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package logger diff --git a/metrics/disk.go b/metrics/disk.go index 25142d2ad1..18bf3879a9 100644 --- a/metrics/disk.go +++ b/metrics/disk.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package metrics diff --git a/metrics/disk_linux.go b/metrics/disk_linux.go index 8967d490e8..8bb19458fe 100644 --- a/metrics/disk_linux.go +++ b/metrics/disk_linux.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Contains the Linux implementation of process disk IO counter retrieval. diff --git a/metrics/disk_nop.go b/metrics/disk_nop.go index 4319f8b277..47c0a0d2e1 100644 --- a/metrics/disk_nop.go +++ b/metrics/disk_nop.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // +build !linux diff --git a/metrics/metrics.go b/metrics/metrics.go index 6d1a065edb..3b865bff99 100644 --- a/metrics/metrics.go +++ b/metrics/metrics.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Package metrics provides general system and process level metrics collection. package metrics @@ -23,8 +23,8 @@ import ( "strings" "time" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" "github.com/rcrowley/go-metrics" ) diff --git a/miner/agent.go b/miner/agent.go index 2f8d9fee42..f23da4f96d 100644 --- a/miner/agent.go +++ b/miner/agent.go @@ -1,28 +1,28 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package miner import ( "sync" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/pow" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/pow" ) type CpuAgent struct { diff --git a/miner/miner.go b/miner/miner.go index b550ed6d62..1ff3c029da 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -1,20 +1,20 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -// Package miner implements Ethereum block creation and mining. +// Package miner implements Expanse block creation and mining. package miner import ( @@ -44,15 +44,15 @@ type Miner struct { threads int coinbase common.Address mining int32 - eth core.Backend + exp core.Backend pow pow.PoW canStart int32 // can start indicates whether we can start the mining operation shouldStart int32 // should start indicates whether we should start after sync } -func New(eth core.Backend, mux *event.TypeMux, pow pow.PoW) *Miner { - miner := &Miner{eth: eth, mux: mux, pow: pow, worker: newWorker(common.Address{}, eth), canStart: 1} +func New(exp core.Backend, mux *event.TypeMux, pow pow.PoW) *Miner { + miner := &Miner{exp: exp, mux: mux, pow: pow, worker: newWorker(common.Address{}, exp), canStart: 1} go miner.update() return miner diff --git a/miner/remote_agent.go b/miner/remote_agent.go index 5c672a6e02..61bf181ec6 100644 --- a/miner/remote_agent.go +++ b/miner/remote_agent.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package miner @@ -21,10 +21,10 @@ import ( "sync" "time" - "github.com/ethereum/ethash" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/ethash" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" ) type hashrate struct { diff --git a/miner/worker.go b/miner/worker.go index 86970ec071..9220ae59e3 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package miner @@ -24,15 +24,15 @@ import ( "sync/atomic" "time" - "github.com/ethereum/go-ethereum/accounts" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/pow" + "github.com/expanse-project/go-expanse/accounts" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/event" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/pow" "gopkg.in/fatih/set.v0" ) @@ -97,7 +97,7 @@ type worker struct { quit chan struct{} pow pow.PoW - eth core.Backend + exp core.Backend chain *core.ChainManager proc *core.BlockProcessor chainDb common.Database @@ -122,15 +122,15 @@ type worker struct { fullValidation bool } -func newWorker(coinbase common.Address, eth core.Backend) *worker { +func newWorker(coinbase common.Address, exp core.Backend) *worker { worker := &worker{ - eth: eth, - mux: eth.EventMux(), - chainDb: eth.ChainDb(), + exp: exp, + mux: exp.EventMux(), + extraDb: exp.ExtraDb(), recv: make(chan *Result, resultQueueSize), gasPrice: new(big.Int), - chain: eth.ChainManager(), - proc: eth.BlockProcessor(), + chain: exp.ChainManager(), + proc: exp.BlockProcessor(), possibleUncles: make(map[common.Hash]*types.Block), coinbase: coinbase, txQueue: make(map[common.Hash]*types.Transaction), @@ -347,7 +347,7 @@ func (self *worker) push(work *Work) { // makeCurrent creates a new environment for the current cycle. func (self *worker) makeCurrent(parent *types.Block, header *types.Header) { - state := state.New(parent.Root(), self.eth.ChainDb()) + state := state.New(parent.Root(), self.exp.ChainDb()) work := &Work{ state: state, ancestors: set.New(), @@ -366,7 +366,7 @@ func (self *worker) makeCurrent(parent *types.Block, header *types.Header) { work.family.Add(ancestor.Hash()) work.ancestors.Add(ancestor.Hash()) } - accounts, _ := self.eth.AccountManager().Accounts() + accounts, _ := self.exp.AccountManager().Accounts() // Keep track of transactions which return errors so they can be removed work.remove = set.New() @@ -461,19 +461,19 @@ func (self *worker) commitNewWork() { work := self.current /* //approach 1 - transactions := self.eth.TxPool().GetTransactions() + transactions := self.exp.TxPool().GetTransactions() sort.Sort(types.TxByNonce{transactions}) */ //approach 2 - transactions := self.eth.TxPool().GetTransactions() + transactions := self.exp.TxPool().GetTransactions() sort.Sort(types.TxByPriceAndNonce{transactions}) /* // approach 3 // commit transactions for this run. txPerOwner := make(map[common.Address]types.Transactions) // Sort transactions by owner - for _, tx := range self.eth.TxPool().GetTransactions() { + for _, tx := range self.exp.TxPool().GetTransactions() { from, _ := tx.From() // we can ignore the sender error txPerOwner[from] = append(txPerOwner[from], tx) } @@ -498,7 +498,7 @@ func (self *worker) commitNewWork() { work.coinbase.SetGasLimit(header.GasLimit) work.commitTransactions(transactions, self.gasPrice, self.proc) - self.eth.TxPool().RemoveTransactions(work.lowGasTxs) + self.exp.TxPool().RemoveTransactions(work.lowGasTxs) // compute uncles for the new block. var ( diff --git a/p2p/dial.go b/p2p/dial.go index 0fd3a4cf52..2ef5c4edaf 100644 --- a/p2p/dial.go +++ b/p2p/dial.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package p2p diff --git a/p2p/dial_test.go b/p2p/dial_test.go index d24e03e292..d9d385807c 100644 --- a/p2p/dial_test.go +++ b/p2p/dial_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package p2p @@ -23,7 +23,7 @@ import ( "time" "github.com/davecgh/go-spew/spew" - "github.com/ethereum/go-ethereum/p2p/discover" + "github.com/expanse-project/go-expanse/p2p/discover" ) func init() { diff --git a/p2p/discover/database.go b/p2p/discover/database.go index d5c594364f..0c182934f9 100644 --- a/p2p/discover/database.go +++ b/p2p/discover/database.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Contains the node database, storing previously seen nodes and any collected // metadata about them for QoS purposes. @@ -26,10 +26,10 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/rlp" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/errors" "github.com/syndtr/goleveldb/leveldb/iterator" diff --git a/p2p/discover/database_test.go b/p2p/discover/database_test.go index 569585903f..ed1b29a591 100644 --- a/p2p/discover/database_test.go +++ b/p2p/discover/database_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package discover @@ -105,8 +105,8 @@ func TestNodeDBFetchStore(t *testing.T) { node := newNode( MustHexID("0x1dd9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"), net.IP{192, 168, 0, 1}, - 30303, - 30303, + 60606, + 60606, ) inst := time.Now() num := 314 @@ -166,8 +166,8 @@ var nodeDBSeedQueryNodes = []struct { node: newNode( MustHexID("0x01d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"), net.IP{127, 0, 0, 1}, - 30303, - 30303, + 60606, + 60606, ), pong: time.Now().Add(-2 * time.Second), }, @@ -175,8 +175,8 @@ var nodeDBSeedQueryNodes = []struct { node: newNode( MustHexID("0x02d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"), net.IP{127, 0, 0, 2}, - 30303, - 30303, + 60606, + 60606, ), pong: time.Now().Add(-3 * time.Second), }, @@ -184,8 +184,8 @@ var nodeDBSeedQueryNodes = []struct { node: newNode( MustHexID("0x03d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"), net.IP{127, 0, 0, 3}, - 30303, - 30303, + 60606, + 60606, ), pong: time.Now().Add(-1 * time.Second), }, @@ -335,8 +335,8 @@ var nodeDBExpirationNodes = []struct { node: newNode( MustHexID("0x01d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"), net.IP{127, 0, 0, 1}, - 30303, - 30303, + 60606, + 60606, ), pong: time.Now().Add(-nodeDBNodeExpiration + time.Minute), exp: false, @@ -344,8 +344,8 @@ var nodeDBExpirationNodes = []struct { node: newNode( MustHexID("0x02d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"), net.IP{127, 0, 0, 2}, - 30303, - 30303, + 60606, + 60606, ), pong: time.Now().Add(-nodeDBNodeExpiration - time.Minute), exp: true, diff --git a/p2p/discover/node.go b/p2p/discover/node.go index a14f294249..279b48b4a2 100644 --- a/p2p/discover/node.go +++ b/p2p/discover/node.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package discover @@ -29,9 +29,9 @@ import ( "strconv" "strings" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/crypto/secp256k1" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/crypto/secp256k1" ) const nodeIDBits = 512 @@ -98,10 +98,10 @@ func (n *Node) String() string { // parameter "discport". // // In the following example, the node URL describes -// a node with IP address 10.3.58.6, TCP listening port 30303 +// a node with IP address 10.3.58.6, TCP listening port 60606 // and UDP discovery port 30301. // -// enode://@10.3.58.6:30303?discport=30301 +// enode://@10.3.58.6:60606?discport=30301 func ParseNode(rawurl string) (*Node, error) { var ( id NodeID diff --git a/p2p/discover/node_test.go b/p2p/discover/node_test.go index e523e12d2f..5f02f02296 100644 --- a/p2p/discover/node_test.go +++ b/p2p/discover/node_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package discover @@ -25,8 +25,8 @@ import ( "testing/quick" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" ) var parseNodeTests = []struct { diff --git a/p2p/discover/table.go b/p2p/discover/table.go index 972bc10777..62c797aa9c 100644 --- a/p2p/discover/table.go +++ b/p2p/discover/table.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Package discover implements the Node Discovery Protocol. // @@ -30,10 +30,10 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" ) const ( diff --git a/p2p/discover/table_test.go b/p2p/discover/table_test.go index 426f4e9ccc..1213d4c277 100644 --- a/p2p/discover/table_test.go +++ b/p2p/discover/table_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package discover @@ -27,8 +27,8 @@ import ( "testing/quick" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" ) func TestTable_pingReplace(t *testing.T) { diff --git a/p2p/discover/udp.go b/p2p/discover/udp.go index afb31ee69d..cba1ccc60c 100644 --- a/p2p/discover/udp.go +++ b/p2p/discover/udp.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package discover @@ -219,7 +219,7 @@ func newUDP(priv *ecdsa.PrivateKey, c conn, natm nat.Interface, nodeDBPath strin realaddr := c.LocalAddr().(*net.UDPAddr) if natm != nil { if !realaddr.IP.IsLoopback() { - go nat.Map(natm, udp.closing, "udp", realaddr.Port, realaddr.Port, "ethereum discovery") + go nat.Map(natm, udp.closing, "udp", realaddr.Port, realaddr.Port, "expanse discovery") } // TODO: react to external IP changes over time. if ext, err := natm.ExternalIP(); err == nil { diff --git a/p2p/discover/udp_test.go b/p2p/discover/udp_test.go index a86d3737bc..f9181d5b4f 100644 --- a/p2p/discover/udp_test.go +++ b/p2p/discover/udp_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package discover @@ -34,8 +34,8 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/logger" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/logger" ) func init() { @@ -67,7 +67,7 @@ func newUDPTest(t *testing.T) *udpTest { pipe: newpipe(), localkey: newkey(), remotekey: newkey(), - remoteaddr: &net.UDPAddr{IP: net.IP{1, 2, 3, 4}, Port: 30303}, + remoteaddr: &net.UDPAddr{IP: net.IP{1, 2, 3, 4}, Port: 60606}, } test.table, test.udp = newUDP(test.localkey, test.pipe, nil, "") return test @@ -296,10 +296,10 @@ func TestUDP_findnodeMultiReply(t *testing.T) { // send the reply as two packets. list := []*Node{ - MustParseNode("enode://ba85011c70bcc5c04d8607d3a0ed29aa6179c092cbdda10d5d32684fb33ed01bd94f588ca8f91ac48318087dcb02eaf36773a7a453f0eedd6742af668097b29c@10.0.1.16:30303?discport=30304"), - MustParseNode("enode://81fa361d25f157cd421c60dcc28d8dac5ef6a89476633339c5df30287474520caca09627da18543d9079b5b288698b542d56167aa5c09111e55acdbbdf2ef799@10.0.1.16:30303"), + MustParseNode("enode://ba85011c70bcc5c04d8607d3a0ed29aa6179c092cbdda10d5d32684fb33ed01bd94f588ca8f91ac48318087dcb02eaf36773a7a453f0eedd6742af668097b29c@10.0.1.16:60606?discport=30304"), + MustParseNode("enode://81fa361d25f157cd421c60dcc28d8dac5ef6a89476633339c5df30287474520caca09627da18543d9079b5b288698b542d56167aa5c09111e55acdbbdf2ef799@10.0.1.16:60606"), MustParseNode("enode://9bffefd833d53fac8e652415f4973bee289e8b1a5c6c4cbe70abf817ce8a64cee11b823b66a987f51aaa9fba0d6a91b3e6bf0d5a5d1042de8e9eeea057b217f8@10.0.1.36:30301?discport=17"), - MustParseNode("enode://1b5b4aa662d7cb44a7221bfba67302590b643028197a7d5214790f3bac7aaa4a3241be9e83c09cf1f6c69d007c634faae3dc1b1221793e8446c0b3a09de65960@10.0.1.16:30303"), + MustParseNode("enode://1b5b4aa662d7cb44a7221bfba67302590b643028197a7d5214790f3bac7aaa4a3241be9e83c09cf1f6c69d007c634faae3dc1b1221793e8446c0b3a09de65960@10.0.1.16:60606"), } rpclist := make([]rpcNode, len(list)) for i := range list { diff --git a/p2p/message.go b/p2p/message.go index 1292d21213..30affb780d 100644 --- a/p2p/message.go +++ b/p2p/message.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package p2p @@ -27,7 +27,7 @@ import ( "sync/atomic" "time" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/rlp" ) // Msg defines the structure of a p2p message. diff --git a/p2p/message_test.go b/p2p/message_test.go index 8599b7e87c..1457ea0dc3 100644 --- a/p2p/message_test.go +++ b/p2p/message_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package p2p diff --git a/p2p/metrics.go b/p2p/metrics.go index f98cac2742..9eb6740385 100644 --- a/p2p/metrics.go +++ b/p2p/metrics.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Contains the meters and timers used by the networking layer. @@ -21,7 +21,7 @@ package p2p import ( "net" - "github.com/ethereum/go-ethereum/metrics" + "github.com/expanse-project/go-expanse/metrics" ) var ( diff --git a/p2p/nat/nat.go b/p2p/nat/nat.go index 505a1fc77b..4fbe6c6f35 100644 --- a/p2p/nat/nat.go +++ b/p2p/nat/nat.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Package nat provides access to common network port mapping protocols. package nat @@ -25,8 +25,8 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" "github.com/jackpal/go-nat-pmp" ) diff --git a/p2p/nat/nat_test.go b/p2p/nat/nat_test.go index a079e7a22c..420b595fd1 100644 --- a/p2p/nat/nat_test.go +++ b/p2p/nat/nat_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package nat diff --git a/p2p/nat/natpmp.go b/p2p/nat/natpmp.go index c2f9408914..01687d49c0 100644 --- a/p2p/nat/natpmp.go +++ b/p2p/nat/natpmp.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package nat diff --git a/p2p/nat/natupnp.go b/p2p/nat/natupnp.go index 0bcb262bf6..4a46e75d9b 100644 --- a/p2p/nat/natupnp.go +++ b/p2p/nat/natupnp.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package nat diff --git a/p2p/nat/natupnp_test.go b/p2p/nat/natupnp_test.go index 79f6d25ae8..f575c5e42b 100644 --- a/p2p/nat/natupnp_test.go +++ b/p2p/nat/natupnp_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package nat diff --git a/p2p/peer.go b/p2p/peer.go index 1b3b19c798..4af6c8f7e8 100644 --- a/p2p/peer.go +++ b/p2p/peer.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package p2p @@ -25,10 +25,10 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/p2p/discover" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/p2p/discover" + "github.com/expanse-project/go-expanse/rlp" ) const ( diff --git a/p2p/peer_error.go b/p2p/peer_error.go index 62c7b665dd..1f5a0caf01 100644 --- a/p2p/peer_error.go +++ b/p2p/peer_error.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package p2p diff --git a/p2p/peer_test.go b/p2p/peer_test.go index 6f96a823b4..33908f3115 100644 --- a/p2p/peer_test.go +++ b/p2p/peer_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package p2p diff --git a/p2p/protocol.go b/p2p/protocol.go index ac0c3d9426..d441ef3d5c 100644 --- a/p2p/protocol.go +++ b/p2p/protocol.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package p2p diff --git a/p2p/rlpx.go b/p2p/rlpx.go index aaa7338547..51f3be4434 100644 --- a/p2p/rlpx.go +++ b/p2p/rlpx.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package p2p @@ -32,12 +32,12 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/crypto/ecies" - "github.com/ethereum/go-ethereum/crypto/secp256k1" - "github.com/ethereum/go-ethereum/crypto/sha3" - "github.com/ethereum/go-ethereum/p2p/discover" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/crypto/ecies" + "github.com/expanse-project/go-expanse/crypto/secp256k1" + "github.com/expanse-project/go-expanse/crypto/sha3" + "github.com/expanse-project/go-expanse/p2p/discover" + "github.com/expanse-project/go-expanse/rlp" ) const ( diff --git a/p2p/rlpx_test.go b/p2p/rlpx_test.go index 900353f0ee..79e33b20a1 100644 --- a/p2p/rlpx_test.go +++ b/p2p/rlpx_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package p2p @@ -30,11 +30,11 @@ import ( "time" "github.com/davecgh/go-spew/spew" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/crypto/ecies" - "github.com/ethereum/go-ethereum/crypto/sha3" - "github.com/ethereum/go-ethereum/p2p/discover" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/crypto/ecies" + "github.com/expanse-project/go-expanse/crypto/sha3" + "github.com/expanse-project/go-expanse/p2p/discover" + "github.com/expanse-project/go-expanse/rlp" ) func TestSharedSecret(t *testing.T) { diff --git a/p2p/server.go b/p2p/server.go index 6060adc71d..444faa3e8e 100644 --- a/p2p/server.go +++ b/p2p/server.go @@ -1,20 +1,20 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -// Package p2p implements the Ethereum p2p network protocols. +// Package p2p implements the Expanse p2p network protocols. package p2p import ( @@ -379,7 +379,7 @@ func (srv *Server) startListening() error { if !laddr.IP.IsLoopback() && srv.NAT != nil { srv.loopWG.Add(1) go func() { - nat.Map(srv.NAT, srv.quit, "tcp", laddr.Port, laddr.Port, "ethereum p2p") + nat.Map(srv.NAT, srv.quit, "tcp", laddr.Port, laddr.Port, "expanse p2p") srv.loopWG.Done() }() } diff --git a/p2p/server_test.go b/p2p/server_test.go index 976d5baf59..18c6c0a107 100644 --- a/p2p/server_test.go +++ b/p2p/server_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package p2p @@ -25,9 +25,9 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/crypto/sha3" - "github.com/ethereum/go-ethereum/p2p/discover" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/crypto/sha3" + "github.com/expanse-project/go-expanse/p2p/discover" ) func init() { diff --git a/params/protocol_params.go b/params/protocol_params.go index dcc17e05d7..665c8b5d99 100755 --- a/params/protocol_params.go +++ b/params/protocol_params.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // DO NOT EDIT!!! // AUTOGENERATED FROM generators/defaults.go @@ -40,7 +40,7 @@ var ( Sha256WordGas = big.NewInt(12) // MinGasLimit = big.NewInt(5000) // Minimum the gas limit may ever be. - GenesisGasLimit = big.NewInt(3141592) // Gas limit of the Genesis block. + GenesisGasLimit = big.NewInt(31415926) // Gas limit of the Genesis block. Sha3Gas = big.NewInt(30) // Once per SHA3 operation. Sha256Gas = big.NewInt(60) // @@ -59,7 +59,7 @@ var ( Ripemd160WordGas = big.NewInt(120) // MinimumDifficulty = big.NewInt(131072) // The minimum that the difficulty may ever be. CallCreateDepth = big.NewInt(1024) // Maximum depth of call/create stack. - ExpGas = big.NewInt(10) // Once per EXP instuction. + ExpGas = big.NewInt(10) // Once per EXP instruction. LogGas = big.NewInt(375) // Per LOG* operation. CopyGas = big.NewInt(3) // StackLimit = big.NewInt(1024) // Maximum size of VM stack allowed. diff --git a/pow/block.go b/pow/block.go index 11807113dc..d39770e6dd 100644 --- a/pow/block.go +++ b/pow/block.go @@ -1,26 +1,26 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package pow import ( "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/types" ) type Block interface { diff --git a/pow/dagger/dagger.go b/pow/dagger/dagger.go index f54ba71ca1..9d761e3af0 100644 --- a/pow/dagger/dagger.go +++ b/pow/dagger/dagger.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package dagger @@ -22,9 +22,9 @@ import ( "math/rand" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto/sha3" - "github.com/ethereum/go-ethereum/logger" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto/sha3" + "github.com/expanse-project/go-expanse/logger" ) var powlogger = logger.NewLogger("POW") diff --git a/pow/dagger/dagger_test.go b/pow/dagger/dagger_test.go index 39b74df306..c66c02c0e0 100644 --- a/pow/dagger/dagger_test.go +++ b/pow/dagger/dagger_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package dagger @@ -20,7 +20,7 @@ import ( "math/big" "testing" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) func BenchmarkDaggerSearch(b *testing.B) { diff --git a/pow/ezp/pow.go b/pow/ezp/pow.go index 03bb3da291..935913b26d 100644 --- a/pow/ezp/pow.go +++ b/pow/ezp/pow.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package ezp @@ -22,10 +22,10 @@ import ( "math/rand" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto/sha3" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/pow" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto/sha3" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/pow" ) var powlogger = logger.NewLogger("POW") diff --git a/pow/pow.go b/pow/pow.go index 22daf35e4d..be9d8f637f 100644 --- a/pow/pow.go +++ b/pow/pow.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package pow diff --git a/rlp/decode.go b/rlp/decode.go index 1381f5274e..7da365cb00 100644 --- a/rlp/decode.go +++ b/rlp/decode.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package rlp diff --git a/rlp/decode_test.go b/rlp/decode_test.go index d6b0611dd0..9fac81b171 100644 --- a/rlp/decode_test.go +++ b/rlp/decode_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package rlp diff --git a/rlp/doc.go b/rlp/doc.go index 72667416cf..32af758b9b 100644 --- a/rlp/doc.go +++ b/rlp/doc.go @@ -1,27 +1,27 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . /* Package rlp implements the RLP serialization format. The purpose of RLP (Recursive Linear Prefix) qis to encode arbitrarily nested arrays of binary data, and RLP is the main encoding method used -to serialize objects in Ethereum. The only purpose of RLP is to encode +to serialize objects in Expanse. The only purpose of RLP is to encode structure; encoding specific atomic data types (eg. strings, ints, -floats) is left up to higher-order protocols; in Ethereum integers +floats) is left up to higher-order protocols; in Expanse integers must be represented in big endian binary form with no leading zeroes (thus making the integer value zero be equivalent to the empty byte array). diff --git a/rlp/encode.go b/rlp/encode.go index b525ae4e7a..0fa8e4e336 100644 --- a/rlp/encode.go +++ b/rlp/encode.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package rlp diff --git a/rlp/encode_test.go b/rlp/encode_test.go index 60bd956926..0e9b364a8a 100644 --- a/rlp/encode_test.go +++ b/rlp/encode_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package rlp diff --git a/rlp/encoder_example_test.go b/rlp/encoder_example_test.go index 1cffa241c2..80f92528b8 100644 --- a/rlp/encoder_example_test.go +++ b/rlp/encoder_example_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package rlp diff --git a/rlp/typecache.go b/rlp/typecache.go index 0ab096695f..152061b66a 100644 --- a/rlp/typecache.go +++ b/rlp/typecache.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package rlp diff --git a/rpc/api/admin.go b/rpc/api/admin.go index 5e392ae320..ca727e2f92 100644 --- a/rpc/api/admin.go +++ b/rpc/api/admin.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api @@ -82,17 +82,17 @@ type adminhandler func(*adminApi, *shared.Request) (interface{}, error) // admin api provider type adminApi struct { xeth *xeth.XEth - ethereum *eth.Ethereum + expanse *exp.Expanse codec codec.Codec coder codec.ApiCoder ds *docserver.DocServer } // create a new admin api instance -func NewAdminApi(xeth *xeth.XEth, ethereum *eth.Ethereum, codec codec.Codec) *adminApi { +func NewAdminApi(xeth *xeth.XEth, expanse *exp.Expanse, codec codec.Codec) *adminApi { return &adminApi{ xeth: xeth, - ethereum: ethereum, + expanse: expanse, codec: codec, coder: codec.New(nil), ds: docserver.New("/"), @@ -133,7 +133,7 @@ func (self *adminApi) AddPeer(req *shared.Request) (interface{}, error) { return nil, shared.NewDecodeParamError(err.Error()) } - err := self.ethereum.AddPeer(args.Url) + err := self.expanse.AddPeer(args.Url) if err == nil { return true, nil } @@ -141,15 +141,15 @@ func (self *adminApi) AddPeer(req *shared.Request) (interface{}, error) { } func (self *adminApi) Peers(req *shared.Request) (interface{}, error) { - return self.ethereum.PeersInfo(), nil + return self.expanse.PeersInfo(), nil } func (self *adminApi) NodeInfo(req *shared.Request) (interface{}, error) { - return self.ethereum.NodeInfo(), nil + return self.expanse.NodeInfo(), nil } func (self *adminApi) DataDir(req *shared.Request) (interface{}, error) { - return self.ethereum.DataDir, nil + return self.expanse.DataDir, nil } func hasAllBlocks(chain *core.ChainManager, bs []*types.Block) bool { @@ -194,10 +194,10 @@ func (self *adminApi) ImportChain(req *shared.Request) (interface{}, error) { break } // Import the batch. - if hasAllBlocks(self.ethereum.ChainManager(), blocks[:i]) { + if hasAllBlocks(self.expanse.ChainManager(), blocks[:i]) { continue } - if _, err := self.ethereum.ChainManager().InsertChain(blocks[:i]); err != nil { + if _, err := self.expanse.ChainManager().InsertChain(blocks[:i]); err != nil { return false, fmt.Errorf("invalid block %d: %v", n, err) } } @@ -215,7 +215,7 @@ func (self *adminApi) ExportChain(req *shared.Request) (interface{}, error) { return false, err } defer fh.Close() - if err := self.ethereum.ChainManager().Export(fh); err != nil { + if err := self.expanse.ChainManager().Export(fh); err != nil { return false, err } @@ -233,7 +233,7 @@ func (self *adminApi) Verbosity(req *shared.Request) (interface{}, error) { } func (self *adminApi) ChainSyncStatus(req *shared.Request) (interface{}, error) { - pending, cached, importing, estimate := self.ethereum.Downloader().Stats() + pending, cached, importing, estimate := self.expanse.Downloader().Stats() return map[string]interface{}{ "blocksAvailable": pending, @@ -268,7 +268,7 @@ func (self *adminApi) StartRPC(req *shared.Request) (interface{}, error) { CorsDomain: args.CorsDomain, } - apis, err := ParseApiString(args.Apis, self.codec, self.xeth, self.ethereum) + apis, err := ParseApiString(args.Apis, self.codec, self.xeth, self.expanse) if err != nil { return false, err } @@ -434,12 +434,12 @@ func (self *adminApi) RegisterUrl(req *shared.Request) (interface{}, error) { } func (self *adminApi) StartNatSpec(req *shared.Request) (interface{}, error) { - self.ethereum.NatSpec = true + self.expanse.NatSpec = true return true, nil } func (self *adminApi) StopNatSpec(req *shared.Request) (interface{}, error) { - self.ethereum.NatSpec = false + self.expanse.NatSpec = false return true, nil } diff --git a/rpc/api/admin_args.go b/rpc/api/admin_args.go index e3a2f72bf9..08e08db02e 100644 --- a/rpc/api/admin_args.go +++ b/rpc/api/admin_args.go @@ -1,26 +1,26 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api import ( "encoding/json" - "github.com/ethereum/go-ethereum/common/compiler" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/common/compiler" + "github.com/expanse-project/go-expanse/rpc/shared" ) type AddPeerArgs struct { @@ -127,8 +127,8 @@ func (args *StartRPCArgs) UnmarshalJSON(b []byte) (err error) { } args.ListenAddress = "127.0.0.1" - args.ListenPort = 8545 - args.Apis = "net,eth,web3" + args.ListenPort = 9656 + args.Apis = "net,exp,web3" if len(obj) >= 1 && obj[0] != nil { if addr, ok := obj[0].(string); ok { diff --git a/rpc/api/admin_js.go b/rpc/api/admin_js.go index 25dbb4a8d3..fb27e35eeb 100644 --- a/rpc/api/admin_js.go +++ b/rpc/api/admin_js.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api diff --git a/rpc/api/api.go b/rpc/api/api.go index e03250ec6d..5cbb1402f6 100644 --- a/rpc/api/api.go +++ b/rpc/api/api.go @@ -1,26 +1,26 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api import ( - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/rpc/shared" ) // Merge multiple API's to a single API instance -func Merge(apis ...shared.EthereumApi) shared.EthereumApi { +func Merge(apis ...shared.ExpanseApi) shared.ExpanseApi { return newMergedApi(apis...) } diff --git a/rpc/api/api_test.go b/rpc/api/api_test.go index 131ef68f81..d1c6c0594c 100644 --- a/rpc/api/api_test.go +++ b/rpc/api/api_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api @@ -22,11 +22,11 @@ import ( "encoding/json" "strconv" - "github.com/ethereum/go-ethereum/common/compiler" - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" - "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/go-expanse/common/compiler" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" + "github.com/expanse-project/go-expanse/xeth" ) func TestParseApiString(t *testing.T) { @@ -39,7 +39,7 @@ func TestParseApiString(t *testing.T) { t.Errorf("Expected 0 apis from empty API string") } - apis, err = ParseApiString("eth", codec.JSON, nil, nil) + apis, err = ParseApiString("exp", codec.JSON, nil, nil) if err != nil { t.Errorf("Expected nil err from parsing empty API string but got %v", err) } @@ -48,7 +48,7 @@ func TestParseApiString(t *testing.T) { t.Errorf("Expected 1 apis but got %d - %v", apis, apis) } - apis, err = ParseApiString("eth,eth", codec.JSON, nil, nil) + apis, err = ParseApiString("exp,exp", codec.JSON, nil, nil) if err != nil { t.Errorf("Expected nil err from parsing empty API string but got \"%v\"", err) } @@ -57,7 +57,7 @@ func TestParseApiString(t *testing.T) { t.Errorf("Expected 2 apis but got %d - %v", apis, apis) } - apis, err = ParseApiString("eth,invalid", codec.JSON, nil, nil) + apis, err = ParseApiString("exp,invalid", codec.JSON, nil, nil) if err == nil { t.Errorf("Expected an err but got no err") } @@ -92,9 +92,9 @@ func TestCompileSolidity(t *testing.T) { expLanguageVersion := "0" expSource := source - eth := ð.Ethereum{} - xeth := xeth.NewTest(eth, nil) - api := NewEthApi(xeth, eth, codec.JSON) + exp := &exp.Expanse{} + xeth := xeth.NewTest(exp, nil) + api := NewEthApi(xeth, exp, codec.JSON) var rpcRequest shared.Request json.Unmarshal([]byte(jsonstr), &rpcRequest) diff --git a/rpc/api/args.go b/rpc/api/args.go index 20f073b670..f9cfe50878 100644 --- a/rpc/api/args.go +++ b/rpc/api/args.go @@ -1,25 +1,25 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api import ( "encoding/json" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/rpc/shared" ) type CompileArgs struct { diff --git a/rpc/api/args_test.go b/rpc/api/args_test.go index 23ae2930d0..2661acae50 100644 --- a/rpc/api/args_test.go +++ b/rpc/api/args_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api @@ -23,7 +23,7 @@ import ( "math/big" "testing" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/rpc/shared" ) func TestBlockheightInvalidString(t *testing.T) { diff --git a/rpc/api/db.go b/rpc/api/db.go index 0eddc410ed..38917891e9 100644 --- a/rpc/api/db.go +++ b/rpc/api/db.go @@ -1,26 +1,26 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api import ( - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" - "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" + "github.com/expanse-project/go-expanse/xeth" ) const ( @@ -43,16 +43,16 @@ type dbhandler func(*dbApi, *shared.Request) (interface{}, error) // db api provider type dbApi struct { xeth *xeth.XEth - ethereum *eth.Ethereum + expanse *exp.Expanse methods map[string]dbhandler codec codec.ApiCoder } // create a new db api instance -func NewDbApi(xeth *xeth.XEth, ethereum *eth.Ethereum, coder codec.Codec) *dbApi { +func NewDbApi(xeth *xeth.XEth, expanse *exp.Expanse, coder codec.Codec) *dbApi { return &dbApi{ xeth: xeth, - ethereum: ethereum, + expanse: expanse, methods: DbMapping, codec: coder.New(nil), } diff --git a/rpc/api/db_args.go b/rpc/api/db_args.go index d61ea77ee0..10faecfe7e 100644 --- a/rpc/api/db_args.go +++ b/rpc/api/db_args.go @@ -1,26 +1,26 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api import ( "encoding/json" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/rpc/shared" ) type DbArgs struct { diff --git a/rpc/api/db_js.go b/rpc/api/db_js.go index 899f8abd9a..59fff32fef 100644 --- a/rpc/api/db_js.go +++ b/rpc/api/db_js.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api diff --git a/rpc/api/debug.go b/rpc/api/debug.go index d325b17209..934a1fca2b 100644 --- a/rpc/api/debug.go +++ b/rpc/api/debug.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api @@ -21,14 +21,14 @@ import ( "strings" "time" - "github.com/ethereum/ethash" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/vm" - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/rlp" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" - "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/ethash" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/vm" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/rlp" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" + "github.com/expanse-project/go-expanse/xeth" "github.com/rcrowley/go-metrics" ) @@ -55,16 +55,16 @@ type debughandler func(*debugApi, *shared.Request) (interface{}, error) // admin api provider type debugApi struct { xeth *xeth.XEth - ethereum *eth.Ethereum + expanse *exp.Expanse methods map[string]debughandler codec codec.ApiCoder } // create a new debug api instance -func NewDebugApi(xeth *xeth.XEth, ethereum *eth.Ethereum, coder codec.Codec) *debugApi { +func NewDebugApi(xeth *xeth.XEth, expanse *exp.Expanse, coder codec.Codec) *debugApi { return &debugApi{ xeth: xeth, - ethereum: ethereum, + expanse: expanse, methods: DebugMapping, codec: coder.New(nil), } @@ -119,7 +119,7 @@ func (self *debugApi) DumpBlock(req *shared.Request) (interface{}, error) { return nil, fmt.Errorf("block #%d not found", args.BlockNumber) } - stateDb := state.New(block.Root(), self.ethereum.ChainDb()) + stateDb := state.New(block.Root(), self.expanse.ChainDb()) if stateDb == nil { return nil, nil } @@ -152,7 +152,7 @@ func (self *debugApi) SetHead(req *shared.Request) (interface{}, error) { return nil, fmt.Errorf("block #%d not found", args.BlockNumber) } - self.ethereum.ChainManager().SetHead(block) + self.expanse.ChainManager().SetHead(block) return nil, nil } @@ -172,7 +172,7 @@ func (self *debugApi) ProcessBlock(req *shared.Request) (interface{}, error) { defer func() { vm.Debug = old }() vm.Debug = true - _, err := self.ethereum.BlockProcessor().RetryProcess(block) + _, err := self.expanse.BlockProcessor().RetryProcess(block) if err == nil { return true, nil } diff --git a/rpc/api/debug_args.go b/rpc/api/debug_args.go index 041ad6b6ad..dee8ae54db 100644 --- a/rpc/api/debug_args.go +++ b/rpc/api/debug_args.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api @@ -22,7 +22,7 @@ import ( "math/big" "reflect" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/rpc/shared" ) type WaitForBlockArgs struct { diff --git a/rpc/api/debug_js.go b/rpc/api/debug_js.go index 0eb9f97f15..18b1587823 100644 --- a/rpc/api/debug_js.go +++ b/rpc/api/debug_js.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api diff --git a/rpc/api/eth.go b/rpc/api/eth.go index 5199bd966d..6f7734b9d4 100644 --- a/rpc/api/eth.go +++ b/rpc/api/eth.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api @@ -23,11 +23,11 @@ import ( "fmt" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" - "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" + "github.com/expanse-project/go-expanse/xeth" "gopkg.in/fatih/set.v0" ) @@ -35,16 +35,16 @@ const ( EthApiVersion = "1.0" ) -// eth api provider -// See https://github.com/ethereum/wiki/wiki/JSON-RPC +// exp api provider +// See https://github.com/expanse-project/wiki/wiki/JSON-RPC type ethApi struct { xeth *xeth.XEth - ethereum *eth.Ethereum + expanse *exp.Expanse methods map[string]ethhandler codec codec.ApiCoder } -// eth callback handler +// exp callback handler type ethhandler func(*ethApi, *shared.Request) (interface{}, error) var ( @@ -100,8 +100,8 @@ var ( ) // create new ethApi instance -func NewEthApi(xeth *xeth.XEth, eth *eth.Ethereum, codec codec.Codec) *ethApi { - return ðApi{xeth, eth, ethMapping, codec.New(nil)} +func NewEthApi(xeth *xeth.XEth, exp *exp.Expanse, codec codec.Codec) *ethApi { + return ðApi{xeth, exp, ethMapping, codec.New(nil)} } // collection with supported methods @@ -591,10 +591,10 @@ func (self *ethApi) Resend(req *shared.Request) (interface{}, error) { from := common.HexToAddress(args.Tx.From) - pending := self.ethereum.TxPool().GetTransactions() + pending := self.expanse.TxPool().GetTransactions() for _, p := range pending { if pFrom, err := p.From(); err == nil && pFrom == from && p.SigHash() == args.Tx.tx.SigHash() { - self.ethereum.TxPool().RemoveTx(common.HexToHash(args.Tx.Hash)) + self.expanse.TxPool().RemoveTx(common.HexToHash(args.Tx.Hash)) return self.xeth.Transact(args.Tx.From, args.Tx.To, args.Tx.Nonce, args.Tx.Value, args.GasLimit, args.GasPrice, args.Tx.Data) } } @@ -603,11 +603,11 @@ func (self *ethApi) Resend(req *shared.Request) (interface{}, error) { } func (self *ethApi) PendingTransactions(req *shared.Request) (interface{}, error) { - txs := self.ethereum.TxPool().GetTransactions() + txs := self.expanse.TxPool().GetTransactions() // grab the accounts from the account manager. This will help with determining which // transactions should be returned. - accounts, err := self.ethereum.AccountManager().Accounts() + accounts, err := self.expanse.AccountManager().Accounts() if err != nil { return nil, err } diff --git a/rpc/api/eth_args.go b/rpc/api/eth_args.go index 8bd077e209..c3c56e366f 100644 --- a/rpc/api/eth_args.go +++ b/rpc/api/eth_args.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api @@ -23,10 +23,10 @@ import ( "strconv" "strings" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/rpc/shared" ) const ( diff --git a/rpc/api/eth_js.go b/rpc/api/eth_js.go index 393dac22f4..728a20d782 100644 --- a/rpc/api/eth_js.go +++ b/rpc/api/eth_js.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api @@ -21,7 +21,7 @@ package api const Eth_JS = ` web3._extend({ - property: 'eth', + property: 'exp', methods: [ new web3._extend.Method({ diff --git a/rpc/api/mergedapi.go b/rpc/api/mergedapi.go index 8f4ef8e603..79993481e3 100644 --- a/rpc/api/mergedapi.go +++ b/rpc/api/mergedapi.go @@ -1,25 +1,25 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api import ( - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/rpc/shared" ) const ( @@ -29,14 +29,14 @@ const ( // combines multiple API's type MergedApi struct { apis map[string]string - methods map[string]shared.EthereumApi + methods map[string]shared.ExpanseApi } // create new merged api instance -func newMergedApi(apis ...shared.EthereumApi) *MergedApi { +func newMergedApi(apis ...shared.ExpanseApi) *MergedApi { mergedApi := new(MergedApi) mergedApi.apis = make(map[string]string, len(apis)) - mergedApi.methods = make(map[string]shared.EthereumApi) + mergedApi.methods = make(map[string]shared.ExpanseApi) for _, api := range apis { mergedApi.apis[api.Name()] = api.ApiVersion() diff --git a/rpc/api/miner.go b/rpc/api/miner.go index 5325a660af..b9df315647 100644 --- a/rpc/api/miner.go +++ b/rpc/api/miner.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api @@ -48,15 +48,15 @@ type minerhandler func(*minerApi, *shared.Request) (interface{}, error) // miner api provider type minerApi struct { - ethereum *eth.Ethereum + expanse *exp.Expanse methods map[string]minerhandler codec codec.ApiCoder } // create a new miner api instance -func NewMinerApi(ethereum *eth.Ethereum, coder codec.Codec) *minerApi { +func NewMinerApi(expanse *exp.Expanse, coder codec.Codec) *minerApi { return &minerApi{ - ethereum: ethereum, + expanse: expanse, methods: MinerMapping, codec: coder.New(nil), } @@ -96,11 +96,11 @@ func (self *minerApi) StartMiner(req *shared.Request) (interface{}, error) { return nil, err } if args.Threads == -1 { // (not specified by user, use default) - args.Threads = self.ethereum.MinerThreads + args.Threads = self.expanse.MinerThreads } - self.ethereum.StartAutoDAG() - err := self.ethereum.StartMining(args.Threads) + self.expanse.StartAutoDAG() + err := self.expanse.StartMining(args.Threads) if err == nil { return true, nil } @@ -109,12 +109,12 @@ func (self *minerApi) StartMiner(req *shared.Request) (interface{}, error) { } func (self *minerApi) StopMiner(req *shared.Request) (interface{}, error) { - self.ethereum.StopMining() + self.expanse.StopMining() return true, nil } func (self *minerApi) Hashrate(req *shared.Request) (interface{}, error) { - return self.ethereum.Miner().HashRate(), nil + return self.expanse.Miner().HashRate(), nil } func (self *minerApi) SetExtra(req *shared.Request) (interface{}, error) { @@ -136,7 +136,7 @@ func (self *minerApi) SetGasPrice(req *shared.Request) (interface{}, error) { return false, err } - self.ethereum.Miner().SetGasPrice(common.String2Big(args.Price)) + self.expanse.Miner().SetGasPrice(common.String2Big(args.Price)) return true, nil } @@ -145,17 +145,17 @@ func (self *minerApi) SetEtherbase(req *shared.Request) (interface{}, error) { if err := self.codec.Decode(req.Params, &args); err != nil { return false, err } - self.ethereum.SetEtherbase(args.Etherbase) + self.expanse.SetEtherbase(args.Etherbase) return nil, nil } func (self *minerApi) StartAutoDAG(req *shared.Request) (interface{}, error) { - self.ethereum.StartAutoDAG() + self.expanse.StartAutoDAG() return true, nil } func (self *minerApi) StopAutoDAG(req *shared.Request) (interface{}, error) { - self.ethereum.StopAutoDAG() + self.expanse.StopAutoDAG() return true, nil } diff --git a/rpc/api/miner_args.go b/rpc/api/miner_args.go index 5ceb244feb..868304d668 100644 --- a/rpc/api/miner_args.go +++ b/rpc/api/miner_args.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api @@ -21,8 +21,8 @@ import ( "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/rpc/shared" ) type StartMinerArgs struct { diff --git a/rpc/api/miner_js.go b/rpc/api/miner_js.go index 0998a9f41c..3a7fcdd9a1 100644 --- a/rpc/api/miner_js.go +++ b/rpc/api/miner_js.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api diff --git a/rpc/api/net.go b/rpc/api/net.go index 9c63696152..c4a9d4d4f8 100644 --- a/rpc/api/net.go +++ b/rpc/api/net.go @@ -1,26 +1,26 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api import ( - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" - "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" + "github.com/expanse-project/go-expanse/xeth" ) const ( @@ -42,16 +42,16 @@ type nethandler func(*netApi, *shared.Request) (interface{}, error) // net api provider type netApi struct { xeth *xeth.XEth - ethereum *eth.Ethereum + expanse *exp.Expanse methods map[string]nethandler codec codec.ApiCoder } // create a new net api instance -func NewNetApi(xeth *xeth.XEth, eth *eth.Ethereum, coder codec.Codec) *netApi { +func NewNetApi(xeth *xeth.XEth, exp *exp.Expanse, coder codec.Codec) *netApi { return &netApi{ xeth: xeth, - ethereum: eth, + expanse: exp, methods: netMapping, codec: coder.New(nil), } diff --git a/rpc/api/net_js.go b/rpc/api/net_js.go index 2ee1f0041a..139c01ebd0 100644 --- a/rpc/api/net_js.go +++ b/rpc/api/net_js.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api diff --git a/rpc/api/parsing.go b/rpc/api/parsing.go index 0698e8dbe7..cd73a60090 100644 --- a/rpc/api/parsing.go +++ b/rpc/api/parsing.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api @@ -24,9 +24,9 @@ import ( "math/big" "strings" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/rpc/shared" ) type hexdata struct { diff --git a/rpc/api/personal.go b/rpc/api/personal.go index 6c73ac83df..bad4464a30 100644 --- a/rpc/api/personal.go +++ b/rpc/api/personal.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api @@ -20,11 +20,11 @@ import ( "fmt" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" - "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" + "github.com/expanse-project/go-expanse/xeth" ) const ( @@ -47,16 +47,16 @@ type personalhandler func(*personalApi, *shared.Request) (interface{}, error) // net api provider type personalApi struct { xeth *xeth.XEth - ethereum *eth.Ethereum + expanse *exp.Expanse methods map[string]personalhandler codec codec.ApiCoder } // create a new net api instance -func NewPersonalApi(xeth *xeth.XEth, eth *eth.Ethereum, coder codec.Codec) *personalApi { +func NewPersonalApi(xeth *xeth.XEth, exp *exp.Expanse, coder codec.Codec) *personalApi { return &personalApi{ xeth: xeth, - ethereum: eth, + expanse: exp, methods: personalMapping, codec: coder.New(nil), } @@ -100,7 +100,7 @@ func (self *personalApi) NewAccount(req *shared.Request) (interface{}, error) { return nil, shared.NewDecodeParamError(err.Error()) } - am := self.ethereum.AccountManager() + am := self.expanse.AccountManager() acc, err := am.NewAccount(args.Passphrase) return acc.Address.Hex(), err } @@ -112,7 +112,7 @@ func (self *personalApi) DeleteAccount(req *shared.Request) (interface{}, error) } addr := common.HexToAddress(args.Address) - am := self.ethereum.AccountManager() + am := self.expanse.AccountManager() if err := am.DeleteAccount(addr, args.Passphrase); err == nil { return true, nil } else { diff --git a/rpc/api/personal_args.go b/rpc/api/personal_args.go index 5a584fb0ce..cf14942489 100644 --- a/rpc/api/personal_args.go +++ b/rpc/api/personal_args.go @@ -1,25 +1,25 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api import ( "encoding/json" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/rpc/shared" ) type NewAccountArgs struct { diff --git a/rpc/api/personal_js.go b/rpc/api/personal_js.go index 81c5d4a366..412c2c120e 100644 --- a/rpc/api/personal_js.go +++ b/rpc/api/personal_js.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api diff --git a/rpc/api/shh.go b/rpc/api/shh.go index 9ca6f9dda4..747bc9e975 100644 --- a/rpc/api/shh.go +++ b/rpc/api/shh.go @@ -1,28 +1,28 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api import ( "math/big" - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" - "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" + "github.com/expanse-project/go-expanse/xeth" ) const ( @@ -52,16 +52,16 @@ type shhhandler func(*shhApi, *shared.Request) (interface{}, error) // shh api provider type shhApi struct { xeth *xeth.XEth - ethereum *eth.Ethereum + expanse *exp.Expanse methods map[string]shhhandler codec codec.ApiCoder } // create a new whisper api instance -func NewShhApi(xeth *xeth.XEth, eth *eth.Ethereum, coder codec.Codec) *shhApi { +func NewShhApi(xeth *xeth.XEth, exp *exp.Expanse, coder codec.Codec) *shhApi { return &shhApi{ xeth: xeth, - ethereum: eth, + expanse: exp, methods: shhMapping, codec: coder.New(nil), } diff --git a/rpc/api/shh_args.go b/rpc/api/shh_args.go index 468a0b98fc..a1300c4e47 100644 --- a/rpc/api/shh_args.go +++ b/rpc/api/shh_args.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api @@ -21,7 +21,7 @@ import ( "fmt" "math/big" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/rpc/shared" ) type WhisperMessageArgs struct { diff --git a/rpc/api/shh_js.go b/rpc/api/shh_js.go index a92ad1644b..93d90ad985 100644 --- a/rpc/api/shh_js.go +++ b/rpc/api/shh_js.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api diff --git a/rpc/api/txpool.go b/rpc/api/txpool.go index 27e40cae59..cf92692934 100644 --- a/rpc/api/txpool.go +++ b/rpc/api/txpool.go @@ -1,26 +1,26 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api import ( - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" - "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" + "github.com/expanse-project/go-expanse/xeth" ) const ( @@ -40,16 +40,16 @@ type txpoolhandler func(*txPoolApi, *shared.Request) (interface{}, error) // txpool api provider type txPoolApi struct { xeth *xeth.XEth - ethereum *eth.Ethereum + expanse *exp.Expanse methods map[string]txpoolhandler codec codec.ApiCoder } // create a new txpool api instance -func NewTxPoolApi(xeth *xeth.XEth, eth *eth.Ethereum, coder codec.Codec) *txPoolApi { +func NewTxPoolApi(xeth *xeth.XEth, exp *exp.Expanse, coder codec.Codec) *txPoolApi { return &txPoolApi{ xeth: xeth, - ethereum: eth, + expanse: exp, methods: txpoolMapping, codec: coder.New(nil), } @@ -84,7 +84,7 @@ func (self *txPoolApi) ApiVersion() string { } func (self *txPoolApi) Status(req *shared.Request) (interface{}, error) { - pending, queue := self.ethereum.TxPool().Stats() + pending, queue := self.expanse.TxPool().Stats() return map[string]int{ "pending": pending, "queued": queue, diff --git a/rpc/api/txpool_js.go b/rpc/api/txpool_js.go index b6c29871a2..355dc2b845 100644 --- a/rpc/api/txpool_js.go +++ b/rpc/api/txpool_js.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api diff --git a/rpc/api/utils.go b/rpc/api/utils.go index 50c607d16b..7857347365 100644 --- a/rpc/api/utils.go +++ b/rpc/api/utils.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api @@ -21,10 +21,10 @@ import ( "fmt" - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" - "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" + "github.com/expanse-project/go-expanse/xeth" ) var ( @@ -64,7 +64,7 @@ var ( "seedHash", "setHead", }, - "eth": []string{ + "exp": []string{ "accounts", "blockNumber", "call", @@ -147,34 +147,34 @@ var ( ) // Parse a comma separated API string to individual api's -func ParseApiString(apistr string, codec codec.Codec, xeth *xeth.XEth, eth *eth.Ethereum) ([]shared.EthereumApi, error) { +func ParseApiString(apistr string, codec codec.Codec, xeth *xeth.XEth, exp *exp.Expanse) ([]shared.ExpanseApi, error) { if len(strings.TrimSpace(apistr)) == 0 { return nil, fmt.Errorf("Empty apistr provided") } names := strings.Split(apistr, ",") - apis := make([]shared.EthereumApi, len(names)) + apis := make([]shared.ExpanseApi, len(names)) for i, name := range names { switch strings.ToLower(strings.TrimSpace(name)) { case shared.AdminApiName: - apis[i] = NewAdminApi(xeth, eth, codec) + apis[i] = NewAdminApi(xeth, exp, codec) case shared.DebugApiName: - apis[i] = NewDebugApi(xeth, eth, codec) + apis[i] = NewDebugApi(xeth, exp, codec) case shared.DbApiName: - apis[i] = NewDbApi(xeth, eth, codec) + apis[i] = NewDbApi(xeth, exp, codec) case shared.EthApiName: - apis[i] = NewEthApi(xeth, eth, codec) + apis[i] = NewEthApi(xeth, exp, codec) case shared.MinerApiName: - apis[i] = NewMinerApi(eth, codec) + apis[i] = NewMinerApi(exp, codec) case shared.NetApiName: - apis[i] = NewNetApi(xeth, eth, codec) + apis[i] = NewNetApi(xeth, exp, codec) case shared.ShhApiName: - apis[i] = NewShhApi(xeth, eth, codec) + apis[i] = NewShhApi(xeth, exp, codec) case shared.TxPoolApiName: - apis[i] = NewTxPoolApi(xeth, eth, codec) + apis[i] = NewTxPoolApi(xeth, exp, codec) case shared.PersonalApiName: - apis[i] = NewPersonalApi(xeth, eth, codec) + apis[i] = NewPersonalApi(xeth, exp, codec) case shared.Web3ApiName: apis[i] = NewWeb3Api(xeth, codec) default: diff --git a/rpc/api/web3.go b/rpc/api/web3.go index e2d8543d34..422595b476 100644 --- a/rpc/api/web3.go +++ b/rpc/api/web3.go @@ -1,27 +1,27 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api import ( - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" - "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" + "github.com/expanse-project/go-expanse/xeth" ) const ( diff --git a/rpc/api/web3_args.go b/rpc/api/web3_args.go index 9e39f7130f..d520a42a2e 100644 --- a/rpc/api/web3_args.go +++ b/rpc/api/web3_args.go @@ -1,25 +1,25 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api import ( "encoding/json" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/rpc/shared" ) type Sha3Args struct { diff --git a/rpc/codec/codec.go b/rpc/codec/codec.go index 786080b44a..a252f182db 100644 --- a/rpc/codec/codec.go +++ b/rpc/codec/codec.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package codec @@ -20,7 +20,7 @@ import ( "net" "strconv" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/rpc/shared" ) type Codec int diff --git a/rpc/codec/json.go b/rpc/codec/json.go index cfc449143b..4f8aaa7504 100644 --- a/rpc/codec/json.go +++ b/rpc/codec/json.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package codec @@ -23,7 +23,7 @@ import ( "time" "strings" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/rpc/shared" ) const ( diff --git a/rpc/codec/json_test.go b/rpc/codec/json_test.go index 01ef77e57d..40b586c112 100644 --- a/rpc/codec/json_test.go +++ b/rpc/codec/json_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package codec diff --git a/rpc/comms/comms.go b/rpc/comms/comms.go index 731b2f62e4..53c05ed647 100644 --- a/rpc/comms/comms.go +++ b/rpc/comms/comms.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package comms @@ -25,10 +25,10 @@ import ( "strconv" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" ) const ( @@ -48,8 +48,8 @@ var ( }, ",") ) -type EthereumClient interface { - // Close underlying connection +type ExpanseClient interface { + // Close underlaying connection Close() // Send request Send(interface{}) error @@ -59,7 +59,7 @@ type EthereumClient interface { SupportedModules() (map[string]string, error) } -func handle(id int, conn net.Conn, api shared.EthereumApi, c codec.Codec) { +func handle(id int, conn net.Conn, api shared.ExpanseApi, c codec.Codec) { codec := c.New(conn) for { @@ -108,9 +108,9 @@ func handle(id int, conn net.Conn, api shared.EthereumApi, c codec.Codec) { // Endpoint must be in the form of: // ${protocol}:${path} -// e.g. ipc:/tmp/geth.ipc -// rpc:localhost:8545 -func ClientFromEndpoint(endpoint string, c codec.Codec) (EthereumClient, error) { +// e.g. ipc:/tmp/gexp.ipc +// rpc:localhost:9656 +func ClientFromEndpoint(endpoint string, c codec.Codec) (ExpanseClient, error) { if strings.HasPrefix(endpoint, "ipc:") { cfg := IpcConfig{ Endpoint: endpoint[4:], @@ -121,7 +121,7 @@ func ClientFromEndpoint(endpoint string, c codec.Codec) (EthereumClient, error) if strings.HasPrefix(endpoint, "rpc:") { parts := strings.Split(endpoint, ":") addr := "http://localhost" - port := uint(8545) + port := uint(9656) if len(parts) >= 3 { addr = parts[1] + ":" + parts[2] } diff --git a/rpc/comms/http.go b/rpc/comms/http.go index c165aa27e1..dfa0fd5851 100644 --- a/rpc/comms/http.go +++ b/rpc/comms/http.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package comms @@ -66,11 +66,11 @@ type stopServer struct { type handler struct { codec codec.Codec - api shared.EthereumApi + api shared.ExpanseApi } // StartHTTP starts listening for RPC requests sent via HTTP. -func StartHttp(cfg HttpConfig, codec codec.Codec, api shared.EthereumApi) error { +func StartHttp(cfg HttpConfig, codec codec.Codec, api shared.ExpanseApi) error { httpServerMu.Lock() defer httpServerMu.Unlock() diff --git a/rpc/comms/inproc.go b/rpc/comms/inproc.go index e8058e32bf..2c07010969 100644 --- a/rpc/comms/inproc.go +++ b/rpc/comms/inproc.go @@ -1,30 +1,30 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package comms import ( "fmt" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" ) type InProcClient struct { - api shared.EthereumApi + api shared.ExpanseApi codec codec.Codec lastId interface{} lastJsonrpc string @@ -44,7 +44,7 @@ func (self *InProcClient) Close() { } // Need to setup api support -func (self *InProcClient) Initialize(offeredApi shared.EthereumApi) { +func (self *InProcClient) Initialize(offeredApi shared.ExpanseApi) { self.api = offeredApi } diff --git a/rpc/comms/ipc.go b/rpc/comms/ipc.go index 3de659b65c..7c4a25cf8f 100644 --- a/rpc/comms/ipc.go +++ b/rpc/comms/ipc.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package comms @@ -23,8 +23,8 @@ import ( "encoding/json" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" ) type IpcConfig struct { @@ -90,7 +90,7 @@ func NewIpcClient(cfg IpcConfig, codec codec.Codec) (*ipcClient, error) { } // Start IPC server -func StartIpc(cfg IpcConfig, codec codec.Codec, initializer func(conn net.Conn) (shared.EthereumApi, error)) error { +func StartIpc(cfg IpcConfig, codec codec.Codec, initializer func(conn net.Conn) (shared.ExpanseApi, error)) error { return startIpc(cfg, codec, initializer) } diff --git a/rpc/comms/ipc_unix.go b/rpc/comms/ipc_unix.go index 9d90da0719..bbe20765d7 100644 --- a/rpc/comms/ipc_unix.go +++ b/rpc/comms/ipc_unix.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris @@ -68,7 +68,7 @@ func (self *ipcClient) reconnect() error { return err } -func startIpc(cfg IpcConfig, codec codec.Codec, initializer func(conn net.Conn) (shared.EthereumApi, error)) error { +func startIpc(cfg IpcConfig, codec codec.Codec, initializer func(conn net.Conn) (shared.ExpanseApi, error)) error { os.Remove(cfg.Endpoint) // in case it still exists from a previous run l, err := net.ListenUnix("unix", &net.UnixAddr{Name: cfg.Endpoint, Net: "unix"}) diff --git a/rpc/comms/ipc_windows.go b/rpc/comms/ipc_windows.go index 47edd9e5bc..8a539573d6 100644 --- a/rpc/comms/ipc_windows.go +++ b/rpc/comms/ipc_windows.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // +build windows @@ -688,7 +688,7 @@ func (self *ipcClient) reconnect() error { return err } -func startIpc(cfg IpcConfig, codec codec.Codec, initializer func(conn net.Conn) (shared.EthereumApi, error)) error { +func startIpc(cfg IpcConfig, codec codec.Codec, initializer func(conn net.Conn) (shared.ExpanseApi, error)) error { os.Remove(cfg.Endpoint) // in case it still exists from a previous run l, err := Listen(cfg.Endpoint) diff --git a/rpc/jeth.go b/rpc/jeth.go index 757f6b7eb5..68a9f63912 100644 --- a/rpc/jeth.go +++ b/rpc/jeth.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package rpc @@ -33,13 +33,13 @@ import ( ) type Jeth struct { - ethApi shared.EthereumApi + ethApi shared.ExpanseApi re *jsre.JSRE - client comms.EthereumClient + client comms.ExpanseClient fe xeth.Frontend } -func NewJeth(ethApi shared.EthereumApi, re *jsre.JSRE, client comms.EthereumClient, fe xeth.Frontend) *Jeth { +func NewJeth(ethApi shared.ExpanseApi, re *jsre.JSRE, client comms.ExpanseClient, fe xeth.Frontend) *Jeth { return &Jeth{ethApi, re, client, fe} } diff --git a/rpc/shared/errors.go b/rpc/shared/errors.go index 85af1bb2f4..5df8996c30 100644 --- a/rpc/shared/errors.go +++ b/rpc/shared/errors.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package shared diff --git a/rpc/shared/types.go b/rpc/shared/types.go index 659b74bf60..8dba495de4 100644 --- a/rpc/shared/types.go +++ b/rpc/shared/types.go @@ -1,30 +1,30 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package shared import ( "encoding/json" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" ) -// Ethereum RPC API interface -type EthereumApi interface { +// Expanse RPC API interface +type ExpanseApi interface { // API identifier Name() string diff --git a/rpc/shared/utils.go b/rpc/shared/utils.go index b13e9eb1b4..eb241d0097 100644 --- a/rpc/shared/utils.go +++ b/rpc/shared/utils.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package shared @@ -20,7 +20,7 @@ import "strings" const ( AdminApiName = "admin" - EthApiName = "eth" + EthApiName = "exp" DbApiName = "db" DebugApiName = "debug" MergedApiName = "merged" diff --git a/rpc/useragent/agent.go b/rpc/useragent/agent.go index df0739e659..6f5c195e98 100644 --- a/rpc/useragent/agent.go +++ b/rpc/useragent/agent.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // package user agent provides frontends and agents which can interact with the user package useragent diff --git a/rpc/xeth.go b/rpc/xeth.go index 9527a96c00..df4f6edff6 100644 --- a/rpc/xeth.go +++ b/rpc/xeth.go @@ -1,20 +1,20 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -// Package rpc implements the Ethereum JSON-RPC API. +// Package rpc implements the Expanse JSON-RPC API. package rpc import ( @@ -23,18 +23,18 @@ import ( "reflect" "sync/atomic" - "github.com/ethereum/go-ethereum/rpc/comms" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/rpc/comms" + "github.com/expanse-project/go-expanse/rpc/shared" ) // Xeth is a native API interface to a remote node. type Xeth struct { - client comms.EthereumClient + client comms.ExpanseClient reqId uint32 } // NewXeth constructs a new native API interface to a remote node. -func NewXeth(client comms.EthereumClient) *Xeth { +func NewXeth(client comms.ExpanseClient) *Xeth { return &Xeth{ client: client, } diff --git a/tests/block_test.go b/tests/block_test.go index b0db5fe568..80a9f6609c 100644 --- a/tests/block_test.go +++ b/tests/block_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package tests diff --git a/tests/block_test_util.go b/tests/block_test_util.go index 2090afce71..616f0e26f6 100644 --- a/tests/block_test_util.go +++ b/tests/block_test_util.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package tests @@ -28,16 +28,16 @@ import ( "strings" "time" - "github.com/ethereum/go-ethereum/accounts" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/accounts" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/rlp" ) // Block Test JSON Format @@ -162,23 +162,23 @@ func runBlockTest(test *BlockTest) error { cfg := test.makeEthConfig() cfg.GenesisBlock = test.Genesis - ethereum, err := eth.New(cfg) + expanse, err := exp.New(cfg) if err != nil { return err } - err = ethereum.Start() + err = expanse.Start() if err != nil { return err } // import pre accounts - statedb, err := test.InsertPreState(ethereum) + statedb, err := test.InsertPreState(expanse) if err != nil { return fmt.Errorf("InsertPreState: %v", err) } - err = test.TryBlocksInsert(ethereum.ChainManager()) + err = test.TryBlocksInsert(expanse.ChainManager()) if err != nil { return err } @@ -189,10 +189,10 @@ func runBlockTest(test *BlockTest) error { return nil } -func (test *BlockTest) makeEthConfig() *eth.Config { +func (test *BlockTest) makeEthConfig() *exp.Config { ks := crypto.NewKeyStorePassphrase(filepath.Join(common.DefaultDataDir(), "keystore")) - return ð.Config{ + return &exp.Config{ DataDir: common.DefaultDataDir(), Verbosity: 5, Etherbase: common.Address{}, @@ -203,8 +203,8 @@ func (test *BlockTest) makeEthConfig() *eth.Config { // InsertPreState populates the given database with the genesis // accounts defined by the test. -func (t *BlockTest) InsertPreState(ethereum *eth.Ethereum) (*state.StateDB, error) { - db := ethereum.ChainDb() +func (t *BlockTest) InsertPreState(expanse *exp.Expanse) (*state.StateDB, error) { + db := expanse.ChainDb() statedb := state.New(common.Hash{}, db) for addrString, acct := range t.preAccounts { addr, err := hex.DecodeString(addrString) @@ -227,7 +227,7 @@ func (t *BlockTest) InsertPreState(ethereum *eth.Ethereum) (*state.StateDB, erro if acct.PrivateKey != "" { privkey, err := hex.DecodeString(strings.TrimPrefix(acct.PrivateKey, "0x")) err = crypto.ImportBlockTestKey(privkey) - err = ethereum.AccountManager().TimedUnlock(common.BytesToAddress(addr), "", 999999*time.Second) + err = expanse.AccountManager().TimedUnlock(common.BytesToAddress(addr), "", 999999*time.Second) if err != nil { return nil, err } @@ -252,7 +252,7 @@ func (t *BlockTest) InsertPreState(ethereum *eth.Ethereum) (*state.StateDB, erro return statedb, nil } -/* See https://github.com/ethereum/tests/wiki/Blockchain-Tests-II +/* See https://github.com/expanse-project/tests/wiki/Blockchain-Tests-II Whether a block is valid or not is a bit subtle, it's defined by presence of blockHeader, transactions and uncleHeaders fields. If they are missing, the block is diff --git a/tests/files/ansible/roles/common/tasks/main.yml b/tests/files/ansible/roles/common/tasks/main.yml index 6c0c7a1197..df92ba07a3 100755 --- a/tests/files/ansible/roles/common/tasks/main.yml +++ b/tests/files/ansible/roles/common/tasks/main.yml @@ -8,6 +8,6 @@ - name: checkout test repo git: - repo: https://github.com/ethereum/tests.git + repo: https://github.com/expanse-project/tests.git version: develop dest: git diff --git a/tests/files/ansible/roles/ec2/vars/main.yml b/tests/files/ansible/roles/ec2/vars/main.yml index 3166da02cd..0dec1612e0 100755 --- a/tests/files/ansible/roles/ec2/vars/main.yml +++ b/tests/files/ansible/roles/ec2/vars/main.yml @@ -12,6 +12,6 @@ keypair: christoph ip_access_range: 0.0.0.0/0 -project_description: https://github.com/ethereum/tests +project_description: https://github.com/expanse-project/tests total_no_instances: 3 diff --git a/tests/files/ansible/roles/testrunner/tasks/main.yml b/tests/files/ansible/roles/testrunner/tasks/main.yml index 41c195f245..d4b00ebe56 100755 --- a/tests/files/ansible/roles/testrunner/tasks/main.yml +++ b/tests/files/ansible/roles/testrunner/tasks/main.yml @@ -2,7 +2,7 @@ - name: update C++ client docker_image: path: /home/{{ ansible_ssh_user }}/git/ansible/test-files/docker-cppjit - name: ethereum/cppjit-testrunner + name: expanse/cppjit-testrunner state: build async: 1200 poll: 5 @@ -10,7 +10,7 @@ - name: update Go client docker_image: path: /home/{{ ansible_ssh_user }}/git/ansible/test-files/docker-go - name: ethereum/go-testrunner + name: expanse/go-testrunner state: build async: 1200 poll: 5 @@ -18,7 +18,7 @@ - name: update Python client docker_image: path: /home/{{ ansible_ssh_user }}/git/ansible/test-files/docker-python - name: ethereum/python-testrunner + name: expanse/python-testrunner state: build async: 1200 poll: 5 diff --git a/tests/files/ansible/test-files/create-docker-images.sh b/tests/files/ansible/test-files/create-docker-images.sh index 06728c6d72..a6b149a20f 100755 --- a/tests/files/ansible/test-files/create-docker-images.sh +++ b/tests/files/ansible/test-files/create-docker-images.sh @@ -2,6 +2,6 @@ # creates the necessary docker images to run testrunner.sh locally -docker build --tag="ethereum/cppjit-testrunner" docker-cppjit -docker build --tag="ethereum/python-testrunner" docker-python -docker build --tag="ethereum/go-testrunner" docker-go +docker build --tag="expanse/cppjit-testrunner" docker-cppjit +docker build --tag="expanse/python-testrunner" docker-python +docker build --tag="expanse/go-testrunner" docker-go diff --git a/tests/files/ansible/test-files/docker-cpp/Dockerfile b/tests/files/ansible/test-files/docker-cpp/Dockerfile index a3b0e4ca6d..40b5f353a1 100755 --- a/tests/files/ansible/test-files/docker-cpp/Dockerfile +++ b/tests/files/ansible/test-files/docker-cpp/Dockerfile @@ -1,32 +1,32 @@ -# adjusted from https://github.com/ethereum/cpp-ethereum/blob/develop/docker/Dockerfile +# adjusted from https://github.com/expanse-project/cpp-expanse/blob/develop/docker/Dockerfile FROM ubuntu:14.04 ENV DEBIAN_FRONTEND noninteractive RUN apt-get update RUN apt-get upgrade -y -# Ethereum dependencies +# Expanse dependencies RUN apt-get install -qy build-essential g++-4.8 git cmake libboost-all-dev libcurl4-openssl-dev wget RUN apt-get install -qy automake unzip libgmp-dev libtool libleveldb-dev yasm libminiupnpc-dev libreadline-dev scons RUN apt-get install -qy libjsoncpp-dev libargtable2-dev -# NCurses based GUI (not optional though for a succesful compilation, see https://github.com/ethereum/cpp-ethereum/issues/452 ) +# NCurses based GUI (not optional though for a succesful compilation, see https://github.com/expanse-project/cpp-expanse/issues/452 ) RUN apt-get install -qy libncurses5-dev # Qt-based GUI # RUN apt-get install -qy qtbase5-dev qt5-default qtdeclarative5-dev libqt5webkit5-dev -# Ethereum PPA +# Expanse PPA RUN apt-get install -qy software-properties-common -RUN add-apt-repository ppa:ethereum/ethereum +RUN add-apt-repository ppa:expanse/expanse RUN apt-get update RUN apt-get install -qy libcryptopp-dev libjson-rpc-cpp-dev -# Build Ethereum (HEADLESS) -RUN git clone --depth=1 --branch develop https://github.com/ethereum/cpp-ethereum -RUN mkdir -p cpp-ethereum/build -RUN cd cpp-ethereum/build && cmake .. -DCMAKE_BUILD_TYPE=Release -DHEADLESS=1 && make -j $(cat /proc/cpuinfo | grep processor | wc -l) && make install +# Build Expanse (HEADLESS) +RUN git clone --depth=1 --branch develop https://github.com/expanse-project/cpp-expanse +RUN mkdir -p cpp-expanse/build +RUN cd cpp-expanse/build && cmake .. -DCMAKE_BUILD_TYPE=Release -DHEADLESS=1 && make -j $(cat /proc/cpuinfo | grep processor | wc -l) && make install RUN ldconfig -ENTRYPOINT ["/cpp-ethereum/build/test/createRandomTest"] +ENTRYPOINT ["/cpp-expanse/build/test/createRandomTest"] diff --git a/tests/files/ansible/test-files/docker-cppjit/Dockerfile b/tests/files/ansible/test-files/docker-cppjit/Dockerfile index 2b10727f05..fef8e31242 100755 --- a/tests/files/ansible/test-files/docker-cppjit/Dockerfile +++ b/tests/files/ansible/test-files/docker-cppjit/Dockerfile @@ -1,16 +1,16 @@ -# adjusted from https://github.com/ethereum/cpp-ethereum/blob/develop/docker/Dockerfile +# adjusted from https://github.com/expanse-project/cpp-expanse/blob/develop/docker/Dockerfile FROM ubuntu:14.04 ENV DEBIAN_FRONTEND noninteractive RUN apt-get update RUN apt-get upgrade -y -# Ethereum dependencies +# Expanse dependencies RUN apt-get install -qy build-essential g++-4.8 git cmake libboost-all-dev libcurl4-openssl-dev wget RUN apt-get install -qy automake unzip libgmp-dev libtool libleveldb-dev yasm libminiupnpc-dev libreadline-dev scons RUN apt-get install -qy libjsoncpp-dev libargtable2-dev -# NCurses based GUI (not optional though for a succesful compilation, see https://github.com/ethereum/cpp-ethereum/issues/452 ) +# NCurses based GUI (not optional though for a succesful compilation, see https://github.com/expanse-project/cpp-expanse/issues/452 ) RUN apt-get install -qy libncurses5-dev # Qt-based GUI @@ -28,19 +28,19 @@ RUN apt-get install -qy llvm-3.5 libedit-dev RUN mkdir -p /usr/lib/llvm-3.5/share/llvm && ln -s /usr/share/llvm-3.5/cmake /usr/lib/llvm-3.5/share/llvm/cmake -# Ethereum PPA +# Expanse PPA RUN apt-get install -qy software-properties-common -RUN add-apt-repository ppa:ethereum/ethereum +RUN add-apt-repository ppa:expanse/expanse RUN apt-get update RUN apt-get install -qy libcryptopp-dev libjson-rpc-cpp-dev # this is a workaround, to make sure that docker's cache is invalidated whenever the git repo changes -ADD https://api.github.com/repos/ethereum/cpp-ethereum/git/refs/heads/develop unused.txt +ADD https://api.github.com/repos/expanse/cpp-expanse/git/refs/heads/develop unused.txt -# Build Ethereum (HEADLESS) -RUN git clone --depth=1 --branch develop https://github.com/ethereum/cpp-ethereum -RUN mkdir -p cpp-ethereum/build -RUN cd cpp-ethereum/build && cmake .. -DCMAKE_BUILD_TYPE=Debug -DVMTRACE=1 -DPARANOIA=1 -DEVMJIT=1 && make -j $(cat /proc/cpuinfo | grep processor | wc -l) && make install +# Build Expanse (HEADLESS) +RUN git clone --depth=1 --branch develop https://github.com/expanse-project/cpp-expanse +RUN mkdir -p cpp-expanse/build +RUN cd cpp-expanse/build && cmake .. -DCMAKE_BUILD_TYPE=Debug -DVMTRACE=1 -DPARANOIA=1 -DEVMJIT=1 && make -j $(cat /proc/cpuinfo | grep processor | wc -l) && make install RUN ldconfig -ENTRYPOINT ["/cpp-ethereum/build/test/checkRandomStateTest"] +ENTRYPOINT ["/cpp-expanse/build/test/checkRandomStateTest"] diff --git a/tests/files/ansible/test-files/docker-go/Dockerfile b/tests/files/ansible/test-files/docker-go/Dockerfile index a5a2f0f231..e132659e59 100755 --- a/tests/files/ansible/test-files/docker-go/Dockerfile +++ b/tests/files/ansible/test-files/docker-go/Dockerfile @@ -1,4 +1,4 @@ -# Adjusted from https://github.com/ethereum/go-ethereum/blob/develop/Dockerfile +# Adjusted from https://github.com/expanse-project/go-expanse/blob/develop/Dockerfile FROM ubuntu:14.04 ## Environment setup @@ -31,17 +31,17 @@ RUN git checkout v1 RUN go install -v # this is a workaround, to make sure that docker's cache is invalidated whenever the git repo changes -ADD https://api.github.com/repos/ethereum/go-ethereum/git/refs/heads/develop unused.txt +ADD https://api.github.com/repos/expanse/go-expanse/git/refs/heads/develop unused.txt -## Fetch and install go-ethereum -RUN go get -u -v -d github.com/ethereum/go-ethereum/... -WORKDIR $GOPATH/src/github.com/ethereum/go-ethereum +## Fetch and install go-expanse +RUN go get -u -v -d github.com/expanse-project/go-expanse/... +WORKDIR $GOPATH/src/github.com/expanse-project/go-expanse RUN git checkout develop RUN git pull -RUN ETH_DEPS=$(go list -f '{{.Imports}} {{.TestImports}} {{.XTestImports}}' github.com/ethereum/go-ethereum/... | sed -e 's/\[//g' | sed -e 's/\]//g' | sed -e 's/C //g'); if [ "$ETH_DEPS" ]; then go get $ETH_DEPS; fi +RUN ETH_DEPS=$(go list -f '{{.Imports}} {{.TestImports}} {{.XTestImports}}' github.com/expanse-project/go-expanse/... | sed -e 's/\[//g' | sed -e 's/\]//g' | sed -e 's/C //g'); if [ "$ETH_DEPS" ]; then go get $ETH_DEPS; fi RUN go install -v ./cmd/ethtest ENTRYPOINT ["ethtest"] diff --git a/tests/files/ansible/test-files/docker-python/Dockerfile b/tests/files/ansible/test-files/docker-python/Dockerfile index e83faf3d6e..c8e0427f63 100755 --- a/tests/files/ansible/test-files/docker-python/Dockerfile +++ b/tests/files/ansible/test-files/docker-python/Dockerfile @@ -7,16 +7,16 @@ RUN apt-get upgrade -y RUN apt-get install -qy curl git python2.7 python-pip python-dev # this is a workaround, to make sure that docker's cache is invalidated whenever the git repo changes -ADD https://api.github.com/repos/ethereum/pyethereum/git/refs/heads/develop unused.txt +ADD https://api.github.com/repos/expanse/pyethereum/git/refs/heads/develop unused.txt -RUN git clone --branch develop --recursive https://github.com/ethereum/pyethereum.git +RUN git clone --branch develop --recursive https://github.com/expanse-project/pyethereum.git RUN cd pyethereum && curl https://bootstrap.pypa.io/bootstrap-buildout.py | python RUN cd pyethereum && bin/buildout #default port for incoming requests -EXPOSE 30303 +EXPOSE 60606 WORKDIR /pyethereum diff --git a/tests/files/ansible/test-files/testrunner.sh b/tests/files/ansible/test-files/testrunner.sh index c7763b1f12..91f310ba4f 100755 --- a/tests/files/ansible/test-files/testrunner.sh +++ b/tests/files/ansible/test-files/testrunner.sh @@ -7,19 +7,19 @@ cd ~/testout export EVMJIT="-cache=0" while [ 1 ] do - TEST="$(docker run --rm --entrypoint=\"/cpp-ethereum/build/test/createRandomStateTest\" ethereum/cppjit-testrunner)" + TEST="$(docker run --rm --entrypoint=\"/cpp-expanse/build/test/createRandomStateTest\" expanse/cppjit-testrunner)" # echo "$TEST" # test pyethereum - OUTPUT_PYTHON="$(docker run --rm ethereum/python-testrunner --notrace <<< "$TEST")" + OUTPUT_PYTHON="$(docker run --rm expanse/python-testrunner --notrace <<< "$TEST")" RESULT_PYTHON=$? # test go - OUTPUT_GO="$(docker run --rm ethereum/go-testrunner "$TEST")" + OUTPUT_GO="$(docker run --rm expanse/go-testrunner "$TEST")" RESULT_GO=$? # test cpp-jit - OUTPUT_CPPJIT="$(docker run --rm ethereum/cppjit-testrunner "$TEST")" + OUTPUT_CPPJIT="$(docker run --rm expanse/cppjit-testrunner "$TEST")" RESULT_CPPJIT=$? # go fails diff --git a/tests/files/package.json b/tests/files/package.json index 1e0ad9c289..c4050a7a82 100755 --- a/tests/files/package.json +++ b/tests/files/package.json @@ -1,25 +1,25 @@ { - "name": "ethereum-tests", + "name": "expanse-tests", "version": "0.0.6", - "description": "tests for ethereum", + "description": "tests for expanse", "main": "index.js", "scripts": { "test": "echo \"There are no tests for there tests\" && exit 1" }, "repository": { "type": "git", - "url": "https://github.com/ethereum/tests" + "url": "https://github.com/expanse-project/tests" }, "keywords": [ "tests", - "ethereum" + "expanse" ], "author": "", "license": "MIT", "bugs": { - "url": "https://github.com/ethereum/tests/issues" + "url": "https://github.com/expanse-project/tests/issues" }, - "homepage": "https://github.com/ethereum/tests", + "homepage": "https://github.com/expanse-project/tests", "dependencies": { "require-all": "^1.0.0" } diff --git a/tests/init.go b/tests/init.go index 3f8b8c6844..154498554f 100644 --- a/tests/init.go +++ b/tests/init.go @@ -1,20 +1,20 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -// Package tests implements execution of Ethereum JSON tests. +// Package tests implements execution of Expanse JSON tests. package tests import ( @@ -26,7 +26,7 @@ import ( "os" "path/filepath" - "github.com/ethereum/go-ethereum/core" + "github.com/expanse-project/go-expanse/core" ) var ( diff --git a/tests/rlp_test.go b/tests/rlp_test.go index 2469ce0dbc..77135feb01 100644 --- a/tests/rlp_test.go +++ b/tests/rlp_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package tests diff --git a/tests/rlp_test_util.go b/tests/rlp_test_util.go index ac53a4f52c..51e3c1e6f6 100644 --- a/tests/rlp_test_util.go +++ b/tests/rlp_test_util.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package tests @@ -26,7 +26,7 @@ import ( "os" "strings" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/rlp" ) // RLPTest is the JSON structure of a single RLP test. diff --git a/tests/state_test.go b/tests/state_test.go index 7090b05410..da58238544 100644 --- a/tests/state_test.go +++ b/tests/state_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package tests diff --git a/tests/state_test_util.go b/tests/state_test_util.go index def9b0c36d..26cd54181f 100644 --- a/tests/state_test_util.go +++ b/tests/state_test_util.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package tests @@ -25,13 +25,13 @@ import ( "strconv" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/vm" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/vm" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/logger/glog" ) func RunStateTestWithReader(r io.Reader, skipTests []string) error { diff --git a/tests/transaction_test.go b/tests/transaction_test.go index f1dfbd0a7f..2439bf1391 100644 --- a/tests/transaction_test.go +++ b/tests/transaction_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package tests diff --git a/tests/transaction_test_util.go b/tests/transaction_test_util.go index 09511acb79..bc633fb717 100644 --- a/tests/transaction_test_util.go +++ b/tests/transaction_test_util.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package tests @@ -23,10 +23,10 @@ import ( "io" "runtime" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/rlp" ) // Transaction Test JSON Format diff --git a/tests/util.go b/tests/util.go index a9b5011a9a..bec06add2b 100644 --- a/tests/util.go +++ b/tests/util.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package tests @@ -21,12 +21,12 @@ import ( "fmt" "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/core/vm" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/core/vm" + "github.com/expanse-project/go-expanse/crypto" ) func checkLogs(tlog []Log, logs state.Logs) error { diff --git a/tests/vm_test.go b/tests/vm_test.go index 96718db3ce..035f205589 100644 --- a/tests/vm_test.go +++ b/tests/vm_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package tests diff --git a/tests/vm_test_util.go b/tests/vm_test_util.go index 71a4f5e335..799206f456 100644 --- a/tests/vm_test_util.go +++ b/tests/vm_test_util.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package tests @@ -24,11 +24,11 @@ import ( "strconv" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/vm" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/vm" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/logger/glog" ) func RunVmTestWithReader(r io.Reader, skipTests []string) error { diff --git a/trie/cache.go b/trie/cache.go index e475fc861a..12c8e7bbe1 100644 --- a/trie/cache.go +++ b/trie/cache.go @@ -1,24 +1,24 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package trie import ( - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/logger/glog" "github.com/syndtr/goleveldb/leveldb" ) diff --git a/trie/encoding.go b/trie/encoding.go index 9c862d78fa..631ea399a3 100644 --- a/trie/encoding.go +++ b/trie/encoding.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package trie diff --git a/trie/encoding_test.go b/trie/encoding_test.go index e49b57ef02..e1daa90d29 100644 --- a/trie/encoding_test.go +++ b/trie/encoding_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package trie diff --git a/trie/fullnode.go b/trie/fullnode.go index 8ff019ec43..730b602f23 100644 --- a/trie/fullnode.go +++ b/trie/fullnode.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package trie diff --git a/trie/hashnode.go b/trie/hashnode.go index d4a0bc7ec9..8f8135f2c4 100644 --- a/trie/hashnode.go +++ b/trie/hashnode.go @@ -1,22 +1,22 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package trie -import "github.com/ethereum/go-ethereum/common" +import "github.com/expanse-project/go-expanse/common" type HashNode struct { key []byte diff --git a/trie/iterator.go b/trie/iterator.go index 9c4c7fbe5b..6691c602b5 100644 --- a/trie/iterator.go +++ b/trie/iterator.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package trie diff --git a/trie/iterator_test.go b/trie/iterator_test.go index 148f9adf99..ef397b250d 100644 --- a/trie/iterator_test.go +++ b/trie/iterator_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package trie diff --git a/trie/node.go b/trie/node.go index 9d49029ded..c8b9614ab6 100644 --- a/trie/node.go +++ b/trie/node.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package trie diff --git a/trie/secure_trie.go b/trie/secure_trie.go index 47c7542bb0..7ac8c2f34b 100644 --- a/trie/secure_trie.go +++ b/trie/secure_trie.go @@ -1,22 +1,22 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package trie -import "github.com/ethereum/go-ethereum/crypto" +import "github.com/expanse-project/go-expanse/crypto" var keyPrefix = []byte("secure-key-") diff --git a/trie/shortnode.go b/trie/shortnode.go index 569d5f1096..cb72455ad3 100644 --- a/trie/shortnode.go +++ b/trie/shortnode.go @@ -1,22 +1,22 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package trie -import "github.com/ethereum/go-ethereum/common" +import "github.com/expanse-project/go-expanse/common" type ShortNode struct { trie *Trie diff --git a/trie/slice.go b/trie/slice.go index ccefbd0643..6bf5d46303 100644 --- a/trie/slice.go +++ b/trie/slice.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package trie diff --git a/trie/trie.go b/trie/trie.go index abf48a8509..fd393461f1 100644 --- a/trie/trie.go +++ b/trie/trie.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Package trie implements Merkle Patricia Tries. package trie @@ -23,8 +23,8 @@ import ( "fmt" "sync" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" ) func ParanoiaCheck(t1 *Trie, backend Backend) (bool, *Trie) { diff --git a/trie/trie_test.go b/trie/trie_test.go index ae4e5efe40..8b96fe5653 100644 --- a/trie/trie_test.go +++ b/trie/trie_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package trie @@ -21,8 +21,8 @@ import ( "fmt" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" ) type Db map[string][]byte diff --git a/trie/valuenode.go b/trie/valuenode.go index 0afa64d54c..86739318e3 100644 --- a/trie/valuenode.go +++ b/trie/valuenode.go @@ -1,22 +1,22 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package trie -import "github.com/ethereum/go-ethereum/common" +import "github.com/expanse-project/go-expanse/common" type ValueNode struct { trie *Trie diff --git a/whisper/doc.go b/whisper/doc.go index cfb0b51175..0ce1541dd2 100644 --- a/whisper/doc.go +++ b/whisper/doc.go @@ -1,23 +1,23 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . /* Package whisper implements the Whisper PoC-1. -(https://github.com/ethereum/wiki/wiki/Whisper-PoC-1-Protocol-Spec) +(https://github.com/expanse-project/wiki/wiki/Whisper-PoC-1-Protocol-Spec) Whisper combines aspects of both DHTs and datagram messaging systems (e.g. UDP). As such it may be likened and compared to both, not dissimilar to the diff --git a/whisper/envelope.go b/whisper/envelope.go index b231c6b44f..a309053521 100644 --- a/whisper/envelope.go +++ b/whisper/envelope.go @@ -1,21 +1,21 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Contains the Whisper protocol Envelope element. For formal details please see -// the specs at https://github.com/ethereum/wiki/wiki/Whisper-PoC-1-Protocol-Spec#envelopes. +// the specs at https://github.com/expanse-project/wiki/wiki/Whisper-PoC-1-Protocol-Spec#envelopes. package whisper @@ -25,10 +25,10 @@ import ( "fmt" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/crypto/ecies" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/crypto/ecies" + "github.com/expanse-project/go-expanse/rlp" ) // Envelope represents a clear-text data packet to transmit through the Whisper diff --git a/whisper/envelope_test.go b/whisper/envelope_test.go index 3bfe527372..5440beae5a 100644 --- a/whisper/envelope_test.go +++ b/whisper/envelope_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package whisper @@ -21,8 +21,8 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/crypto/ecies" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/crypto/ecies" ) func TestEnvelopeOpen(t *testing.T) { diff --git a/whisper/filter.go b/whisper/filter.go index 9f6d6b7817..9e82756b37 100644 --- a/whisper/filter.go +++ b/whisper/filter.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Contains the message filter for fine grained subscriptions. @@ -21,7 +21,7 @@ package whisper import ( "crypto/ecdsa" - "github.com/ethereum/go-ethereum/event/filter" + "github.com/expanse-project/go-expanse/event/filter" ) // Filter is used to subscribe to specific types of whisper messages. diff --git a/whisper/filter_test.go b/whisper/filter_test.go index b805b2baf1..8b1adf6568 100644 --- a/whisper/filter_test.go +++ b/whisper/filter_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package whisper diff --git a/whisper/main.go b/whisper/main.go index be41604890..eca5f942cf 100644 --- a/whisper/main.go +++ b/whisper/main.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // +build none @@ -27,12 +27,12 @@ import ( "os" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/p2p/nat" - "github.com/ethereum/go-ethereum/whisper" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/p2p" + "github.com/expanse-project/go-expanse/p2p/nat" + "github.com/expanse-project/go-expanse/whisper" ) func main() { @@ -47,7 +47,7 @@ func main() { name := common.MakeName("whisper-go", "1.0") shh := whisper.New() - // Create an Ethereum peer to communicate through + // Create an Expanse peer to communicate through server := p2p.Server{ PrivateKey: key, MaxPeers: 10, @@ -56,9 +56,9 @@ func main() { ListenAddr: ":30300", NAT: nat.Any(), } - fmt.Println("Starting Ethereum peer...") + fmt.Println("Starting Expanse peer...") if err := server.Start(); err != nil { - fmt.Printf("Failed to start Ethereum peer: %v.\n", err) + fmt.Printf("Failed to start Expanse peer: %v.\n", err) os.Exit(1) } diff --git a/whisper/message.go b/whisper/message.go index 506f142edd..5780b5d8ce 100644 --- a/whisper/message.go +++ b/whisper/message.go @@ -1,21 +1,21 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Contains the Whisper protocol Message element. For formal details please see -// the specs at https://github.com/ethereum/wiki/wiki/Whisper-PoC-1-Protocol-Spec#messages. +// the specs at https://github.com/expanse-project/wiki/wiki/Whisper-PoC-1-Protocol-Spec#messages. package whisper @@ -24,10 +24,10 @@ import ( "math/rand" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" ) // Message represents an end-user data packet to transmit through the Whisper diff --git a/whisper/message_test.go b/whisper/message_test.go index 6ff95efff5..23f03d8094 100644 --- a/whisper/message_test.go +++ b/whisper/message_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package whisper @@ -22,7 +22,7 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/crypto" ) // Tests whether a message can be wrapped without any identity or encryption. diff --git a/whisper/peer.go b/whisper/peer.go index ee10e66e79..a6f9b48b3f 100644 --- a/whisper/peer.go +++ b/whisper/peer.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package whisper @@ -20,11 +20,11 @@ import ( "fmt" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/p2p" + "github.com/expanse-project/go-expanse/rlp" "gopkg.in/fatih/set.v0" ) diff --git a/whisper/peer_test.go b/whisper/peer_test.go index 594671ee14..81dd7f80cb 100644 --- a/whisper/peer_test.go +++ b/whisper/peer_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package whisper @@ -20,8 +20,8 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/p2p/discover" + "github.com/expanse-project/go-expanse/p2p" + "github.com/expanse-project/go-expanse/p2p/discover" ) type testPeer struct { diff --git a/whisper/topic.go b/whisper/topic.go index 7ac3e8dc1d..a47f1bb34b 100644 --- a/whisper/topic.go +++ b/whisper/topic.go @@ -1,25 +1,25 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Contains the Whisper protocol Topic element. For formal details please see -// the specs at https://github.com/ethereum/wiki/wiki/Whisper-PoC-1-Protocol-Spec#topics. +// the specs at https://github.com/expanse-project/wiki/wiki/Whisper-PoC-1-Protocol-Spec#topics. package whisper -import "github.com/ethereum/go-ethereum/crypto" +import "github.com/expanse-project/go-expanse/crypto" // Topic represents a cryptographically secure, probabilistic partial // classifications of a message, determined as the first (left) 4 bytes of the diff --git a/whisper/topic_test.go b/whisper/topic_test.go index 9c45f67408..c70923ed2c 100644 --- a/whisper/topic_test.go +++ b/whisper/topic_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package whisper diff --git a/whisper/whisper.go b/whisper/whisper.go index 676d8ae7a3..b38ecc0510 100644 --- a/whisper/whisper.go +++ b/whisper/whisper.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package whisper @@ -21,13 +21,13 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/crypto/ecies" - "github.com/ethereum/go-ethereum/event/filter" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/p2p" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/crypto/ecies" + "github.com/expanse-project/go-expanse/event/filter" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/p2p" "gopkg.in/fatih/set.v0" ) @@ -56,7 +56,7 @@ type MessageEvent struct { Message *Message } -// Whisper represents a dark communication interface through the Ethereum +// Whisper represents a dark communication interface through the Expanse // network, using its very own P2P communication layer. type Whisper struct { protocol p2p.Protocol @@ -74,7 +74,7 @@ type Whisper struct { quit chan struct{} } -// New creates a Whisper client ready to communicate through the Ethereum P2P +// New creates a Whisper client ready to communicate through the Expanse P2P // network. func New() *Whisper { whisper := &Whisper{ diff --git a/whisper/whisper_test.go b/whisper/whisper_test.go index b5a919984b..c036b354e5 100644 --- a/whisper/whisper_test.go +++ b/whisper/whisper_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package whisper @@ -20,8 +20,8 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/p2p/discover" + "github.com/expanse-project/go-expanse/p2p" + "github.com/expanse-project/go-expanse/p2p/discover" ) func startTestCluster(n int) []*Whisper { diff --git a/xeth/frontend.go b/xeth/frontend.go index e892822428..d52f4c3063 100644 --- a/xeth/frontend.go +++ b/xeth/frontend.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package xeth diff --git a/xeth/state.go b/xeth/state.go index 981fe63b7e..16c5f1139f 100644 --- a/xeth/state.go +++ b/xeth/state.go @@ -1,24 +1,24 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package xeth import ( - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" ) type State struct { diff --git a/xeth/types.go b/xeth/types.go index 218c8dc7cd..69ef054ad9 100644 --- a/xeth/types.go +++ b/xeth/types.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package xeth @@ -22,13 +22,13 @@ import ( "math/big" "strings" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/p2p" + "github.com/expanse-project/go-expanse/rlp" ) type Object struct { diff --git a/xeth/whisper.go b/xeth/whisper.go index e7130978f2..97eee34a4c 100644 --- a/xeth/whisper.go +++ b/xeth/whisper.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Contains the external API to the whisper sub-protocol. @@ -22,10 +22,10 @@ import ( "fmt" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/whisper" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/whisper" ) var qlogger = logger.NewLogger("XSHH") diff --git a/xeth/whisper_filter.go b/xeth/whisper_filter.go index fdf5cebae1..25dfb730a3 100644 --- a/xeth/whisper_filter.go +++ b/xeth/whisper_filter.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Contains the external API side message filter for watching, pooling and polling // matched whisper messages, also serializing data access to avoid duplications. @@ -23,7 +23,7 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) // whisperFilter is the message cache matching a specific filter, accumulating diff --git a/xeth/whisper_message.go b/xeth/whisper_message.go index b3014a6972..992d5a51b7 100644 --- a/xeth/whisper_message.go +++ b/xeth/whisper_message.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Contains the external API representation of a whisper message. @@ -21,9 +21,9 @@ package xeth import ( "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/whisper" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/whisper" ) // WhisperMessage is the external API representation of a whisper.Message. diff --git a/xeth/xeth.go b/xeth/xeth.go index 8bd45998f1..010d528761 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -1,20 +1,20 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -// Package xeth is the interface to all Ethereum functionality. +// Package xeth is the interface to all Expanse functionality. package xeth import ( @@ -27,19 +27,19 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/accounts" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/compiler" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/event/filter" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/miner" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/accounts" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/common/compiler" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/event/filter" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/miner" + "github.com/expanse-project/go-expanse/rlp" ) var ( @@ -62,13 +62,13 @@ func DefaultGas() *big.Int { return new(big.Int).Set(defaultGas) } func (self *XEth) DefaultGasPrice() *big.Int { if self.gpo == nil { - self.gpo = eth.NewGasPriceOracle(self.backend) + self.gpo = exp.NewGasPriceOracle(self.backend) } return self.gpo.SuggestPrice() } type XEth struct { - backend *eth.Ethereum + backend *exp.Expanse frontend Frontend state *State @@ -93,12 +93,12 @@ type XEth struct { agent *miner.RemoteAgent - gpo *eth.GasPriceOracle + gpo *exp.GasPriceOracle } -func NewTest(eth *eth.Ethereum, frontend Frontend) *XEth { +func NewTest(exp *exp.Expanse, frontend Frontend) *XEth { return &XEth{ - backend: eth, + backend: exp, frontend: frontend, } } @@ -106,22 +106,22 @@ func NewTest(eth *eth.Ethereum, frontend Frontend) *XEth { // New creates an XEth that uses the given frontend. // If a nil Frontend is provided, a default frontend which // confirms all transactions will be used. -func New(ethereum *eth.Ethereum, frontend Frontend) *XEth { +func New(expanse *exp.Expanse, frontend Frontend) *XEth { xeth := &XEth{ - backend: ethereum, + backend: expanse, frontend: frontend, quit: make(chan struct{}), - filterManager: filter.NewFilterManager(ethereum.EventMux()), + filterManager: filter.NewFilterManager(expanse.EventMux()), logQueue: make(map[int]*logQueue), blockQueue: make(map[int]*hashQueue), transactionQueue: make(map[int]*hashQueue), messages: make(map[int]*whisperFilter), agent: miner.NewRemoteAgent(), } - if ethereum.Whisper() != nil { - xeth.whisper = NewWhisper(ethereum.Whisper()) + if expanse.Whisper() != nil { + xeth.whisper = NewWhisper(expanse.Whisper()) } - ethereum.Miner().Register(xeth.agent) + expanse.Miner().Register(xeth.agent) if frontend == nil { xeth.frontend = dummyFrontend{} }