mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +00:00
test change lol
This commit is contained in:
parent
82ef26f600
commit
d368397fc2
384 changed files with 4584 additions and 3409 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -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/
|
||||
|
|
|
|||
6
.gitmodules
vendored
6
.gitmodules
vendored
|
|
@ -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
|
||||
|
|
|
|||
1
.idea/.name
Normal file
1
.idea/.name
Normal file
|
|
@ -0,0 +1 @@
|
|||
go-expanse
|
||||
4
.idea/encodings.xml
Normal file
4
.idea/encodings.xml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
|
||||
</project>
|
||||
8
.idea/go-expanse.iml
Normal file
8
.idea/go-expanse.iml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
8
.idea/modules.xml
Normal file
8
.idea/modules.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/go-expanse.iml" filepath="$PROJECT_DIR$/.idea/go-expanse.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
5
.idea/scopes/scope_settings.xml
Normal file
5
.idea/scopes/scope_settings.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<component name="DependencyValidationManager">
|
||||
<state>
|
||||
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
|
||||
</state>
|
||||
</component>
|
||||
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
1143
.idea/workspace.xml
Normal file
1143
.idea/workspace.xml
Normal file
File diff suppressed because it is too large
Load diff
14
.mailmap
14
.mailmap
|
|
@ -1,7 +1,7 @@
|
|||
Jeffrey Wilcke <jeffrey@ethereum.org>
|
||||
Jeffrey Wilcke <jeffrey@ethereum.org> <geffobscura@gmail.com>
|
||||
Jeffrey Wilcke <jeffrey@ethereum.org> <obscuren@obscura.com>
|
||||
Jeffrey Wilcke <jeffrey@ethereum.org> <obscuren@users.noreply.github.com>
|
||||
Jeffrey Wilcke <jeffrey@expanse.org>
|
||||
Jeffrey Wilcke <jeffrey@expanse.org> <geffobscura@gmail.com>
|
||||
Jeffrey Wilcke <jeffrey@expanse.org> <obscuren@obscura.com>
|
||||
Jeffrey Wilcke <jeffrey@expanse.org> <obscuren@users.noreply.github.com>
|
||||
|
||||
Viktor Trón <viktor.tron@gmail.com>
|
||||
|
||||
|
|
@ -12,7 +12,7 @@ Nick Savers <nicksavers@gmail.com>
|
|||
Maran Hidskes <maran.hidskes@gmail.com>
|
||||
|
||||
Taylor Gerring <taylor.gerring@gmail.com>
|
||||
Taylor Gerring <taylor.gerring@gmail.com> <taylor.gerring@ethereum.org>
|
||||
Taylor Gerring <taylor.gerring@gmail.com> <taylor.gerring@expanse.org>
|
||||
|
||||
Bas van Kervel <bas@ethdev.com>
|
||||
Bas van Kervel <bas@ethdev.com> <basvankervel@ziggo.nl>
|
||||
|
|
@ -57,5 +57,5 @@ Nick Dodson <silentcicero@outlook.com>
|
|||
Jason Carver <jacarver@linkedin.com>
|
||||
Jason Carver <jacarver@linkedin.com> <ut96caarrs@snkmail.com>
|
||||
|
||||
Joseph Chow <ethereum@outlook.com>
|
||||
Joseph Chow <ethereum@outlook.com> ethers <TODO>
|
||||
Joseph Chow <expanse@outlook.com>
|
||||
Joseph Chow <expanse@outlook.com> ethers <TODO>
|
||||
|
|
|
|||
6
AUTHORS
6
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 <alex@ethdev.com>
|
||||
Alexandre Van de Sande <alex.vandesande@ethdev.com>
|
||||
|
|
@ -10,8 +10,8 @@ Felix Lange <fjl@twurst.com>
|
|||
Gustav Simonsson <gustav.simonsson@gmail.com>
|
||||
Jae Kwon <jkwon.work@gmail.com>
|
||||
Jason Carver <jacarver@linkedin.com>
|
||||
Jeffrey Wilcke <jeffrey@ethereum.org>
|
||||
Joseph Chow <ethereum@outlook.com>
|
||||
Jeffrey Wilcke <jeffrey@expanse.org>
|
||||
Joseph Chow <expanse@outlook.com>
|
||||
Kobi Gurkan <kobigurk@gmail.com>
|
||||
Maran Hidskes <maran.hidskes@gmail.com>
|
||||
Marek Kotewicz <marek.kotewicz@gmail.com>
|
||||
|
|
|
|||
2
COPYING
2
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.
|
||||
|
||||
|
|
|
|||
4
Godeps/Godeps.json
generated
4
Godeps/Godeps.json
generated
|
|
@ -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"
|
||||
},
|
||||
|
|
|
|||
8
Godeps/_workspace/src/github.com/ethereum/ethash/.travis.yml
generated
vendored
8
Godeps/_workspace/src/github.com/ethereum/ethash/.travis.yml
generated
vendored
|
|
@ -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:
|
||||
|
|
|
|||
8
Godeps/_workspace/src/github.com/ethereum/ethash/README.md
generated
vendored
8
Godeps/_workspace/src/github.com/ethereum/ethash/README.md
generated
vendored
|
|
@ -1,14 +1,14 @@
|
|||
[](https://travis-ci.org/ethereum/ethash)
|
||||
[](https://travis-ci.org/expanse/ethash)
|
||||
[](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:
|
||||
|
||||
|
|
|
|||
14
Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go
generated
vendored
14
Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go
generated
vendored
|
|
@ -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)
|
||||
|
|
|
|||
38
Godeps/_workspace/src/github.com/ethereum/ethash/ethash_test.go
generated
vendored
38
Godeps/_workspace/src/github.com/ethereum/ethash/ethash_test.go
generated
vendored
|
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
6
Godeps/_workspace/src/github.com/ethereum/ethash/setup.py
generated
vendored
6
Godeps/_workspace/src/github.com/ethereum/ethash/setup.py
generated
vendored
|
|
@ -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],
|
||||
)
|
||||
|
|
|
|||
8
Godeps/_workspace/src/github.com/ethereum/ethash/src/benchmark/benchmark.cpp
generated
vendored
8
Godeps/_workspace/src/github.com/ethereum/ethash/src/benchmark/benchmark.cpp
generated
vendored
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
along with cpp-expanse. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/** @file benchmark.cpp
|
||||
* @author Tim Hughes <tim@twistedfury.com>
|
||||
|
|
|
|||
8
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/compiler.h
generated
vendored
8
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/compiler.h
generated
vendored
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
along with cpp-expanse. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/** @file compiler.h
|
||||
* @date 2014
|
||||
|
|
|
|||
8
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/data_sizes.h
generated
vendored
8
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/data_sizes.h
generated
vendored
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
along with cpp-expanse. If notUUU,see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file data_sizes.h
|
||||
|
|
|
|||
8
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/fnv.h
generated
vendored
8
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/fnv.h
generated
vendored
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
along with cpp-expanse. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/** @file fnv.h
|
||||
* @author Matthew Wampler-Doty <negacthulhu@gmail.com>
|
||||
|
|
|
|||
2
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/internal.c
generated
vendored
2
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/internal.c
generated
vendored
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
along with cpp-expanse. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/** @file internal.c
|
||||
* @author Tim Hughes <tim@twistedfury.com>
|
||||
|
|
|
|||
6
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io.h
generated
vendored
6
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io.h
generated
vendored
|
|
@ -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
|
||||
|
|
|
|||
8
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/util_win32.c
generated
vendored
8
Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/util_win32.c
generated
vendored
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
along with cpp-expanse. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/** @file util.c
|
||||
* @author Tim Hughes <tim@twistedfury.com>
|
||||
|
|
|
|||
6
Godeps/_workspace/src/github.com/ethereum/ethash/src/python/core.c
generated
vendored
6
Godeps/_workspace/src/github.com/ethereum/ethash/src/python/core.c
generated
vendored
|
|
@ -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);
|
||||
|
|
|
|||
2
Godeps/_workspace/src/github.com/ethereum/ethash/test/c/test.cpp
generated
vendored
2
Godeps/_workspace/src/github.com/ethereum/ethash/test/c/test.cpp
generated
vendored
|
|
@ -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;
|
||||
|
|
|
|||
2
Godeps/_workspace/src/github.com/huin/goupnp/httpu/httpu.go
generated
vendored
2
Godeps/_workspace/src/github.com/huin/goupnp/httpu/httpu.go
generated
vendored
|
|
@ -10,7 +10,7 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/ethereum/go-ethereum/fdtrack"
|
||||
"github.com/expanse-project/go-expanse/fdtrack"
|
||||
)
|
||||
|
||||
// HTTPUClient is a client for dealing with HTTPU (HTTP over UDP). Its typical
|
||||
|
|
|
|||
2
Godeps/_workspace/src/github.com/huin/goupnp/soap/soap.go
generated
vendored
2
Godeps/_workspace/src/github.com/huin/goupnp/soap/soap.go
generated
vendored
|
|
@ -12,7 +12,7 @@ import (
|
|||
"net/url"
|
||||
"reflect"
|
||||
|
||||
"github.com/ethereum/go-ethereum/fdtrack"
|
||||
"github.com/expanse-project/go-expanse/fdtrack"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
2
Godeps/_workspace/src/github.com/jackpal/go-nat-pmp/natpmp.go
generated
vendored
2
Godeps/_workspace/src/github.com/jackpal/go-nat-pmp/natpmp.go
generated
vendored
|
|
@ -6,7 +6,7 @@ import (
|
|||
"net"
|
||||
"time"
|
||||
|
||||
"github.com/ethereum/go-ethereum/fdtrack"
|
||||
"github.com/expanse-project/go-expanse/fdtrack"
|
||||
)
|
||||
|
||||
// Implement the NAT-PMP protocol, typically supported by Apple routers and open source
|
||||
|
|
|
|||
2
Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/file_storage.go
generated
vendored
2
Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/file_storage.go
generated
vendored
|
|
@ -18,7 +18,7 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/ethereum/go-ethereum/fdtrack"
|
||||
"github.com/expanse-project/go-expanse/fdtrack"
|
||||
"github.com/syndtr/goleveldb/leveldb/util"
|
||||
)
|
||||
|
||||
|
|
|
|||
4
Godeps/_workspace/src/golang.org/x/net/html/entity.go
generated
vendored
4
Godeps/_workspace/src/golang.org/x/net/html/entity.go
generated
vendored
|
|
@ -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',
|
||||
|
|
|
|||
8
Makefile
8
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 mist all test travis-test-with-coverage clean
|
||||
.PHONY: gexp 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."
|
||||
|
||||
mist:
|
||||
build/env.sh go install -v $(shell build/ldflags.sh) ./cmd/mist
|
||||
|
|
|
|||
48
README.md
48
README.md
|
|
@ -1,54 +1,54 @@
|
|||
## Ethereum Go
|
||||
## Expanse Go
|
||||
|
||||
Ethereum Go Client, by Jeffrey Wilcke (and some other people).
|
||||
Expanse Go Client, by Christopher Franko (forked from Jeffrey Wilcke (and some other people)'s Expanse Go client).
|
||||
|
||||
| Linux | OSX | ARM | Windows | Tests
|
||||
----------|---------|-----|-----|---------|------
|
||||
develop | [](https://build.ethdev.com/builders/Linux%20Go%20develop%20branch/builds/-1) | [](https://build.ethdev.com/builders/OSX%20Go%20develop%20branch/builds/-1) | [](https://build.ethdev.com/builders/ARM%20Go%20develop%20branch/builds/-1) | [](https://build.ethdev.com/builders/Windows%20Go%20develop%20branch/builds/-1) | [](https://travis-ci.org/ethereum/go-ethereum) [](https://coveralls.io/r/ethereum/go-ethereum?branch=develop)
|
||||
master | [](https://build.ethdev.com/builders/Linux%20Go%20master%20branch/builds/-1) | [](https://build.ethdev.com/builders/OSX%20Go%20master%20branch/builds/-1) | [](https://build.ethdev.com/builders/ARM%20Go%20master%20branch/builds/-1) | [](https://build.ethdev.com/builders/Windows%20Go%20master%20branch/builds/-1) | [](https://travis-ci.org/ethereum/go-ethereum) [](https://coveralls.io/r/ethereum/go-ethereum?branch=master)
|
||||
develop | [](https://build.ethdev.com/builders/Linux%20Go%20develop%20branch/builds/-1) | [](https://build.ethdev.com/builders/OSX%20Go%20develop%20branch/builds/-1) | [](https://build.ethdev.com/builders/ARM%20Go%20develop%20branch/builds/-1) | [](https://build.ethdev.com/builders/Windows%20Go%20develop%20branch/builds/-1) | [](https://travis-ci.org/expanse/go-expanse) [](https://coveralls.io/r/expanse/go-expanse?branch=develop)
|
||||
master | [](https://build.ethdev.com/builders/Linux%20Go%20master%20branch/builds/-1) | [](https://build.ethdev.com/builders/OSX%20Go%20master%20branch/builds/-1) | [](https://build.ethdev.com/builders/ARM%20Go%20master%20branch/builds/-1) | [](https://build.ethdev.com/builders/Windows%20Go%20master%20branch/builds/-1) | [](https://travis-ci.org/expanse/go-expanse) [](https://coveralls.io/r/expanse/go-expanse?branch=master)
|
||||
|
||||
[](https://waffle.io/ethereum/go-ethereum)
|
||||
[](https://waffle.io/ethereum/go-ethereum)
|
||||
[](http://waffle.io/ethereum/go-ethereum)
|
||||
[](https://gitter.im/ethereum/go-ethereum?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
[](https://waffle.io/expanse/go-expanse)
|
||||
[](https://waffle.io/expanse/go-expanse)
|
||||
[](http://waffle.io/expanse/go-expanse)
|
||||
[](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):
|
||||
|
||||
* `geth` Ethereum CLI (ethereum command line interface client)
|
||||
* `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/ethereum/tests) suite:
|
||||
* `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 Ethereum Virtual Machine: `evm -code 60ff60ff -gas
|
||||
* `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
|
||||
|
|
@ -56,23 +56,23 @@ Go Ethereum comes with several wrappers/executables found in
|
|||
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:
|
||||
|
||||
geth --help
|
||||
gexp --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.
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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.
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package abi
|
||||
|
||||
|
|
@ -23,7 +23,7 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/expanse-project/go-expanse/crypto"
|
||||
)
|
||||
|
||||
const jsondata = `
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// 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
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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{})
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package abi
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package abi
|
||||
|
||||
|
|
@ -22,7 +22,7 @@ import (
|
|||
"regexp"
|
||||
"strconv"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/expanse-project/go-expanse/common"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// 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 (
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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)
|
||||
}
|
||||
|
|
|
|||
12
build/env.sh
12
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 "$@"
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ echo "mode: count" > profile.cov
|
|||
|
||||
for pkg in $(go list ./...); do
|
||||
# drop the namespace prefix.
|
||||
dir=${pkg##github.com/ethereum/go-ethereum/}
|
||||
dir=${pkg##github.com/expanse-project/go-expanse/}
|
||||
|
||||
if [[ $dir != "tests" ]]; then
|
||||
go test -covermode=count -coverprofile=$dir/profile.tmp $pkg
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with go-expanse. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// 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() {
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with go-expanse. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// 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() {
|
||||
|
|
|
|||
2
cmd/ethtest/.gitignore
vendored
2
cmd/ethtest/.gitignore
vendored
|
|
@ -10,7 +10,7 @@
|
|||
*un~
|
||||
.DS_Store
|
||||
*/**/.DS_Store
|
||||
ethereum/ethereum
|
||||
expanse/expanse
|
||||
ethereal/ethereal
|
||||
example/js
|
||||
node_modules
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with go-expanse. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// ethtest executes Ethereum JSON tests.
|
||||
// ethtest executes Expanse JSON tests.
|
||||
package main
|
||||
|
||||
import (
|
||||
|
|
@ -26,8 +26,8 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/ethereum/go-ethereum/logger/glog"
|
||||
"github.com/ethereum/go-ethereum/tests"
|
||||
"github.com/expanse-project/go-expanse/logger/glog"
|
||||
"github.com/expanse-project/go-expanse/tests"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
@ -200,10 +200,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,
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with go-expanse. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// evm executes EVM code snippets.
|
||||
package main
|
||||
|
|
@ -25,13 +25,13 @@ 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/core/vm"
|
||||
"github.com/ethereum/go-ethereum/ethdb"
|
||||
"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/core/vm"
|
||||
"github.com/expanse-project/go-expanse/ethdb"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with go-expanse. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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 <path-to-test-file> [ <test-name> [ "rpc" ] ]`)
|
||||
utils.Fatalf(`Usage: expanse blocktest <path-to-test-file> [ <test-name> [ "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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with go-expanse. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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.
|
||||
`,
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with go-expanse. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
|
|
@ -145,7 +145,7 @@ func apiWordCompleter(line string, pos int) (head string, completions []string,
|
|||
return begin, completionWords, end
|
||||
}
|
||||
|
||||
func newLightweightJSRE(libPath string, client comms.EthereumClient, interactive bool, f xeth.Frontend) *jsre {
|
||||
func newLightweightJSRE(libPath string, client comms.ExpanseClient, interactive bool, f xeth.Frontend) *jsre {
|
||||
js := &jsre{ps1: "> "}
|
||||
js.wait = make(chan *big.Int)
|
||||
js.client = client
|
||||
|
|
@ -180,19 +180,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...))
|
||||
}
|
||||
}
|
||||
|
|
@ -250,13 +250,13 @@ 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.Eval(`console.log('instance: ' + web3.version.client);`)
|
||||
self.re.Eval(`console.log(' datadir: ' + admin.datadir);`)
|
||||
self.re.Eval(`console.log("coinbase: " + eth.coinbase);`)
|
||||
self.re.Eval(`var lastBlockTimestamp = 1000 * eth.getBlock(eth.blockNumber).timestamp`)
|
||||
self.re.Eval(`console.log("at block: " + eth.blockNumber + " (" + new Date(lastBlockTimestamp).toLocaleDateString()
|
||||
self.re.Eval(`console.log("coinbase: " + exp.coinbase);`)
|
||||
self.re.Eval(`var lastBlockTimestamp = 1000 * exp.getBlock(exp.blockNumber).timestamp`)
|
||||
self.re.Eval(`console.log("at block: " + exp.blockNumber + " (" + new Date(lastBlockTimestamp).toLocaleDateString()
|
||||
+ " " + new Date(lastBlockTimestamp).toLocaleTimeString() + ")");`)
|
||||
|
||||
if modules, err := self.supportedApis(); err == nil {
|
||||
|
|
@ -286,7 +286,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)
|
||||
}
|
||||
|
|
@ -304,7 +304,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)
|
||||
}
|
||||
|
|
@ -320,7 +320,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
|
||||
|
|
@ -339,12 +339,12 @@ func (js *jsre) apiBindings(f xeth.Frontend) error {
|
|||
utils.Fatalf("Error setting namespaces: %v", err)
|
||||
}
|
||||
|
||||
js.re.Eval(`var GlobalRegistrar = eth.contract(` + registrar.GlobalRegistrarAbi + `); registrar = GlobalRegistrar.at("` + registrar.GlobalRegistrarAddr + `");`)
|
||||
js.re.Eval(`var GlobalRegistrar = exp.contract(` + registrar.GlobalRegistrarAbi + `); registrar = GlobalRegistrar.at("` + registrar.GlobalRegistrarAddr + `");`)
|
||||
return nil
|
||||
}
|
||||
|
||||
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]")
|
||||
|
|
@ -361,7 +361,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.")
|
||||
|
|
@ -439,8 +439,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)
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with go-expanse. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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))
|
||||
|
|
|
|||
120
cmd/geth/main.go
120
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 <http://www.gnu.org/licenses/>.
|
||||
// along with go-expanse. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// geth is the official command-line client for Ethereum.
|
||||
// gexp is the official command-line client for Expanse.
|
||||
package main
|
||||
|
||||
import (
|
||||
|
|
@ -30,20 +30,20 @@ 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/fdtrack"
|
||||
"github.com/ethereum/go-ethereum/logger"
|
||||
"github.com/ethereum/go-ethereum/logger/glog"
|
||||
"github.com/ethereum/go-ethereum/metrics"
|
||||
"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"
|
||||
)
|
||||
|
|
@ -66,7 +66,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{
|
||||
|
|
@ -103,7 +103,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.
|
||||
`,
|
||||
|
|
@ -111,12 +111,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: `
|
||||
|
|
@ -151,7 +151,7 @@ Note that exporting your key in unencrypted format is NOT supported.
|
|||
|
||||
Keys are stored under <DATADIR>/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
|
||||
|
|
@ -171,7 +171,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.
|
||||
|
||||
|
|
@ -181,7 +181,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 <passwordfile> account new
|
||||
expanse --password <passwordfile> 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.
|
||||
|
|
@ -193,7 +193,7 @@ password to file or expose in any other way.
|
|||
Usage: "update an existing account",
|
||||
Description: `
|
||||
|
||||
ethereum account update <address>
|
||||
expanse account update <address>
|
||||
|
||||
Update an existing account.
|
||||
|
||||
|
|
@ -205,7 +205,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 <passwordfile> account new
|
||||
expanse --password <passwordfile> account new
|
||||
|
||||
Since only one password can be given, only format update can be performed,
|
||||
changing your password is only possible interactively.
|
||||
|
|
@ -220,7 +220,7 @@ changes.
|
|||
Usage: "import a private key into a new account",
|
||||
Description: `
|
||||
|
||||
ethereum account import <keyfile>
|
||||
expanse account import <keyfile>
|
||||
|
||||
Imports an unencrypted private key from <keyfile> and creates a new account.
|
||||
Prints the address.
|
||||
|
|
@ -233,10 +233,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 <passwordfile> account import <keyfile>
|
||||
expanse --password <passwordfile> account import <keyfile>
|
||||
|
||||
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.
|
||||
`,
|
||||
|
|
@ -250,7 +250,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,
|
||||
|
|
@ -259,8 +259,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.
|
||||
`,
|
||||
},
|
||||
{
|
||||
|
|
@ -269,7 +269,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
|
||||
`,
|
||||
},
|
||||
}
|
||||
|
|
@ -353,14 +353,14 @@ func run(ctx *cli.Context) {
|
|||
}
|
||||
|
||||
cfg := utils.MakeEthConfig(ClientIdentifier, nodeNameVersion, ctx)
|
||||
ethereum, err := eth.New(cfg)
|
||||
expanse, err := exp.New(cfg)
|
||||
if err != nil {
|
||||
utils.Fatalf("%v", err)
|
||||
}
|
||||
|
||||
startEth(ctx, ethereum)
|
||||
startEth(ctx, expanse)
|
||||
// this blocks the thread
|
||||
ethereum.WaitForShutdown()
|
||||
expanse.WaitForShutdown()
|
||||
}
|
||||
|
||||
func attach(ctx *cli.Context) {
|
||||
|
|
@ -374,7 +374,7 @@ func attach(ctx *cli.Context) {
|
|||
}
|
||||
}
|
||||
|
||||
var client comms.EthereumClient
|
||||
var client comms.ExpanseClient
|
||||
var err error
|
||||
if ctx.Args().Present() {
|
||||
client, err = comms.ClientFromEndpoint(ctx.Args().First(), codec.JSON)
|
||||
|
|
@ -386,7 +386,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(
|
||||
|
|
@ -415,16 +415,16 @@ func console(ctx *cli.Context) {
|
|||
}
|
||||
|
||||
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,
|
||||
|
|
@ -439,23 +439,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,
|
||||
|
|
@ -466,8 +466,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) {
|
||||
|
|
@ -529,14 +529,14 @@ 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)
|
||||
|
||||
// Start logging file descriptor stats.
|
||||
fdtrack.Start()
|
||||
|
||||
am := eth.AccountManager()
|
||||
am := exp.AccountManager()
|
||||
account := ctx.GlobalString(utils.UnlockedAccountFlag.Name)
|
||||
accounts := strings.Split(account, " ")
|
||||
for i, account := range accounts {
|
||||
|
|
@ -549,17 +549,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)
|
||||
}
|
||||
}
|
||||
|
|
@ -687,7 +687,7 @@ func makedag(ctx *cli.Context) {
|
|||
|
||||
args := ctx.Args()
|
||||
wrongArgs := func() {
|
||||
utils.Fatalf(`Usage: geth makedag <block number> <outputdir>`)
|
||||
utils.Fatalf(`Usage: gexp makedag <block number> <outputdir>`)
|
||||
}
|
||||
switch {
|
||||
case len(args) == 2:
|
||||
|
|
@ -719,7 +719,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)
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with go-expanse. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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})
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with go-expanse. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// 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 (
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with go-expanse. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// Package utils contains internal helper functions for go-ethereum commands.
|
||||
// Package utils contains internal helper functions for go-expanse commands.
|
||||
package utils
|
||||
|
||||
import (
|
||||
|
|
@ -27,14 +27,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"
|
||||
)
|
||||
|
||||
|
|
@ -120,10 +120,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)
|
||||
|
|
@ -131,7 +131,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
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with go-expanse. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with go-expanse. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package utils
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with go-expanse. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package utils
|
||||
|
||||
|
|
@ -27,24 +27,24 @@ import (
|
|||
"runtime"
|
||||
"strconv"
|
||||
|
||||
"github.com/ethereum/go-ethereum/metrics"
|
||||
"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/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/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/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() {
|
||||
|
|
@ -102,7 +102,7 @@ var (
|
|||
NetworkIdFlag = cli.IntFlag{
|
||||
Name: "networkid",
|
||||
Usage: "Network Id (integer)",
|
||||
Value: eth.NetworkId,
|
||||
Value: exp.NetworkId,
|
||||
}
|
||||
BlockchainVersionFlag = cli.IntFlag{
|
||||
Name: "blockchainversion",
|
||||
|
|
@ -232,7 +232,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",
|
||||
|
|
@ -276,7 +276,7 @@ var (
|
|||
ListenPortFlag = cli.IntFlag{
|
||||
Name: "port",
|
||||
Usage: "Network listening port",
|
||||
Value: 30303,
|
||||
Value: 60606,
|
||||
}
|
||||
BootnodesFlag = cli.StringFlag{
|
||||
Name: "bootnodes",
|
||||
|
|
@ -375,8 +375,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
|
||||
|
|
@ -387,7 +387,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),
|
||||
|
|
@ -486,7 +486,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)
|
||||
|
|
@ -496,15 +496,15 @@ 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),
|
||||
}
|
||||
|
||||
xeth := xeth.New(eth, nil)
|
||||
xeth := xeth.New(exp, nil)
|
||||
codec := codec.JSON
|
||||
|
||||
apis, err := api.ParseApiString(ctx.GlobalString(IPCApiFlag.Name), codec, xeth, eth)
|
||||
apis, err := api.ParseApiString(ctx.GlobalString(IPCApiFlag.Name), codec, xeth, exp)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -512,17 +512,17 @@ func StartIPC(eth *eth.Ethereum, ctx *cli.Context) error {
|
|||
return comms.StartIpc(config, codec, api.Merge(apis...))
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with go-expanse. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package utils
|
||||
|
||||
|
|
|
|||
|
|
@ -1,22 +1,22 @@
|
|||
# ethutil
|
||||
|
||||
[](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`.
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package common
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package common
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// Package common contains various helper functions.
|
||||
package common
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package common
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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 (
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package compiler
|
||||
|
||||
|
|
@ -22,7 +22,7 @@ import (
|
|||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/expanse-project/go-expanse/common"
|
||||
)
|
||||
|
||||
const solcVersion = "0.9.23"
|
||||
|
|
|
|||
10
common/db.go
10
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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package common
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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)
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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 {
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package docserver
|
||||
|
||||
|
|
@ -22,8 +22,8 @@ import (
|
|||
"os"
|
||||
"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) {
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package common
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package common
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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 {
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package math
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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))
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package natspec
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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)
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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) {
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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) {
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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,19 +102,19 @@ 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")
|
||||
}
|
||||
|
||||
func IsWindows() bool {
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package common
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ func (s *CommonSuite) TestOS(c *checker.C) {
|
|||
|
||||
func (s *CommonSuite) TestWindonziePath(c *checker.C) {
|
||||
iswindowspath := os.PathSeparator == '\\'
|
||||
path := "/opt/eth/test/file.ext"
|
||||
path := "/opt/exp/test/file.ext"
|
||||
res := WindonizePath(path)
|
||||
ressep := string(res[0])
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package registrar
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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)
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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 {
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package common
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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) {
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package common
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package common
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package common
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package common
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// +build none
|
||||
//sed -e 's/_N_/Hash/g' -e 's/_S_/32/g' -e '1d' types_template.go | gofmt -w hash.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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package common
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
// along with the go-expanse library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue