From d368397fc21ac270050dd61d03e9ccdc41a18e46 Mon Sep 17 00:00:00 2001 From: Christopher Franko Date: Fri, 7 Aug 2015 15:37:14 -0400 Subject: [PATCH 1/7] test change lol --- .gitignore | 2 +- .gitmodules | 6 +- .idea/.name | 1 + .idea/encodings.xml | 4 + .idea/go-expanse.iml | 8 + .idea/modules.xml | 8 + .idea/scopes/scope_settings.xml | 5 + .idea/vcs.xml | 6 + .idea/workspace.xml | 1143 +++++++++++++++++ .mailmap | 14 +- AUTHORS | 6 +- COPYING | 2 +- Godeps/Godeps.json | 4 +- .../github.com/ethereum/ethash/.travis.yml | 8 +- .../src/github.com/ethereum/ethash/README.md | 8 +- .../src/github.com/ethereum/ethash/ethash.go | 14 +- .../github.com/ethereum/ethash/ethash_test.go | 38 +- .../src/github.com/ethereum/ethash/setup.py | 6 +- .../ethash/src/benchmark/benchmark.cpp | 8 +- .../ethereum/ethash/src/libethash/compiler.h | 8 +- .../ethash/src/libethash/data_sizes.h | 8 +- .../ethereum/ethash/src/libethash/fnv.h | 8 +- .../ethereum/ethash/src/libethash/internal.c | 2 +- .../ethereum/ethash/src/libethash/io.h | 6 +- .../ethash/src/libethash/util_win32.c | 8 +- .../ethereum/ethash/src/python/core.c | 6 +- .../ethereum/ethash/test/c/test.cpp | 2 +- .../src/github.com/huin/goupnp/httpu/httpu.go | 2 +- .../src/github.com/huin/goupnp/soap/soap.go | 2 +- .../github.com/jackpal/go-nat-pmp/natpmp.go | 2 +- .../goleveldb/leveldb/storage/file_storage.go | 2 +- .../src/golang.org/x/net/html/entity.go | 4 +- Makefile | 8 +- README.md | 48 +- accounts/abi/abi.go | 12 +- accounts/abi/abi_test.go | 12 +- accounts/abi/doc.go | 14 +- accounts/abi/numbers.go | 12 +- accounts/abi/numbers_test.go | 10 +- accounts/abi/type.go | 12 +- accounts/account_manager.go | 14 +- accounts/accounts_test.go | 14 +- build/env.sh | 12 +- build/test-global-coverage.sh | 2 +- build/update-license.go | 10 +- cmd/bootnode/main.go | 20 +- cmd/disasm/main.go | 14 +- cmd/ethtest/.gitignore | 2 +- cmd/ethtest/main.go | 20 +- cmd/evm/main.go | 24 +- cmd/geth/blocktestcmd.go | 60 +- cmd/geth/chaincmd.go | 24 +- cmd/geth/js.go | 74 +- cmd/geth/js_test.go | 154 +-- cmd/geth/main.go | 120 +- cmd/geth/monitorcmd.go | 30 +- cmd/rlpdump/main.go | 12 +- cmd/utils/cmd.go | 38 +- cmd/utils/customflags.go | 12 +- cmd/utils/customflags_test.go | 10 +- cmd/utils/flags.go | 68 +- cmd/utils/legalese.go | 10 +- common/README.md | 14 +- common/big.go | 10 +- common/big_test.go | 10 +- common/bytes.go | 10 +- common/bytes_test.go | 10 +- common/compiler/solidity.go | 18 +- common/compiler/solidity_test.go | 12 +- common/db.go | 10 +- common/debug.go | 12 +- common/docserver/docserver.go | 14 +- common/docserver/docserver_test.go | 14 +- common/list.go | 10 +- common/main_test.go | 10 +- common/math/dist.go | 12 +- common/math/dist_test.go | 10 +- common/natspec/natspec.go | 20 +- common/natspec/natspec_e2e_test.go | 70 +- common/natspec/natspec_e2e_test.go.orig | 54 +- common/natspec/natspec_js.go | 60 +- common/natspec/natspec_test.go | 10 +- common/number/int.go | 12 +- common/number/uint_test.go | 12 +- common/package.go | 12 +- common/path.go | 26 +- common/path_test.go | 12 +- common/registrar/contracts.go | 10 +- common/registrar/ethreg/ethreg.go | 14 +- common/registrar/registrar.go | 22 +- common/registrar/registrar_test.go | 14 +- common/rlp.go | 10 +- common/rlp_test.go | 12 +- common/size.go | 10 +- common/size_test.go | 10 +- common/test_utils.go | 10 +- common/types.go | 10 +- common/types_template.go | 10 +- common/types_test.go | 10 +- common/value.go | 12 +- common/value_test.go | 10 +- compression/rle/read_write.go | 14 +- compression/rle/read_write_test.go | 10 +- core/asm.go | 14 +- core/bad_block.go | 20 +- core/bench_test.go | 24 +- core/block_cache.go | 14 +- core/block_cache_test.go | 14 +- core/block_processor.go | 28 +- core/block_processor_test.go | 22 +- core/blocks.go | 12 +- core/canary.go | 14 +- core/chain_makers.go | 20 +- core/chain_makers_test.go | 20 +- core/chain_manager.go | 32 +- core/chain_manager_test.go | 26 +- core/chain_util.go | 22 +- core/chain_util_test.go | 12 +- core/default_genesis.go | 10 +- core/error.go | 12 +- core/events.go | 16 +- core/execution.go | 22 +- core/fees.go | 12 +- core/filter.go | 30 +- core/filter_test.go | 10 +- core/genesis.go | 22 +- core/helper_test.go | 20 +- core/manager.go | 16 +- core/state/dump.go | 12 +- core/state/errors.go | 10 +- core/state/log.go | 14 +- core/state/main_test.go | 10 +- core/state/managed_state.go | 12 +- core/state/managed_state_test.go | 14 +- core/state/state_object.go | 22 +- core/state/state_test.go | 14 +- core/state/statedb.go | 22 +- core/state_transition.go | 22 +- core/transaction_pool.go | 22 +- core/transaction_pool_test.go | 22 +- core/transaction_util.go | 22 +- core/types/block.go | 22 +- core/types/block_test.go | 14 +- core/types/bloom9.go | 16 +- core/types/bloom9_test.go | 12 +- core/types/common.go | 14 +- core/types/derive_sha.go | 18 +- core/types/receipt.go | 16 +- core/types/transaction.go | 20 +- core/types/transaction_test.go | 18 +- core/vm/analysis.go | 12 +- core/vm/asm.go | 12 +- core/vm/common.go | 14 +- core/vm/context.go | 12 +- core/vm/contracts.go | 20 +- core/vm/disasm.go | 10 +- core/vm/environment.go | 14 +- core/vm/errors.go | 12 +- core/vm/gas.go | 12 +- core/vm/logger.go | 12 +- core/vm/memory.go | 10 +- core/vm/opcodes.go | 10 +- core/vm/stack.go | 10 +- core/vm/virtual_machine.go | 10 +- core/vm/vm.go | 20 +- core/vm/vm_jit.go | 18 +- core/vm/vm_jit_fake.go | 10 +- core/vm_env.go | 18 +- crypto/crypto.go | 24 +- crypto/crypto_test.go | 14 +- crypto/encrypt_decrypt_test.go | 12 +- crypto/key.go | 12 +- crypto/key_store_passphrase.go | 16 +- crypto/key_store_plain.go | 12 +- crypto/key_store_test.go | 16 +- crypto/keypair.go | 14 +- crypto/mnemonic.go | 10 +- crypto/mnemonic_test.go | 10 +- crypto/mnemonic_words.go | 10 +- crypto/randentropy/rand_entropy.go | 12 +- crypto/secp256k1/notes.go | 10 +- crypto/secp256k1/secp256.go | 12 +- crypto/secp256k1/secp256_test.go | 12 +- docker/Dockerfile | 12 +- docker/supervisord.conf | 8 +- errs/errors.go | 14 +- errs/errors_test.go | 12 +- eth/backend.go | 190 +-- eth/downloader/downloader.go | 30 +- eth/downloader/downloader_test.go | 22 +- eth/downloader/events.go | 10 +- eth/downloader/peer.go | 14 +- eth/downloader/queue.go | 18 +- eth/fetcher/fetcher.go | 20 +- eth/fetcher/fetcher_test.go | 20 +- eth/fetcher/metrics.go | 24 +- eth/gasprice.go | 60 +- eth/handler.go | 50 +- eth/metrics.go | 54 +- eth/peer.go | 30 +- eth/protocol.go | 20 +- eth/protocol_test.go | 28 +- eth/sync.go | 22 +- ethdb/README.md | 4 +- ethdb/database.go | 16 +- ethdb/database_test.go | 12 +- ethdb/memory_database.go | 12 +- event/event.go | 10 +- event/event_test.go | 10 +- event/example_test.go | 10 +- event/filter/eth_filter.go | 16 +- event/filter/filter.go | 10 +- event/filter/filter_test.go | 10 +- event/filter/generic_filter.go | 10 +- fdtrack/fdtrack.go | 12 +- fdtrack/fdusage.go | 10 +- fdtrack/fdusage_darwin.go | 10 +- fdtrack/fdusage_linux.go | 10 +- generators/defaults.go | 12 +- jsre/bignumber_js.go | 10 +- jsre/ethereum_js.go | 326 ++--- jsre/jsre.go | 12 +- jsre/jsre_test.go | 10 +- jsre/pp_js.go | 10 +- logger/example_test.go | 10 +- logger/log.go | 12 +- logger/loggers.go | 12 +- logger/loggers_test.go | 10 +- logger/logsystem.go | 10 +- logger/sys.go | 10 +- logger/types.go | 46 +- logger/verbosity.go | 10 +- metrics/disk.go | 10 +- metrics/disk_linux.go | 10 +- metrics/disk_nop.go | 10 +- metrics/metrics.go | 14 +- miner/agent.go | 18 +- miner/miner.go | 36 +- miner/remote_agent.go | 18 +- miner/worker.go | 56 +- p2p/dial.go | 18 +- p2p/dial_test.go | 12 +- p2p/discover/database.go | 18 +- p2p/discover/database_test.go | 34 +- p2p/discover/node.go | 20 +- p2p/discover/node_test.go | 14 +- p2p/discover/table.go | 18 +- p2p/discover/table_test.go | 14 +- p2p/discover/udp.go | 24 +- p2p/discover/udp_test.go | 22 +- p2p/message.go | 12 +- p2p/message_test.go | 10 +- p2p/metrics.go | 12 +- p2p/nat/nat.go | 14 +- p2p/nat/nat_test.go | 10 +- p2p/nat/natpmp.go | 10 +- p2p/nat/natupnp.go | 10 +- p2p/nat/natupnp_test.go | 10 +- p2p/peer.go | 18 +- p2p/peer_error.go | 10 +- p2p/peer_test.go | 10 +- p2p/protocol.go | 10 +- p2p/rlpx.go | 22 +- p2p/rlpx_test.go | 20 +- p2p/server.go | 24 +- p2p/server_test.go | 16 +- params/protocol_params.go | 14 +- pow/block.go | 14 +- pow/dagger/dagger.go | 16 +- pow/dagger/dagger_test.go | 12 +- pow/ezp/pow.go | 18 +- pow/pow.go | 10 +- rlp/decode.go | 10 +- rlp/decode_test.go | 10 +- rlp/doc.go | 14 +- rlp/encode.go | 10 +- rlp/encode_test.go | 10 +- rlp/encoder_example_test.go | 10 +- rlp/typecache.go | 10 +- rpc/api/admin.go | 68 +- rpc/api/admin_args.go | 18 +- rpc/api/admin_js.go | 10 +- rpc/api/api.go | 14 +- rpc/api/api_test.go | 32 +- rpc/api/args.go | 12 +- rpc/api/args_test.go | 12 +- rpc/api/db.go | 24 +- rpc/api/db_args.go | 14 +- rpc/api/db_js.go | 10 +- rpc/api/debug.go | 38 +- rpc/api/debug_args.go | 12 +- rpc/api/debug_js.go | 10 +- rpc/api/eth.go | 40 +- rpc/api/eth_args.go | 18 +- rpc/api/eth_js.go | 12 +- rpc/api/mergedapi.go | 22 +- rpc/api/miner.go | 48 +- rpc/api/miner_args.go | 14 +- rpc/api/miner_js.go | 10 +- rpc/api/net.go | 24 +- rpc/api/net_js.go | 10 +- rpc/api/parsing.go | 16 +- rpc/api/personal.go | 32 +- rpc/api/personal_args.go | 12 +- rpc/api/personal_js.go | 10 +- rpc/api/shh.go | 24 +- rpc/api/shh_args.go | 12 +- rpc/api/ssh_js.go | 10 +- rpc/api/txpool.go | 26 +- rpc/api/txpool_js.go | 10 +- rpc/api/utils.go | 42 +- rpc/api/web3.go | 20 +- rpc/api/web3_args.go | 12 +- rpc/codec/codec.go | 12 +- rpc/codec/json.go | 12 +- rpc/codec/json_test.go | 10 +- rpc/comms/comms.go | 30 +- rpc/comms/http.go | 24 +- rpc/comms/inproc.go | 18 +- rpc/comms/ipc.go | 16 +- rpc/comms/ipc_unix.go | 22 +- rpc/comms/ipc_windows.go | 20 +- rpc/jeth.go | 22 +- rpc/shared/errors.go | 10 +- rpc/shared/types.go | 18 +- rpc/shared/utils.go | 12 +- rpc/xeth.go | 20 +- tests/block_test.go | 10 +- tests/block_test_util.go | 50 +- .../files/ansible/roles/common/tasks/main.yml | 2 +- tests/files/ansible/roles/ec2/vars/main.yml | 2 +- .../ansible/roles/testrunner/tasks/main.yml | 6 +- .../test-files/create-docker-images.sh | 6 +- .../ansible/test-files/docker-cpp/Dockerfile | 20 +- .../test-files/docker-cppjit/Dockerfile | 22 +- .../ansible/test-files/docker-go/Dockerfile | 12 +- .../test-files/docker-python/Dockerfile | 6 +- tests/files/ansible/test-files/testrunner.sh | 8 +- tests/files/package.json | 12 +- tests/init.go | 14 +- tests/rlp_test.go | 10 +- tests/rlp_test_util.go | 12 +- tests/state_test.go | 10 +- tests/state_test_util.go | 24 +- tests/transaction_test.go | 10 +- tests/transaction_test_util.go | 18 +- tests/util.go | 22 +- tests/vm_test.go | 10 +- tests/vm_test_util.go | 20 +- trie/cache.go | 14 +- trie/encoding.go | 10 +- trie/encoding_test.go | 10 +- trie/fullnode.go | 10 +- trie/hashnode.go | 12 +- trie/iterator.go | 10 +- trie/iterator_test.go | 10 +- trie/node.go | 10 +- trie/secure_trie.go | 12 +- trie/shortnode.go | 12 +- trie/slice.go | 10 +- trie/trie.go | 14 +- trie/trie_test.go | 14 +- trie/valuenode.go | 12 +- whisper/doc.go | 12 +- whisper/envelope.go | 20 +- whisper/envelope_test.go | 14 +- whisper/filter.go | 12 +- whisper/filter_test.go | 10 +- whisper/main.go | 28 +- whisper/message.go | 20 +- whisper/message_test.go | 12 +- whisper/peer.go | 20 +- whisper/peer_test.go | 14 +- whisper/topic.go | 14 +- whisper/topic_test.go | 10 +- whisper/whisper.go | 28 +- whisper/whisper_test.go | 14 +- xeth/frontend.go | 10 +- xeth/state.go | 14 +- xeth/types.go | 24 +- xeth/whisper.go | 18 +- xeth/whisper_filter.go | 12 +- xeth/whisper_message.go | 16 +- xeth/xeth.go | 60 +- 384 files changed, 4584 insertions(+), 3409 deletions(-) create mode 100644 .idea/.name create mode 100644 .idea/encodings.xml create mode 100644 .idea/go-expanse.iml create mode 100644 .idea/modules.xml create mode 100644 .idea/scopes/scope_settings.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml diff --git a/.gitignore b/.gitignore index 3b34d32c28..48077ede1c 100644 --- a/.gitignore +++ b/.gitignore @@ -25,7 +25,7 @@ Godeps/_workspace/bin deploy/osx/Mist.app deploy/osx/Mist\ Installer.dmg -cmd/mist/assets/ext/ethereum.js/ +cmd/mist/assets/ext/expanse.js/ # used by the Makefile /build/_workspace/ diff --git a/.gitmodules b/.gitmodules index 219564eb7b..fbd82891d0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "cmd/mist/assets/ext/ethereum.js"] - path = cmd/mist/assets/ext/ethereum.js - url = https://github.com/ethereum/web3.js +[submodule "cmd/mist/assets/ext/expanse.js"] + path = cmd/mist/assets/ext/expanse.js + url = https://github.com/expanse-project/web3.js diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000000..2adf87fbaf --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +go-expanse \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000000..d82104827f --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/go-expanse.iml b/.idea/go-expanse.iml new file mode 100644 index 0000000000..c956989b29 --- /dev/null +++ b/.idea/go-expanse.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000000..2318fdd1a3 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml new file mode 100644 index 0000000000..922003b843 --- /dev/null +++ b/.idea/scopes/scope_settings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000000..94a25f7f4c --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000000..b88a882863 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,1143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1438971860269 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.mailmap b/.mailmap index 704d397486..527178eba1 100644 --- a/.mailmap +++ b/.mailmap @@ -1,7 +1,7 @@ -Jeffrey Wilcke -Jeffrey Wilcke -Jeffrey Wilcke -Jeffrey Wilcke +Jeffrey Wilcke +Jeffrey Wilcke +Jeffrey Wilcke +Jeffrey Wilcke Viktor Trón @@ -12,7 +12,7 @@ Nick Savers Maran Hidskes Taylor Gerring -Taylor Gerring +Taylor Gerring Bas van Kervel Bas van Kervel @@ -57,5 +57,5 @@ Nick Dodson Jason Carver Jason Carver -Joseph Chow -Joseph Chow ethers +Joseph Chow +Joseph Chow ethers diff --git a/AUTHORS b/AUTHORS index 0c5b547d7a..0e67eac1fb 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,4 +1,4 @@ -# This is the official list of go-ethereum authors for copyright purposes. +# This is the official list of go-expanse authors for copyright purposes. Alex Leverington Alexandre Van de Sande @@ -10,8 +10,8 @@ Felix Lange Gustav Simonsson Jae Kwon Jason Carver -Jeffrey Wilcke -Joseph Chow +Jeffrey Wilcke +Joseph Chow Kobi Gurkan Maran Hidskes Marek Kotewicz diff --git a/COPYING b/COPYING index 8d66e87723..593b66738e 100644 --- a/COPYING +++ b/COPYING @@ -1,7 +1,7 @@ GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - Copyright (C) 2014 The go-ethereum Authors. + Copyright (C) 2015 The go-expanse Authors. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 199914baa4..b7e32e489c 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1,5 +1,5 @@ { - "ImportPath": "github.com/ethereum/go-ethereum", + "ImportPath": "github.com/expanse-project/go-expanse", "GoVersion": "go1.4", "Packages": [ "./..." @@ -20,7 +20,7 @@ "Rev": "3e6e67c4dcea3ac2f25fd4731abc0e1deaf36216" }, { - "ImportPath": "github.com/ethereum/ethash", + "ImportPath": "github.com/expanse-project/ethash", "Comment": "v23.1-227-g8f6ccaa", "Rev": "8f6ccaaef9b418553807a73a95cb5f49cd3ea39f" }, diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/.travis.yml b/Godeps/_workspace/src/github.com/ethereum/ethash/.travis.yml index b83b02bf3c..a6d979e02e 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/.travis.yml +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/.travis.yml @@ -6,12 +6,12 @@ before_install: # for g++4.8 and C++11 - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - # Set up go-ethereum + # Set up go-expanse - sudo apt-get update -y -qq - sudo apt-get install -yqq libgmp3-dev - - git clone --depth=10 https://github.com/ethereum/go-ethereum ${GOPATH}/src/github.com/ethereum/go-ethereum - # use canned dependencies from the go-ethereum repository - - export GOPATH=$GOPATH:$GOPATH/src/github.com/ethereum/go-ethereum/Godeps/_workspace/ + - git clone --depth=10 https://github.com/expanse-project/go-expanse ${GOPATH}/src/github.com/expanse-project/go-expanse + # use canned dependencies from the go-expanse repository + - export GOPATH=$GOPATH:$GOPATH/src/github.com/expanse-project/go-expanse/Godeps/_workspace/ - echo $GOPATH install: diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/README.md b/Godeps/_workspace/src/github.com/ethereum/ethash/README.md index 2b2c3b544c..a0004a373f 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/README.md +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/README.md @@ -1,14 +1,14 @@ -[![Build Status](https://travis-ci.org/ethereum/ethash.svg?branch=master)](https://travis-ci.org/ethereum/ethash) +[![Build Status](https://travis-ci.org/expanse/ethash.svg?branch=master)](https://travis-ci.org/expanse/ethash) [![Windows Build Status](https://ci.appveyor.com/api/projects/status/github/debris/ethash?branch=master&svg=true)](https://ci.appveyor.com/project/debris/ethash-nr37r/branch/master) # Ethash -For details on this project, please see the Ethereum wiki: -https://github.com/ethereum/wiki/wiki/Ethash +For details on this project, please see the Expanse wiki: +https://github.com/expanse-project/wiki/wiki/Ethash ### Coding Style for C++ code: -Follow the same exact style as in [cpp-ethereum](https://github.com/ethereum/cpp-ethereum/blob/develop/CodingStandards.txt) +Follow the same exact style as in [cpp-expanse](https://github.com/expanse-project/cpp-expanse/blob/develop/CodingStandards.txt) ### Coding Style for C code: diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go index d0864da7f7..5904a0f21d 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go @@ -22,11 +22,11 @@ import ( "time" "unsafe" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/pow" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/pow" ) var ( @@ -110,7 +110,7 @@ func (l *Light) Verify(block pow.Block) bool { /* Cannot happen if block header diff is validated prior to PoW, but can happen if PoW is checked first due to parallel PoW checking. We could check the minimum valid difficulty but for SoC we avoid (duplicating) - Ethereum protocol consensus rules here which are not in scope of Ethash + Expanse protocol consensus rules here which are not in scope of Ethash */ if difficulty.Cmp(common.Big0) == 0 { glog.V(logger.Debug).Infof("invalid block difficulty") @@ -308,7 +308,7 @@ func (pow *Full) Search(block pow.Block, stop <-chan struct{}) (nonce uint64, mi ret := C.ethash_full_compute(dag.ptr, hash, C.uint64_t(nonce)) result := h256ToHash(ret.result).Big() - // TODO: disagrees with the spec https://github.com/ethereum/wiki/wiki/Ethash#mining + // TODO: disagrees with the spec https://github.com/expanse-project/wiki/wiki/Ethash#mining if ret.success && result.Cmp(target) <= 0 { mixDigest = C.GoBytes(unsafe.Pointer(&ret.mix_hash), C.int(32)) atomic.AddInt32(&pow.hashRate, -previousHashrate) diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash_test.go b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash_test.go index 1e1de989d1..4d9cdc11b6 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash_test.go +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash_test.go @@ -10,8 +10,8 @@ import ( "sync" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" ) func init() { @@ -69,30 +69,30 @@ var invalidZeroDiffBlock = testBlock{ } func TestEthashVerifyValid(t *testing.T) { - eth := New() + exp := New() for i, block := range validBlocks { - if !eth.Verify(block) { + if !exp.Verify(block) { t.Errorf("block %d (%x) did not validate.", i, block.hashNoNonce[:6]) } } } func TestEthashVerifyInvalid(t *testing.T) { - eth := New() - if eth.Verify(&invalidZeroDiffBlock) { + exp := New() + if exp.Verify(&invalidZeroDiffBlock) { t.Errorf("should not validate - we just ensure it does not panic on this block") } } func TestEthashConcurrentVerify(t *testing.T) { - eth, err := NewForTesting() + exp, err := NewForTesting() if err != nil { t.Fatal(err) } - defer os.RemoveAll(eth.Full.Dir) + defer os.RemoveAll(exp.Full.Dir) block := &testBlock{difficulty: big.NewInt(10)} - nonce, md := eth.Search(block, nil) + nonce, md := exp.Search(block, nil) block.nonce = nonce block.mixDigest = common.BytesToHash(md) @@ -101,7 +101,7 @@ func TestEthashConcurrentVerify(t *testing.T) { wg.Add(100) for i := 0; i < 100; i++ { go func() { - if !eth.Verify(block) { + if !exp.Verify(block) { t.Error("Block could not be verified") } wg.Done() @@ -111,12 +111,12 @@ func TestEthashConcurrentVerify(t *testing.T) { } func TestEthashConcurrentSearch(t *testing.T) { - eth, err := NewForTesting() + exp, err := NewForTesting() if err != nil { t.Fatal(err) } - eth.Turbo(true) - defer os.RemoveAll(eth.Full.Dir) + exp.Turbo(true) + defer os.RemoveAll(exp.Full.Dir) type searchRes struct { n uint64 @@ -135,7 +135,7 @@ func TestEthashConcurrentSearch(t *testing.T) { // launch n searches concurrently. for i := 0; i < nsearch; i++ { go func() { - nonce, md := eth.Search(block, stop) + nonce, md := exp.Search(block, stop) select { case found <- searchRes{n: nonce, md: md}: case <-stop: @@ -152,25 +152,25 @@ func TestEthashConcurrentSearch(t *testing.T) { block.nonce = res.n block.mixDigest = common.BytesToHash(res.md) - if !eth.Verify(block) { + if !exp.Verify(block) { t.Error("Block could not be verified") } } func TestEthashSearchAcrossEpoch(t *testing.T) { - eth, err := NewForTesting() + exp, err := NewForTesting() if err != nil { t.Fatal(err) } - defer os.RemoveAll(eth.Full.Dir) + defer os.RemoveAll(exp.Full.Dir) for i := epochLength - 40; i < epochLength+40; i++ { block := &testBlock{number: i, difficulty: big.NewInt(90)} rand.Read(block.hashNoNonce[:]) - nonce, md := eth.Search(block, nil) + nonce, md := exp.Search(block, nil) block.nonce = nonce block.mixDigest = common.BytesToHash(md) - if !eth.Verify(block) { + if !exp.Verify(block) { t.Fatalf("Block could not be verified") } } diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/setup.py b/Godeps/_workspace/src/github.com/ethereum/ethash/setup.py index 18aa20f6db..51ac2e39f5 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/setup.py +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/setup.py @@ -39,9 +39,9 @@ setup( author_email="matthew.wampler.doty@gmail.com", license='GPL', version='0.1.23', - url='https://github.com/ethereum/ethash', - download_url='https://github.com/ethereum/ethash/tarball/v23', - description=('Python wrappers for ethash, the ethereum proof of work' + url='https://github.com/expanse-project/ethash', + download_url='https://github.com/expanse-project/ethash/tarball/v23', + description=('Python wrappers for ethash, the expanse proof of work' 'hashing function'), ext_modules=[pyethash], ) diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/benchmark/benchmark.cpp b/Godeps/_workspace/src/github.com/ethereum/ethash/src/benchmark/benchmark.cpp index 1a648edf42..dae4124824 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/benchmark/benchmark.cpp +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/src/benchmark/benchmark.cpp @@ -1,18 +1,18 @@ /* - This file is part of cpp-ethereum. + This file is part of cpp-expanse. - cpp-ethereum is free software: you can redistribute it and/or modify + cpp-expanse is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - cpp-ethereum is distributed in the hope that it will be useful, + cpp-expanse is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with cpp-ethereum. If not, see . + along with cpp-expanse. If not, see . */ /** @file benchmark.cpp * @author Tim Hughes diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/compiler.h b/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/compiler.h index 9695871cdc..7750ab9b7c 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/compiler.h +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/compiler.h @@ -1,18 +1,18 @@ /* - This file is part of cpp-ethereum. + This file is part of cpp-expanse. - cpp-ethereum is free software: you can redistribute it and/or modify + cpp-expanse is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - cpp-ethereum is distributed in the hope that it will be useful, + cpp-expanse is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with cpp-ethereum. If not, see . + along with cpp-expanse. If not, see . */ /** @file compiler.h * @date 2014 diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/data_sizes.h b/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/data_sizes.h index 83cc30bcba..4eadea6127 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/data_sizes.h +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/data_sizes.h @@ -1,18 +1,18 @@ /* - This file is part of cpp-ethereum. + This file is part of cpp-expanse. - cpp-ethereum is free software: you can redistribute it and/or modify + cpp-expanse is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software FoundationUUU,either version 3 of the LicenseUUU,or (at your option) any later version. - cpp-ethereum is distributed in the hope that it will be usefulU, + cpp-expanse is distributed in the hope that it will be usefulU, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with cpp-ethereum. If notUUU,see . + along with cpp-expanse. If notUUU,see . */ /** @file data_sizes.h diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/fnv.h b/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/fnv.h index d23c4e2474..ee5252b5b3 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/fnv.h +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/fnv.h @@ -1,18 +1,18 @@ /* - This file is part of cpp-ethereum. + This file is part of cpp-expanse. - cpp-ethereum is free software: you can redistribute it and/or modify + cpp-expanse is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - cpp-ethereum is distributed in the hope that it will be useful, + cpp-expanse is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with cpp-ethereum. If not, see . + along with cpp-expanse. If not, see . */ /** @file fnv.h * @author Matthew Wampler-Doty diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/internal.c b/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/internal.c index 338aa5ecd3..20ef8a9afc 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/internal.c +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/internal.c @@ -12,7 +12,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with cpp-ethereum. If not, see . + along with cpp-expanse. If not, see . */ /** @file internal.c * @author Tim Hughes diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io.h b/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io.h index 7a27089c7d..0febbe1b9e 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io.h +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io.h @@ -38,7 +38,7 @@ extern "C" { // 10 is for maximum number of digits of a uint32_t (for REVISION) // 1 is for - and 16 is for the first 16 hex digits for first 8 bytes of // the seedhash and last 1 is for the null terminating character -// Reference: https://github.com/ethereum/wiki/wiki/Ethash-DAG +// Reference: https://github.com/expanse-project/wiki/wiki/Ethash-DAG #define DAG_MUTABLE_NAME_MAX_SIZE (6 + 10 + 1 + 16 + 1) /// Possible return values of @see ethash_io_prepare enum ethash_io_rc { @@ -80,7 +80,7 @@ enum ethash_io_rc { * data directory. If it does not exist it's created. * @param[in] seedhash The seedhash of the current block number, used in the * naming of the file as can be seen from the spec at: - * https://github.com/ethereum/wiki/wiki/Ethash-DAG + * https://github.com/expanse-project/wiki/wiki/Ethash-DAG * @param[out] output_file If there was no failure then this will point to an open * file descriptor. User is responsible for closing it. * In the case of memo match then the file is open on read @@ -175,7 +175,7 @@ char* ethash_io_create_filename( /** * Gets the default directory name for the DAG depending on the system * - * The spec defining this directory is here: https://github.com/ethereum/wiki/wiki/Ethash-DAG + * The spec defining this directory is here: https://github.com/expanse-project/wiki/wiki/Ethash-DAG * * @param[out] strbuf A string buffer of sufficient size to keep the * null termninated string of the directory name diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/util_win32.c b/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/util_win32.c index 268e6db056..6f2e69e6d1 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/util_win32.c +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/util_win32.c @@ -1,18 +1,18 @@ /* - This file is part of cpp-ethereum. + This file is part of cpp-expanse. - cpp-ethereum is free software: you can redistribute it and/or modify + cpp-expanse is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - cpp-ethereum is distributed in the hope that it will be useful, + cpp-expanse is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with cpp-ethereum. If not, see . + along with cpp-expanse. If not, see . */ /** @file util.c * @author Tim Hughes diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/python/core.c b/Godeps/_workspace/src/github.com/ethereum/ethash/src/python/core.c index c66e03c549..b84d6c7504 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/src/python/core.c +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/src/python/core.c @@ -172,7 +172,7 @@ mine(PyObject *self, PyObject *args) { // TODO: Multi threading? do { ethash_full(&out, (void *) full_bytes, ¶ms, (const ethash_h256_t *) header, nonce++); - // TODO: disagrees with the spec https://github.com/ethereum/wiki/wiki/Ethash#mining + // TODO: disagrees with the spec https://github.com/expanse-project/wiki/wiki/Ethash#mining } while (!ethash_check_difficulty(&out.result, (const ethash_h256_t *) difficulty)); return Py_BuildValue("{" PY_CONST_STRING_FORMAT ":" PY_STRING_FORMAT ", " PY_CONST_STRING_FORMAT ":" PY_STRING_FORMAT ", " PY_CONST_STRING_FORMAT ":K}", @@ -233,7 +233,7 @@ static struct PyModuleDef PyethashModule = { PyMODINIT_FUNC PyInit_pyethash(void) { PyObject *module = PyModule_Create(&PyethashModule); - // Following Spec: https://github.com/ethereum/wiki/wiki/Ethash#definitions + // Following Spec: https://github.com/expanse-project/wiki/wiki/Ethash#definitions PyModule_AddIntConstant(module, "REVISION", (long) ETHASH_REVISION); PyModule_AddIntConstant(module, "DATASET_BYTES_INIT", (long) ETHASH_DATASET_BYTES_INIT); PyModule_AddIntConstant(module, "DATASET_BYTES_GROWTH", (long) ETHASH_DATASET_BYTES_GROWTH); @@ -251,7 +251,7 @@ PyMODINIT_FUNC PyInit_pyethash(void) { PyMODINIT_FUNC initpyethash(void) { PyObject *module = Py_InitModule("pyethash", PyethashMethods); - // Following Spec: https://github.com/ethereum/wiki/wiki/Ethash#definitions + // Following Spec: https://github.com/expanse-project/wiki/wiki/Ethash#definitions PyModule_AddIntConstant(module, "REVISION", (long) ETHASH_REVISION); PyModule_AddIntConstant(module, "DATASET_BYTES_INIT", (long) ETHASH_DATASET_BYTES_INIT); PyModule_AddIntConstant(module, "DATASET_BYTES_GROWTH", (long) ETHASH_DATASET_BYTES_GROWTH); diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/test/c/test.cpp b/Godeps/_workspace/src/github.com/ethereum/ethash/test/c/test.cpp index 44e0c385bb..ffcf105186 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/test/c/test.cpp +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/test/c/test.cpp @@ -36,7 +36,7 @@ namespace fs = boost::filesystem; #define our_alloca(param__) alloca((size_t)(param__)) -// some functions taken from eth::dev for convenience. +// some functions taken from exp::dev for convenience. std::string bytesToHexString(const uint8_t *str, const uint64_t s) { std::ostringstream ret; diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/httpu/httpu.go b/Godeps/_workspace/src/github.com/huin/goupnp/httpu/httpu.go index 3f4606af0f..5077b7127c 100644 --- a/Godeps/_workspace/src/github.com/huin/goupnp/httpu/httpu.go +++ b/Godeps/_workspace/src/github.com/huin/goupnp/httpu/httpu.go @@ -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 diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/soap/soap.go b/Godeps/_workspace/src/github.com/huin/goupnp/soap/soap.go index 786ce6fa84..6828f9d59e 100644 --- a/Godeps/_workspace/src/github.com/huin/goupnp/soap/soap.go +++ b/Godeps/_workspace/src/github.com/huin/goupnp/soap/soap.go @@ -12,7 +12,7 @@ import ( "net/url" "reflect" - "github.com/ethereum/go-ethereum/fdtrack" + "github.com/expanse-project/go-expanse/fdtrack" ) const ( diff --git a/Godeps/_workspace/src/github.com/jackpal/go-nat-pmp/natpmp.go b/Godeps/_workspace/src/github.com/jackpal/go-nat-pmp/natpmp.go index b165c784e3..6f30456a3b 100644 --- a/Godeps/_workspace/src/github.com/jackpal/go-nat-pmp/natpmp.go +++ b/Godeps/_workspace/src/github.com/jackpal/go-nat-pmp/natpmp.go @@ -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 diff --git a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/file_storage.go b/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/file_storage.go index 6d44f74b38..14af07e7fb 100644 --- a/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/file_storage.go +++ b/Godeps/_workspace/src/github.com/syndtr/goleveldb/leveldb/storage/file_storage.go @@ -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" ) diff --git a/Godeps/_workspace/src/golang.org/x/net/html/entity.go b/Godeps/_workspace/src/golang.org/x/net/html/entity.go index a50c04c60e..f285b78f6d 100644 --- a/Godeps/_workspace/src/golang.org/x/net/html/entity.go +++ b/Godeps/_workspace/src/golang.org/x/net/html/entity.go @@ -975,7 +975,7 @@ var entity = map[string]rune{ "esdot;": '\U00002250', "esim;": '\U00002242', "eta;": '\U000003B7', - "eth;": '\U000000F0', + "exp;": '\U000000F0', "euml;": '\U000000EB', "euro;": '\U000020AC', "excl;": '\U00000021', @@ -2102,7 +2102,7 @@ var entity = map[string]rune{ "eacute": '\U000000E9', "ecirc": '\U000000EA', "egrave": '\U000000E8', - "eth": '\U000000F0', + "exp": '\U000000F0', "euml": '\U000000EB', "frac12": '\U000000BD', "frac14": '\U000000BC', diff --git a/Makefile b/Makefile index 03e3bf4c6f..6260ad7641 100644 --- a/Makefile +++ b/Makefile @@ -2,13 +2,13 @@ # with Go source code. If you know what GOPATH is then you probably # don't need to bother with make. -.PHONY: geth 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 diff --git a/README.md b/README.md index b9ab28fdb1..2699fd6eb3 100644 --- a/README.md +++ b/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 | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=Linux%20Go%20develop%20branch)](https://build.ethdev.com/builders/Linux%20Go%20develop%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=Linux%20Go%20develop%20branch)](https://build.ethdev.com/builders/OSX%20Go%20develop%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=ARM%20Go%20develop%20branch)](https://build.ethdev.com/builders/ARM%20Go%20develop%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=Windows%20Go%20develop%20branch)](https://build.ethdev.com/builders/Windows%20Go%20develop%20branch/builds/-1) | [![Buildr+Status](https://travis-ci.org/ethereum/go-ethereum.svg?branch=develop)](https://travis-ci.org/ethereum/go-ethereum) [![Coverage Status](https://coveralls.io/repos/ethereum/go-ethereum/badge.svg?branch=develop)](https://coveralls.io/r/ethereum/go-ethereum?branch=develop) -master | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=Linux%20Go%20master%20branch)](https://build.ethdev.com/builders/Linux%20Go%20master%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=OSX%20Go%20master%20branch)](https://build.ethdev.com/builders/OSX%20Go%20master%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=ARM%20Go%20master%20branch)](https://build.ethdev.com/builders/ARM%20Go%20master%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=Windows%20Go%20master%20branch)](https://build.ethdev.com/builders/Windows%20Go%20master%20branch/builds/-1) | [![Buildr+Status](https://travis-ci.org/ethereum/go-ethereum.svg?branch=master)](https://travis-ci.org/ethereum/go-ethereum) [![Coverage Status](https://coveralls.io/repos/ethereum/go-ethereum/badge.svg?branch=master)](https://coveralls.io/r/ethereum/go-ethereum?branch=master) +develop | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=Linux%20Go%20develop%20branch)](https://build.ethdev.com/builders/Linux%20Go%20develop%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=Linux%20Go%20develop%20branch)](https://build.ethdev.com/builders/OSX%20Go%20develop%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=ARM%20Go%20develop%20branch)](https://build.ethdev.com/builders/ARM%20Go%20develop%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=Windows%20Go%20develop%20branch)](https://build.ethdev.com/builders/Windows%20Go%20develop%20branch/builds/-1) | [![Buildr+Status](https://travis-ci.org/expanse/go-expanse.svg?branch=develop)](https://travis-ci.org/expanse/go-expanse) [![Coverage Status](https://coveralls.io/repos/expanse/go-expanse/badge.svg?branch=develop)](https://coveralls.io/r/expanse/go-expanse?branch=develop) +master | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=Linux%20Go%20master%20branch)](https://build.ethdev.com/builders/Linux%20Go%20master%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=OSX%20Go%20master%20branch)](https://build.ethdev.com/builders/OSX%20Go%20master%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=ARM%20Go%20master%20branch)](https://build.ethdev.com/builders/ARM%20Go%20master%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=Windows%20Go%20master%20branch)](https://build.ethdev.com/builders/Windows%20Go%20master%20branch/builds/-1) | [![Buildr+Status](https://travis-ci.org/expanse/go-expanse.svg?branch=master)](https://travis-ci.org/expanse/go-expanse) [![Coverage Status](https://coveralls.io/repos/expanse/go-expanse/badge.svg?branch=master)](https://coveralls.io/r/expanse/go-expanse?branch=master) -[![Bugs](https://badge.waffle.io/ethereum/go-ethereum.png?label=bug&title=Bugs)](https://waffle.io/ethereum/go-ethereum) -[![Stories in Ready](https://badge.waffle.io/ethereum/go-ethereum.png?label=ready&title=Ready)](https://waffle.io/ethereum/go-ethereum) -[![Stories in Progress](https://badge.waffle.io/ethereum/go-ethereum.svg?label=in%20progress&title=In Progress)](http://waffle.io/ethereum/go-ethereum) -[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ethereum/go-ethereum?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) +[![Bugs](https://badge.waffle.io/expanse/go-expanse.png?label=bug&title=Bugs)](https://waffle.io/expanse/go-expanse) +[![Stories in Ready](https://badge.waffle.io/expanse/go-expanse.png?label=ready&title=Ready)](https://waffle.io/expanse/go-expanse) +[![Stories in Progress](https://badge.waffle.io/expanse/go-expanse.svg?label=in%20progress&title=In Progress)](http://waffle.io/expanse/go-expanse) +[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/expanse/go-expanse?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) Automated development builds ====================== -The following builds are build automatically by our build servers after each push to the [develop](https://github.com/ethereum/go-ethereum/tree/develop) branch. +The following builds are build automatically by our build servers after each push to the [develop](https://github.com/expanse-project/go-expanse/tree/develop) branch. -* [Docker](https://registry.hub.docker.com/u/ethereum/client-go/) +* [Docker](https://registry.hub.docker.com/u/expanse/client-go/) * [OS X](http://build.ethdev.com/builds/OSX%20Go%20develop%20branch/Mist-OSX-latest.dmg) * Ubuntu [trusty](https://build.ethdev.com/builds/Linux%20Go%20develop%20deb%20i386-trusty/latest/) | [utopic](https://build.ethdev.com/builds/Linux%20Go%20develop%20deb%20i386-utopic/latest/) * [Windows 64-bit](https://build.ethdev.com/builds/Windows%20Go%20develop%20branch/Geth-Win64-latest.zip) -* [ARM](https://build.ethdev.com/builds/ARM%20Go%20develop%20branch/geth-ARM-latest.tar.bz2) +* [ARM](https://build.ethdev.com/builds/ARM%20Go%20develop%20branch/gexp-ARM-latest.tar.bz2) Building the source =================== For prerequisites and detailed build instructions please read the -[Installation Instructions](https://github.com/ethereum/go-ethereum/wiki/Building-Ethereum) +[Installation Instructions](https://github.com/expanse-project/go-expanse/wiki/Building-Expanse) on the wiki. -Building geth requires two external dependencies, Go and GMP. +Building gexp requires two external dependencies, Go and GMP. You can install them using your favourite package manager. Once the dependencies are installed, run - make geth + make gexp Executables =========== -Go Ethereum comes with several wrappers/executables found in -[the `cmd` directory](https://github.com/ethereum/go-ethereum/tree/develop/cmd): +Go Expanse comes with several wrappers/executables found in +[the `cmd` directory](https://github.com/expanse-project/go-expanse/tree/develop/cmd): -* `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. diff --git a/accounts/abi/abi.go b/accounts/abi/abi.go index de3128902b..d50015707f 100644 --- a/accounts/abi/abi.go +++ b/accounts/abi/abi.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package abi @@ -22,7 +22,7 @@ import ( "io" "strings" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/crypto" ) // Callable method given a `Name` and whether the method is a constant. diff --git a/accounts/abi/abi_test.go b/accounts/abi/abi_test.go index 7706de05d9..42510dbaec 100644 --- a/accounts/abi/abi_test.go +++ b/accounts/abi/abi_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package abi @@ -23,7 +23,7 @@ import ( "strings" "testing" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/crypto" ) const jsondata = ` diff --git a/accounts/abi/doc.go b/accounts/abi/doc.go index 8242068582..419fb17403 100644 --- a/accounts/abi/doc.go +++ b/accounts/abi/doc.go @@ -1,23 +1,23 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -// Package abi implements the Ethereum ABI (Application Binary +// Package abi implements the Expanse ABI (Application Binary // Interface). // -// The Ethereum ABI is strongly typed, known at compile time +// The Expanse ABI is strongly typed, known at compile time // and static. This ABI will handle basic type casting; unsigned // to signed and visa versa. It does not handle slice casting such // as unsigned slice to signed slice. Bit size type casting is also diff --git a/accounts/abi/numbers.go b/accounts/abi/numbers.go index 2a7049425a..da77e7b9bb 100644 --- a/accounts/abi/numbers.go +++ b/accounts/abi/numbers.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package abi @@ -20,7 +20,7 @@ import ( "math/big" "reflect" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) var big_t = reflect.TypeOf(&big.Int{}) diff --git a/accounts/abi/numbers_test.go b/accounts/abi/numbers_test.go index 78dc57543b..827f2abb37 100644 --- a/accounts/abi/numbers_test.go +++ b/accounts/abi/numbers_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package abi diff --git a/accounts/abi/type.go b/accounts/abi/type.go index b16822d3ba..fc3aa075cd 100644 --- a/accounts/abi/type.go +++ b/accounts/abi/type.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package abi @@ -22,7 +22,7 @@ import ( "regexp" "strconv" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) const ( diff --git a/accounts/account_manager.go b/accounts/account_manager.go index 2781be656f..bffe782ba6 100644 --- a/accounts/account_manager.go +++ b/accounts/account_manager.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Package implements a private key management facility. // @@ -31,8 +31,8 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" ) var ( diff --git a/accounts/accounts_test.go b/accounts/accounts_test.go index d7a8a2b85f..f6df012fb6 100644 --- a/accounts/accounts_test.go +++ b/accounts/accounts_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package accounts @@ -22,7 +22,7 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/crypto" ) var testSigData = make([]byte, 32) @@ -142,7 +142,7 @@ func TestSignRace(t *testing.T) { } func tmpKeyStore(t *testing.T, new func(string) crypto.KeyStore) (string, crypto.KeyStore) { - d, err := ioutil.TempDir("", "eth-keystore-test") + d, err := ioutil.TempDir("", "exp-keystore-test") if err != nil { t.Fatal(err) } diff --git a/build/env.sh b/build/env.sh index 04401a3e17..1ba0936131 100755 --- a/build/env.sh +++ b/build/env.sh @@ -10,23 +10,23 @@ fi # Create fake Go workspace if it doesn't exist yet. workspace="$PWD/build/_workspace" root="$PWD" -ethdir="$workspace/src/github.com/ethereum" -if [ ! -L "$ethdir/go-ethereum" ]; then +ethdir="$workspace/src/github.com/expanse" +if [ ! -L "$ethdir/go-expanse" ]; then mkdir -p "$ethdir" cd "$ethdir" - ln -s ../../../../../. go-ethereum + ln -s ../../../../../. go-expanse cd "$root" fi # Set up the environment to use the workspace. # Also add Godeps workspace so we build using canned dependencies. -GOPATH="$ethdir/go-ethereum/Godeps/_workspace:$workspace" +GOPATH="$ethdir/go-expanse/Godeps/_workspace:$workspace" GOBIN="$PWD/build/bin" export GOPATH GOBIN # Run the command inside the workspace. -cd "$ethdir/go-ethereum" -PWD="$ethdir/go-ethereum" +cd "$ethdir/go-expanse" +PWD="$ethdir/go-expanse" # Launch the arguments with the configured environment. exec "$@" diff --git a/build/test-global-coverage.sh b/build/test-global-coverage.sh index 5bb233a31d..40df8d4c9c 100755 --- a/build/test-global-coverage.sh +++ b/build/test-global-coverage.sh @@ -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 diff --git a/build/update-license.go b/build/update-license.go index e28005cbd7..5c19d50be8 100644 --- a/build/update-license.go +++ b/build/update-license.go @@ -59,13 +59,13 @@ var ( licenseCommentRE = regexp.MustCompile(`^//\s*(Copyright|This file is part of).*?\n(?://.*?\n)*\n*`) // this text appears at the start of AUTHORS - authorsFileHeader = "# This is the official list of go-ethereum authors for copyright purposes.\n\n" + authorsFileHeader = "# This is the official list of go-expanse authors for copyright purposes.\n\n" ) // this template generates the license comment. // its input is an info structure. var licenseT = template.Must(template.New("").Parse(` -// Copyright {{.Year}} The go-ethereum Authors +// Copyright {{.Year}} The go-expanse Authors // This file is part of {{.Whole false}}. // // {{.Whole true}} is free software: you can redistribute it and/or modify @@ -104,12 +104,12 @@ func (i info) ShortLicense() string { func (i info) Whole(startOfSentence bool) string { if i.gpl() { - return "go-ethereum" + return "go-expanse" } if startOfSentence { - return "The go-ethereum library" + return "The go-expanse library" } - return "the go-ethereum library" + return "the go-expanse library" } func (i info) gpl() bool { diff --git a/cmd/bootnode/main.go b/cmd/bootnode/main.go index 0cad5321b9..d8989b2385 100644 --- a/cmd/bootnode/main.go +++ b/cmd/bootnode/main.go @@ -1,20 +1,20 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2015 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . -// bootnode runs a bootstrap node for the Ethereum Discovery Protocol. +// bootnode runs a bootstrap node for the Expanse Discovery Protocol. package main import ( @@ -26,10 +26,10 @@ import ( "log" "os" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/p2p/discover" - "github.com/ethereum/go-ethereum/p2p/nat" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/p2p/discover" + "github.com/expanse-project/go-expanse/p2p/nat" ) func main() { diff --git a/cmd/disasm/main.go b/cmd/disasm/main.go index ba1295ba1f..223747f049 100644 --- a/cmd/disasm/main.go +++ b/cmd/disasm/main.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2015 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . // disasm is a pretty-printer for EVM bytecode. package main @@ -22,8 +22,8 @@ import ( "io/ioutil" "os" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/vm" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/vm" ) func main() { diff --git a/cmd/ethtest/.gitignore b/cmd/ethtest/.gitignore index 399b6dc882..6eeba6f0f0 100644 --- a/cmd/ethtest/.gitignore +++ b/cmd/ethtest/.gitignore @@ -10,7 +10,7 @@ *un~ .DS_Store */**/.DS_Store -ethereum/ethereum +expanse/expanse ethereal/ethereal example/js node_modules diff --git a/cmd/ethtest/main.go b/cmd/ethtest/main.go index 5429cab31a..ec020918f7 100644 --- a/cmd/ethtest/main.go +++ b/cmd/ethtest/main.go @@ -1,20 +1,20 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2014 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . -// ethtest executes Ethereum JSON tests. +// ethtest executes Expanse JSON tests. package main import ( @@ -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, diff --git a/cmd/evm/main.go b/cmd/evm/main.go index 9659943820..d922de9acf 100644 --- a/cmd/evm/main.go +++ b/cmd/evm/main.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2014 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . // evm executes EVM code snippets. package main @@ -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 ( diff --git a/cmd/geth/blocktestcmd.go b/cmd/geth/blocktestcmd.go index 4eff82e3d1..58d3c60e0c 100644 --- a/cmd/geth/blocktestcmd.go +++ b/cmd/geth/blocktestcmd.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2015 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . package main @@ -21,11 +21,11 @@ import ( "os" "github.com/codegangsta/cli" - "github.com/ethereum/go-ethereum/cmd/utils" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/tests" + "github.com/expanse-project/go-expanse/cmd/utils" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/tests" ) var blocktestCommand = cli.Command{ @@ -57,7 +57,7 @@ func runBlockTest(ctx *cli.Context) { file, testname = args[0], args[1] rpc = true default: - utils.Fatalf(`Usage: ethereum blocktest [ [ "rpc" ] ]`) + utils.Fatalf(`Usage: expanse blocktest [ [ "rpc" ] ]`) } bt, err := tests.LoadBlockTests(file) if err != nil { @@ -69,15 +69,15 @@ func runBlockTest(ctx *cli.Context) { ecode := 0 for name, test := range bt { fmt.Printf("----------------- Running Block Test %q\n", name) - ethereum, err := runOneBlockTest(ctx, test) + expanse, err := runOneBlockTest(ctx, test) if err != nil { fmt.Println(err) fmt.Println("FAIL") ecode = 1 } - if ethereum != nil { - ethereum.Stop() - ethereum.WaitForShutdown() + if expanse != nil { + expanse.Stop() + expanse.WaitForShutdown() } } os.Exit(ecode) @@ -88,49 +88,49 @@ func runBlockTest(ctx *cli.Context) { if !ok { utils.Fatalf("Test file does not contain test named %q", testname) } - ethereum, err := runOneBlockTest(ctx, test) + expanse, err := runOneBlockTest(ctx, test) if err != nil { utils.Fatalf("%v", err) } - defer ethereum.Stop() + defer expanse.Stop() if rpc { fmt.Println("Block Test post state validated, starting RPC interface.") - startEth(ctx, ethereum) - utils.StartRPC(ethereum, ctx) - ethereum.WaitForShutdown() + startEth(ctx, expanse) + utils.StartRPC(expanse, ctx) + expanse.WaitForShutdown() } } -func runOneBlockTest(ctx *cli.Context, test *tests.BlockTest) (*eth.Ethereum, error) { +func runOneBlockTest(ctx *cli.Context, test *tests.BlockTest) (*exp.Expanse, error) { cfg := utils.MakeEthConfig(ClientIdentifier, Version, ctx) cfg.NewDB = func(path string) (common.Database, error) { return ethdb.NewMemDatabase() } cfg.MaxPeers = 0 // disable network cfg.Shh = false // disable whisper cfg.NAT = nil // disable port mapping - ethereum, err := eth.New(cfg) + expanse, err := exp.New(cfg) if err != nil { return nil, err } - // if err := ethereum.Start(); err != nil { + // if err := expanse.Start(); err != nil { // return nil, err // } // import the genesis block - ethereum.ResetWithGenesisBlock(test.Genesis) + expanse.ResetWithGenesisBlock(test.Genesis) // import pre accounts - statedb, err := test.InsertPreState(ethereum) + statedb, err := test.InsertPreState(expanse) if err != nil { - return ethereum, fmt.Errorf("InsertPreState: %v", err) + return expanse, fmt.Errorf("InsertPreState: %v", err) } - if err := test.TryBlocksInsert(ethereum.ChainManager()); err != nil { - return ethereum, fmt.Errorf("Block Test load error: %v", err) + if err := test.TryBlocksInsert(expanse.ChainManager()); err != nil { + return expanse, fmt.Errorf("Block Test load error: %v", err) } if err := test.ValidatePostState(statedb); err != nil { - return ethereum, fmt.Errorf("post state validation failed: %v", err) + return expanse, fmt.Errorf("post state validation failed: %v", err) } - return ethereum, nil + return expanse, nil } diff --git a/cmd/geth/chaincmd.go b/cmd/geth/chaincmd.go index 2d8eb15c29..e2d833ff8c 100644 --- a/cmd/geth/chaincmd.go +++ b/cmd/geth/chaincmd.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2015 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . package main @@ -24,12 +24,12 @@ import ( "time" "github.com/codegangsta/cli" - "github.com/ethereum/go-ethereum/cmd/utils" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/cmd/utils" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/logger/glog" ) var ( @@ -65,7 +65,7 @@ if already existing. Usage: `dump a specific block from storage`, Description: ` The arguments are interpreted as block numbers or hashes. -Use "ethereum dump 0" to dump the genesis block. +Use "expanse dump 0" to dump the genesis block. `, } ) diff --git a/cmd/geth/js.go b/cmd/geth/js.go index bf56423ece..fa2a64843a 100644 --- a/cmd/geth/js.go +++ b/cmd/geth/js.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2014 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . package main @@ -28,19 +28,19 @@ import ( "sort" - "github.com/ethereum/go-ethereum/cmd/utils" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/docserver" - "github.com/ethereum/go-ethereum/common/natspec" - "github.com/ethereum/go-ethereum/common/registrar" - "github.com/ethereum/go-ethereum/eth" - re "github.com/ethereum/go-ethereum/jsre" - "github.com/ethereum/go-ethereum/rpc" - "github.com/ethereum/go-ethereum/rpc/api" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/comms" - "github.com/ethereum/go-ethereum/rpc/shared" - "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/go-expanse/cmd/utils" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/common/docserver" + "github.com/expanse-project/go-expanse/common/natspec" + "github.com/expanse-project/go-expanse/common/registrar" + "github.com/expanse-project/go-expanse/exp" + re "github.com/expanse-project/go-expanse/jsre" + "github.com/expanse-project/go-expanse/rpc" + "github.com/expanse-project/go-expanse/rpc/api" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/comms" + "github.com/expanse-project/go-expanse/rpc/shared" + "github.com/expanse-project/go-expanse/xeth" "github.com/peterh/liner" "github.com/robertkrimen/otto" ) @@ -76,13 +76,13 @@ func (r dumbterm) AppendHistory(string) {} type jsre struct { ds *docserver.DocServer re *re.JSRE - ethereum *eth.Ethereum + expanse *exp.Expanse xeth *xeth.XEth wait chan *big.Int ps1 string atexit func() corsDomain string - client comms.EthereumClient + client comms.ExpanseClient prompter } @@ -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) diff --git a/cmd/geth/js_test.go b/cmd/geth/js_test.go index 67c36dfe71..5772a0beac 100644 --- a/cmd/geth/js_test.go +++ b/cmd/geth/js_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2015 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . package main @@ -28,18 +28,18 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/accounts" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/compiler" - "github.com/ethereum/go-ethereum/common/docserver" - "github.com/ethereum/go-ethereum/common/natspec" - "github.com/ethereum/go-ethereum/common/registrar" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/comms" + "github.com/expanse-project/go-expanse/accounts" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/common/compiler" + "github.com/expanse-project/go-expanse/common/docserver" + "github.com/expanse-project/go-expanse/common/natspec" + "github.com/expanse-project/go-expanse/common/registrar" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/comms" ) const ( @@ -66,7 +66,7 @@ type testjethre struct { } func (self *testjethre) UnlockAccount(acc []byte) bool { - err := self.ethereum.AccountManager().Unlock(common.BytesToAddress(acc), "") + err := self.expanse.AccountManager().Unlock(common.BytesToAddress(acc), "") if err != nil { panic("unable to unlock") } @@ -74,18 +74,18 @@ func (self *testjethre) UnlockAccount(acc []byte) bool { } func (self *testjethre) ConfirmTransaction(tx string) bool { - if self.ethereum.NatSpec { + if self.expanse.NatSpec { self.lastConfirm = natspec.GetNotice(self.xeth, tx, self.ds) } return true } -func testJEthRE(t *testing.T) (string, *testjethre, *eth.Ethereum) { +func testJEthRE(t *testing.T) (string, *testjethre, *exp.Expanse) { return testREPL(t, nil) } -func testREPL(t *testing.T, config func(*eth.Config)) (string, *testjethre, *eth.Ethereum) { - tmp, err := ioutil.TempDir("", "geth-test") +func testREPL(t *testing.T, config func(*exp.Config)) (string, *testjethre, *exp.Expanse) { + tmp, err := ioutil.TempDir("", "gexp-test") if err != nil { t.Fatal(err) } @@ -95,7 +95,7 @@ func testREPL(t *testing.T, config func(*eth.Config)) (string, *testjethre, *eth core.WriteGenesisBlockForTesting(db, common.HexToAddress(testAddress), common.String2Big(testBalance)) ks := crypto.NewKeyStorePlain(filepath.Join(tmp, "keystore")) am := accounts.NewManager(ks) - conf := ð.Config{ + conf := &exp.Config{ NodeKey: testNodeKey, DataDir: tmp, AccountManager: am, @@ -108,7 +108,7 @@ func testREPL(t *testing.T, config func(*eth.Config)) (string, *testjethre, *eth if config != nil { config(conf) } - ethereum, err := eth.New(conf) + expanse, err := exp.New(conf) if err != nil { t.Fatal("%v", err) } @@ -128,22 +128,22 @@ func testREPL(t *testing.T, config func(*eth.Config)) (string, *testjethre, *eth t.Fatal(err) } - assetPath := filepath.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "cmd", "mist", "assets", "ext") + assetPath := filepath.Join(os.Getenv("GOPATH"), "src", "github.com", "expanse", "go-expanse", "cmd", "mist", "assets", "ext") client := comms.NewInProcClient(codec.JSON) ds := docserver.New("/") tf := &testjethre{ds: ds} - repl := newJSRE(ethereum, assetPath, "", client, false, tf) + repl := newJSRE(expanse, assetPath, "", client, false, tf) tf.jsre = repl - return tmp, tf, ethereum + return tmp, tf, expanse } func TestNodeInfo(t *testing.T) { t.Skip("broken after p2p update") - tmp, repl, ethereum := testJEthRE(t) - if err := ethereum.Start(); err != nil { - t.Fatalf("error starting ethereum: %v", err) + tmp, repl, expanse := testJEthRE(t) + if err := expanse.Start(); err != nil { + t.Fatalf("error starting expanse: %v", err) } - defer ethereum.Stop() + defer expanse.Stop() defer os.RemoveAll(tmp) want := `{"DiscPort":0,"IP":"0.0.0.0","ListenAddr":"","Name":"test","NodeID":"4cb2fc32924e94277bf94b5e4c983beedb2eabd5a0bc941db32202735c6625d020ca14a5963d1738af43b6ac0a711d61b1a06de931a499fe2aa0b1a132a902b5","NodeUrl":"enode://4cb2fc32924e94277bf94b5e4c983beedb2eabd5a0bc941db32202735c6625d020ca14a5963d1738af43b6ac0a711d61b1a06de931a499fe2aa0b1a132a902b5@0.0.0.0:0","TCPPort":0,"Td":"131072"}` @@ -151,15 +151,15 @@ func TestNodeInfo(t *testing.T) { } func TestAccounts(t *testing.T) { - tmp, repl, ethereum := testJEthRE(t) - if err := ethereum.Start(); err != nil { - t.Fatalf("error starting ethereum: %v", err) + tmp, repl, expanse := testJEthRE(t) + if err := expanse.Start(); err != nil { + t.Fatalf("error starting expanse: %v", err) } - defer ethereum.Stop() + defer expanse.Stop() defer os.RemoveAll(tmp) - checkEvalJSON(t, repl, `eth.accounts`, `["`+testAddress+`"]`) - checkEvalJSON(t, repl, `eth.coinbase`, `"`+testAddress+`"`) + checkEvalJSON(t, repl, `exp.accounts`, `["`+testAddress+`"]`) + checkEvalJSON(t, repl, `exp.coinbase`, `"`+testAddress+`"`) val, err := repl.re.Run(`personal.newAccount("password")`) if err != nil { t.Errorf("expected no error, got %v", err) @@ -169,26 +169,26 @@ func TestAccounts(t *testing.T) { t.Errorf("address not hex: %q", addr) } - checkEvalJSON(t, repl, `eth.accounts`, `["`+testAddress+`","`+addr+`"]`) + checkEvalJSON(t, repl, `exp.accounts`, `["`+testAddress+`","`+addr+`"]`) } func TestBlockChain(t *testing.T) { - tmp, repl, ethereum := testJEthRE(t) - if err := ethereum.Start(); err != nil { - t.Fatalf("error starting ethereum: %v", err) + tmp, repl, expanse := testJEthRE(t) + if err := expanse.Start(); err != nil { + t.Fatalf("error starting expanse: %v", err) } - defer ethereum.Stop() + defer expanse.Stop() defer os.RemoveAll(tmp) // get current block dump before export/import. - val, err := repl.re.Run("JSON.stringify(debug.dumpBlock(eth.blockNumber))") + val, err := repl.re.Run("JSON.stringify(debug.dumpBlock(exp.blockNumber))") if err != nil { t.Errorf("expected no error, got %v", err) } beforeExport := val.String() // do the export - extmp, err := ioutil.TempDir("", "geth-test-export") + extmp, err := ioutil.TempDir("", "gexp-test-export") if err != nil { t.Fatal(err) } @@ -196,7 +196,7 @@ func TestBlockChain(t *testing.T) { tmpfile := filepath.Join(extmp, "export.chain") tmpfileq := strconv.Quote(tmpfile) - ethereum.ChainManager().Reset() + expanse.ChainManager().Reset() checkEvalJSON(t, repl, `admin.exportChain(`+tmpfileq+`)`, `true`) if _, err := os.Stat(tmpfile); err != nil { @@ -205,57 +205,57 @@ func TestBlockChain(t *testing.T) { // check import, verify that dumpBlock gives the same result. checkEvalJSON(t, repl, `admin.importChain(`+tmpfileq+`)`, `true`) - checkEvalJSON(t, repl, `debug.dumpBlock(eth.blockNumber)`, beforeExport) + checkEvalJSON(t, repl, `debug.dumpBlock(exp.blockNumber)`, beforeExport) } func TestMining(t *testing.T) { - tmp, repl, ethereum := testJEthRE(t) - if err := ethereum.Start(); err != nil { - t.Fatalf("error starting ethereum: %v", err) + tmp, repl, expanse := testJEthRE(t) + if err := expanse.Start(); err != nil { + t.Fatalf("error starting expanse: %v", err) } - defer ethereum.Stop() + defer expanse.Stop() defer os.RemoveAll(tmp) - checkEvalJSON(t, repl, `eth.mining`, `false`) + checkEvalJSON(t, repl, `exp.mining`, `false`) } func TestRPC(t *testing.T) { - tmp, repl, ethereum := testJEthRE(t) - if err := ethereum.Start(); err != nil { - t.Errorf("error starting ethereum: %v", err) + tmp, repl, expanse := testJEthRE(t) + if err := expanse.Start(); err != nil { + t.Errorf("error starting expanse: %v", err) return } - defer ethereum.Stop() + defer expanse.Stop() defer os.RemoveAll(tmp) - checkEvalJSON(t, repl, `admin.startRPC("127.0.0.1", 5004, "*", "web3,eth,net")`, `true`) + checkEvalJSON(t, repl, `admin.startRPC("127.0.0.1", 5004, "*", "web3,exp,net")`, `true`) } func TestCheckTestAccountBalance(t *testing.T) { t.Skip() // i don't think it tests the correct behaviour here. it's actually testing // internals which shouldn't be tested. This now fails because of a change in the core // and i have no means to fix this, sorry - @obscuren - tmp, repl, ethereum := testJEthRE(t) - if err := ethereum.Start(); err != nil { - t.Errorf("error starting ethereum: %v", err) + tmp, repl, expanse := testJEthRE(t) + if err := expanse.Start(); err != nil { + t.Errorf("error starting expanse: %v", err) return } - defer ethereum.Stop() + defer expanse.Stop() defer os.RemoveAll(tmp) repl.re.Run(`primary = "` + testAddress + `"`) - checkEvalJSON(t, repl, `eth.getBalance(primary)`, `"`+testBalance+`"`) + checkEvalJSON(t, repl, `exp.getBalance(primary)`, `"`+testBalance+`"`) } func TestSignature(t *testing.T) { - tmp, repl, ethereum := testJEthRE(t) - if err := ethereum.Start(); err != nil { - t.Errorf("error starting ethereum: %v", err) + tmp, repl, expanse := testJEthRE(t) + if err := expanse.Start(); err != nil { + t.Errorf("error starting expanse: %v", err) return } - defer ethereum.Stop() + defer expanse.Stop() defer os.RemoveAll(tmp) - val, err := repl.re.Run(`eth.sign("` + testAddress + `", "` + testHash + `")`) + val, err := repl.re.Run(`exp.sign("` + testAddress + `", "` + testHash + `")`) // This is a very preliminary test, lacking actual signature verification if err != nil { @@ -275,15 +275,15 @@ func TestSignature(t *testing.T) { func TestContract(t *testing.T) { t.Skip("contract testing is implemented with mining in ethash test mode. This takes about 7seconds to run. Unskip and run on demand") coinbase := common.HexToAddress(testAddress) - tmp, repl, ethereum := testREPL(t, func(conf *eth.Config) { + tmp, repl, expanse := testREPL(t, func(conf *exp.Config) { conf.Etherbase = coinbase conf.PowTest = true }) - if err := ethereum.Start(); err != nil { - t.Errorf("error starting ethereum: %v", err) + if err := expanse.Start(); err != nil { + t.Errorf("error starting expanse: %v", err) return } - defer ethereum.Stop() + defer expanse.Stop() defer os.RemoveAll(tmp) reg := registrar.New(repl.xeth) @@ -321,7 +321,7 @@ func TestContract(t *testing.T) { if err != nil { t.Fatalf("%v", err) } - if checkEvalJSON(t, repl, `primary = eth.accounts[0]`, `"`+testAddress+`"`) != nil { + if checkEvalJSON(t, repl, `primary = exp.accounts[0]`, `"`+testAddress+`"`) != nil { return } if checkEvalJSON(t, repl, `source = "`+source+`"`, `"`+source+`"`) != nil { @@ -346,7 +346,7 @@ func TestContract(t *testing.T) { t.Errorf("%v", err) } } else { - if checkEvalJSON(t, repl, `contract = eth.compile.solidity(source).test`, string(contractInfo)) != nil { + if checkEvalJSON(t, repl, `contract = exp.compile.solidity(source).test`, string(contractInfo)) != nil { return } } @@ -357,7 +357,7 @@ func TestContract(t *testing.T) { if checkEvalJSON( t, repl, - `contractaddress = eth.sendTransaction({from: primary, data: contract.code})`, + `contractaddress = exp.sendTransaction({from: primary, data: contract.code})`, `"0x46d69d55c3c4b86a924a92c9fc4720bb7bce1d74"`, ) != nil { return @@ -368,7 +368,7 @@ func TestContract(t *testing.T) { } callSetup := `abiDef = JSON.parse('[{"constant":false,"inputs":[{"name":"a","type":"uint256"}],"name":"multiply","outputs":[{"name":"d","type":"uint256"}],"type":"function"}]'); -Multiply7 = eth.contract(abiDef); +Multiply7 = exp.contract(abiDef); multiply7 = Multiply7.at(contractaddress); ` _, err = repl.re.Run(callSetup) @@ -443,7 +443,7 @@ multiply7 = Multiply7.at(contractaddress); } func pendingTransactions(repl *testjethre, t *testing.T) (txc int64, err error) { - txs := repl.ethereum.TxPool().GetTransactions() + txs := repl.expanse.TxPool().GetTransactions() return int64(len(txs)), nil } @@ -469,12 +469,12 @@ func processTxs(repl *testjethre, t *testing.T, expTxc int) bool { return false } - err = repl.ethereum.StartMining(runtime.NumCPU()) + err = repl.expanse.StartMining(runtime.NumCPU()) if err != nil { t.Errorf("unexpected error mining: %v", err) return false } - defer repl.ethereum.StopMining() + defer repl.expanse.StopMining() timer := time.NewTimer(100 * time.Second) height := new(big.Int).Add(repl.xeth.CurrentBlock().Number(), big.NewInt(1)) diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 74f4e90c3a..d8e34a3f28 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -1,20 +1,20 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2014 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . -// geth is the official command-line client for Ethereum. +// gexp is the official command-line client for Expanse. package main import ( @@ -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 /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 account new + expanse --password account new Note, this is meant to be used for testing only, it is a bad idea to save your password to file or expose in any other way. @@ -193,7 +193,7 @@ password to file or expose in any other way. Usage: "update an existing account", Description: ` - ethereum account update
+ expanse account update
Update an existing account. @@ -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 account new + expanse --password account new Since only one password can be given, only format update can be performed, changing your password is only possible interactively. @@ -220,7 +220,7 @@ changes. Usage: "import a private key into a new account", Description: ` - ethereum account import + expanse account import Imports an unencrypted private key from and creates a new account. Prints the address. @@ -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 account import + expanse --password account import Note: -As you can directly copy your encrypted accounts to another ethereum instance, +As you can directly copy your encrypted accounts to another expanse instance, this import mechanism is not needed when you transfer an account between nodes. `, @@ -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 `) + utils.Fatalf(`Usage: gexp makedag `) } 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) diff --git a/cmd/geth/monitorcmd.go b/cmd/geth/monitorcmd.go index a7c099532c..4634ce5184 100644 --- a/cmd/geth/monitorcmd.go +++ b/cmd/geth/monitorcmd.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2015 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . package main @@ -26,11 +26,11 @@ import ( "time" "github.com/codegangsta/cli" - "github.com/ethereum/go-ethereum/cmd/utils" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/rpc" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/comms" + "github.com/expanse-project/go-expanse/cmd/utils" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/rpc" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/comms" "github.com/gizak/termui" ) @@ -70,13 +70,13 @@ to display multiple metrics simultaneously. // monitor starts a terminal UI based monitoring tool for the requested metrics. func monitor(ctx *cli.Context) { var ( - client comms.EthereumClient + client comms.ExpanseClient err error ) - // Attach to an Ethereum node over IPC or RPC + // Attach to an Expanse node over IPC or RPC endpoint := ctx.String(monitorCommandAttachFlag.Name) if client, err = comms.ClientFromEndpoint(endpoint, codec.JSON); err != nil { - utils.Fatalf("Unable to attach to geth node: %v", err) + utils.Fatalf("Unable to attach to gexp node: %v", err) } defer client.Close() @@ -95,7 +95,7 @@ func monitor(ctx *cli.Context) { if len(list) > 0 { utils.Fatalf("No metrics specified.\n\nAvailable:\n - %s", strings.Join(list, "\n - ")) } else { - utils.Fatalf("No metrics collected by geth (--%s).\n", utils.MetricsEnabledFlag.Name) + utils.Fatalf("No metrics collected by gexp (--%s).\n", utils.MetricsEnabledFlag.Name) } } sort.Strings(monitored) @@ -162,7 +162,7 @@ func monitor(ctx *cli.Context) { } } -// retrieveMetrics contacts the attached geth node and retrieves the entire set +// retrieveMetrics contacts the attached gexp node and retrieves the entire set // of collected system metrics. func retrieveMetrics(xeth *rpc.Xeth) (map[string]interface{}, error) { return xeth.Call("debug_metrics", []interface{}{true}) diff --git a/cmd/rlpdump/main.go b/cmd/rlpdump/main.go index 10eea1fde0..e2dd152be7 100644 --- a/cmd/rlpdump/main.go +++ b/cmd/rlpdump/main.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2015 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . // rlpdump is a pretty-printer for RLP data. package main @@ -26,7 +26,7 @@ import ( "os" "strings" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/rlp" ) var ( diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go index f8f7f6376e..0c60da38d2 100644 --- a/cmd/utils/cmd.go +++ b/cmd/utils/cmd.go @@ -1,20 +1,20 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2014 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . -// Package utils contains internal helper functions for go-ethereum commands. +// Package utils contains internal helper functions for go-expanse commands. package utils import ( @@ -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 diff --git a/cmd/utils/customflags.go b/cmd/utils/customflags.go index e7efed4e3c..e730c197d4 100644 --- a/cmd/utils/customflags.go +++ b/cmd/utils/customflags.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2015 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . package utils @@ -44,7 +44,7 @@ func (self *DirectoryString) Set(value string) error { } // Custom cli.Flag type which expand the received string to an absolute path. -// e.g. ~/.ethereum -> /home/username/.ethereum +// e.g. ~/.expanse -> /home/username/.expanse type DirectoryFlag struct { cli.GenericFlag Name string diff --git a/cmd/utils/customflags_test.go b/cmd/utils/customflags_test.go index 0fb0af63b7..61c000238f 100644 --- a/cmd/utils/customflags_test.go +++ b/cmd/utils/customflags_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2015 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . package utils diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 815d481244..01f9976530 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2015 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . package utils @@ -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 } diff --git a/cmd/utils/legalese.go b/cmd/utils/legalese.go index 09e687c17b..4779849015 100644 --- a/cmd/utils/legalese.go +++ b/cmd/utils/legalese.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of go-ethereum. +// Copyright 2015 The go-expanse Authors +// This file is part of go-expanse. // -// go-ethereum is free software: you can redistribute it and/or modify +// go-expanse is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// go-expanse is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with go-ethereum. If not, see . +// along with go-expanse. If not, see . package utils diff --git a/common/README.md b/common/README.md index 1ed56b71ba..a1ddd98cc6 100644 --- a/common/README.md +++ b/common/README.md @@ -1,22 +1,22 @@ # ethutil [![Build -Status](https://travis-ci.org/ethereum/go-ethereum.png?branch=master)](https://travis-ci.org/ethereum/go-ethereum) +Status](https://travis-ci.org/expanse/go-expanse.png?branch=master)](https://travis-ci.org/expanse/go-expanse) -The ethutil package contains the ethereum utility library. +The ethutil package contains the expanse utility library. # Installation -`go get github.com/ethereum/ethutil-go` +`go get github.com/expanse-project/ethutil-go` # Usage ## RLP (Recursive Linear Prefix) Encoding -RLP Encoding is an encoding scheme utilized by the Ethereum project. It +RLP Encoding is an encoding scheme utilized by the Expanse project. It encodes any native value or list to string. -More in depth information about the Encoding scheme see the [Wiki](http://wiki.ethereum.org/index.php/RLP) +More in depth information about the Encoding scheme see the [Wiki](http://wiki.expanse.org/index.php/RLP) article. ```go @@ -31,10 +31,10 @@ fmt.Println(decoded) // => ["dog" "cat"] ## Patricia Trie -Patricie Tree is a merkle trie utilized by the Ethereum project. +Patricie Tree is a merkle trie utilized by the Expanse project. More in depth information about the (modified) Patricia Trie can be -found on the [Wiki](http://wiki.ethereum.org/index.php/Patricia_Tree). +found on the [Wiki](http://wiki.expanse.org/index.php/Patricia_Tree). The patricia trie uses a db as backend and could be anything as long as it satisfies the Database interface found in `ethutil/db.go`. diff --git a/common/big.go b/common/big.go index a5d512d0dc..9dce0d70cb 100644 --- a/common/big.go +++ b/common/big.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common diff --git a/common/big_test.go b/common/big_test.go index 1eb0c0c1fd..e45c98ff3d 100644 --- a/common/big_test.go +++ b/common/big_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common diff --git a/common/bytes.go b/common/bytes.go index ba6987a9ec..11dc2665ec 100644 --- a/common/bytes.go +++ b/common/bytes.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Package common contains various helper functions. package common diff --git a/common/bytes_test.go b/common/bytes_test.go index 816d2082b8..f2b40e9463 100644 --- a/common/bytes_test.go +++ b/common/bytes_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common diff --git a/common/compiler/solidity.go b/common/compiler/solidity.go index 56928ac27d..d3d0a2a57b 100644 --- a/common/compiler/solidity.go +++ b/common/compiler/solidity.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package compiler @@ -27,10 +27,10 @@ import ( "regexp" "strings" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" ) const ( diff --git a/common/compiler/solidity_test.go b/common/compiler/solidity_test.go index 8255e8e2d9..780e879709 100644 --- a/common/compiler/solidity_test.go +++ b/common/compiler/solidity_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package compiler @@ -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" diff --git a/common/db.go b/common/db.go index 60c090cdce..2aee774304 100644 --- a/common/db.go +++ b/common/db.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common diff --git a/common/debug.go b/common/debug.go index fa93d7bda5..0ba3e3b303 100644 --- a/common/debug.go +++ b/common/debug.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common @@ -24,7 +24,7 @@ import ( ) func Report(extra ...interface{}) { - fmt.Fprintln(os.Stderr, "You've encountered a sought after, hard to reproduce bug. Please report this to the developers <3 https://github.com/ethereum/go-ethereum/issues") + fmt.Fprintln(os.Stderr, "You've encountered a sought after, hard to reproduce bug. Please report this to the developers <3 https://github.com/expanse-project/go-expanse/issues") fmt.Fprintln(os.Stderr, extra...) _, file, line, _ := runtime.Caller(1) diff --git a/common/docserver/docserver.go b/common/docserver/docserver.go index fa120fb380..cc5d17b0b5 100644 --- a/common/docserver/docserver.go +++ b/common/docserver/docserver.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package docserver @@ -22,8 +22,8 @@ import ( "net/http" "path/filepath" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" ) type DocServer struct { diff --git a/common/docserver/docserver_test.go b/common/docserver/docserver_test.go index 92e39d167a..f02a55f75f 100644 --- a/common/docserver/docserver_test.go +++ b/common/docserver/docserver_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package docserver @@ -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) { diff --git a/common/list.go b/common/list.go index 07b2f17f53..395519b921 100644 --- a/common/list.go +++ b/common/list.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common diff --git a/common/main_test.go b/common/main_test.go index 149d09928a..95e10f0c3c 100644 --- a/common/main_test.go +++ b/common/main_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common diff --git a/common/math/dist.go b/common/math/dist.go index 913fbfbd47..5df1fc2d1c 100644 --- a/common/math/dist.go +++ b/common/math/dist.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package math @@ -20,7 +20,7 @@ import ( "math/big" "sort" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) type Summer interface { diff --git a/common/math/dist_test.go b/common/math/dist_test.go index 1eacfbcaf2..41d5175561 100644 --- a/common/math/dist_test.go +++ b/common/math/dist_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package math diff --git a/common/natspec/natspec.go b/common/natspec/natspec.go index 0265c2e13f..7907f21b61 100644 --- a/common/natspec/natspec.go +++ b/common/natspec/natspec.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package natspec @@ -22,11 +22,11 @@ import ( "fmt" "strings" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/docserver" - "github.com/ethereum/go-ethereum/common/registrar" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/common/docserver" + "github.com/expanse-project/go-expanse/common/registrar" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/xeth" "github.com/robertkrimen/otto" ) diff --git a/common/natspec/natspec_e2e_test.go b/common/natspec/natspec_e2e_test.go index fc8ca6af2e..8c063f6259 100644 --- a/common/natspec/natspec_e2e_test.go +++ b/common/natspec/natspec_e2e_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package natspec @@ -26,15 +26,15 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/accounts" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/docserver" - "github.com/ethereum/go-ethereum/common/registrar" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/ethdb" - xe "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/go-expanse/accounts" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/common/docserver" + "github.com/expanse-project/go-expanse/common/registrar" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/ethdb" + xe "github.com/expanse-project/go-expanse/xeth" ) const ( @@ -93,7 +93,7 @@ const ( type testFrontend struct { t *testing.T - ethereum *eth.Ethereum + expanse *exp.Expanse xeth *xe.XEth wait chan *big.Int lastConfirm string @@ -101,7 +101,7 @@ type testFrontend struct { } func (self *testFrontend) UnlockAccount(acc []byte) bool { - self.ethereum.AccountManager().Unlock(common.BytesToAddress(acc), "password") + self.expanse.AccountManager().Unlock(common.BytesToAddress(acc), "password") return true } @@ -113,17 +113,17 @@ func (self *testFrontend) ConfirmTransaction(tx string) bool { return true } -func testEth(t *testing.T) (ethereum *eth.Ethereum, err error) { +func testEth(t *testing.T) (expanse *exp.Expanse, err error) { - os.RemoveAll("/tmp/eth-natspec/") + os.RemoveAll("/tmp/exp-natspec/") - err = os.MkdirAll("/tmp/eth-natspec/keystore", os.ModePerm) + err = os.MkdirAll("/tmp/exp-natspec/keystore", os.ModePerm) if err != nil { panic(err) } // create a testAddress - ks := crypto.NewKeyStorePassphrase("/tmp/eth-natspec/keystore") + ks := crypto.NewKeyStorePassphrase("/tmp/exp-natspec/keystore") am := accounts.NewManager(ks) testAccount, err := am.NewAccount("password") if err != nil { @@ -137,8 +137,8 @@ func testEth(t *testing.T) (ethereum *eth.Ethereum, err error) { core.WriteGenesisBlockForTesting(db, common.HexToAddress(testAddress), common.String2Big(testBalance)) // only use minimalistic stack with no networking - ethereum, err = eth.New(ð.Config{ - DataDir: "/tmp/eth-natspec", + expanse, err = exp.New(&exp.Config{ + DataDir: "/tmp/exp-natspec", AccountManager: am, MaxPeers: 0, PowTest: true, @@ -154,23 +154,23 @@ func testEth(t *testing.T) (ethereum *eth.Ethereum, err error) { } func testInit(t *testing.T) (self *testFrontend) { - // initialise and start minimal ethereum stack - ethereum, err := testEth(t) + // initialise and start minimal expanse stack + expanse, err := testEth(t) if err != nil { - t.Errorf("error creating ethereum: %v", err) + t.Errorf("error creating expanse: %v", err) return } - err = ethereum.Start() + err = expanse.Start() if err != nil { - t.Errorf("error starting ethereum: %v", err) + t.Errorf("error starting expanse: %v", err) return } // mock frontend - self = &testFrontend{t: t, ethereum: ethereum} - self.xeth = xe.New(ethereum, self) + self = &testFrontend{t: t, expanse: expanse} + self.xeth = xe.New(expanse, self) self.wait = self.xeth.UpdateState() - addr, _ := self.ethereum.Etherbase() + addr, _ := self.expanse.Etherbase() // initialise the registry contracts reg := registrar.New(self.xeth) @@ -211,8 +211,8 @@ func TestNatspecE2E(t *testing.T) { t.Skip() tf := testInit(t) - defer tf.ethereum.Stop() - addr, _ := tf.ethereum.Etherbase() + defer tf.expanse.Stop() + addr, _ := tf.expanse.Etherbase() // create a contractInfo file (mock cloud-deployed contract metadocs) // incidentally this is the info for the registry contract itself @@ -280,7 +280,7 @@ func TestNatspecE2E(t *testing.T) { } func pendingTransactions(repl *testFrontend, t *testing.T) (txc int64, err error) { - txs := repl.ethereum.TxPool().GetTransactions() + txs := repl.expanse.TxPool().GetTransactions() return int64(len(txs)), nil } @@ -306,12 +306,12 @@ func processTxs(repl *testFrontend, t *testing.T, expTxc int) bool { return false } - err = repl.ethereum.StartMining(runtime.NumCPU()) + err = repl.expanse.StartMining(runtime.NumCPU()) if err != nil { t.Errorf("unexpected error mining: %v", err) return false } - defer repl.ethereum.StopMining() + defer repl.expanse.StopMining() timer := time.NewTimer(100 * time.Second) height := new(big.Int).Add(repl.xeth.CurrentBlock().Number(), big.NewInt(1)) diff --git a/common/natspec/natspec_e2e_test.go.orig b/common/natspec/natspec_e2e_test.go.orig index ae8e17ad9a..bd89d9c546 100644 --- a/common/natspec/natspec_e2e_test.go.orig +++ b/common/natspec/natspec_e2e_test.go.orig @@ -7,15 +7,15 @@ import ( "strings" "testing" - "github.com/ethereum/go-ethereum/accounts" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/docserver" - "github.com/ethereum/go-ethereum/common/registrar" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/eth" - xe "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/go-expanse/accounts" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/common/docserver" + "github.com/expanse-project/go-expanse/common/registrar" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/exp" + xe "github.com/expanse-project/go-expanse/xeth" ) const ( @@ -74,7 +74,7 @@ const ( type testFrontend struct { t *testing.T - ethereum *eth.Ethereum + expanse *exp.Expanse xeth *xe.XEth coinbase common.Address stateDb *state.StateDB @@ -84,7 +84,7 @@ type testFrontend struct { } func (self *testFrontend) UnlockAccount(acc []byte) bool { - self.ethereum.AccountManager().Unlock(common.BytesToAddress(acc), "password") + self.expanse.AccountManager().Unlock(common.BytesToAddress(acc), "password") return true } @@ -96,17 +96,17 @@ func (self *testFrontend) ConfirmTransaction(tx string) bool { return true } -func testEth(t *testing.T) (ethereum *eth.Ethereum, err error) { +func testEth(t *testing.T) (expanse *exp.Expanse, err error) { - os.RemoveAll("/tmp/eth-natspec/") + os.RemoveAll("/tmp/exp-natspec/") - err = os.MkdirAll("/tmp/eth-natspec/keystore", os.ModePerm) + err = os.MkdirAll("/tmp/exp-natspec/keystore", os.ModePerm) if err != nil { panic(err) } // create a testAddress - ks := crypto.NewKeyStorePassphrase("/tmp/eth-natspec/keystore") + ks := crypto.NewKeyStorePassphrase("/tmp/exp-natspec/keystore") am := accounts.NewManager(ks) testAccount, err := am.NewAccount("password") if err != nil { @@ -120,8 +120,8 @@ func testEth(t *testing.T) (ethereum *eth.Ethereum, err error) { }`) // only use minimalistic stack with no networking - ethereum, err = eth.New(ð.Config{ - DataDir: "/tmp/eth-natspec", + expanse, err = exp.New(&exp.Config{ + DataDir: "/tmp/exp-natspec", AccountManager: am, MaxPeers: 0, }) @@ -134,25 +134,25 @@ func testEth(t *testing.T) (ethereum *eth.Ethereum, err error) { } func testInit(t *testing.T) (self *testFrontend) { - // initialise and start minimal ethereum stack - ethereum, err := testEth(t) + // initialise and start minimal expanse stack + expanse, err := testEth(t) if err != nil { - t.Errorf("error creating ethereum: %v", err) + t.Errorf("error creating expanse: %v", err) return } - err = ethereum.Start() + err = expanse.Start() if err != nil { - t.Errorf("error starting ethereum: %v", err) + t.Errorf("error starting expanse: %v", err) return } // mock frontend - self = &testFrontend{t: t, ethereum: ethereum} - self.xeth = xe.New(ethereum, self) + self = &testFrontend{t: t, expanse: expanse} + self.xeth = xe.New(expanse, self) - addr, _ := ethereum.Etherbase() + addr, _ := expanse.Etherbase() self.coinbase = addr - self.stateDb = self.ethereum.ChainManager().State().Copy() + self.stateDb = self.expanse.ChainManager().State().Copy() // initialise the registry contracts reg := registrar.New(self.xeth) @@ -185,7 +185,7 @@ func TestNatspecE2E(t *testing.T) { t.Skip() tf := testInit(t) - defer tf.ethereum.Stop() + defer tf.expanse.Stop() // create a contractInfo file (mock cloud-deployed contract metadocs) // incidentally this is the info for the registry contract itself diff --git a/common/natspec/natspec_js.go b/common/natspec/natspec_js.go index 2b30d31d35..7af296bbe1 100644 --- a/common/natspec/natspec_js.go +++ b/common/natspec/natspec_js.go @@ -1,41 +1,41 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package natspec -const natspecJS = //`require=function t(e,n,r){function i(f,u){if(!n[f]){if(!e[f]){var s="function"==typeof require&&require;if(!u&&s)return s(f,!0);if(o)return o(f,!0);var c=new Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c}var a=n[f]={exports:{}};e[f][0].call(a.exports,function(t){var n=e[f][1][t];return i(n?n:t)},a,a.exports,t,e,n,r)}return n[f].exports}for(var o="function"==typeof require&&require,f=0;fv;v++)d.push(g(e.slice(0,s))),e=e.slice(s);n.push(d)}else r.prefixedType("string")(t[c].type)?(a=a.slice(s),n.push(g(e.slice(0,s))),e=e.slice(s)):(n.push(g(e.slice(0,s))),e=e.slice(s))}),n},g=function(t){var e={};return t.forEach(function(t){var r=n.extractDisplayName(t.name),i=n.extractTypeName(t.name),o=function(){var e=Array.prototype.slice.call(arguments);return a(t.inputs,e)};void 0===e[r]&&(e[r]=o),e[r][i]=o}),e},m=function(t){var e={};return t.forEach(function(t){var r=n.extractDisplayName(t.name),i=n.extractTypeName(t.name),o=function(e){return h(t.outputs,e)};void 0===e[r]&&(e[r]=o),e[r][i]=o}),e};e.exports={inputParser:g,outputParser:m,formatInput:a,formatOutput:h}},{"./const":4,"./formatters":5,"./types":6,"./utils":7}],4:[function(t,e){(function(n){if("build"!==n.env.NODE_ENV)var r=t("bignumber.js");var i=["wei","Kwei","Mwei","Gwei","szabo","finney","ether","grand","Mether","Gether","Tether","Pether","Eether","Zether","Yether","Nether","Dether","Vether","Uether"];e.exports={ETH_PADDING:32,ETH_SIGNATURE_LENGTH:4,ETH_UNITS:i,ETH_BIGNUMBER_ROUNDING_MODE:{ROUNDING_MODE:r.ROUND_DOWN},ETH_POLLING_TIMEOUT:1e3}}).call(this,t("_process"))},{_process:2,"bignumber.js":8}],5:[function(t,e){(function(n){if("build"!==n.env.NODE_ENV)var r=t("bignumber.js");var i=t("./utils"),o=t("./const"),f=function(t,e,n){return new Array(e-t.length+1).join(n?n:"0")+t},u=function(t){var e=2*o.ETH_PADDING;return t instanceof r||"number"==typeof t?("number"==typeof t&&(t=new r(t)),r.config(o.ETH_BIGNUMBER_ROUNDING_MODE),t=t.round(),t.lessThan(0)&&(t=new r("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16).plus(t).plus(1)),t=t.toString(16)):t=0===t.indexOf("0x")?t.substr(2):"string"==typeof t?u(new r(t)):(+t).toString(16),f(t,e)},s=function(t){return i.fromAscii(t,o.ETH_PADDING).substr(2)},c=function(t){return"000000000000000000000000000000000000000000000000000000000000000"+(t?"1":"0")},a=function(t){return u(new r(t).times(new r(2).pow(128)))},l=function(t){return"1"===new r(t.substr(0,1),16).toString(2).substr(0,1)},p=function(t){return t=t||"0",l(t)?new r(t,16).minus(new r("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16)).minus(1):new r(t,16)},h=function(t){return t=t||"0",new r(t,16)},g=function(t){return p(t).dividedBy(new r(2).pow(128))},m=function(t){return h(t).dividedBy(new r(2).pow(128))},d=function(t){return"0x"+t},v=function(t){return"0000000000000000000000000000000000000000000000000000000000000001"===t?!0:!1},w=function(t){return i.toAscii(t)},y=function(t){return"0x"+t.slice(t.length-40,t.length)};e.exports={formatInputInt:u,formatInputString:s,formatInputBool:c,formatInputReal:a,formatOutputInt:p,formatOutputUInt:h,formatOutputReal:g,formatOutputUReal:m,formatOutputHash:d,formatOutputBool:v,formatOutputString:w,formatOutputAddress:y}}).call(this,t("_process"))},{"./const":4,"./utils":7,_process:2,"bignumber.js":8}],6:[function(t,e){var n=t("./formatters"),r=function(t){return function(e){return 0===e.indexOf(t)}},i=function(t){return function(e){return t===e}},o=function(){return[{type:r("uint"),format:n.formatInputInt},{type:r("int"),format:n.formatInputInt},{type:r("hash"),format:n.formatInputInt},{type:r("string"),format:n.formatInputString},{type:r("real"),format:n.formatInputReal},{type:r("ureal"),format:n.formatInputReal},{type:i("address"),format:n.formatInputInt},{type:i("bool"),format:n.formatInputBool}]},f=function(){return[{type:r("uint"),format:n.formatOutputUInt},{type:r("int"),format:n.formatOutputInt},{type:r("hash"),format:n.formatOutputHash},{type:r("string"),format:n.formatOutputString},{type:r("real"),format:n.formatOutputReal},{type:r("ureal"),format:n.formatOutputUReal},{type:i("address"),format:n.formatOutputAddress},{type:i("bool"),format:n.formatOutputBool}]};e.exports={prefixedType:r,namedType:i,inputTypes:o,outputTypes:f}},{"./formatters":5}],7:[function(t,e){var n=t("./const"),r=function(t,e){for(var n=!1,r=0;rn;n+=2){var i=parseInt(t.substr(n,2),16);if(0===i)break;e+=String.fromCharCode(i)}return e},o=function(t){for(var e="",n=0;n3e3&&rr?"i":"").test(c))return m(a,c,u,r);u?(a.s=0>1/t?(c=c.slice(1),-1):1,$&&c.replace(/^0\.0*|\./,"").length>15&&U(L,O,t),u=!1):a.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1,c=n(c,10,r,a.s)}else{if(t instanceof e)return a.s=t.s,a.e=t.e,a.c=(t=t.c)?t.slice():t,void(L=0);if((u="number"==typeof t)&&0*t==0){if(a.s=0>1/t?(t=-t,-1):1,t===~~t){for(o=0,f=t;f>=10;f/=10,o++);return a.e=o,a.c=[t],void(L=0)}c=t+""}else{if(!d.test(c=t+""))return m(a,c,u);a.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1}}for((o=c.indexOf("."))>-1&&(c=c.replace(".","")),(f=c.search(/e/i))>0?(0>o&&(o=f),o+=+c.slice(f+1),c=c.substring(0,f)):0>o&&(o=c.length),f=0;48===c.charCodeAt(f);f++);for(s=c.length;48===c.charCodeAt(--s););if(c=c.slice(f,s+1))if(s=c.length,u&&$&&s>15&&U(L,O,a.s*t),o=o-f-1,o>q)a.c=a.e=null;else if(k>o)a.c=[a.e=0];else{if(a.e=o,a.c=[],f=(o+1)%I,0>o&&(f+=I),s>f){for(f&&a.c.push(+c.slice(0,f)),s-=I;s>f;)a.c.push(+c.slice(f,f+=I));c=c.slice(f),f=I-c.length}else f-=s;for(;f--;c+="0");a.c.push(+c)}else a.c=[a.e=0];L=0}function n(t,n,r,i){var f,u,s,a,p,h,g,m=t.indexOf("."),d=B,v=H;for(37>r&&(t=t.toLowerCase()),m>=0&&(s=Y,Y=0,t=t.replace(".",""),g=new e(r),p=g.pow(t.length-m),Y=s,g.c=c(l(o(p.c),p.e),10,n),g.e=g.c.length),h=c(t,r,n),u=s=h.length;0==h[--s];h.pop());if(!h[0])return"0";if(0>m?--u:(p.c=h,p.e=u,p.s=i,p=G(p,g,d,v,n),h=p.c,a=p.r,u=p.e),f=u+d+1,m=h[f],s=n/2,a=a||0>f||null!=h[f+1],a=4>v?(null!=m||a)&&(0==v||v==(p.s<0?3:2)):m>s||m==s&&(4==v||a||6==v&&1&h[f-1]||v==(p.s<0?8:7)),1>f||!h[0])t=a?l("1",-d):"0";else{if(h.length=f,a)for(--n;++h[--f]>n;)h[f]=0,f||(++u,h.unshift(1));for(s=h.length;!h[--s];);for(m=0,t="";s>=m;t+=N.charAt(h[m++]));t=l(t,u)}return t}function h(t,n,r,i){var f,u,s,c,p;if(r=null!=r&&z(r,0,8,i,b)?0|r:H,!t.c)return t.toString();if(f=t.c[0],s=t.e,null==n)p=o(t.c),p=19==i||24==i&&C>=s?a(p,s):l(p,s);else if(t=F(new e(t),n,r),u=t.e,p=o(t.c),c=p.length,19==i||24==i&&(u>=n||C>=u)){for(;n>c;p+="0",c++);p=a(p,u)}else if(n-=s,p=l(p,u),u+1>c){if(--n>0)for(p+=".";n--;p+="0");}else if(n+=u-c,n>0)for(u+1==c&&(p+=".");n--;p+="0");return t.s<0&&f?"-"+p:p}function S(t,n){var r,i,o=0;for(s(t[0])&&(t=t[0]),r=new e(t[0]);++ot||t>n||t!=p(t))&&U(r,(i||"decimal places")+(e>t||t>n?" out of range":" not an integer"),t),!0}function R(t,e,n){for(var r=1,i=e.length;!e[--i];e.pop());for(i=e[0];i>=10;i/=10,r++);return(n=r+n*I-1)>q?t.c=t.e=null:k>n?t.c=[t.e=0]:(t.e=n,t.c=e),t}function U(t,e,n){var r=new Error(["new BigNumber","cmp","config","div","divToInt","eq","gt","gte","lt","lte","minus","mod","plus","precision","random","round","shift","times","toDigits","toExponential","toFixed","toFormat","toFraction","pow","toPrecision","toString","BigNumber"][t]+"() "+e+": "+n);throw r.name="BigNumber Error",L=0,r}function F(t,e,n,r){var i,o,f,u,s,c,a,l=t.c,p=_;if(l){t:{for(i=1,u=l[0];u>=10;u/=10,i++);if(o=e-i,0>o)o+=I,f=e,s=l[c=0],a=s/p[i-f-1]%10|0;else if(c=v((o+1)/I),c>=l.length){if(!r)break t;for(;l.length<=c;l.push(0));s=a=0,i=1,o%=I,f=o-I+1}else{for(s=u=l[c],i=1;u>=10;u/=10,i++);o%=I,f=o-I+i,a=0>f?0:s/p[i-f-1]%10|0}if(r=r||0>e||null!=l[c+1]||(0>f?s:s%p[i-f-1]),r=4>n?(a||r)&&(0==n||n==(t.s<0?3:2)):a>5||5==a&&(4==n||r||6==n&&(o>0?f>0?s/p[i-f]:0:l[c-1])%10&1||n==(t.s<0?8:7)),1>e||!l[0])return l.length=0,r?(e-=t.e+1,l[0]=p[e%I],t.e=-e||0):l[0]=t.e=0,t;if(0==o?(l.length=c,u=1,c--):(l.length=c+1,u=p[I-o],l[c]=f>0?w(s/p[i-f]%p[f])*u:0),r)for(;;){if(0==c){for(o=1,f=l[0];f>=10;f/=10,o++);for(f=l[0]+=u,u=1;f>=10;f/=10,u++);o!=u&&(t.e++,l[0]==E&&(l[0]=1));break}if(l[c]+=u,l[c]!=E)break;l[c--]=0,u=1}for(o=l.length;0===l[--o];l.pop());}t.e>q?t.c=t.e=null:t.en?null!=(t=i[n++]):void 0};return f(e="DECIMAL_PLACES")&&z(t,0,D,2,e)&&(B=0|t),r[e]=B,f(e="ROUNDING_MODE")&&z(t,0,8,2,e)&&(H=0|t),r[e]=H,f(e="EXPONENTIAL_AT")&&(s(t)?z(t[0],-D,0,2,e)&&z(t[1],0,D,2,e)&&(C=0|t[0],j=0|t[1]):z(t,-D,D,2,e)&&(C=-(j=0|(0>t?-t:t)))),r[e]=[C,j],f(e="RANGE")&&(s(t)?z(t[0],-D,-1,2,e)&&z(t[1],1,D,2,e)&&(k=0|t[0],q=0|t[1]):z(t,-D,D,2,e)&&(0|t?k=-(q=0|(0>t?-t:t)):$&&U(2,e+" cannot be zero",t))),r[e]=[k,q],f(e="ERRORS")&&(t===!!t||1===t||0===t?(L=0,z=($=!!t)?A:u):$&&U(2,e+y,t)),r[e]=$,f(e="CRYPTO")&&(t===!!t||1===t||0===t?(V=!(!t||!g||"object"!=typeof g),t&&!V&&$&&U(2,"crypto unavailable",g)):$&&U(2,e+y,t)),r[e]=V,f(e="MODULO_MODE")&&z(t,0,9,2,e)&&(W=0|t),r[e]=W,f(e="POW_PRECISION")&&z(t,0,D,2,e)&&(Y=0|t),r[e]=Y,f(e="FORMAT")&&("object"==typeof t?Z=t:$&&U(2,e+" not an object",t)),r[e]=Z,r},e.max=function(){return S(arguments,M.lt)},e.min=function(){return S(arguments,M.gt)},e.random=function(){var t=9007199254740992,n=Math.random()*t&2097151?function(){return w(Math.random()*t)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(t){var r,i,o,f,u,s=0,c=[],a=new e(P);if(t=null!=t&&z(t,0,D,14)?0|t:B,f=v(t/I),V)if(g&&g.getRandomValues){for(r=g.getRandomValues(new Uint32Array(f*=2));f>s;)u=131072*r[s]+(r[s+1]>>>11),u>=9e15?(i=g.getRandomValues(new Uint32Array(2)),r[s]=i[0],r[s+1]=i[1]):(c.push(u%1e14),s+=2);s=f/2}else if(g&&g.randomBytes){for(r=g.randomBytes(f*=7);f>s;)u=281474976710656*(31&r[s])+1099511627776*r[s+1]+4294967296*r[s+2]+16777216*r[s+3]+(r[s+4]<<16)+(r[s+5]<<8)+r[s+6],u>=9e15?g.randomBytes(7).copy(r,s):(c.push(u%1e14),s+=7);s=f/7}else $&&U(14,"crypto unavailable",g);if(!s)for(;f>s;)u=n(),9e15>u&&(c[s++]=u%1e14);for(f=c[--s],t%=I,f&&t&&(u=_[I-t],c[s]=w(f/u)*u);0===c[s];c.pop(),s--);if(0>s)c=[o=0];else{for(o=-1;0===c[0];c.shift(),o-=I);for(s=1,u=c[0];u>=10;u/=10,s++);I>s&&(o-=I-s)}return a.e=o,a.c=c,a}}(),G=function(){function t(t,e,n){var r,i,o,f,u=0,s=t.length,c=e%T,a=e/T|0;for(t=t.slice();s--;)o=t[s]%T,f=t[s]/T|0,r=a*o+f*c,i=c*o+r%T*T+u,u=(i/n|0)+(r/T|0)+a*f,t[s]=i%n;return u&&t.unshift(u),t}function n(t,e,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;n>i;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function r(t,e,n,r){for(var i=0;n--;)t[n]-=i,i=t[n]1;t.shift());}return function(o,f,u,s,c){var a,l,p,h,g,m,d,v,y,b,O,N,x,_,T,D,S,A=o.s==f.s?1:-1,R=o.c,U=f.c;if(!(R&&R[0]&&U&&U[0]))return new e(o.s&&f.s&&(R?!U||R[0]!=U[0]:U)?R&&0==R[0]||!U?0*A:A/0:0/0);for(v=new e(A),y=v.c=[],l=o.e-f.e,A=u+l+1,c||(c=E,l=i(o.e/I)-i(f.e/I),A=A/I|0),p=0;U[p]==(R[p]||0);p++);if(U[p]>(R[p]||0)&&l--,0>A)y.push(1),h=!0;else{for(_=R.length,D=U.length,p=0,A+=2,g=w(c/(U[0]+1)),g>1&&(U=t(U,g,c),R=t(R,g,c),D=U.length,_=R.length),x=D,b=R.slice(0,D),O=b.length;D>O;b[O++]=0);S=U.slice(),S.unshift(0),T=U[0],U[1]>=c/2&&T++;do g=0,a=n(U,b,D,O),0>a?(N=b[0],D!=O&&(N=N*c+(b[1]||0)),g=w(N/T),g>1?(g>=c&&(g=c-1),m=t(U,g,c),d=m.length,O=b.length,a=n(m,b,d,O),1==a&&(g--,r(m,d>D?S:U,d,c))):(0==g&&(a=g=1),m=U.slice()),d=m.length,O>d&&m.unshift(0),r(b,m,O,c),-1==a&&(O=b.length,a=n(U,b,D,O),1>a&&(g++,r(b,O>D?S:U,O,c))),O=b.length):0===a&&(g++,b=[0]),y[p++]=g,a&&b[0]?b[O++]=R[x]||0:(b=[R[x]],O=1);while((x++<_||null!=b[0])&&A--);h=null!=b[0],y[0]||y.shift()}if(c==E){for(p=1,A=y[0];A>=10;A/=10,p++);F(v,u+(v.e=p+l*I-1)+1,s,h)}else v.e=l,v.r=+h;return v}}(),m==function(){var t=/^(-?)0([xbo])(\w[\w.]*$)/i,n=/^([^.]+)\.$/,r=/^\.([^.]+)$/,i=/^-?(Infinity|NaN)$/,o=/^\s*\+([\w.])|^\s+|\s+$/g;return function(f,u,s,c){var a,l=s?u:u.replace(o,"$1");if(i.test(l))f.s=isNaN(l)?null:0>l?-1:1;else{if(!s&&(l=l.replace(t,function(t,e,n){return a="x"==(n=n.toLowerCase())?16:"b"==n?2:8,c&&c!=a?t:e}),c&&(a=c,l=l.replace(n,"$1").replace(r,"0.$1")),u!=l))return new e(l,a);$&&U(L,"not a"+(c?" base "+c:"")+" number",u),f.s=null}f.c=f.e=null,L=0}}(),M.absoluteValue=M.abs=function(){var t=new e(this);return t.s<0&&(t.s=1),t},M.ceil=function(){return F(new e(this),this.e+1,2)},M.comparedTo=M.cmp=function(t,n){return L=1,f(this,new e(t,n))},M.decimalPlaces=M.dp=function(){var t,e,n=this.c;if(!n)return null;if(t=((e=n.length-1)-i(this.e/I))*I,e=n[e])for(;e%10==0;e/=10,t--);return 0>t&&(t=0),t},M.dividedBy=M.div=function(t,n){return L=3,G(this,new e(t,n),B,H)},M.dividedToIntegerBy=M.divToInt=function(t,n){return L=4,G(this,new e(t,n),0,1)},M.equals=M.eq=function(t,n){return L=5,0===f(this,new e(t,n))},M.floor=function(){return F(new e(this),this.e+1,3)},M.greaterThan=M.gt=function(t,n){return L=6,f(this,new e(t,n))>0},M.greaterThanOrEqualTo=M.gte=function(t,n){return L=7,1===(n=f(this,new e(t,n)))||0===n},M.isFinite=function(){return!!this.c},M.isInteger=M.isInt=function(){return!!this.c&&i(this.e/I)>this.c.length-2},M.isNaN=function(){return!this.s},M.isNegative=M.isNeg=function(){return this.s<0},M.isZero=function(){return!!this.c&&0==this.c[0]},M.lessThan=M.lt=function(t,n){return L=8,f(this,new e(t,n))<0},M.lessThanOrEqualTo=M.lte=function(t,n){return L=9,-1===(n=f(this,new e(t,n)))||0===n},M.minus=M.sub=function(t,n){var r,o,f,u,s=this,c=s.s;if(L=10,t=new e(t,n),n=t.s,!c||!n)return new e(0/0);if(c!=n)return t.s=-n,s.plus(t);var a=s.e/I,l=t.e/I,p=s.c,h=t.c;if(!a||!l){if(!p||!h)return p?(t.s=-n,t):new e(h?s:0/0);if(!p[0]||!h[0])return h[0]?(t.s=-n,t):new e(p[0]?s:3==H?-0:0)}if(a=i(a),l=i(l),p=p.slice(),c=a-l){for((u=0>c)?(c=-c,f=p):(l=a,f=h),f.reverse(),n=c;n--;f.push(0));f.reverse()}else for(o=(u=(c=p.length)<(n=h.length))?c:n,c=n=0;o>n;n++)if(p[n]!=h[n]){u=p[n]0)for(;n--;p[r++]=0);for(n=E-1;o>c;){if(p[--o]0?(s=u,r=a):(f=-f,r=c),r.reverse();f--;r.push(0));r.reverse()}for(f=c.length,n=a.length,0>f-n&&(r=a,a=c,c=r,n=f),f=0;n;)f=(c[--n]=c[n]+a[n]+f)/E|0,c[n]%=E;return f&&(c.unshift(f),++s),R(t,c,s)},M.precision=M.sd=function(t){var e,n,r=this,i=r.c;if(null!=t&&t!==!!t&&1!==t&&0!==t&&($&&U(13,"argument"+y,t),t!=!!t&&(t=null)),!i)return null;if(n=i.length-1,e=n*I+1,n=i[n]){for(;n%10==0;n/=10,e--);for(n=i[0];n>=10;n/=10,e++);}return t&&r.e+1>e&&(e=r.e+1),e},M.round=function(t,n){var r=new e(this);return(null==t||z(t,0,D,15))&&F(r,~~t+this.e+1,null!=n&&z(n,0,8,15,b)?0|n:H),r},M.shift=function(t){var n=this;return z(t,-x,x,16,"argument")?n.times("1e"+p(t)):new e(n.c&&n.c[0]&&(-x>t||t>x)?n.s*(0>t?0:1/0):n)},M.squareRoot=M.sqrt=function(){var t,n,r,f,u,s=this,c=s.c,a=s.s,l=s.e,p=B+4,h=new e("0.5");if(1!==a||!c||!c[0])return new e(!a||0>a&&(!c||c[0])?0/0:c?s:1/0);if(a=Math.sqrt(+s),0==a||a==1/0?(n=o(c),(n.length+l)%2==0&&(n+="0"),a=Math.sqrt(n),l=i((l+1)/2)-(0>l||l%2),a==1/0?n="1e"+l:(n=a.toExponential(),n=n.slice(0,n.indexOf("e")+1)+l),r=new e(n)):r=new e(a+""),r.c[0])for(l=r.e,a=l+p,3>a&&(a=0);;)if(u=r,r=h.times(u.plus(G(s,u,p,1))),o(u.c).slice(0,a)===(n=o(r.c)).slice(0,a)){if(r.ea&&(d=b,b=O,O=d,f=a,a=h,h=f),f=a+h,d=[];f--;d.push(0));for(v=E,w=T,f=h;--f>=0;){for(r=0,g=O[f]%w,m=O[f]/w|0,s=a,u=f+s;u>f;)l=b[--s]%w,p=b[s]/w|0,c=m*l+p*g,l=g*l+c%w*w+d[u]+r,r=(l/v|0)+(c/w|0)+m*p,d[u--]=l%v;d[u]=r}return r?++o:d.shift(),R(t,d,o)},M.toDigits=function(t,n){var r=new e(this);return t=null!=t&&z(t,1,D,18,"precision")?0|t:null,n=null!=n&&z(n,0,8,18,b)?0|n:H,t?F(r,t,n):r},M.toExponential=function(t,e){return h(this,null!=t&&z(t,0,D,19)?~~t+1:null,e,19)},M.toFixed=function(t,e){return h(this,null!=t&&z(t,0,D,20)?~~t+this.e+1:null,e,20)},M.toFormat=function(t,e){var n=h(this,null!=t&&z(t,0,D,21)?~~t+this.e+1:null,e,21);if(this.c){var r,i=n.split("."),o=+Z.groupSize,f=+Z.secondaryGroupSize,u=Z.groupSeparator,s=i[0],c=i[1],a=this.s<0,l=a?s.slice(1):s,p=l.length;if(f&&(r=o,o=f,f=r,p-=r),o>0&&p>0){for(r=p%o||o,s=l.substr(0,r);p>r;r+=o)s+=u+l.substr(r,o);f>0&&(s+=u+l.slice(r)),a&&(s="-"+s)}n=c?s+Z.decimalSeparator+((f=+Z.fractionGroupSize)?c.replace(new RegExp("\\d{"+f+"}\\B","g"),"$&"+Z.fractionGroupSeparator):c):s}return n},M.toFraction=function(t){var n,r,i,f,u,s,c,a,l,p=$,h=this,g=h.c,m=new e(P),d=r=new e(P),v=c=new e(P);if(null!=t&&($=!1,s=new e(t),$=p,(!(p=s.isInt())||s.lt(P))&&($&&U(22,"max denominator "+(p?"out of range":"not an integer"),t),t=!p&&s.c&&F(s,s.e+1,1).gte(P)?s:null)),!g)return h.toString();for(l=o(g),f=m.e=l.length-h.e-1,m.c[0]=_[(u=f%I)<0?I+u:u],t=!t||s.cmp(m)>0?f>0?m:d:s,u=q,q=1/0,s=new e(l),c.c[0]=0;a=G(s,m,0,1),i=r.plus(a.times(v)),1!=i.cmp(t);)r=v,v=i,d=c.plus(a.times(i=d)),c=i,m=s.minus(a.times(i=m)),s=i;return i=G(t.minus(r),v,0,1),c=c.plus(i.times(d)),r=r.plus(i.times(v)),c.s=d.s=h.s,f*=2,n=G(d,v,f,H).minus(h).abs().cmp(G(c,r,f,H).minus(h).abs())<1?[d.toString(),v.toString()]:[c.toString(),r.toString()],q=u,n},M.toNumber=function(){var t=this;return+t||(t.s?0*t.s:0/0)},M.toPower=M.pow=function(t){var n,r,i=w(0>t?-t:+t),o=this;if(!z(t,-x,x,23,"exponent")&&(!isFinite(t)||i>x&&(t/=0)||parseFloat(t)!=t&&!(t=0/0)))return new e(Math.pow(+o,t));for(n=Y?v(Y/I+2):0,r=new e(P);;){if(i%2){if(r=r.times(o),!r.c)break;n&&r.c.length>n&&(r.c.length=n)}if(i=w(i/2),!i)break;o=o.times(o),n&&o.c&&o.c.length>n&&(o.c.length=n)}return 0>t&&(r=P.div(r)),n?F(r,Y,H):r},M.toPrecision=function(t,e){return h(this,null!=t&&z(t,1,D,24,"precision")?0|t:null,e,24)},M.toString=function(t){var e,r=this,i=r.s,f=r.e;return null===f?i?(e="Infinity",0>i&&(e="-"+e)):e="NaN":(e=o(r.c),e=null!=t&&z(t,2,64,25,"base")?n(l(e,f),0|t,10,i):C>=f||f>=j?a(e,f):l(e,f),0>i&&r.c[0]&&(e="-"+e)),e},M.truncated=M.trunc=function(){return F(new e(this),this.e+1,1)},M.valueOf=M.toJSON=function(){return this.toString()},null!=t&&e.config(t),e}function i(t){var e=0|t;return t>0||t===e?e:e-1}function o(t){for(var e,n,r=1,i=t.length,o=t[0]+"";i>r;){for(e=t[r++]+"",n=I-e.length;n--;e="0"+e);o+=e}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function f(t,e){var n,r,i=t.c,o=e.c,f=t.s,u=e.s,s=t.e,c=e.e;if(!f||!u)return null;if(n=i&&!i[0],r=o&&!o[0],n||r)return n?r?0:-u:f;if(f!=u)return f;if(n=0>f,r=s==c,!i||!o)return r?0:!i^n?1:-1;if(!r)return s>c^n?1:-1;for(u=(s=i.length)<(c=o.length)?s:c,f=0;u>f;f++)if(i[f]!=o[f])return i[f]>o[f]^n?1:-1;return s==c?0:s>c^n?1:-1}function u(t,e,n){return(t=p(t))>=e&&n>=t}function s(t){return"[object Array]"==Object.prototype.toString.call(t)}function c(t,e,n){for(var r,i,o=[0],f=0,u=t.length;u>f;){for(i=o.length;i--;o[i]*=e);for(o[r=0]+=N.indexOf(t.charAt(f++));rn-1&&(null==o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}function a(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(0>e?"e":"e+")+e}function l(t,e){var n,r;if(0>e){for(r="0.";++e;r+="0");t=r+t}else if(n=t.length,++e>n){for(r="0",e-=n;--e;r+="0");t+=r}else n>e&&(t=t.slice(0,e)+"."+t.slice(e));return t}function p(t){return t=parseFloat(t),0>t?v(t):w(t)}var h,g,m,d=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,v=Math.ceil,w=Math.floor,y=" not a boolean or binary digit",b="rounding mode",O="number type has more than 15 significant digits",N="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",E=1e14,I=14,x=9007199254740991,_=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],T=1e7,D=1e9;if(h=r(),"function"==typeof define&&define.amd)define(function(){return h});else if("undefined"!=typeof e&&e.exports){if(e.exports=h,!g)try{g=t("crypto")}catch(S){}}else n.BigNumber=h}(this)},{crypto:1}],natspec:[function(t,e){var n=t("./node_modules/ethereum.js/lib/abi.js"),r=function(){var t=function(t,e){Object.keys(t).forEach(function(n){e[n]=t[n]})},e=function(t){return Object.keys(t).reduce(function(t,e){return t+"var "+e+" = context['"+e+"'];\n"},"")},r=function(t,e){return t.filter(function(t){return t.name===e})[0]},i=function(t,e){var r=n.formatOutput(t.inputs,"0x"+e.params[0].data.slice(10));return t.inputs.reduce(function(t,e,n){return t[e.name]=r[n],t},{})},o=function(t,e){var n,r="",i=/\` + "`" + `(?:\\.|[^` + "`" + `\\])*\` + "`" + `/gim,o=0;try{for(;null!==(n=i.exec(t));){var f=i.lastIndex-n[0].length,u=n[0].slice(1,n[0].length-1);r+=t.slice(o,f);var s=e(u);r+=s,o=i.lastIndex}r+=t.slice(o)}catch(c){throw new Error("Natspec evaluation failed, wrong input params")}return r},f=function(n,f){var u={};if(f)try{var s=r(f.abi,f.method),c=i(s,f.transaction);t(c,u)}catch(a){throw new Error("Natspec evaluation failed, method does not exist")}var l=e(u),p=o(n,function(t){var e=new Function("context",l+"return "+t+";");return e(u).toString()});return p},u=function(t,e){try{return f(t,e)}catch(n){return n.message}};return{evaluateExpression:f,evaluateExpressionSafe:u}}();e.exports=r},{"./node_modules/ethereum.js/lib/abi.js":3}]},{},[]); +const natspecJS = //`require=function t(e,n,r){function i(f,u){if(!n[f]){if(!e[f]){var s="function"==typeof require&&require;if(!u&&s)return s(f,!0);if(o)return o(f,!0);var c=new Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c}var a=n[f]={exports:{}};e[f][0].call(a.exports,function(t){var n=e[f][1][t];return i(n?n:t)},a,a.exports,t,e,n,r)}return n[f].exports}for(var o="function"==typeof require&&require,f=0;fv;v++)d.push(g(e.slice(0,s))),e=e.slice(s);n.push(d)}else r.prefixedType("string")(t[c].type)?(a=a.slice(s),n.push(g(e.slice(0,s))),e=e.slice(s)):(n.push(g(e.slice(0,s))),e=e.slice(s))}),n},g=function(t){var e={};return t.forEach(function(t){var r=n.extractDisplayName(t.name),i=n.extractTypeName(t.name),o=function(){var e=Array.prototype.slice.call(arguments);return a(t.inputs,e)};void 0===e[r]&&(e[r]=o),e[r][i]=o}),e},m=function(t){var e={};return t.forEach(function(t){var r=n.extractDisplayName(t.name),i=n.extractTypeName(t.name),o=function(e){return h(t.outputs,e)};void 0===e[r]&&(e[r]=o),e[r][i]=o}),e};e.exports={inputParser:g,outputParser:m,formatInput:a,formatOutput:h}},{"./const":4,"./formatters":5,"./types":6,"./utils":7}],4:[function(t,e){(function(n){if("build"!==n.env.NODE_ENV)var r=t("bignumber.js");var i=["wei","Kwei","Mwei","Gwei","szabo","finney","ether","grand","Mether","Gether","Tether","Pether","Eether","Zether","Yether","Nether","Dether","Vether","Uether"];e.exports={ETH_PADDING:32,ETH_SIGNATURE_LENGTH:4,ETH_UNITS:i,ETH_BIGNUMBER_ROUNDING_MODE:{ROUNDING_MODE:r.ROUND_DOWN},ETH_POLLING_TIMEOUT:1e3}}).call(this,t("_process"))},{_process:2,"bignumber.js":8}],5:[function(t,e){(function(n){if("build"!==n.env.NODE_ENV)var r=t("bignumber.js");var i=t("./utils"),o=t("./const"),f=function(t,e,n){return new Array(e-t.length+1).join(n?n:"0")+t},u=function(t){var e=2*o.ETH_PADDING;return t instanceof r||"number"==typeof t?("number"==typeof t&&(t=new r(t)),r.config(o.ETH_BIGNUMBER_ROUNDING_MODE),t=t.round(),t.lessThan(0)&&(t=new r("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16).plus(t).plus(1)),t=t.toString(16)):t=0===t.indexOf("0x")?t.substr(2):"string"==typeof t?u(new r(t)):(+t).toString(16),f(t,e)},s=function(t){return i.fromAscii(t,o.ETH_PADDING).substr(2)},c=function(t){return"000000000000000000000000000000000000000000000000000000000000000"+(t?"1":"0")},a=function(t){return u(new r(t).times(new r(2).pow(128)))},l=function(t){return"1"===new r(t.substr(0,1),16).toString(2).substr(0,1)},p=function(t){return t=t||"0",l(t)?new r(t,16).minus(new r("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16)).minus(1):new r(t,16)},h=function(t){return t=t||"0",new r(t,16)},g=function(t){return p(t).dividedBy(new r(2).pow(128))},m=function(t){return h(t).dividedBy(new r(2).pow(128))},d=function(t){return"0x"+t},v=function(t){return"0000000000000000000000000000000000000000000000000000000000000001"===t?!0:!1},w=function(t){return i.toAscii(t)},y=function(t){return"0x"+t.slice(t.length-40,t.length)};e.exports={formatInputInt:u,formatInputString:s,formatInputBool:c,formatInputReal:a,formatOutputInt:p,formatOutputUInt:h,formatOutputReal:g,formatOutputUReal:m,formatOutputHash:d,formatOutputBool:v,formatOutputString:w,formatOutputAddress:y}}).call(this,t("_process"))},{"./const":4,"./utils":7,_process:2,"bignumber.js":8}],6:[function(t,e){var n=t("./formatters"),r=function(t){return function(e){return 0===e.indexOf(t)}},i=function(t){return function(e){return t===e}},o=function(){return[{type:r("uint"),format:n.formatInputInt},{type:r("int"),format:n.formatInputInt},{type:r("hash"),format:n.formatInputInt},{type:r("string"),format:n.formatInputString},{type:r("real"),format:n.formatInputReal},{type:r("ureal"),format:n.formatInputReal},{type:i("address"),format:n.formatInputInt},{type:i("bool"),format:n.formatInputBool}]},f=function(){return[{type:r("uint"),format:n.formatOutputUInt},{type:r("int"),format:n.formatOutputInt},{type:r("hash"),format:n.formatOutputHash},{type:r("string"),format:n.formatOutputString},{type:r("real"),format:n.formatOutputReal},{type:r("ureal"),format:n.formatOutputUReal},{type:i("address"),format:n.formatOutputAddress},{type:i("bool"),format:n.formatOutputBool}]};e.exports={prefixedType:r,namedType:i,inputTypes:o,outputTypes:f}},{"./formatters":5}],7:[function(t,e){var n=t("./const"),r=function(t,e){for(var n=!1,r=0;rn;n+=2){var i=parseInt(t.substr(n,2),16);if(0===i)break;e+=String.fromCharCode(i)}return e},o=function(t){for(var e="",n=0;n3e3&&rr?"i":"").test(c))return m(a,c,u,r);u?(a.s=0>1/t?(c=c.slice(1),-1):1,$&&c.replace(/^0\.0*|\./,"").length>15&&U(L,O,t),u=!1):a.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1,c=n(c,10,r,a.s)}else{if(t instanceof e)return a.s=t.s,a.e=t.e,a.c=(t=t.c)?t.slice():t,void(L=0);if((u="number"==typeof t)&&0*t==0){if(a.s=0>1/t?(t=-t,-1):1,t===~~t){for(o=0,f=t;f>=10;f/=10,o++);return a.e=o,a.c=[t],void(L=0)}c=t+""}else{if(!d.test(c=t+""))return m(a,c,u);a.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1}}for((o=c.indexOf("."))>-1&&(c=c.replace(".","")),(f=c.search(/e/i))>0?(0>o&&(o=f),o+=+c.slice(f+1),c=c.substring(0,f)):0>o&&(o=c.length),f=0;48===c.charCodeAt(f);f++);for(s=c.length;48===c.charCodeAt(--s););if(c=c.slice(f,s+1))if(s=c.length,u&&$&&s>15&&U(L,O,a.s*t),o=o-f-1,o>q)a.c=a.e=null;else if(k>o)a.c=[a.e=0];else{if(a.e=o,a.c=[],f=(o+1)%I,0>o&&(f+=I),s>f){for(f&&a.c.push(+c.slice(0,f)),s-=I;s>f;)a.c.push(+c.slice(f,f+=I));c=c.slice(f),f=I-c.length}else f-=s;for(;f--;c+="0");a.c.push(+c)}else a.c=[a.e=0];L=0}function n(t,n,r,i){var f,u,s,a,p,h,g,m=t.indexOf("."),d=B,v=H;for(37>r&&(t=t.toLowerCase()),m>=0&&(s=Y,Y=0,t=t.replace(".",""),g=new e(r),p=g.pow(t.length-m),Y=s,g.c=c(l(o(p.c),p.e),10,n),g.e=g.c.length),h=c(t,r,n),u=s=h.length;0==h[--s];h.pop());if(!h[0])return"0";if(0>m?--u:(p.c=h,p.e=u,p.s=i,p=G(p,g,d,v,n),h=p.c,a=p.r,u=p.e),f=u+d+1,m=h[f],s=n/2,a=a||0>f||null!=h[f+1],a=4>v?(null!=m||a)&&(0==v||v==(p.s<0?3:2)):m>s||m==s&&(4==v||a||6==v&&1&h[f-1]||v==(p.s<0?8:7)),1>f||!h[0])t=a?l("1",-d):"0";else{if(h.length=f,a)for(--n;++h[--f]>n;)h[f]=0,f||(++u,h.unshift(1));for(s=h.length;!h[--s];);for(m=0,t="";s>=m;t+=N.charAt(h[m++]));t=l(t,u)}return t}function h(t,n,r,i){var f,u,s,c,p;if(r=null!=r&&z(r,0,8,i,b)?0|r:H,!t.c)return t.toString();if(f=t.c[0],s=t.e,null==n)p=o(t.c),p=19==i||24==i&&C>=s?a(p,s):l(p,s);else if(t=F(new e(t),n,r),u=t.e,p=o(t.c),c=p.length,19==i||24==i&&(u>=n||C>=u)){for(;n>c;p+="0",c++);p=a(p,u)}else if(n-=s,p=l(p,u),u+1>c){if(--n>0)for(p+=".";n--;p+="0");}else if(n+=u-c,n>0)for(u+1==c&&(p+=".");n--;p+="0");return t.s<0&&f?"-"+p:p}function S(t,n){var r,i,o=0;for(s(t[0])&&(t=t[0]),r=new e(t[0]);++ot||t>n||t!=p(t))&&U(r,(i||"decimal places")+(e>t||t>n?" out of range":" not an integer"),t),!0}function R(t,e,n){for(var r=1,i=e.length;!e[--i];e.pop());for(i=e[0];i>=10;i/=10,r++);return(n=r+n*I-1)>q?t.c=t.e=null:k>n?t.c=[t.e=0]:(t.e=n,t.c=e),t}function U(t,e,n){var r=new Error(["new BigNumber","cmp","config","div","divToInt","eq","gt","gte","lt","lte","minus","mod","plus","precision","random","round","shift","times","toDigits","toExponential","toFixed","toFormat","toFraction","pow","toPrecision","toString","BigNumber"][t]+"() "+e+": "+n);throw r.name="BigNumber Error",L=0,r}function F(t,e,n,r){var i,o,f,u,s,c,a,l=t.c,p=_;if(l){t:{for(i=1,u=l[0];u>=10;u/=10,i++);if(o=e-i,0>o)o+=I,f=e,s=l[c=0],a=s/p[i-f-1]%10|0;else if(c=v((o+1)/I),c>=l.length){if(!r)break t;for(;l.length<=c;l.push(0));s=a=0,i=1,o%=I,f=o-I+1}else{for(s=u=l[c],i=1;u>=10;u/=10,i++);o%=I,f=o-I+i,a=0>f?0:s/p[i-f-1]%10|0}if(r=r||0>e||null!=l[c+1]||(0>f?s:s%p[i-f-1]),r=4>n?(a||r)&&(0==n||n==(t.s<0?3:2)):a>5||5==a&&(4==n||r||6==n&&(o>0?f>0?s/p[i-f]:0:l[c-1])%10&1||n==(t.s<0?8:7)),1>e||!l[0])return l.length=0,r?(e-=t.e+1,l[0]=p[e%I],t.e=-e||0):l[0]=t.e=0,t;if(0==o?(l.length=c,u=1,c--):(l.length=c+1,u=p[I-o],l[c]=f>0?w(s/p[i-f]%p[f])*u:0),r)for(;;){if(0==c){for(o=1,f=l[0];f>=10;f/=10,o++);for(f=l[0]+=u,u=1;f>=10;f/=10,u++);o!=u&&(t.e++,l[0]==E&&(l[0]=1));break}if(l[c]+=u,l[c]!=E)break;l[c--]=0,u=1}for(o=l.length;0===l[--o];l.pop());}t.e>q?t.c=t.e=null:t.en?null!=(t=i[n++]):void 0};return f(e="DECIMAL_PLACES")&&z(t,0,D,2,e)&&(B=0|t),r[e]=B,f(e="ROUNDING_MODE")&&z(t,0,8,2,e)&&(H=0|t),r[e]=H,f(e="EXPONENTIAL_AT")&&(s(t)?z(t[0],-D,0,2,e)&&z(t[1],0,D,2,e)&&(C=0|t[0],j=0|t[1]):z(t,-D,D,2,e)&&(C=-(j=0|(0>t?-t:t)))),r[e]=[C,j],f(e="RANGE")&&(s(t)?z(t[0],-D,-1,2,e)&&z(t[1],1,D,2,e)&&(k=0|t[0],q=0|t[1]):z(t,-D,D,2,e)&&(0|t?k=-(q=0|(0>t?-t:t)):$&&U(2,e+" cannot be zero",t))),r[e]=[k,q],f(e="ERRORS")&&(t===!!t||1===t||0===t?(L=0,z=($=!!t)?A:u):$&&U(2,e+y,t)),r[e]=$,f(e="CRYPTO")&&(t===!!t||1===t||0===t?(V=!(!t||!g||"object"!=typeof g),t&&!V&&$&&U(2,"crypto unavailable",g)):$&&U(2,e+y,t)),r[e]=V,f(e="MODULO_MODE")&&z(t,0,9,2,e)&&(W=0|t),r[e]=W,f(e="POW_PRECISION")&&z(t,0,D,2,e)&&(Y=0|t),r[e]=Y,f(e="FORMAT")&&("object"==typeof t?Z=t:$&&U(2,e+" not an object",t)),r[e]=Z,r},e.max=function(){return S(arguments,M.lt)},e.min=function(){return S(arguments,M.gt)},e.random=function(){var t=9007199254740992,n=Math.random()*t&2097151?function(){return w(Math.random()*t)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(t){var r,i,o,f,u,s=0,c=[],a=new e(P);if(t=null!=t&&z(t,0,D,14)?0|t:B,f=v(t/I),V)if(g&&g.getRandomValues){for(r=g.getRandomValues(new Uint32Array(f*=2));f>s;)u=131072*r[s]+(r[s+1]>>>11),u>=9e15?(i=g.getRandomValues(new Uint32Array(2)),r[s]=i[0],r[s+1]=i[1]):(c.push(u%1e14),s+=2);s=f/2}else if(g&&g.randomBytes){for(r=g.randomBytes(f*=7);f>s;)u=281474976710656*(31&r[s])+1099511627776*r[s+1]+4294967296*r[s+2]+16777216*r[s+3]+(r[s+4]<<16)+(r[s+5]<<8)+r[s+6],u>=9e15?g.randomBytes(7).copy(r,s):(c.push(u%1e14),s+=7);s=f/7}else $&&U(14,"crypto unavailable",g);if(!s)for(;f>s;)u=n(),9e15>u&&(c[s++]=u%1e14);for(f=c[--s],t%=I,f&&t&&(u=_[I-t],c[s]=w(f/u)*u);0===c[s];c.pop(),s--);if(0>s)c=[o=0];else{for(o=-1;0===c[0];c.shift(),o-=I);for(s=1,u=c[0];u>=10;u/=10,s++);I>s&&(o-=I-s)}return a.e=o,a.c=c,a}}(),G=function(){function t(t,e,n){var r,i,o,f,u=0,s=t.length,c=e%T,a=e/T|0;for(t=t.slice();s--;)o=t[s]%T,f=t[s]/T|0,r=a*o+f*c,i=c*o+r%T*T+u,u=(i/n|0)+(r/T|0)+a*f,t[s]=i%n;return u&&t.unshift(u),t}function n(t,e,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;n>i;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function r(t,e,n,r){for(var i=0;n--;)t[n]-=i,i=t[n]1;t.shift());}return function(o,f,u,s,c){var a,l,p,h,g,m,d,v,y,b,O,N,x,_,T,D,S,A=o.s==f.s?1:-1,R=o.c,U=f.c;if(!(R&&R[0]&&U&&U[0]))return new e(o.s&&f.s&&(R?!U||R[0]!=U[0]:U)?R&&0==R[0]||!U?0*A:A/0:0/0);for(v=new e(A),y=v.c=[],l=o.e-f.e,A=u+l+1,c||(c=E,l=i(o.e/I)-i(f.e/I),A=A/I|0),p=0;U[p]==(R[p]||0);p++);if(U[p]>(R[p]||0)&&l--,0>A)y.push(1),h=!0;else{for(_=R.length,D=U.length,p=0,A+=2,g=w(c/(U[0]+1)),g>1&&(U=t(U,g,c),R=t(R,g,c),D=U.length,_=R.length),x=D,b=R.slice(0,D),O=b.length;D>O;b[O++]=0);S=U.slice(),S.unshift(0),T=U[0],U[1]>=c/2&&T++;do g=0,a=n(U,b,D,O),0>a?(N=b[0],D!=O&&(N=N*c+(b[1]||0)),g=w(N/T),g>1?(g>=c&&(g=c-1),m=t(U,g,c),d=m.length,O=b.length,a=n(m,b,d,O),1==a&&(g--,r(m,d>D?S:U,d,c))):(0==g&&(a=g=1),m=U.slice()),d=m.length,O>d&&m.unshift(0),r(b,m,O,c),-1==a&&(O=b.length,a=n(U,b,D,O),1>a&&(g++,r(b,O>D?S:U,O,c))),O=b.length):0===a&&(g++,b=[0]),y[p++]=g,a&&b[0]?b[O++]=R[x]||0:(b=[R[x]],O=1);while((x++<_||null!=b[0])&&A--);h=null!=b[0],y[0]||y.shift()}if(c==E){for(p=1,A=y[0];A>=10;A/=10,p++);F(v,u+(v.e=p+l*I-1)+1,s,h)}else v.e=l,v.r=+h;return v}}(),m==function(){var t=/^(-?)0([xbo])(\w[\w.]*$)/i,n=/^([^.]+)\.$/,r=/^\.([^.]+)$/,i=/^-?(Infinity|NaN)$/,o=/^\s*\+([\w.])|^\s+|\s+$/g;return function(f,u,s,c){var a,l=s?u:u.replace(o,"$1");if(i.test(l))f.s=isNaN(l)?null:0>l?-1:1;else{if(!s&&(l=l.replace(t,function(t,e,n){return a="x"==(n=n.toLowerCase())?16:"b"==n?2:8,c&&c!=a?t:e}),c&&(a=c,l=l.replace(n,"$1").replace(r,"0.$1")),u!=l))return new e(l,a);$&&U(L,"not a"+(c?" base "+c:"")+" number",u),f.s=null}f.c=f.e=null,L=0}}(),M.absoluteValue=M.abs=function(){var t=new e(this);return t.s<0&&(t.s=1),t},M.ceil=function(){return F(new e(this),this.e+1,2)},M.comparedTo=M.cmp=function(t,n){return L=1,f(this,new e(t,n))},M.decimalPlaces=M.dp=function(){var t,e,n=this.c;if(!n)return null;if(t=((e=n.length-1)-i(this.e/I))*I,e=n[e])for(;e%10==0;e/=10,t--);return 0>t&&(t=0),t},M.dividedBy=M.div=function(t,n){return L=3,G(this,new e(t,n),B,H)},M.dividedToIntegerBy=M.divToInt=function(t,n){return L=4,G(this,new e(t,n),0,1)},M.equals=M.eq=function(t,n){return L=5,0===f(this,new e(t,n))},M.floor=function(){return F(new e(this),this.e+1,3)},M.greaterThan=M.gt=function(t,n){return L=6,f(this,new e(t,n))>0},M.greaterThanOrEqualTo=M.gte=function(t,n){return L=7,1===(n=f(this,new e(t,n)))||0===n},M.isFinite=function(){return!!this.c},M.isInteger=M.isInt=function(){return!!this.c&&i(this.e/I)>this.c.length-2},M.isNaN=function(){return!this.s},M.isNegative=M.isNeg=function(){return this.s<0},M.isZero=function(){return!!this.c&&0==this.c[0]},M.lessThan=M.lt=function(t,n){return L=8,f(this,new e(t,n))<0},M.lessThanOrEqualTo=M.lte=function(t,n){return L=9,-1===(n=f(this,new e(t,n)))||0===n},M.minus=M.sub=function(t,n){var r,o,f,u,s=this,c=s.s;if(L=10,t=new e(t,n),n=t.s,!c||!n)return new e(0/0);if(c!=n)return t.s=-n,s.plus(t);var a=s.e/I,l=t.e/I,p=s.c,h=t.c;if(!a||!l){if(!p||!h)return p?(t.s=-n,t):new e(h?s:0/0);if(!p[0]||!h[0])return h[0]?(t.s=-n,t):new e(p[0]?s:3==H?-0:0)}if(a=i(a),l=i(l),p=p.slice(),c=a-l){for((u=0>c)?(c=-c,f=p):(l=a,f=h),f.reverse(),n=c;n--;f.push(0));f.reverse()}else for(o=(u=(c=p.length)<(n=h.length))?c:n,c=n=0;o>n;n++)if(p[n]!=h[n]){u=p[n]0)for(;n--;p[r++]=0);for(n=E-1;o>c;){if(p[--o]0?(s=u,r=a):(f=-f,r=c),r.reverse();f--;r.push(0));r.reverse()}for(f=c.length,n=a.length,0>f-n&&(r=a,a=c,c=r,n=f),f=0;n;)f=(c[--n]=c[n]+a[n]+f)/E|0,c[n]%=E;return f&&(c.unshift(f),++s),R(t,c,s)},M.precision=M.sd=function(t){var e,n,r=this,i=r.c;if(null!=t&&t!==!!t&&1!==t&&0!==t&&($&&U(13,"argument"+y,t),t!=!!t&&(t=null)),!i)return null;if(n=i.length-1,e=n*I+1,n=i[n]){for(;n%10==0;n/=10,e--);for(n=i[0];n>=10;n/=10,e++);}return t&&r.e+1>e&&(e=r.e+1),e},M.round=function(t,n){var r=new e(this);return(null==t||z(t,0,D,15))&&F(r,~~t+this.e+1,null!=n&&z(n,0,8,15,b)?0|n:H),r},M.shift=function(t){var n=this;return z(t,-x,x,16,"argument")?n.times("1e"+p(t)):new e(n.c&&n.c[0]&&(-x>t||t>x)?n.s*(0>t?0:1/0):n)},M.squareRoot=M.sqrt=function(){var t,n,r,f,u,s=this,c=s.c,a=s.s,l=s.e,p=B+4,h=new e("0.5");if(1!==a||!c||!c[0])return new e(!a||0>a&&(!c||c[0])?0/0:c?s:1/0);if(a=Math.sqrt(+s),0==a||a==1/0?(n=o(c),(n.length+l)%2==0&&(n+="0"),a=Math.sqrt(n),l=i((l+1)/2)-(0>l||l%2),a==1/0?n="1e"+l:(n=a.toExponential(),n=n.slice(0,n.indexOf("e")+1)+l),r=new e(n)):r=new e(a+""),r.c[0])for(l=r.e,a=l+p,3>a&&(a=0);;)if(u=r,r=h.times(u.plus(G(s,u,p,1))),o(u.c).slice(0,a)===(n=o(r.c)).slice(0,a)){if(r.ea&&(d=b,b=O,O=d,f=a,a=h,h=f),f=a+h,d=[];f--;d.push(0));for(v=E,w=T,f=h;--f>=0;){for(r=0,g=O[f]%w,m=O[f]/w|0,s=a,u=f+s;u>f;)l=b[--s]%w,p=b[s]/w|0,c=m*l+p*g,l=g*l+c%w*w+d[u]+r,r=(l/v|0)+(c/w|0)+m*p,d[u--]=l%v;d[u]=r}return r?++o:d.shift(),R(t,d,o)},M.toDigits=function(t,n){var r=new e(this);return t=null!=t&&z(t,1,D,18,"precision")?0|t:null,n=null!=n&&z(n,0,8,18,b)?0|n:H,t?F(r,t,n):r},M.toExponential=function(t,e){return h(this,null!=t&&z(t,0,D,19)?~~t+1:null,e,19)},M.toFixed=function(t,e){return h(this,null!=t&&z(t,0,D,20)?~~t+this.e+1:null,e,20)},M.toFormat=function(t,e){var n=h(this,null!=t&&z(t,0,D,21)?~~t+this.e+1:null,e,21);if(this.c){var r,i=n.split("."),o=+Z.groupSize,f=+Z.secondaryGroupSize,u=Z.groupSeparator,s=i[0],c=i[1],a=this.s<0,l=a?s.slice(1):s,p=l.length;if(f&&(r=o,o=f,f=r,p-=r),o>0&&p>0){for(r=p%o||o,s=l.substr(0,r);p>r;r+=o)s+=u+l.substr(r,o);f>0&&(s+=u+l.slice(r)),a&&(s="-"+s)}n=c?s+Z.decimalSeparator+((f=+Z.fractionGroupSize)?c.replace(new RegExp("\\d{"+f+"}\\B","g"),"$&"+Z.fractionGroupSeparator):c):s}return n},M.toFraction=function(t){var n,r,i,f,u,s,c,a,l,p=$,h=this,g=h.c,m=new e(P),d=r=new e(P),v=c=new e(P);if(null!=t&&($=!1,s=new e(t),$=p,(!(p=s.isInt())||s.lt(P))&&($&&U(22,"max denominator "+(p?"out of range":"not an integer"),t),t=!p&&s.c&&F(s,s.e+1,1).gte(P)?s:null)),!g)return h.toString();for(l=o(g),f=m.e=l.length-h.e-1,m.c[0]=_[(u=f%I)<0?I+u:u],t=!t||s.cmp(m)>0?f>0?m:d:s,u=q,q=1/0,s=new e(l),c.c[0]=0;a=G(s,m,0,1),i=r.plus(a.times(v)),1!=i.cmp(t);)r=v,v=i,d=c.plus(a.times(i=d)),c=i,m=s.minus(a.times(i=m)),s=i;return i=G(t.minus(r),v,0,1),c=c.plus(i.times(d)),r=r.plus(i.times(v)),c.s=d.s=h.s,f*=2,n=G(d,v,f,H).minus(h).abs().cmp(G(c,r,f,H).minus(h).abs())<1?[d.toString(),v.toString()]:[c.toString(),r.toString()],q=u,n},M.toNumber=function(){var t=this;return+t||(t.s?0*t.s:0/0)},M.toPower=M.pow=function(t){var n,r,i=w(0>t?-t:+t),o=this;if(!z(t,-x,x,23,"exponent")&&(!isFinite(t)||i>x&&(t/=0)||parseFloat(t)!=t&&!(t=0/0)))return new e(Math.pow(+o,t));for(n=Y?v(Y/I+2):0,r=new e(P);;){if(i%2){if(r=r.times(o),!r.c)break;n&&r.c.length>n&&(r.c.length=n)}if(i=w(i/2),!i)break;o=o.times(o),n&&o.c&&o.c.length>n&&(o.c.length=n)}return 0>t&&(r=P.div(r)),n?F(r,Y,H):r},M.toPrecision=function(t,e){return h(this,null!=t&&z(t,1,D,24,"precision")?0|t:null,e,24)},M.toString=function(t){var e,r=this,i=r.s,f=r.e;return null===f?i?(e="Infinity",0>i&&(e="-"+e)):e="NaN":(e=o(r.c),e=null!=t&&z(t,2,64,25,"base")?n(l(e,f),0|t,10,i):C>=f||f>=j?a(e,f):l(e,f),0>i&&r.c[0]&&(e="-"+e)),e},M.truncated=M.trunc=function(){return F(new e(this),this.e+1,1)},M.valueOf=M.toJSON=function(){return this.toString()},null!=t&&e.config(t),e}function i(t){var e=0|t;return t>0||t===e?e:e-1}function o(t){for(var e,n,r=1,i=t.length,o=t[0]+"";i>r;){for(e=t[r++]+"",n=I-e.length;n--;e="0"+e);o+=e}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function f(t,e){var n,r,i=t.c,o=e.c,f=t.s,u=e.s,s=t.e,c=e.e;if(!f||!u)return null;if(n=i&&!i[0],r=o&&!o[0],n||r)return n?r?0:-u:f;if(f!=u)return f;if(n=0>f,r=s==c,!i||!o)return r?0:!i^n?1:-1;if(!r)return s>c^n?1:-1;for(u=(s=i.length)<(c=o.length)?s:c,f=0;u>f;f++)if(i[f]!=o[f])return i[f]>o[f]^n?1:-1;return s==c?0:s>c^n?1:-1}function u(t,e,n){return(t=p(t))>=e&&n>=t}function s(t){return"[object Array]"==Object.prototype.toString.call(t)}function c(t,e,n){for(var r,i,o=[0],f=0,u=t.length;u>f;){for(i=o.length;i--;o[i]*=e);for(o[r=0]+=N.indexOf(t.charAt(f++));rn-1&&(null==o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}function a(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(0>e?"e":"e+")+e}function l(t,e){var n,r;if(0>e){for(r="0.";++e;r+="0");t=r+t}else if(n=t.length,++e>n){for(r="0",e-=n;--e;r+="0");t+=r}else n>e&&(t=t.slice(0,e)+"."+t.slice(e));return t}function p(t){return t=parseFloat(t),0>t?v(t):w(t)}var h,g,m,d=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,v=Math.ceil,w=Math.floor,y=" not a boolean or binary digit",b="rounding mode",O="number type has more than 15 significant digits",N="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",E=1e14,I=14,x=9007199254740991,_=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],T=1e7,D=1e9;if(h=r(),"function"==typeof define&&define.amd)define(function(){return h});else if("undefined"!=typeof e&&e.exports){if(e.exports=h,!g)try{g=t("crypto")}catch(S){}}else n.BigNumber=h}(this)},{crypto:1}],natspec:[function(t,e){var n=t("./node_modules/expanse.js/lib/abi.js"),r=function(){var t=function(t,e){Object.keys(t).forEach(function(n){e[n]=t[n]})},e=function(t){return Object.keys(t).reduce(function(t,e){return t+"var "+e+" = context['"+e+"'];\n"},"")},r=function(t,e){return t.filter(function(t){return t.name===e})[0]},i=function(t,e){var r=n.formatOutput(t.inputs,"0x"+e.params[0].data.slice(10));return t.inputs.reduce(function(t,e,n){return t[e.name]=r[n],t},{})},o=function(t,e){var n,r="",i=/\` + "`" + `(?:\\.|[^` + "`" + `\\])*\` + "`" + `/gim,o=0;try{for(;null!==(n=i.exec(t));){var f=i.lastIndex-n[0].length,u=n[0].slice(1,n[0].length-1);r+=t.slice(o,f);var s=e(u);r+=s,o=i.lastIndex}r+=t.slice(o)}catch(c){throw new Error("Natspec evaluation failed, wrong input params")}return r},f=function(n,f){var u={};if(f)try{var s=r(f.abi,f.method),c=i(s,f.transaction);t(c,u)}catch(a){throw new Error("Natspec evaluation failed, method does not exist")}var l=e(u),p=o(n,function(t){var e=new Function("context",l+"return "+t+";");return e(u).toString()});return p},u=function(t,e){try{return f(t,e)}catch(n){return n.message}};return{evaluateExpression:f,evaluateExpressionSafe:u}}();e.exports=r},{"./node_modules/expanse.js/lib/abi.js":3}]},{},[]); ` require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o. + along with expanse.js. If not, see . */ /** * @file abi.js @@ -282,20 +282,20 @@ module.exports = { },{"../utils/config":6,"../utils/utils":7,"./formatters":3,"./types":4,"./utils":5}],3:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** @file formatters.js * @authors: @@ -482,20 +482,20 @@ module.exports = { },{"../utils/config":6,"../utils/utils":7,"bignumber.js":8}],4:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** @file types.js * @authors: @@ -561,20 +561,20 @@ module.exports = { },{"./formatters":3}],5:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file utils.js @@ -631,20 +631,20 @@ module.exports = { },{}],6:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** @file config.js * @authors: @@ -702,20 +702,20 @@ module.exports = { },{"bignumber.js":8}],7:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** @file utils.js * @authors: diff --git a/common/natspec/natspec_test.go b/common/natspec/natspec_test.go index 9ec14829a9..581bdd16f8 100644 --- a/common/natspec/natspec_test.go +++ b/common/natspec/natspec_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package natspec diff --git a/common/number/int.go b/common/number/int.go index 6dab2436de..2fb06fa5eb 100644 --- a/common/number/int.go +++ b/common/number/int.go @@ -1,25 +1,25 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package number import ( "math/big" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) var tt256 = new(big.Int).Lsh(big.NewInt(1), 256) diff --git a/common/number/uint_test.go b/common/number/uint_test.go index 3ab9e4c344..0ea54fa8a4 100644 --- a/common/number/uint_test.go +++ b/common/number/uint_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package number @@ -20,7 +20,7 @@ import ( "math/big" "testing" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) func TestSet(t *testing.T) { diff --git a/common/package.go b/common/package.go index 4e8780c08a..1b2e270e55 100644 --- a/common/package.go +++ b/common/package.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common @@ -93,7 +93,7 @@ func FindFileInArchive(fn string, files []*zip.File) (index int) { // Open package // -// Opens a prepared ethereum package +// Opens a prepared expanse package // Reads the manifest file and determines file contents and returns and // the external package. func OpenPackage(fn string) (*ExtPackage, error) { diff --git a/common/path.go b/common/path.go index 0d7adb9617..80f4fb4ea9 100644 --- a/common/path.go +++ b/common/path.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common @@ -27,7 +27,7 @@ import ( "github.com/kardianos/osext" ) -// MakeName creates a node name that follows the ethereum convention +// MakeName creates a node name that follows the expanse convention // for such names. It adds the operation system name and Go runtime version // the name. func MakeName(name, version string) string { @@ -68,9 +68,9 @@ func AbsolutePath(Datadir string, filename string) string { func DefaultAssetPath() string { var assetPath string pwd, _ := os.Getwd() - srcdir := filepath.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "cmd", "mist") + srcdir := filepath.Join(os.Getenv("GOPATH"), "src", "github.com", "expanse", "go-expanse", "cmd", "mist") - // If the current working directory is the go-ethereum dir + // If the current working directory is the go-expanse dir // assume a debug build and use the source directory as // asset directory. if pwd == srcdir { @@ -102,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 { diff --git a/common/path_test.go b/common/path_test.go index 71ffd5fe1e..0929fc50cb 100644 --- a/common/path_test.go +++ b/common/path_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common @@ -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]) diff --git a/common/registrar/contracts.go b/common/registrar/contracts.go index cd80dfcaba..afd6eac4cd 100644 --- a/common/registrar/contracts.go +++ b/common/registrar/contracts.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package registrar diff --git a/common/registrar/ethreg/ethreg.go b/common/registrar/ethreg/ethreg.go index 626ebe1d74..aee131a1f7 100644 --- a/common/registrar/ethreg/ethreg.go +++ b/common/registrar/ethreg/ethreg.go @@ -1,26 +1,26 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package ethreg import ( "math/big" - "github.com/ethereum/go-ethereum/common/registrar" - "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/go-expanse/common/registrar" + "github.com/expanse-project/go-expanse/xeth" ) // implements a versioned Registrar on an archiving full node diff --git a/common/registrar/registrar.go b/common/registrar/registrar.go index d891e161e7..9d09d8c6e8 100644 --- a/common/registrar/registrar.go +++ b/common/registrar/registrar.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package registrar @@ -22,15 +22,15 @@ import ( "math/big" "regexp" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" ) /* -Registrar implements the Ethereum name registrar services mapping -- arbitrary strings to ethereum addresses +Registrar implements the Expanse name registrar services mapping +- arbitrary strings to expanse addresses - hashes to hashes - hashes to arbitrary strings (likely will provide lookup service for all three) diff --git a/common/registrar/registrar_test.go b/common/registrar/registrar_test.go index 63f2835638..2aeb4df52d 100644 --- a/common/registrar/registrar_test.go +++ b/common/registrar/registrar_test.go @@ -1,26 +1,26 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package registrar import ( "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" ) type testBackend struct { diff --git a/common/rlp.go b/common/rlp.go index 481b451b1b..5c76413a5d 100644 --- a/common/rlp.go +++ b/common/rlp.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common diff --git a/common/rlp_test.go b/common/rlp_test.go index 2320ffe3c2..aeb232f605 100644 --- a/common/rlp_test.go +++ b/common/rlp_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common @@ -22,7 +22,7 @@ import ( "reflect" "testing" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/rlp" ) func TestNonInterfaceSlice(t *testing.T) { diff --git a/common/size.go b/common/size.go index 9653b36298..62e4358e86 100644 --- a/common/size.go +++ b/common/size.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common diff --git a/common/size_test.go b/common/size_test.go index 8709a02374..91e22da052 100644 --- a/common/size_test.go +++ b/common/size_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common diff --git a/common/test_utils.go b/common/test_utils.go index a848642f77..063b696e36 100644 --- a/common/test_utils.go +++ b/common/test_utils.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common diff --git a/common/types.go b/common/types.go index 624f4b8265..908ed8245d 100644 --- a/common/types.go +++ b/common/types.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common diff --git a/common/types_template.go b/common/types_template.go index 8048f9cc3f..748e5dea83 100644 --- a/common/types_template.go +++ b/common/types_template.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // +build none //sed -e 's/_N_/Hash/g' -e 's/_S_/32/g' -e '1d' types_template.go | gofmt -w hash.go diff --git a/common/types_test.go b/common/types_test.go index edf8d4d142..9b710a1ead 100644 --- a/common/types_test.go +++ b/common/types_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common diff --git a/common/value.go b/common/value.go index 7abbf67b15..b76d5d1b0b 100644 --- a/common/value.go +++ b/common/value.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common @@ -24,7 +24,7 @@ import ( "reflect" "strconv" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/rlp" ) // Value can hold values of certain basic types and provides ways to diff --git a/common/value_test.go b/common/value_test.go index ac2ef02a70..23d329d263 100644 --- a/common/value_test.go +++ b/common/value_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package common diff --git a/compression/rle/read_write.go b/compression/rle/read_write.go index 19133119b3..b7698ea435 100644 --- a/compression/rle/read_write.go +++ b/compression/rle/read_write.go @@ -1,27 +1,27 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -// Package rle implements the run-length encoding used for Ethereum data. +// Package rle implements the run-length encoding used for Expanse data. package rle import ( "bytes" "errors" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/crypto" ) const ( diff --git a/compression/rle/read_write_test.go b/compression/rle/read_write_test.go index ba39650256..c19fd796d1 100644 --- a/compression/rle/read_write_test.go +++ b/compression/rle/read_write_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package rle diff --git a/core/asm.go b/core/asm.go index a86a2c44c3..acbf6d9372 100644 --- a/core/asm.go +++ b/core/asm.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -20,8 +20,8 @@ import ( "fmt" "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/vm" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/vm" ) func Disassemble(script []byte) (asm []string) { diff --git a/core/bad_block.go b/core/bad_block.go index cd3fb575a8..1239431b42 100644 --- a/core/bad_block.go +++ b/core/bad_block.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -22,11 +22,11 @@ import ( "io/ioutil" "net/http" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/rlp" ) // DisabledBadBlockReporting can be set to prevent blocks being reported. diff --git a/core/bench_test.go b/core/bench_test.go index 67ba15970f..e5765d8dc6 100644 --- a/core/bench_test.go +++ b/core/bench_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -23,12 +23,12 @@ import ( "os" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/params" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/event" + "github.com/expanse-project/go-expanse/params" ) func BenchmarkInsertChain_empty_memdb(b *testing.B) { @@ -148,7 +148,7 @@ func benchInsertChain(b *testing.B, disk bool, gen func(int, *BlockGen)) { if !disk { db, _ = ethdb.NewMemDatabase() } else { - dir, err := ioutil.TempDir("", "eth-core-bench") + dir, err := ioutil.TempDir("", "exp-core-bench") if err != nil { b.Fatalf("cannot create temporary directory: %v", err) } diff --git a/core/block_cache.go b/core/block_cache.go index 0fd7114488..6c8a5bf67f 100644 --- a/core/block_cache.go +++ b/core/block_cache.go @@ -1,26 +1,26 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core import ( "sync" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/types" ) // BlockCache implements a caching mechanism specifically for blocks and uses FILO to pop diff --git a/core/block_cache_test.go b/core/block_cache_test.go index ef826d5bda..33b76296fc 100644 --- a/core/block_cache_test.go +++ b/core/block_cache_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -20,8 +20,8 @@ import ( "math/big" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/types" ) func newChain(size int) (chain []*types.Block) { diff --git a/core/block_processor.go b/core/block_processor.go index 5a2ad8377f..ce811005af 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -22,15 +22,15 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/params" - "github.com/ethereum/go-ethereum/pow" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/event" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/params" + "github.com/expanse-project/go-expanse/pow" "gopkg.in/fatih/set.v0" ) diff --git a/core/block_processor_test.go b/core/block_processor_test.go index f48ce9607f..faf74feb3b 100644 --- a/core/block_processor_test.go +++ b/core/block_processor_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -21,12 +21,12 @@ import ( "math/big" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/pow/ezp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/event" + "github.com/expanse-project/go-expanse/pow/ezp" ) func proc() (*BlockProcessor, *ChainManager) { diff --git a/core/blocks.go b/core/blocks.go index 326e4c3fc5..0903146ae5 100644 --- a/core/blocks.go +++ b/core/blocks.go @@ -1,22 +1,22 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core -import "github.com/ethereum/go-ethereum/common" +import "github.com/expanse-project/go-expanse/common" // Set of manually tracked bad hashes (usually hard forks) var BadHashes = map[common.Hash]bool{ diff --git a/core/canary.go b/core/canary.go index 5eefe066cf..8f99ad036c 100644 --- a/core/canary.go +++ b/core/canary.go @@ -1,26 +1,26 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core import ( "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" ) var ( diff --git a/core/chain_makers.go b/core/chain_makers.go index 85a6175dc9..e61efc15a5 100644 --- a/core/chain_makers.go +++ b/core/chain_makers.go @@ -1,29 +1,29 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core import ( "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/pow" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/event" + "github.com/expanse-project/go-expanse/pow" ) // FakePow is a non-validating proof of work implementation. diff --git a/core/chain_makers_test.go b/core/chain_makers_test.go index 98a585f9be..14a8b5fdfc 100644 --- a/core/chain_makers_test.go +++ b/core/chain_makers_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -20,11 +20,11 @@ import ( "fmt" "math/big" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/params" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/event" + "github.com/expanse-project/go-expanse/params" ) func ExampleGenerateChain() { diff --git a/core/chain_manager.go b/core/chain_manager.go index fc1d1304fd..9c352daf55 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -1,20 +1,20 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -// Package core implements the Ethereum consensus protocol. +// Package core implements the Expanse consensus protocol. package core import ( @@ -27,14 +27,14 @@ import ( "sync/atomic" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/metrics" - "github.com/ethereum/go-ethereum/pow" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/event" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/metrics" + "github.com/expanse-project/go-expanse/pow" "github.com/hashicorp/golang-lru" ) @@ -55,7 +55,7 @@ const ( ) type ChainManager struct { - //eth EthManager + //exp EthManager blockDb common.Database stateDb common.Database extraDb common.Database @@ -107,7 +107,7 @@ func NewChainManager(blockDb, stateDb, extraDb common.Database, pow pow.PoW, mux if err != nil { return nil, err } - glog.V(logger.Info).Infoln("WARNING: Wrote default ethereum genesis block") + glog.V(logger.Info).Infoln("WARNING: Wrote default expanse genesis block") } if err := bc.setLastState(); err != nil { diff --git a/core/chain_manager_test.go b/core/chain_manager_test.go index f0c097df6c..4345e56d9f 100644 --- a/core/chain_manager_test.go +++ b/core/chain_manager_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -26,14 +26,14 @@ import ( "strconv" "testing" - "github.com/ethereum/ethash" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/pow" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/ethash" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/event" + "github.com/expanse-project/go-expanse/pow" + "github.com/expanse-project/go-expanse/rlp" "github.com/hashicorp/golang-lru" ) diff --git a/core/chain_util.go b/core/chain_util.go index 34f6c8d0aa..e7018eaf42 100644 --- a/core/chain_util.go +++ b/core/chain_util.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -21,12 +21,12 @@ import ( "math/big" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/params" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/params" + "github.com/expanse-project/go-expanse/rlp" ) var ( diff --git a/core/chain_util_test.go b/core/chain_util_test.go index 4bbe811942..095e4b2735 100644 --- a/core/chain_util_test.go +++ b/core/chain_util_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -22,7 +22,7 @@ import ( "os" "testing" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) type diffTest struct { diff --git a/core/default_genesis.go b/core/default_genesis.go index f8acda9fb6..8d0b70fdc1 100644 --- a/core/default_genesis.go +++ b/core/default_genesis.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core diff --git a/core/error.go b/core/error.go index 5e6ff4de7f..37e4fc0e83 100644 --- a/core/error.go +++ b/core/error.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -21,7 +21,7 @@ import ( "fmt" "math/big" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) var ( diff --git a/core/events.go b/core/events.go index a487fc51d4..1ca656c5c5 100644 --- a/core/events.go +++ b/core/events.go @@ -1,27 +1,27 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core import ( "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" ) // TxPreEvent is posted when a transaction enters the transaction pool. diff --git a/core/execution.go b/core/execution.go index 699bad9a38..a31bc7dccc 100644 --- a/core/execution.go +++ b/core/execution.go @@ -1,29 +1,29 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core import ( "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/vm" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/params" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/vm" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/params" ) type Execution struct { @@ -54,7 +54,7 @@ func (self *Execution) Create(caller vm.ContextRef) (ret []byte, err error, acco self.input = nil ret, err = self.exec(nil, code, caller) // Here we get an error if we run into maximum stack depth, - // See: https://github.com/ethereum/yellowpaper/pull/131 + // See: https://github.com/expanse-project/yellowpaper/pull/131 // and YP definitions for CREATE instruction if err != nil { return nil, err, nil diff --git a/core/fees.go b/core/fees.go index 0bb26f0552..98adc603d9 100644 --- a/core/fees.go +++ b/core/fees.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -20,4 +20,4 @@ import ( "math/big" ) -var BlockReward *big.Int = big.NewInt(5e+18) +var BlockReward *big.Int = big.NewInt(6e+18) diff --git a/core/filter.go b/core/filter.go index 8a876396be..d33a446244 100644 --- a/core/filter.go +++ b/core/filter.go @@ -1,27 +1,27 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core import ( "math" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" ) type AccountChange struct { @@ -30,7 +30,7 @@ type AccountChange struct { // Filtering interface type Filter struct { - eth Backend + exp Backend earliest int64 latest int64 skip int @@ -45,8 +45,8 @@ type Filter struct { // Create a new filter which uses a bloom filter on blocks to figure out whether a particular block // is interesting or not. -func NewFilter(eth Backend) *Filter { - return &Filter{eth: eth} +func NewFilter(exp Backend) *Filter { + return &Filter{exp: exp} } // Set the earliest and latest block for filtering. @@ -78,7 +78,7 @@ func (self *Filter) SetSkip(skip int) { // Run filters logs with the current parameters set func (self *Filter) Find() state.Logs { - earliestBlock := self.eth.ChainManager().CurrentBlock() + earliestBlock := self.exp.ChainManager().CurrentBlock() var earliestBlockNo uint64 = uint64(self.earliest) if self.earliest == -1 { earliestBlockNo = earliestBlock.NumberU64() @@ -90,7 +90,7 @@ func (self *Filter) Find() state.Logs { var ( logs state.Logs - block = self.eth.ChainManager().GetBlockByNumber(latestBlockNo) + block = self.exp.ChainManager().GetBlockByNumber(latestBlockNo) ) done: @@ -109,7 +109,7 @@ done: // current parameters if self.bloomFilter(block) { // Get the logs of the block - unfiltered, err := self.eth.BlockProcessor().GetLogs(block) + unfiltered, err := self.exp.BlockProcessor().GetLogs(block) if err != nil { chainlogger.Warnln("err: filter get logs ", err) @@ -119,7 +119,7 @@ done: logs = append(logs, self.FilterLogs(unfiltered)...) } - block = self.eth.ChainManager().GetBlock(block.ParentHash()) + block = self.exp.ChainManager().GetBlock(block.ParentHash()) } skip := int(math.Min(float64(len(logs)), float64(self.skip))) diff --git a/core/filter_test.go b/core/filter_test.go index 58e71e305d..693bf7c10a 100644 --- a/core/filter_test.go +++ b/core/filter_test.go @@ -1,17 +1,17 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core diff --git a/core/genesis.go b/core/genesis.go index 4c0323c176..d98163bff9 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -24,12 +24,12 @@ import ( "math/big" "strings" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/params" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/params" ) // WriteGenesisBlock writes the genesis block to the database as block number 0 diff --git a/core/helper_test.go b/core/helper_test.go index b21f31d7c8..1b9fdefe58 100644 --- a/core/helper_test.go +++ b/core/helper_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -20,11 +20,11 @@ import ( "container/list" "fmt" - "github.com/ethereum/go-ethereum/core/types" - // "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/event" + "github.com/expanse-project/go-expanse/core/types" + // "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/event" ) // Implement our EthTest Manager diff --git a/core/manager.go b/core/manager.go index a07c326592..f36ff71548 100644 --- a/core/manager.go +++ b/core/manager.go @@ -1,25 +1,25 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core import ( - "github.com/ethereum/go-ethereum/accounts" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/event" + "github.com/expanse-project/go-expanse/accounts" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/event" ) // TODO move this to types? diff --git a/core/state/dump.go b/core/state/dump.go index 9acb8a0244..a507b1a750 100644 --- a/core/state/dump.go +++ b/core/state/dump.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package state @@ -20,7 +20,7 @@ import ( "encoding/json" "fmt" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) type Account struct { diff --git a/core/state/errors.go b/core/state/errors.go index a08ed2d23d..1d120e8970 100644 --- a/core/state/errors.go +++ b/core/state/errors.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package state diff --git a/core/state/log.go b/core/state/log.go index 5d7d7357dd..9433c4d447 100644 --- a/core/state/log.go +++ b/core/state/log.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package state @@ -20,8 +20,8 @@ import ( "fmt" "io" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/rlp" ) type Log struct { diff --git a/core/state/main_test.go b/core/state/main_test.go index cd9661031f..1d01867c37 100644 --- a/core/state/main_test.go +++ b/core/state/main_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package state diff --git a/core/state/managed_state.go b/core/state/managed_state.go index 4df0479791..38038186b6 100644 --- a/core/state/managed_state.go +++ b/core/state/managed_state.go @@ -1,25 +1,25 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package state import ( "sync" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) type account struct { diff --git a/core/state/managed_state_test.go b/core/state/managed_state_test.go index 58e77d842b..34b32564f7 100644 --- a/core/state/managed_state_test.go +++ b/core/state/managed_state_test.go @@ -1,26 +1,26 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package state import ( "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/ethdb" ) var addr = common.BytesToAddress([]byte("test")) diff --git a/core/state/state_object.go b/core/state/state_object.go index 3d4f0b3769..6fd56139a5 100644 --- a/core/state/state_object.go +++ b/core/state/state_object.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package state @@ -21,12 +21,12 @@ import ( "fmt" "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/rlp" - "github.com/ethereum/go-ethereum/trie" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/rlp" + "github.com/expanse-project/go-expanse/trie" ) type Code []byte diff --git a/core/state/state_test.go b/core/state/state_test.go index 5972d266a9..293ed6cc18 100644 --- a/core/state/state_test.go +++ b/core/state/state_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package state @@ -22,8 +22,8 @@ import ( checker "gopkg.in/check.v1" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/ethdb" ) type StateSuite struct { diff --git a/core/state/statedb.go b/core/state/statedb.go index 45bdfc084d..65d09562c4 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -1,33 +1,33 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -// Package state provides a caching layer atop the Ethereum state trie. +// Package state provides a caching layer atop the Expanse state trie. package state import ( "bytes" "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/trie" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/trie" ) -// StateDBs within the ethereum protocol are used to store anything +// StateDBs within the expanse protocol are used to store anything // within the merkle trie. StateDBs take care of caching and storing // nested states. It's the general query interface to retrieve: // * Contracts diff --git a/core/state_transition.go b/core/state_transition.go index a5d4fc19b9..b2f305c6cc 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -20,12 +20,12 @@ import ( "fmt" "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/vm" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/params" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/vm" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/params" ) /* diff --git a/core/transaction_pool.go b/core/transaction_pool.go index 42e26b3b38..0fd1230b76 100644 --- a/core/transaction_pool.go +++ b/core/transaction_pool.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -23,12 +23,12 @@ import ( "sort" "sync" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/event" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" ) var ( diff --git a/core/transaction_pool_test.go b/core/transaction_pool_test.go index 7d09847401..edbc1e03c0 100644 --- a/core/transaction_pool_test.go +++ b/core/transaction_pool_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core @@ -21,12 +21,12 @@ import ( "math/big" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/event" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/event" ) func transaction(nonce uint64, gaslimit *big.Int, key *ecdsa.PrivateKey) *types.Transaction { diff --git a/core/transaction_util.go b/core/transaction_util.go index ce2ceac463..625ffcf158 100644 --- a/core/transaction_util.go +++ b/core/transaction_util.go @@ -1,28 +1,28 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core import ( - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/rlp" "github.com/syndtr/goleveldb/leveldb" ) diff --git a/core/types/block.go b/core/types/block.go index 427a3e6cb3..a7d4037282 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -1,20 +1,20 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -// Package types contains data types related to Ethereum consensus. +// Package types contains data types related to Expanse consensus. package types import ( @@ -28,9 +28,9 @@ import ( "sync/atomic" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto/sha3" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto/sha3" + "github.com/expanse-project/go-expanse/rlp" ) // A BlockNonce is a 64-bit hash which proves (combined with the @@ -131,7 +131,7 @@ type Block struct { // of the chain up to and including the block. Td *big.Int - // ReceivedAt is used by package eth to track block propagation time. + // ReceivedAt is used by package exp to track block propagation time. ReceivedAt time.Time } @@ -140,7 +140,7 @@ type Block struct { // would otherwise need to be recomputed. type StorageBlock Block -// "external" block encoding. used for eth protocol, etc. +// "external" block encoding. used for exp protocol, etc. type extblock struct { Header *Header Txs []*Transaction diff --git a/core/types/block_test.go b/core/types/block_test.go index aebb6328bd..f884250022 100644 --- a/core/types/block_test.go +++ b/core/types/block_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package types @@ -22,8 +22,8 @@ import ( "reflect" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/rlp" ) // from bcValidBlockTest.json, "SimpleTx" diff --git a/core/types/bloom9.go b/core/types/bloom9.go index 0629b31d45..a02f716c09 100644 --- a/core/types/bloom9.go +++ b/core/types/bloom9.go @@ -1,27 +1,27 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package types import ( "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/crypto" ) type bytesBacked interface { diff --git a/core/types/bloom9_test.go b/core/types/bloom9_test.go index f020670b1c..1691fc89b9 100644 --- a/core/types/bloom9_test.go +++ b/core/types/bloom9_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package types @@ -20,7 +20,7 @@ package types import ( "testing" - "github.com/ethereum/go-ethereum/core/state" + "github.com/expanse-project/go-expanse/core/state" ) func TestBloom9(t *testing.T) { diff --git a/core/types/common.go b/core/types/common.go index de6efcd86b..65a6d4a992 100644 --- a/core/types/common.go +++ b/core/types/common.go @@ -1,26 +1,26 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package types import ( "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" "fmt" ) diff --git a/core/types/derive_sha.go b/core/types/derive_sha.go index 478edb0e81..99bcd1b407 100644 --- a/core/types/derive_sha.go +++ b/core/types/derive_sha.go @@ -1,26 +1,26 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package types import ( - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/rlp" - "github.com/ethereum/go-ethereum/trie" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/rlp" + "github.com/expanse-project/go-expanse/trie" ) type DerivableList interface { diff --git a/core/types/receipt.go b/core/types/receipt.go index e01d690052..57e6912e45 100644 --- a/core/types/receipt.go +++ b/core/types/receipt.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package types @@ -22,9 +22,9 @@ import ( "io" "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/rlp" ) type Receipt struct { diff --git a/core/types/transaction.go b/core/types/transaction.go index 28a7e02b31..b9246ad456 100644 --- a/core/types/transaction.go +++ b/core/types/transaction.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package types @@ -24,11 +24,11 @@ import ( "math/big" "sync/atomic" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/rlp" ) var ErrInvalidSig = errors.New("invalid v, r, s values") diff --git a/core/types/transaction_test.go b/core/types/transaction_test.go index 1c0e27d9a4..54a417a82b 100644 --- a/core/types/transaction_test.go +++ b/core/types/transaction_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package types @@ -22,13 +22,13 @@ import ( "math/big" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/rlp" ) // The values in those tests are from the Transaction Tests -// at github.com/ethereum/tests. +// at github.com/expanse-project/tests. var ( emptyTx = NewTransaction( diff --git a/core/vm/analysis.go b/core/vm/analysis.go index a0f6158217..c064d95355 100644 --- a/core/vm/analysis.go +++ b/core/vm/analysis.go @@ -1,25 +1,25 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm import ( "math/big" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) var bigMaxUint64 = new(big.Int).SetUint64(^uint64(0)) diff --git a/core/vm/asm.go b/core/vm/asm.go index 639201e50b..a4dddf52d8 100644 --- a/core/vm/asm.go +++ b/core/vm/asm.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm @@ -20,7 +20,7 @@ import ( "fmt" "math/big" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) func Disassemble(script []byte) (asm []string) { diff --git a/core/vm/common.go b/core/vm/common.go index 2e03ec80bb..718fd9a9f7 100644 --- a/core/vm/common.go +++ b/core/vm/common.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm @@ -20,8 +20,8 @@ import ( "math" "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/logger/glog" ) // Global Debug flag indicating Debug VM (full logging) diff --git a/core/vm/context.go b/core/vm/context.go index 162666ef22..bc8b9f9067 100644 --- a/core/vm/context.go +++ b/core/vm/context.go @@ -1,25 +1,25 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm import ( "math/big" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) type ContextRef interface { diff --git a/core/vm/contracts.go b/core/vm/contracts.go index 2d70f173e9..85b15bd60a 100644 --- a/core/vm/contracts.go +++ b/core/vm/contracts.go @@ -1,29 +1,29 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm import ( "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/params" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/params" ) type Address interface { diff --git a/core/vm/disasm.go b/core/vm/disasm.go index 2bfea5cbda..616a4521b8 100644 --- a/core/vm/disasm.go +++ b/core/vm/disasm.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm diff --git a/core/vm/environment.go b/core/vm/environment.go index 723924b6fc..63626f795d 100644 --- a/core/vm/environment.go +++ b/core/vm/environment.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm @@ -20,8 +20,8 @@ import ( "errors" "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" ) // Environment is is required by the virtual machine to get information from diff --git a/core/vm/errors.go b/core/vm/errors.go index 24567e9a1e..b9a211b821 100644 --- a/core/vm/errors.go +++ b/core/vm/errors.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm @@ -20,7 +20,7 @@ import ( "errors" "fmt" - "github.com/ethereum/go-ethereum/params" + "github.com/expanse-project/go-expanse/params" ) var OutOfGasError = errors.New("Out of gas") diff --git a/core/vm/gas.go b/core/vm/gas.go index af2e586a71..7845acb50b 100644 --- a/core/vm/gas.go +++ b/core/vm/gas.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm @@ -20,7 +20,7 @@ import ( "fmt" "math/big" - "github.com/ethereum/go-ethereum/params" + "github.com/expanse-project/go-expanse/params" ) var ( diff --git a/core/vm/logger.go b/core/vm/logger.go index 736f595f6b..6d4cb26833 100644 --- a/core/vm/logger.go +++ b/core/vm/logger.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm @@ -21,7 +21,7 @@ import ( "os" "unicode" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) func StdErrFormat(logs []StructLog) { diff --git a/core/vm/memory.go b/core/vm/memory.go index 0109050d7c..7ebd244a19 100644 --- a/core/vm/memory.go +++ b/core/vm/memory.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm diff --git a/core/vm/opcodes.go b/core/vm/opcodes.go index ecced3650b..f7abce5f79 100644 --- a/core/vm/opcodes.go +++ b/core/vm/opcodes.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm diff --git a/core/vm/stack.go b/core/vm/stack.go index 3d669b2f20..20267d5318 100644 --- a/core/vm/stack.go +++ b/core/vm/stack.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm diff --git a/core/vm/virtual_machine.go b/core/vm/virtual_machine.go index 047723744e..4b87e1f731 100644 --- a/core/vm/virtual_machine.go +++ b/core/vm/virtual_machine.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm diff --git a/core/vm/vm.go b/core/vm/vm.go index 21e0a46656..833f7065c5 100644 --- a/core/vm/vm.go +++ b/core/vm/vm.go @@ -1,30 +1,30 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -// Package vm implements the Ethereum Virtual Machine. +// Package vm implements the Expanse Virtual Machine. package vm import ( "fmt" "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/params" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/params" ) // Vm implements VirtualMachine diff --git a/core/vm/vm_jit.go b/core/vm/vm_jit.go index 339cb8ea8a..103faa8c0b 100644 --- a/core/vm/vm_jit.go +++ b/core/vm/vm_jit.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // +build evmjit @@ -25,7 +25,7 @@ int evmjit_run(void* _jit, void* _data, void* _env); void evmjit_destroy(void* _jit); // Shared library evmjit (e.g. libevmjit.so) is expected to be installed in /usr/local/lib -// More: https://github.com/ethereum/evmjit +// More: https://github.com/expanse-project/evmjit #cgo LDFLAGS: -levmjit */ import "C" @@ -37,9 +37,9 @@ import ( "math/big" "unsafe" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/params" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/params" ) type JitVm struct { diff --git a/core/vm/vm_jit_fake.go b/core/vm/vm_jit_fake.go index 456fcb8d4b..ebb382238f 100644 --- a/core/vm/vm_jit_fake.go +++ b/core/vm/vm_jit_fake.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // +build !evmjit diff --git a/core/vm_env.go b/core/vm_env.go index c1a86d63e2..b4f6666512 100644 --- a/core/vm_env.go +++ b/core/vm_env.go @@ -1,28 +1,28 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package core import ( "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/core/vm" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/core/vm" ) type VMEnv struct { diff --git a/crypto/crypto.go b/crypto/crypto.go index a474d6f13f..04102e0487 100644 --- a/crypto/crypto.go +++ b/crypto/crypto.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package crypto @@ -34,11 +34,11 @@ import ( "errors" "code.google.com/p/go-uuid/uuid" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto/ecies" - "github.com/ethereum/go-ethereum/crypto/secp256k1" - "github.com/ethereum/go-ethereum/crypto/sha3" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto/ecies" + "github.com/expanse-project/go-expanse/crypto/secp256k1" + "github.com/expanse-project/go-expanse/crypto/sha3" + "github.com/expanse-project/go-expanse/rlp" "golang.org/x/crypto/pbkdf2" "golang.org/x/crypto/ripemd160" ) @@ -68,7 +68,7 @@ func Sha3Hash(data ...[]byte) (h common.Hash) { return h } -// Creates an ethereum address given the bytes and the nonce +// Creates an expanse address given the bytes and the nonce func CreateAddress(b common.Address, nonce uint64) common.Address { data, _ := rlp.EncodeToBytes([]interface{}{b, nonce}) return common.BytesToAddress(Sha3(data)[12:]) @@ -250,7 +250,7 @@ func decryptPreSaleKey(fileContent []byte, password string) (key *Key, err error iv := encSeedBytes[:16] cipherText := encSeedBytes[16:] /* - See https://github.com/ethereum/pyethsaletool + See https://github.com/expanse-project/pyethsaletool pyethsaletool generates the encryption key from password by 2000 rounds of PBKDF2 with HMAC-SHA-256 using password as salt (:(). diff --git a/crypto/crypto_test.go b/crypto/crypto_test.go index b891f41a9a..c73c88bb9d 100644 --- a/crypto/crypto_test.go +++ b/crypto/crypto_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package crypto @@ -23,8 +23,8 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto/secp256k1" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto/secp256k1" ) // These tests are sanity checks. diff --git a/crypto/encrypt_decrypt_test.go b/crypto/encrypt_decrypt_test.go index fcf40b70fd..d1366cc48f 100644 --- a/crypto/encrypt_decrypt_test.go +++ b/crypto/encrypt_decrypt_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package crypto @@ -21,7 +21,7 @@ import ( "fmt" "testing" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) func TestBox(t *testing.T) { diff --git a/crypto/key.go b/crypto/key.go index d80b997598..024266f6ea 100644 --- a/crypto/key.go +++ b/crypto/key.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package crypto @@ -24,7 +24,7 @@ import ( "io" "code.google.com/p/go-uuid/uuid" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) const ( diff --git a/crypto/key_store_passphrase.go b/crypto/key_store_passphrase.go index f21af8dd9f..d1edac838f 100644 --- a/crypto/key_store_passphrase.go +++ b/crypto/key_store_passphrase.go @@ -1,25 +1,25 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . /* This key store behaves as KeyStorePlain with the difference that the private key is encrypted and on disk uses another JSON encoding. -The crypto is documented at https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition +The crypto is documented at https://github.com/expanse-project/wiki/wiki/Web3-Secret-Storage-Definition */ @@ -37,8 +37,8 @@ import ( "reflect" "code.google.com/p/go-uuid/uuid" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto/randentropy" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto/randentropy" "golang.org/x/crypto/pbkdf2" "golang.org/x/crypto/scrypt" ) diff --git a/crypto/key_store_plain.go b/crypto/key_store_plain.go index c1c23f8b8b..31cc283baa 100644 --- a/crypto/key_store_plain.go +++ b/crypto/key_store_plain.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package crypto @@ -26,7 +26,7 @@ import ( "path/filepath" "time" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) type KeyStore interface { diff --git a/crypto/key_store_test.go b/crypto/key_store_test.go index fda87ddc87..55d843f7d1 100644 --- a/crypto/key_store_test.go +++ b/crypto/key_store_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package crypto @@ -22,8 +22,8 @@ import ( "reflect" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto/randentropy" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto/randentropy" ) func TestKeyStorePlain(t *testing.T) { @@ -117,7 +117,7 @@ func TestImportPreSaleKey(t *testing.T) { } } -// Test and utils for the key store tests in the Ethereum JSON tests; +// Test and utils for the key store tests in the Expanse JSON tests; // tests/KeyStoreTests/basic_tests.json type KeyStoreTestV3 struct { Json encryptedKeyJSONV3 diff --git a/crypto/keypair.go b/crypto/keypair.go index e070f292fc..913369c7ec 100644 --- a/crypto/keypair.go +++ b/crypto/keypair.go @@ -1,26 +1,26 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package crypto import ( "strings" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto/secp256k1" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto/secp256k1" ) type KeyPair struct { diff --git a/crypto/mnemonic.go b/crypto/mnemonic.go index 34698926cb..a1c08dd48c 100644 --- a/crypto/mnemonic.go +++ b/crypto/mnemonic.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package crypto diff --git a/crypto/mnemonic_test.go b/crypto/mnemonic_test.go index 07b364a01e..9a9036f527 100644 --- a/crypto/mnemonic_test.go +++ b/crypto/mnemonic_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package crypto diff --git a/crypto/mnemonic_words.go b/crypto/mnemonic_words.go index 6b8412e897..3b412cc35a 100644 --- a/crypto/mnemonic_words.go +++ b/crypto/mnemonic_words.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package crypto diff --git a/crypto/randentropy/rand_entropy.go b/crypto/randentropy/rand_entropy.go index 0c2e3c051d..1282974fb4 100644 --- a/crypto/randentropy/rand_entropy.go +++ b/crypto/randentropy/rand_entropy.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package randentropy @@ -20,7 +20,7 @@ import ( crand "crypto/rand" "io" - "github.com/ethereum/go-ethereum/crypto/sha3" + "github.com/expanse-project/go-expanse/crypto/sha3" ) var Reader io.Reader = &randEntropy{} diff --git a/crypto/secp256k1/notes.go b/crypto/secp256k1/notes.go index 93e6d1902f..2834cc3562 100644 --- a/crypto/secp256k1/notes.go +++ b/crypto/secp256k1/notes.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package secp256k1 diff --git a/crypto/secp256k1/secp256.go b/crypto/secp256k1/secp256.go index 7baa456bff..b7aa97b5ec 100644 --- a/crypto/secp256k1/secp256.go +++ b/crypto/secp256k1/secp256.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package secp256k1 @@ -42,7 +42,7 @@ import ( "errors" "unsafe" - "github.com/ethereum/go-ethereum/crypto/randentropy" + "github.com/expanse-project/go-expanse/crypto/randentropy" ) //#define USE_FIELD_5X64 diff --git a/crypto/secp256k1/secp256_test.go b/crypto/secp256k1/secp256_test.go index deeec98d50..48c5a4bc0d 100644 --- a/crypto/secp256k1/secp256_test.go +++ b/crypto/secp256k1/secp256_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package secp256k1 @@ -22,7 +22,7 @@ import ( "log" "testing" - "github.com/ethereum/go-ethereum/crypto/randentropy" + "github.com/expanse-project/go-expanse/crypto/randentropy" ) const TESTS = 10000 // how many tests diff --git a/docker/Dockerfile b/docker/Dockerfile index b608e4ab6d..b31368c291 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -11,12 +11,12 @@ RUN apt-get dist-upgrade -q -y # Let our containers upgrade themselves RUN apt-get install -q -y unattended-upgrades -# Install Ethereum +# Install Expanse RUN apt-get install -q -y software-properties-common -RUN add-apt-repository ppa:ethereum/ethereum -RUN add-apt-repository ppa:ethereum/ethereum-dev +RUN add-apt-repository ppa:expanse/expanse +RUN add-apt-repository ppa:expanse/expanse-dev RUN apt-get update -RUN apt-get install -q -y geth +RUN apt-get install -q -y gexp # Install supervisor RUN apt-get install -q -y supervisor @@ -24,8 +24,8 @@ RUN apt-get install -q -y supervisor # Add supervisor configs ADD supervisord.conf supervisord.conf -EXPOSE 8545 -EXPOSE 30303 +EXPOSE 9656 +EXPOSE 60606 CMD ["-n", "-c", "/supervisord.conf"] ENTRYPOINT ["/usr/bin/supervisord"] diff --git a/docker/supervisord.conf b/docker/supervisord.conf index 33cba0c140..d5d1da6fd4 100644 --- a/docker/supervisord.conf +++ b/docker/supervisord.conf @@ -1,17 +1,17 @@ [supervisord] nodaemon=false -[program:geth] +[program:gexp] priority=30 directory=/ -command=geth --rpc +command=gexp --rpc user=root autostart=true autorestart=true startsecs=10 stopsignal=QUIT -stdout_logfile=/var/log/geth.log -stderr_logfile=/var/log/geth.err +stdout_logfile=/var/log/gexp.log +stderr_logfile=/var/log/gexp.err [unix_http_server] file=%(here)s/supervisor.sock diff --git a/errs/errors.go b/errs/errors.go index 675649efa2..f77aa96cb0 100644 --- a/errs/errors.go +++ b/errs/errors.go @@ -1,26 +1,26 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package errs import ( "fmt" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" ) /* diff --git a/errs/errors_test.go b/errs/errors_test.go index d6d14b45ea..7f22ea15c4 100644 --- a/errs/errors_test.go +++ b/errs/errors_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package errs @@ -20,7 +20,7 @@ import ( "fmt" "testing" - "github.com/ethereum/go-ethereum/logger" + "github.com/expanse-project/go-expanse/logger" ) func testErrors() *Errors { diff --git a/eth/backend.go b/eth/backend.go index 4795000e09..5b4eae80ad 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -1,21 +1,21 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -// Package eth implements the Ethereum protocol. -package eth +// Package exp implements the Expanse protocol. +package exp import ( "crypto/ecdsa" @@ -28,25 +28,25 @@ import ( "strings" "time" - "github.com/ethereum/ethash" - "github.com/ethereum/go-ethereum/accounts" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/compiler" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/core/vm" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/eth/downloader" - "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/miner" - "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/p2p/discover" - "github.com/ethereum/go-ethereum/p2p/nat" - "github.com/ethereum/go-ethereum/params" - "github.com/ethereum/go-ethereum/whisper" + "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/common/compiler" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/core/vm" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/exp/downloader" + "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/miner" + "github.com/expanse-project/go-expanse/p2p" + "github.com/expanse-project/go-expanse/p2p/discover" + "github.com/expanse-project/go-expanse/p2p/nat" + "github.com/expanse-project/go-expanse/params" + "github.com/expanse-project/go-expanse/whisper" ) const ( @@ -62,10 +62,10 @@ var ( defaultBootNodes = []*discover.Node{ // ETH/DEV Go Bootnodes - discover.MustParseNode("enode://a979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3331163c@52.16.188.185:30303"), - discover.MustParseNode("enode://de471bccee3d042261d52e9bff31458daecc406142b401d4cd848f677479f73104b9fdeb090af9583d3391b7f10cb2ba9e26865dd5fca4fcdc0fb1e3b723c786@54.94.239.50:30303"), - // ETH/DEV cpp-ethereum (poc-9.ethdev.com) - discover.MustParseNode("enode://487611428e6c99a11a9795a6abe7b529e81315ca6aad66e2a2fc76e3adf263faba0d35466c2f8f68d561dbefa8878d4df5f1f2ddb1fbeab7f42ffb8cd328bd4a@5.1.83.226:30303"), + discover.MustParseNode("enode://a979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3331163c@52.16.188.185:60606"), + discover.MustParseNode("enode://de471bccee3d042261d52e9bff31458daecc406142b401d4cd848f677479f73104b9fdeb090af9583d3391b7f10cb2ba9e26865dd5fca4fcdc0fb1e3b723c786@54.94.239.50:60606"), + // ETH/DEV cpp-expanse (poc-9.ethdev.com) + discover.MustParseNode("enode://487611428e6c99a11a9795a6abe7b529e81315ca6aad66e2a2fc76e3adf263faba0d35466c2f8f68d561dbefa8878d4df5f1f2ddb1fbeab7f42ffb8cd328bd4a@5.1.83.226:60606"), } staticNodes = "static-nodes.json" // Path within to search for the static node list @@ -201,8 +201,8 @@ func (cfg *Config) nodeKey() (*ecdsa.PrivateKey, error) { return key, nil } -type Ethereum struct { - // Channel for shutting down the ethereum +type Expanse struct { + // Channel for shutting down the expanse shutdownChan chan bool // DB interfaces @@ -251,7 +251,7 @@ type Ethereum struct { shhVersionId int } -func New(config *Config) (*Ethereum, error) { +func New(config *Config) (*Expanse, error) { // Bootstrap database logger.New(config.DataDir, config.LogFile, config.Verbosity) if len(config.LogJSON) > 0 { @@ -271,21 +271,21 @@ func New(config *Config) (*Ethereum, error) { return nil, fmt.Errorf("blockchain db err: %v", err) } if db, ok := blockDb.(*ethdb.LDBDatabase); ok { - db.Meter("eth/db/block/") + db.Meter("exp/db/block/") } stateDb, err := newdb(filepath.Join(config.DataDir, "state")) if err != nil { return nil, fmt.Errorf("state db err: %v", err) } if db, ok := stateDb.(*ethdb.LDBDatabase); ok { - db.Meter("eth/db/state/") + db.Meter("exp/db/state/") } extraDb, err := newdb(filepath.Join(config.DataDir, "extra")) if err != nil { return nil, fmt.Errorf("extra db err: %v", err) } if db, ok := extraDb.(*ethdb.LDBDatabase); ok { - db.Meter("eth/db/extra/") + db.Meter("exp/db/extra/") } nodeDb := filepath.Join(config.DataDir, "nodes") glog.V(logger.Info).Infof("Protocol Versions: %v, Network Id: %v", ProtocolVersions, config.NetworkId) @@ -321,13 +321,13 @@ func New(config *Config) (*Ethereum, error) { b, _ := blockDb.Get([]byte("BlockchainVersion")) bcVersion := int(common.NewValue(b).Uint()) if bcVersion != config.BlockChainVersion && bcVersion != 0 { - return nil, fmt.Errorf("Blockchain DB version mismatch (%d / %d). Run geth upgradedb.\n", bcVersion, config.BlockChainVersion) + return nil, fmt.Errorf("Blockchain DB version mismatch (%d / %d). Run gexp upgradedb.\n", bcVersion, config.BlockChainVersion) } saveBlockchainVersion(blockDb, config.BlockChainVersion) } glog.V(logger.Info).Infof("Blockchain DB Version: %d", config.BlockChainVersion) - eth := &Ethereum{ + exp := &Expanse{ shutdownChan: make(chan bool), databasesClosed: make(chan bool), blockDb: blockDb, @@ -354,15 +354,15 @@ func New(config *Config) (*Ethereum, error) { if config.PowTest { glog.V(logger.Info).Infof("ethash used in test mode") - eth.pow, err = ethash.NewForTesting() + exp.pow, err = ethash.NewForTesting() if err != nil { return nil, err } } else { - eth.pow = ethash.New() + exp.pow = ethash.New() } //genesis := core.GenesisBlock(uint64(config.GenesisNonce), stateDb) - eth.chainManager, err = core.NewChainManager(blockDb, stateDb, extraDb, eth.pow, eth.EventMux()) + exp.chainManager, err = core.NewChainManager(blockDb, stateDb, extraDb, exp.pow, exp.EventMux()) if err != nil { if err == core.ErrNoGenesis { return nil, fmt.Errorf(`Genesis block not found. Please supply a genesis block with the "--genesis /path/to/file" argument`) @@ -370,35 +370,35 @@ func New(config *Config) (*Ethereum, error) { return nil, err } - eth.txPool = core.NewTxPool(eth.EventMux(), eth.chainManager.State, eth.chainManager.GasLimit) + exp.txPool = core.NewTxPool(exp.EventMux(), exp.chainManager.State, exp.chainManager.GasLimit) - eth.blockProcessor = core.NewBlockProcessor(stateDb, extraDb, eth.pow, eth.chainManager, eth.EventMux()) - eth.chainManager.SetProcessor(eth.blockProcessor) - eth.protocolManager = NewProtocolManager(config.NetworkId, eth.eventMux, eth.txPool, eth.pow, eth.chainManager) + exp.blockProcessor = core.NewBlockProcessor(stateDb, extraDb, exp.pow, exp.chainManager, exp.EventMux()) + exp.chainManager.SetProcessor(exp.blockProcessor) + exp.protocolManager = NewProtocolManager(config.NetworkId, exp.eventMux, exp.txPool, exp.pow, exp.chainManager) - eth.miner = miner.New(eth, eth.EventMux(), eth.pow) - eth.miner.SetGasPrice(config.GasPrice) + exp.miner = miner.New(exp, exp.EventMux(), exp.pow) + exp.miner.SetGasPrice(config.GasPrice) extra := config.Name if uint64(len(extra)) > params.MaximumExtraDataSize.Uint64() { extra = extra[:params.MaximumExtraDataSize.Uint64()] } - eth.miner.SetExtra([]byte(extra)) + exp.miner.SetExtra([]byte(extra)) if config.Shh { - eth.whisper = whisper.New() - eth.shhVersionId = int(eth.whisper.Version()) + exp.whisper = whisper.New() + exp.shhVersionId = int(exp.whisper.Version()) } netprv, err := config.nodeKey() if err != nil { return nil, err } - protocols := append([]p2p.Protocol{}, eth.protocolManager.SubProtocols...) + protocols := append([]p2p.Protocol{}, exp.protocolManager.SubProtocols...) if config.Shh { - protocols = append(protocols, eth.whisper.Protocol()) + protocols = append(protocols, exp.whisper.Protocol()) } - eth.net = &p2p.Server{ + exp.net = &p2p.Server{ PrivateKey: netprv, Name: config.Name, MaxPeers: config.MaxPeers, @@ -413,12 +413,12 @@ func New(config *Config) (*Ethereum, error) { NodeDatabase: nodeDb, } if len(config.Port) > 0 { - eth.net.ListenAddr = ":" + config.Port + exp.net.ListenAddr = ":" + config.Port } vm.Debug = config.VmDebug - return eth, nil + return exp, nil } type NodeInfo struct { @@ -432,7 +432,7 @@ type NodeInfo struct { ListenAddr string } -func (s *Ethereum) NodeInfo() *NodeInfo { +func (s *Expanse) NodeInfo() *NodeInfo { node := s.net.Self() return &NodeInfo{ @@ -470,7 +470,7 @@ func newPeerInfo(peer *p2p.Peer) *PeerInfo { } // PeersInfo returns an array of PeerInfo objects describing connected peers -func (s *Ethereum) PeersInfo() (peersinfo []*PeerInfo) { +func (s *Expanse) PeersInfo() (peersinfo []*PeerInfo) { for _, peer := range s.net.Peers() { if peer != nil { peersinfo = append(peersinfo, newPeerInfo(peer)) @@ -479,11 +479,11 @@ func (s *Ethereum) PeersInfo() (peersinfo []*PeerInfo) { return } -func (s *Ethereum) ResetWithGenesisBlock(gb *types.Block) { +func (s *Expanse) ResetWithGenesisBlock(gb *types.Block) { s.chainManager.ResetWithGenesisBlock(gb) } -func (s *Ethereum) StartMining(threads int) error { +func (s *Expanse) StartMining(threads int) error { eb, err := s.Etherbase() if err != nil { err = fmt.Errorf("Cannot start mining without etherbase address: %v", err) @@ -495,7 +495,7 @@ func (s *Ethereum) StartMining(threads int) error { return nil } -func (s *Ethereum) Etherbase() (eb common.Address, err error) { +func (s *Expanse) Etherbase() (eb common.Address, err error) { eb = s.etherbase if (eb == common.Address{}) { addr, e := s.AccountManager().AddressByIndex(0) @@ -508,38 +508,38 @@ func (s *Ethereum) Etherbase() (eb common.Address, err error) { } // set in js console via admin interface or wrapper from cli flags -func (self *Ethereum) SetEtherbase(etherbase common.Address) { +func (self *Expanse) SetEtherbase(etherbase common.Address) { self.etherbase = etherbase self.miner.SetEtherbase(etherbase) } -func (s *Ethereum) StopMining() { s.miner.Stop() } -func (s *Ethereum) IsMining() bool { return s.miner.Mining() } -func (s *Ethereum) Miner() *miner.Miner { return s.miner } +func (s *Expanse) StopMining() { s.miner.Stop() } +func (s *Expanse) IsMining() bool { return s.miner.Mining() } +func (s *Expanse) Miner() *miner.Miner { return s.miner } -// func (s *Ethereum) Logger() logger.LogSystem { return s.logger } -func (s *Ethereum) Name() string { return s.net.Name } -func (s *Ethereum) AccountManager() *accounts.Manager { return s.accountManager } -func (s *Ethereum) ChainManager() *core.ChainManager { return s.chainManager } -func (s *Ethereum) BlockProcessor() *core.BlockProcessor { return s.blockProcessor } -func (s *Ethereum) TxPool() *core.TxPool { return s.txPool } -func (s *Ethereum) Whisper() *whisper.Whisper { return s.whisper } -func (s *Ethereum) EventMux() *event.TypeMux { return s.eventMux } -func (s *Ethereum) BlockDb() common.Database { return s.blockDb } -func (s *Ethereum) StateDb() common.Database { return s.stateDb } -func (s *Ethereum) ExtraDb() common.Database { return s.extraDb } -func (s *Ethereum) IsListening() bool { return true } // Always listening -func (s *Ethereum) PeerCount() int { return s.net.PeerCount() } -func (s *Ethereum) Peers() []*p2p.Peer { return s.net.Peers() } -func (s *Ethereum) MaxPeers() int { return s.net.MaxPeers } -func (s *Ethereum) ClientVersion() string { return s.clientVersion } -func (s *Ethereum) EthVersion() int { return int(s.protocolManager.SubProtocols[0].Version) } -func (s *Ethereum) NetVersion() int { return s.netVersionId } -func (s *Ethereum) ShhVersion() int { return s.shhVersionId } -func (s *Ethereum) Downloader() *downloader.Downloader { return s.protocolManager.downloader } +// func (s *Expanse) Logger() logger.LogSystem { return s.logger } +func (s *Expanse) Name() string { return s.net.Name } +func (s *Expanse) AccountManager() *accounts.Manager { return s.accountManager } +func (s *Expanse) ChainManager() *core.ChainManager { return s.chainManager } +func (s *Expanse) BlockProcessor() *core.BlockProcessor { return s.blockProcessor } +func (s *Expanse) TxPool() *core.TxPool { return s.txPool } +func (s *Expanse) Whisper() *whisper.Whisper { return s.whisper } +func (s *Expanse) EventMux() *event.TypeMux { return s.eventMux } +func (s *Expanse) BlockDb() common.Database { return s.blockDb } +func (s *Expanse) StateDb() common.Database { return s.stateDb } +func (s *Expanse) ExtraDb() common.Database { return s.extraDb } +func (s *Expanse) IsListening() bool { return true } // Always listening +func (s *Expanse) PeerCount() int { return s.net.PeerCount() } +func (s *Expanse) Peers() []*p2p.Peer { return s.net.Peers() } +func (s *Expanse) MaxPeers() int { return s.net.MaxPeers } +func (s *Expanse) ClientVersion() string { return s.clientVersion } +func (s *Expanse) EthVersion() int { return int(s.protocolManager.SubProtocols[0].Version) } +func (s *Expanse) NetVersion() int { return s.netVersionId } +func (s *Expanse) ShhVersion() int { return s.shhVersionId } +func (s *Expanse) Downloader() *downloader.Downloader { return s.protocolManager.downloader } -// Start the ethereum -func (s *Ethereum) Start() error { +// Start the expanse +func (s *Expanse) Start() error { jsonlogger.LogJson(&logger.LogStarting{ ClientString: s.net.Name, ProtocolVersion: s.EthVersion(), @@ -567,7 +567,7 @@ func (s *Ethereum) Start() error { // sync databases every minute. If flushing fails we exit immediatly. The system // may not continue under any circumstances. -func (s *Ethereum) syncDatabases() { +func (s *Expanse) syncDatabases() { ticker := time.NewTicker(1 * time.Minute) done: for { @@ -595,7 +595,7 @@ done: close(s.databasesClosed) } -func (s *Ethereum) StartForTest() { +func (s *Expanse) StartForTest() { jsonlogger.LogJson(&logger.LogStarting{ ClientString: s.net.Name, ProtocolVersion: s.EthVersion(), @@ -605,7 +605,7 @@ func (s *Ethereum) StartForTest() { // AddPeer connects to the given node and maintains the connection until the // server is shut down. If the connection fails for any reason, the server will // attempt to reconnect the peer. -func (self *Ethereum) AddPeer(nodeURL string) error { +func (self *Expanse) AddPeer(nodeURL string) error { n, err := discover.ParseNode(nodeURL) if err != nil { return fmt.Errorf("invalid node URL: %v", err) @@ -614,7 +614,7 @@ func (self *Ethereum) AddPeer(nodeURL string) error { return nil } -func (s *Ethereum) Stop() { +func (s *Expanse) Stop() { s.net.Stop() s.chainManager.Stop() s.protocolManager.Stop() @@ -629,7 +629,7 @@ func (s *Ethereum) Stop() { } // This function will wait for a shutdown and resumes main thread execution -func (s *Ethereum) WaitForShutdown() { +func (s *Expanse) WaitForShutdown() { <-s.databasesClosed <-s.shutdownChan } @@ -643,7 +643,7 @@ func (s *Ethereum) WaitForShutdown() { // stop any number of times. // For any more sophisticated pattern of DAG generation, use CLI subcommand // makedag -func (self *Ethereum) StartAutoDAG() { +func (self *Expanse) StartAutoDAG() { if self.autodagquit != nil { return // already started } @@ -697,7 +697,7 @@ func dagFiles(epoch uint64) (string, string) { } // stopAutoDAG stops automatic DAG pregeneration by quitting the loop -func (self *Ethereum) StopAutoDAG() { +func (self *Expanse) StopAutoDAG() { if self.autodagquit != nil { close(self.autodagquit) self.autodagquit = nil @@ -729,7 +729,7 @@ func saveBlockchainVersion(db common.Database, bcVersion int) { } } -func (self *Ethereum) Solc() (*compiler.Solidity, error) { +func (self *Expanse) Solc() (*compiler.Solidity, error) { var err error if self.solc == nil { self.solc, err = compiler.New(self.SolcPath) @@ -738,7 +738,7 @@ func (self *Ethereum) Solc() (*compiler.Solidity, error) { } // set in js console via admin interface or wrapper from cli flags -func (self *Ethereum) SetSolc(solcPath string) (*compiler.Solidity, error) { +func (self *Expanse) SetSolc(solcPath string) (*compiler.Solidity, error) { self.SolcPath = solcPath self.solc = nil return self.Solc() diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index e3e22a7848..bca84cc182 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Package downloader contains the manual full chain synchronisation. package downloader @@ -27,12 +27,12 @@ import ( "sync/atomic" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/event" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" "gopkg.in/fatih/set.v0" ) @@ -319,10 +319,10 @@ func (d *Downloader) syncWithPeer(p *peer, hash common.Hash, td *big.Int) (err e } }() - glog.V(logger.Debug).Infof("Synchronizing with the network using: %s, eth/%d", p.id, p.version) + glog.V(logger.Debug).Infof("Synchronizing with the network using: %s, exp/%d", p.id, p.version) switch p.version { case eth60: - // Old eth/60 version, use reverse hash retrieval algorithm + // Old exp/60 version, use reverse hash retrieval algorithm if err = d.fetchHashes60(p, hash); err != nil { return err } @@ -330,7 +330,7 @@ func (d *Downloader) syncWithPeer(p *peer, hash common.Hash, td *big.Int) (err e return err } case eth61: - // New eth/61, use forward, concurrent hash and block retrieval algorithm + // New exp/61, use forward, concurrent hash and block retrieval algorithm number, err := d.findAncestor(p) if err != nil { return err @@ -349,7 +349,7 @@ func (d *Downloader) syncWithPeer(p *peer, hash common.Hash, td *big.Int) (err e default: // Something very wrong, stop right here - glog.V(logger.Error).Infof("Unsupported eth protocol: %d", p.version) + glog.V(logger.Error).Infof("Unsupported exp protocol: %d", p.version) return errBadPeer } glog.V(logger.Debug).Infoln("Synchronization completed") diff --git a/eth/downloader/downloader_test.go b/eth/downloader/downloader_test.go index 61fc7827b6..5b4cb7d994 100644 --- a/eth/downloader/downloader_test.go +++ b/eth/downloader/downloader_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package downloader @@ -25,11 +25,11 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/event" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/event" ) var ( @@ -215,7 +215,7 @@ func (dl *downloadTester) peerGetRelHashesFn(id string, delay time.Duration) fun // a particular peer in the download tester. The returned function can be used to // retrieve batches of hashes from the particularly requested peer. func (dl *downloadTester) peerGetAbsHashesFn(id string, version int, delay time.Duration) func(uint64, int) error { - // If the simulated peer runs eth/60, this message is not supported + // If the simulated peer runs exp/60, this message is not supported if version == eth60 { return func(uint64, int) error { return nil } } diff --git a/eth/downloader/events.go b/eth/downloader/events.go index 64905b8f2a..8bd052ec91 100644 --- a/eth/downloader/events.go +++ b/eth/downloader/events.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package downloader diff --git a/eth/downloader/peer.go b/eth/downloader/peer.go index 4273b91682..0d23233efe 100644 --- a/eth/downloader/peer.go +++ b/eth/downloader/peer.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Contains the active peer-set of the downloader, maintaining both failures // as well as reputation metrics to prioritize the block retrievals. @@ -27,7 +27,7 @@ import ( "sync/atomic" "time" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" "gopkg.in/fatih/set.v0" ) @@ -58,7 +58,7 @@ type peer struct { getAbsHashes absoluteHashFetcherFn // Method to retrieve a batch of hashes from an absolute position getBlocks blockFetcherFn // Method to retrieve a batch of blocks - version int // Eth protocol version number to switch strategies + version int // Exp protocol version number to switch strategies } // newPeer create a new downloader peer, with specific hash and block retrieval diff --git a/eth/downloader/queue.go b/eth/downloader/queue.go index 96e08e1440..e35df3eb31 100644 --- a/eth/downloader/queue.go +++ b/eth/downloader/queue.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Contains the block download scheduler to collect download tasks and schedule // them in an ordered, and throttled way. @@ -25,10 +25,10 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" "gopkg.in/karalabe/cookiejar.v2/collections/prque" ) diff --git a/eth/fetcher/fetcher.go b/eth/fetcher/fetcher.go index 55b6c5c1c5..77fdd4c9f6 100644 --- a/eth/fetcher/fetcher.go +++ b/eth/fetcher/fetcher.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Package fetcher contains the block announcement based synchonisation. package fetcher @@ -23,11 +23,11 @@ import ( "math/rand" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" "gopkg.in/karalabe/cookiejar.v2/collections/prque" ) diff --git a/eth/fetcher/fetcher_test.go b/eth/fetcher/fetcher_test.go index ecbb3f868c..b994206180 100644 --- a/eth/fetcher/fetcher_test.go +++ b/eth/fetcher/fetcher_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package fetcher @@ -24,11 +24,11 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/params" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/params" ) var ( diff --git a/eth/fetcher/metrics.go b/eth/fetcher/metrics.go index 76cc492269..7bb8cd5c4b 100644 --- a/eth/fetcher/metrics.go +++ b/eth/fetcher/metrics.go @@ -1,32 +1,32 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Contains the metrics collected by the fetcher. package fetcher import ( - "github.com/ethereum/go-ethereum/metrics" + "github.com/expanse-project/go-expanse/metrics" ) var ( - announceMeter = metrics.NewMeter("eth/sync/RemoteAnnounces") - announceTimer = metrics.NewTimer("eth/sync/LocalAnnounces") - broadcastMeter = metrics.NewMeter("eth/sync/RemoteBroadcasts") - broadcastTimer = metrics.NewTimer("eth/sync/LocalBroadcasts") - discardMeter = metrics.NewMeter("eth/sync/DiscardedBlocks") - futureMeter = metrics.NewMeter("eth/sync/FutureBlocks") + announceMeter = metrics.NewMeter("exp/sync/RemoteAnnounces") + announceTimer = metrics.NewTimer("exp/sync/LocalAnnounces") + broadcastMeter = metrics.NewMeter("exp/sync/RemoteBroadcasts") + broadcastTimer = metrics.NewTimer("exp/sync/LocalBroadcasts") + discardMeter = metrics.NewMeter("exp/sync/DiscardedBlocks") + futureMeter = metrics.NewMeter("exp/sync/FutureBlocks") ) diff --git a/eth/gasprice.go b/eth/gasprice.go index 031098e9a1..7a4662a97d 100644 --- a/eth/gasprice.go +++ b/eth/gasprice.go @@ -1,31 +1,31 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -package eth +package exp import ( "math/big" "math/rand" "sync" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/event" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" ) const gpoProcessPastBlocks = 100 @@ -35,7 +35,7 @@ type blockPriceInfo struct { } type GasPriceOracle struct { - eth *Ethereum + exp *Expanse chain *core.ChainManager pool *core.TxPool events event.Subscription @@ -45,13 +45,13 @@ type GasPriceOracle struct { lastBase *big.Int } -func NewGasPriceOracle(eth *Ethereum) (self *GasPriceOracle) { +func NewGasPriceOracle(exp *Expanse) (self *GasPriceOracle) { self = &GasPriceOracle{} self.blocks = make(map[uint64]*blockPriceInfo) - self.eth = eth - self.chain = eth.chainManager - self.pool = eth.txPool - self.events = eth.EventMux().Subscribe( + self.exp = exp + self.chain = exp.chainManager + self.pool = exp.txPool + self.events = exp.EventMux().Subscribe( core.ChainEvent{}, core.ChainSplitEvent{}, core.TxPreEvent{}, @@ -106,7 +106,7 @@ func (self *GasPriceOracle) processBlock(block *types.Block) { self.lastProcessed = i } - lastBase := self.eth.GpoMinGasPrice + lastBase := self.exp.GpoMinGasPrice bpl := self.blocks[i-1] if bpl != nil { lastBase = bpl.baseGasPrice @@ -122,9 +122,9 @@ func (self *GasPriceOracle) processBlock(block *types.Block) { } if lastBase.Cmp(lp) < 0 { - corr = self.eth.GpobaseStepUp + corr = self.exp.GpobaseStepUp } else { - corr = -self.eth.GpobaseStepDown + corr = -self.exp.GpobaseStepDown } crand := int64(corr * (900 + rand.Intn(201))) @@ -148,7 +148,7 @@ func (self *GasPriceOracle) processBlock(block *types.Block) { func (self *GasPriceOracle) lowestPrice(block *types.Block) *big.Int { gasUsed := new(big.Int) - receipts := self.eth.BlockProcessor().GetBlockReceipts(block.Hash()) + receipts := self.exp.BlockProcessor().GetBlockReceipts(block.Hash()) if len(receipts) > 0 { if cgu := receipts[len(receipts)-1].CumulativeGasUsed; cgu != nil { gasUsed = receipts[len(receipts)-1].CumulativeGasUsed @@ -156,14 +156,14 @@ func (self *GasPriceOracle) lowestPrice(block *types.Block) *big.Int { } if new(big.Int).Mul(gasUsed, big.NewInt(100)).Cmp(new(big.Int).Mul(block.GasLimit(), - big.NewInt(int64(self.eth.GpoFullBlockRatio)))) < 0 { + big.NewInt(int64(self.exp.GpoFullBlockRatio)))) < 0 { // block is not full, could have posted a tx with MinGasPrice - return self.eth.GpoMinGasPrice + return self.exp.GpoMinGasPrice } txs := block.Transactions() if len(txs) == 0 { - return self.eth.GpoMinGasPrice + return self.exp.GpoMinGasPrice } // block is full, find smallest gasPrice minPrice := txs[0].GasPrice() @@ -182,21 +182,21 @@ func (self *GasPriceOracle) SuggestPrice() *big.Int { self.lastBaseMutex.Unlock() if base == nil { - base = self.eth.GpoMinGasPrice + base = self.exp.GpoMinGasPrice } if base == nil { return big.NewInt(10000000000000) // apparently MinGasPrice is not initialized during some tests } - baseCorr := new(big.Int).Mul(base, big.NewInt(int64(self.eth.GpobaseCorrectionFactor))) + baseCorr := new(big.Int).Mul(base, big.NewInt(int64(self.exp.GpobaseCorrectionFactor))) baseCorr.Div(baseCorr, big.NewInt(100)) - if baseCorr.Cmp(self.eth.GpoMinGasPrice) < 0 { - return self.eth.GpoMinGasPrice + if baseCorr.Cmp(self.exp.GpoMinGasPrice) < 0 { + return self.exp.GpoMinGasPrice } - if baseCorr.Cmp(self.eth.GpoMaxGasPrice) > 0 { - return self.eth.GpoMaxGasPrice + if baseCorr.Cmp(self.exp.GpoMaxGasPrice) > 0 { + return self.exp.GpoMaxGasPrice } return baseCorr diff --git a/eth/handler.go b/eth/handler.go index 2bd3699013..d2174db1e0 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -1,20 +1,20 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -package eth +package exp import ( "fmt" @@ -23,17 +23,17 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/eth/downloader" - "github.com/ethereum/go-ethereum/eth/fetcher" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/pow" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/exp/downloader" + "github.com/expanse-project/go-expanse/exp/fetcher" + "github.com/expanse-project/go-expanse/event" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/p2p" + "github.com/expanse-project/go-expanse/pow" + "github.com/expanse-project/go-expanse/rlp" ) // This is the target maximum size of returned blocks for the @@ -83,8 +83,8 @@ type ProtocolManager struct { quit bool } -// NewProtocolManager returns a new ethereum sub protocol manager. The Ethereum sub protocol manages peers capable -// with the ethereum network. +// NewProtocolManager returns a new expanse sub protocol manager. The Expanse sub protocol manages peers capable +// with the expanse network. func NewProtocolManager(networkId int, mux *event.TypeMux, txpool txPool, pow pow.PoW, chainman *core.ChainManager) *ProtocolManager { // Create the protocol manager with the base fields manager := &ProtocolManager{ @@ -103,7 +103,7 @@ func NewProtocolManager(networkId int, mux *event.TypeMux, txpool txPool, pow po version := ProtocolVersions[i] manager.SubProtocols[i] = p2p.Protocol{ - Name: "eth", + Name: "exp", Version: version, Length: ProtocolLengths[i], Run: func(p *p2p.Peer, rw p2p.MsgReadWriter) error { @@ -135,7 +135,7 @@ func (pm *ProtocolManager) removePeer(id string) { } glog.V(logger.Debug).Infoln("Removing peer", id) - // Unregister the peer from the downloader and Ethereum peer set + // Unregister the peer from the downloader and Expanse peer set pm.downloader.UnregisterPeer(id) if err := pm.peers.Unregister(id); err != nil { glog.V(logger.Error).Infoln("Removal failed:", err) @@ -162,7 +162,7 @@ func (pm *ProtocolManager) Start() { func (pm *ProtocolManager) Stop() { // Showing a log message. During download / process this could actually // take between 5 to 10 seconds and therefor feedback is required. - glog.V(logger.Info).Infoln("Stopping ethereum protocol handler...") + glog.V(logger.Info).Infoln("Stopping expanse protocol handler...") pm.quit = true pm.txSub.Unsubscribe() // quits txBroadcastLoop @@ -172,19 +172,19 @@ func (pm *ProtocolManager) Stop() { // Wait for any process action pm.wg.Wait() - glog.V(logger.Info).Infoln("Ethereum protocol handler stopped") + glog.V(logger.Info).Infoln("Expanse protocol handler stopped") } func (pm *ProtocolManager) newPeer(pv, nv int, p *p2p.Peer, rw p2p.MsgReadWriter) *peer { return newPeer(pv, nv, p, rw) } -// handle is the callback invoked to manage the life cycle of an eth peer. When +// handle is the callback invoked to manage the life cycle of an exp peer. When // this function terminates, the peer is disconnected. func (pm *ProtocolManager) handle(p *peer) error { glog.V(logger.Debug).Infof("%v: peer connected [%s]", p, p.Name()) - // Execute the Ethereum handshake + // Execute the Expanse handshake td, head, genesis := pm.chainman.Status() if err := p.Handshake(td, head, genesis); err != nil { glog.V(logger.Debug).Infof("%v: handshake failed: %v", p, err) diff --git a/eth/metrics.go b/eth/metrics.go index 625b90b671..2bce1e89da 100644 --- a/eth/metrics.go +++ b/eth/metrics.go @@ -1,44 +1,44 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -package eth +package exp import ( - "github.com/ethereum/go-ethereum/metrics" + "github.com/expanse-project/go-expanse/metrics" ) var ( - propTxnInPacketsMeter = metrics.NewMeter("eth/prop/txns/in/packets") - propTxnInTrafficMeter = metrics.NewMeter("eth/prop/txns/in/traffic") - propTxnOutPacketsMeter = metrics.NewMeter("eth/prop/txns/out/packets") - propTxnOutTrafficMeter = metrics.NewMeter("eth/prop/txns/out/traffic") - propHashInPacketsMeter = metrics.NewMeter("eth/prop/hashes/in/packets") - propHashInTrafficMeter = metrics.NewMeter("eth/prop/hashes/in/traffic") - propHashOutPacketsMeter = metrics.NewMeter("eth/prop/hashes/out/packets") - propHashOutTrafficMeter = metrics.NewMeter("eth/prop/hashes/out/traffic") - propBlockInPacketsMeter = metrics.NewMeter("eth/prop/blocks/in/packets") - propBlockInTrafficMeter = metrics.NewMeter("eth/prop/blocks/in/traffic") - propBlockOutPacketsMeter = metrics.NewMeter("eth/prop/blocks/out/packets") - propBlockOutTrafficMeter = metrics.NewMeter("eth/prop/blocks/out/traffic") - reqHashInPacketsMeter = metrics.NewMeter("eth/req/hashes/in/packets") - reqHashInTrafficMeter = metrics.NewMeter("eth/req/hashes/in/traffic") - reqHashOutPacketsMeter = metrics.NewMeter("eth/req/hashes/out/packets") - reqHashOutTrafficMeter = metrics.NewMeter("eth/req/hashes/out/traffic") - reqBlockInPacketsMeter = metrics.NewMeter("eth/req/blocks/in/packets") - reqBlockInTrafficMeter = metrics.NewMeter("eth/req/blocks/in/traffic") - reqBlockOutPacketsMeter = metrics.NewMeter("eth/req/blocks/out/packets") - reqBlockOutTrafficMeter = metrics.NewMeter("eth/req/blocks/out/traffic") + propTxnInPacketsMeter = metrics.NewMeter("exp/prop/txns/in/packets") + propTxnInTrafficMeter = metrics.NewMeter("exp/prop/txns/in/traffic") + propTxnOutPacketsMeter = metrics.NewMeter("exp/prop/txns/out/packets") + propTxnOutTrafficMeter = metrics.NewMeter("exp/prop/txns/out/traffic") + propHashInPacketsMeter = metrics.NewMeter("exp/prop/hashes/in/packets") + propHashInTrafficMeter = metrics.NewMeter("exp/prop/hashes/in/traffic") + propHashOutPacketsMeter = metrics.NewMeter("exp/prop/hashes/out/packets") + propHashOutTrafficMeter = metrics.NewMeter("exp/prop/hashes/out/traffic") + propBlockInPacketsMeter = metrics.NewMeter("exp/prop/blocks/in/packets") + propBlockInTrafficMeter = metrics.NewMeter("exp/prop/blocks/in/traffic") + propBlockOutPacketsMeter = metrics.NewMeter("exp/prop/blocks/out/packets") + propBlockOutTrafficMeter = metrics.NewMeter("exp/prop/blocks/out/traffic") + reqHashInPacketsMeter = metrics.NewMeter("exp/req/hashes/in/packets") + reqHashInTrafficMeter = metrics.NewMeter("exp/req/hashes/in/traffic") + reqHashOutPacketsMeter = metrics.NewMeter("exp/req/hashes/out/packets") + reqHashOutTrafficMeter = metrics.NewMeter("exp/req/hashes/out/traffic") + reqBlockInPacketsMeter = metrics.NewMeter("exp/req/blocks/in/packets") + reqBlockInTrafficMeter = metrics.NewMeter("exp/req/blocks/in/traffic") + reqBlockOutPacketsMeter = metrics.NewMeter("exp/req/blocks/out/packets") + reqBlockOutTrafficMeter = metrics.NewMeter("exp/req/blocks/out/traffic") ) diff --git a/eth/peer.go b/eth/peer.go index ade1f37eaa..0953981a65 100644 --- a/eth/peer.go +++ b/eth/peer.go @@ -1,20 +1,20 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -package eth +package exp import ( "errors" @@ -22,12 +22,12 @@ import ( "math/big" "sync" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/eth/downloader" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/p2p" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/exp/downloader" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/p2p" "gopkg.in/fatih/set.v0" ) @@ -195,7 +195,7 @@ func (p *peer) RequestBlocks(hashes []common.Hash) error { return p2p.Send(p.rw, GetBlocksMsg, hashes) } -// Handshake executes the eth protocol handshake, negotiating version number, +// Handshake executes the exp protocol handshake, negotiating version number, // network IDs, difficulties, head and genesis blocks. func (p *peer) Handshake(td *big.Int, head common.Hash, genesis common.Hash) error { // Send out own handshake in a new thread @@ -242,12 +242,12 @@ func (p *peer) Handshake(td *big.Int, head common.Hash, genesis common.Hash) err // String implements fmt.Stringer. func (p *peer) String() string { return fmt.Sprintf("Peer %s [%s]", p.id, - fmt.Sprintf("eth/%2d", p.version), + fmt.Sprintf("exp/%2d", p.version), ) } // peerSet represents the collection of active peers currently participating in -// the Ethereum sub-protocol. +// the Expanse sub-protocol. type peerSet struct { peers map[string]*peer lock sync.RWMutex diff --git a/eth/protocol.go b/eth/protocol.go index b8c9b50d0e..4fe0d920cc 100644 --- a/eth/protocol.go +++ b/eth/protocol.go @@ -1,29 +1,29 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -package eth +package exp import ( "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/types" ) -// Supported versions of the eth protocol (first is primary). +// Supported versions of the exp protocol (first is primary). var ProtocolVersions = []uint{61, 60} // Number of implemented message corresponding to different protocol versions. @@ -34,7 +34,7 @@ const ( ProtocolMaxMsgSize = 10 * 1024 * 1024 // Maximum cap on the size of a protocol message ) -// eth protocol message codes +// exp protocol message codes const ( StatusMsg = iota NewBlockHashesMsg diff --git a/eth/protocol_test.go b/eth/protocol_test.go index a24d98f696..2567b30491 100644 --- a/eth/protocol_test.go +++ b/eth/protocol_test.go @@ -1,20 +1,20 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -package eth +package exp import ( "crypto/rand" @@ -23,14 +23,14 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/p2p/discover" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/event" + "github.com/expanse-project/go-expanse/p2p" + "github.com/expanse-project/go-expanse/p2p/discover" ) func init() { diff --git a/eth/sync.go b/eth/sync.go index b4dea4b0ff..4221fcc760 100644 --- a/eth/sync.go +++ b/eth/sync.go @@ -1,30 +1,30 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -package eth +package exp import ( "math/rand" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/p2p/discover" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/p2p/discover" ) const ( diff --git a/ethdb/README.md b/ethdb/README.md index 5bed8eedc6..fbc451595b 100644 --- a/ethdb/README.md +++ b/ethdb/README.md @@ -1,10 +1,10 @@ # ethdb -The ethdb package contains the ethereum database interfaces +The ethdb package contains the expanse database interfaces # Installation -`go get github.com/ethereum/ethdb-go` +`go get github.com/expanse-project/ethdb-go` # Usage diff --git a/ethdb/database.go b/ethdb/database.go index ace56c6c74..ab5283d9a7 100644 --- a/ethdb/database.go +++ b/ethdb/database.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package ethdb @@ -23,9 +23,9 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/metrics" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/metrics" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/errors" "github.com/syndtr/goleveldb/leveldb/iterator" diff --git a/ethdb/database_test.go b/ethdb/database_test.go index ae49061660..38b3eb2769 100644 --- a/ethdb/database_test.go +++ b/ethdb/database_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package ethdb @@ -20,7 +20,7 @@ import ( "os" "path/filepath" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) func newDb() *LDBDatabase { diff --git a/ethdb/memory_database.go b/ethdb/memory_database.go index 70b03dfade..a5445c2c51 100644 --- a/ethdb/memory_database.go +++ b/ethdb/memory_database.go @@ -1,25 +1,25 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package ethdb import ( "fmt" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) /* diff --git a/event/event.go b/event/event.go index ce74e52862..cbbb3ad1bb 100644 --- a/event/event.go +++ b/event/event.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Package event implements an event multiplexer. package event diff --git a/event/event_test.go b/event/event_test.go index 465af38cd9..562ee665eb 100644 --- a/event/event_test.go +++ b/event/event_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package event diff --git a/event/example_test.go b/event/example_test.go index d4642ef2f5..e23d0afe2b 100644 --- a/event/example_test.go +++ b/event/example_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package event diff --git a/event/filter/eth_filter.go b/event/filter/eth_filter.go index 6f61e2b608..d1066f1f38 100644 --- a/event/filter/eth_filter.go +++ b/event/filter/eth_filter.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package filter @@ -21,9 +21,9 @@ package filter import ( "sync" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/event" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/event" ) type FilterManager struct { diff --git a/event/filter/filter.go b/event/filter/filter.go index b1fbf30ee4..d985402e2e 100644 --- a/event/filter/filter.go +++ b/event/filter/filter.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Package filter implements event filters. package filter diff --git a/event/filter/filter_test.go b/event/filter/filter_test.go index 0cd26bfc9b..c09255b24b 100644 --- a/event/filter/filter_test.go +++ b/event/filter/filter_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package filter diff --git a/event/filter/generic_filter.go b/event/filter/generic_filter.go index 27f35920d4..497176829b 100644 --- a/event/filter/generic_filter.go +++ b/event/filter/generic_filter.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package filter diff --git a/fdtrack/fdtrack.go b/fdtrack/fdtrack.go index 2f5ab57f44..6a552be6bc 100644 --- a/fdtrack/fdtrack.go +++ b/fdtrack/fdtrack.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Package fdtrack logs statistics about open file descriptors. package fdtrack @@ -24,7 +24,7 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/logger/glog" ) var ( diff --git a/fdtrack/fdusage.go b/fdtrack/fdusage.go index 689625a8f5..0e0df6da7f 100644 --- a/fdtrack/fdusage.go +++ b/fdtrack/fdusage.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // +build !linux,!darwin diff --git a/fdtrack/fdusage_darwin.go b/fdtrack/fdusage_darwin.go index 04a3a9baf7..094a2b6c2c 100644 --- a/fdtrack/fdusage_darwin.go +++ b/fdtrack/fdusage_darwin.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // +build darwin diff --git a/fdtrack/fdusage_linux.go b/fdtrack/fdusage_linux.go index d9a856a0ca..e5e16f3a00 100644 --- a/fdtrack/fdusage_linux.go +++ b/fdtrack/fdusage_linux.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // +build linux diff --git a/generators/defaults.go b/generators/defaults.go index 386c6743d9..18a0d2fad4 100644 --- a/generators/defaults.go +++ b/generators/defaults.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . //go:generate go run defaults.go default.json defs.go @@ -51,7 +51,7 @@ func main() { m := make(map[string]setting) json.Unmarshal(content, &m) - filepath := filepath.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "params", os.Args[2]) + filepath := filepath.Join(os.Getenv("GOPATH"), "src", "github.com", "expanse", "go-expanse", "params", os.Args[2]) output, err := os.OpenFile(filepath, os.O_RDWR|os.O_CREATE, os.ModePerm /*0777*/) if err != nil { fatal("error opening file for writing %v\n", err) diff --git a/jsre/bignumber_js.go b/jsre/bignumber_js.go index 2e9c74c9f2..8e0fd5f92e 100644 --- a/jsre/bignumber_js.go +++ b/jsre/bignumber_js.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package jsre diff --git a/jsre/ethereum_js.go b/jsre/ethereum_js.go index 27dbed24cc..8c932203ca 100644 --- a/jsre/ethereum_js.go +++ b/jsre/ethereum_js.go @@ -1,38 +1,38 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package jsre const Web3_JS = ` require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o. + along with expanse.js. If not, see . */ /** * @file coder.js @@ -310,20 +310,20 @@ module.exports = coder; },{"../utils/utils":7,"./formatters":2,"./param":3,"bignumber.js":"bignumber.js"}],2:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file formatters.js @@ -561,20 +561,20 @@ module.exports = { },{"../utils/config":5,"../utils/utils":7,"./param":3,"bignumber.js":"bignumber.js"}],3:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file param.js @@ -785,20 +785,20 @@ if (typeof XMLHttpRequest === 'undefined') { },{}],5:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** @file config.js * @authors: @@ -865,20 +865,20 @@ module.exports = { },{"bignumber.js":"bignumber.js"}],6:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file sha3.js @@ -893,7 +893,7 @@ module.exports = function (str, isNew) { if (str.substr(0, 2) === '0x' && !isNew) { console.warn('requirement of using web3.fromAscii before sha3 is deprecated'); console.warn('new usage: \'web3.sha3("hello")\''); - console.warn('see https://github.com/ethereum/web3.js/pull/205'); + console.warn('see https://github.com/expanse-project/web3.js/pull/205'); console.warn('if you need to hash hex value, you can do \'sha3("0xfff", true)\''); str = utils.toAscii(str); } @@ -906,20 +906,20 @@ module.exports = function (str, isNew) { },{"./utils":7,"crypto-js/sha3":34}],7:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file utils.js @@ -1378,7 +1378,7 @@ var isJson = function (str) { }; /** - * This method should be called to check if string is valid ethereum IBAN number + * This method should be called to check if string is valid expanse IBAN number * Supports direct and indirect IBANs * * @method isIBAN @@ -1425,20 +1425,20 @@ module.exports={ },{}],9:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** @file web3.js * @authors: @@ -1452,7 +1452,7 @@ module.exports={ var version = require('./version.json'); var net = require('./web3/net'); -var eth = require('./web3/eth'); +var exp = require('./web3/exp'); var db = require('./web3/db'); var shh = require('./web3/shh'); var watches = require('./web3/watches'); @@ -1476,7 +1476,7 @@ var web3Properties = [ inputFormatter: utils.toDecimal }), new Property({ - name: 'version.ethereum', + name: 'version.expanse', getter: 'eth_protocolVersion', inputFormatter: utils.toDecimal }), @@ -1509,11 +1509,11 @@ web3.providers = {}; web3.currentProvider = null; web3.version = {}; web3.version.api = version.version; -web3.eth = {}; +web3.exp = {}; /*jshint maxparams:4 */ -web3.eth.filter = function (fil, callback) { - return new Filter(fil, watches.eth(), formatters.outputLogFormatter, callback); +web3.exp.filter = function (fil, callback) { + return new Filter(fil, watches.exp(), formatters.outputLogFormatter, callback); }; /*jshint maxparams:3 */ @@ -1551,7 +1551,7 @@ web3.createBatch = function () { }; // ADD defaultblock -Object.defineProperty(web3.eth, 'defaultBlock', { +Object.defineProperty(web3.exp, 'defaultBlock', { get: function () { return c.defaultBlock; }, @@ -1561,7 +1561,7 @@ Object.defineProperty(web3.eth, 'defaultBlock', { } }); -Object.defineProperty(web3.eth, 'defaultAccount', { +Object.defineProperty(web3.exp, 'defaultAccount', { get: function () { return c.defaultAccount; }, @@ -1592,30 +1592,30 @@ web3._extend.Property = require('./web3/property'); setupProperties(web3, web3Properties); setupMethods(web3.net, net.methods); setupProperties(web3.net, net.properties); -setupMethods(web3.eth, eth.methods); -setupProperties(web3.eth, eth.properties); +setupMethods(web3.exp, exp.methods); +setupProperties(web3.exp, exp.properties); setupMethods(web3.db, db.methods); setupMethods(web3.shh, shh.methods); module.exports = web3; -},{"./utils/config":5,"./utils/sha3":6,"./utils/utils":7,"./version.json":8,"./web3/batch":11,"./web3/db":13,"./web3/eth":15,"./web3/filter":17,"./web3/formatters":18,"./web3/method":24,"./web3/net":26,"./web3/property":27,"./web3/requestmanager":28,"./web3/shh":29,"./web3/watches":31}],10:[function(require,module,exports){ +},{"./utils/config":5,"./utils/sha3":6,"./utils/utils":7,"./version.json":8,"./web3/batch":11,"./web3/db":13,"./web3/exp":15,"./web3/filter":17,"./web3/formatters":18,"./web3/method":24,"./web3/net":26,"./web3/property":27,"./web3/requestmanager":28,"./web3/shh":29,"./web3/watches":31}],10:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file allevents.js @@ -1671,7 +1671,7 @@ AllSolidityEvents.prototype.decode = function (data) { AllSolidityEvents.prototype.execute = function (options, callback) { var o = this.encode(options); var formatter = this.decode.bind(this); - return new Filter(o, watches.eth(), formatter, callback); + return new Filter(o, watches.exp(), formatter, callback); }; AllSolidityEvents.prototype.attachToContract = function (contract) { @@ -1684,20 +1684,20 @@ module.exports = AllSolidityEvents; },{"../utils/sha3":6,"../utils/utils":7,"./event":16,"./filter":17,"./formatters":18,"./watches":31}],11:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file batch.js @@ -1752,20 +1752,20 @@ module.exports = Batch; },{"./errors":14,"./jsonrpc":23,"./requestmanager":28}],12:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file contract.js @@ -1862,7 +1862,7 @@ var checkForContractAddress = function(contract, abi, callback){ callbackFired = false; // wait for receipt - var filter = web3.eth.filter('latest', function(e){ + var filter = web3.exp.filter('latest', function(e){ if(!e && !callbackFired) { count++; @@ -1882,10 +1882,10 @@ var checkForContractAddress = function(contract, abi, callback){ } else { - web3.eth.getTransactionReceipt(contract.transactionHash, function(e, receipt){ + web3.exp.getTransactionReceipt(contract.transactionHash, function(e, receipt){ if(receipt && !callbackFired) { - web3.eth.getCode(receipt.contractAddress, function(e, code){ + web3.exp.getCode(receipt.contractAddress, function(e, code){ /*jshint maxcomplexity: 5 */ if(callbackFired) @@ -1969,7 +1969,7 @@ ContractFactory.prototype.new = function () { if(callback) { // wait for the contract address adn check if the code was deployed - web3.eth.sendTransaction(options, function (err, hash) { + web3.exp.sendTransaction(options, function (err, hash) { if (err) { callback(err); } else { @@ -1983,7 +1983,7 @@ ContractFactory.prototype.new = function () { } }); } else { - var hash = web3.eth.sendTransaction(options); + var hash = web3.exp.sendTransaction(options); // add the transaction hash contract.transactionHash = hash; checkForContractAddress(contract, _this.abi); @@ -2031,20 +2031,20 @@ module.exports = contract; },{"../solidity/coder":1,"../utils/utils":7,"../web3":9,"./allevents":10,"./event":16,"./function":19}],13:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** @file db.js * @authors: @@ -2089,20 +2089,20 @@ module.exports = { },{"./method":24}],14:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file errors.js @@ -2129,23 +2129,23 @@ module.exports = { },{}],15:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** - * @file eth.js + * @file exp.js * @author Marek Kotewicz * @author Fabian Vogelsteller * @date 2015 @@ -2158,7 +2158,7 @@ module.exports = { */ /** - * Eth methods and properties + * Exp methods and properties * * An example method object can look as follows: * @@ -2173,7 +2173,7 @@ module.exports = { * ] * }, * - * @class [web3] eth + * @class [web3] exp * @constructor */ @@ -2204,7 +2204,7 @@ var uncleCountCall = function (args) { return (utils.isString(args[0]) && args[0].indexOf('0x') === 0) ? 'eth_getUncleCountByBlockHash' : 'eth_getUncleCountByBlockNumber'; }; -/// @returns an array of objects describing web3.eth api methods +/// @returns an array of objects describing web3.exp api methods var getBalance = new Method({ name: 'getBalance', @@ -2380,7 +2380,7 @@ var methods = [ getWork ]; -/// @returns an array of objects describing web3.eth api properties +/// @returns an array of objects describing web3.exp api properties @@ -2422,20 +2422,20 @@ module.exports = { },{"../utils/utils":7,"./formatters":18,"./method":24,"./property":27}],16:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file event.js @@ -2608,7 +2608,7 @@ SolidityEvent.prototype.execute = function (indexed, options, callback) { var o = this.encode(indexed, options); var formatter = this.decode.bind(this); - return new Filter(o, watches.eth(), formatter, callback); + return new Filter(o, watches.exp(), formatter, callback); }; /** @@ -2631,20 +2631,20 @@ module.exports = SolidityEvent; },{"../solidity/coder":1,"../utils/sha3":6,"../utils/utils":7,"./filter":17,"./formatters":18,"./watches":31}],17:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** @file filter.js * @authors: @@ -2842,20 +2842,20 @@ module.exports = Filter; },{"../utils/utils":7,"./formatters":18,"./requestmanager":28}],18:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file formatters.js @@ -3089,20 +3089,20 @@ module.exports = { },{"../utils/config":5,"../utils/utils":7}],19:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file function.js @@ -3199,12 +3199,12 @@ SolidityFunction.prototype.call = function () { if (!callback) { - var output = web3.eth.call(payload, defaultBlock); + var output = web3.exp.call(payload, defaultBlock); return this.unpackOutput(output); } var self = this; - web3.eth.call(payload, defaultBlock, function (error, output) { + web3.exp.call(payload, defaultBlock, function (error, output) { callback(error, self.unpackOutput(output)); }); }; @@ -3221,10 +3221,10 @@ SolidityFunction.prototype.sendTransaction = function () { var payload = this.toPayload(args); if (!callback) { - return web3.eth.sendTransaction(payload); + return web3.exp.sendTransaction(payload); } - web3.eth.sendTransaction(payload, callback); + web3.exp.sendTransaction(payload, callback); }; /** @@ -3239,10 +3239,10 @@ SolidityFunction.prototype.estimateGas = function () { var payload = this.toPayload(args); if (!callback) { - return web3.eth.estimateGas(payload); + return web3.exp.estimateGas(payload); } - web3.eth.estimateGas(payload, callback); + web3.exp.estimateGas(payload, callback); }; /** @@ -3326,20 +3326,20 @@ module.exports = SolidityFunction; },{"../solidity/coder":1,"../utils/sha3":6,"../utils/utils":7,"../web3":9,"./formatters":18}],20:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** @file httpprovider.js * @authors: @@ -3355,7 +3355,7 @@ var XMLHttpRequest = (typeof window !== 'undefined' && window.XMLHttpRequest) ? var errors = require('./errors'); var HttpProvider = function (host) { - this.host = host || 'http://localhost:8545'; + this.host = host || 'http://localhost:9656'; }; HttpProvider.prototype.isConnected = function() { @@ -3439,20 +3439,20 @@ module.exports = HttpProvider; },{"./errors":14,"xmlhttprequest":4}],21:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file icap.js @@ -3549,20 +3549,20 @@ module.exports = ICAP; },{"../utils/utils":7}],22:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** @file ipcprovider.js * @authors: @@ -3762,20 +3762,20 @@ module.exports = IpcProvider; },{"../utils/utils":7,"./errors":14,"net":32}],23:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** @file jsonrpc.js * @authors: @@ -3855,20 +3855,20 @@ module.exports = Jsonrpc; },{}],24:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file method.js @@ -4029,20 +4029,20 @@ module.exports = Method; },{"../utils/utils":7,"./errors":14,"./requestmanager":28}],25:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file namereg.js @@ -4077,22 +4077,22 @@ module.exports = contract(abi).at(address); },{"./contract":12}],26:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ -/** @file eth.js +/** @file exp.js * @authors: * Marek Kotewicz * @date 2015 @@ -4101,11 +4101,11 @@ module.exports = contract(abi).at(address); var utils = require('../utils/utils'); var Property = require('./property'); -/// @returns an array of objects describing web3.eth api methods +/// @returns an array of objects describing web3.exp api methods var methods = [ ]; -/// @returns an array of objects describing web3.eth api properties +/// @returns an array of objects describing web3.exp api properties var properties = [ new Property({ name: 'listening', @@ -4127,20 +4127,20 @@ module.exports = { },{"../utils/utils":7,"./property":27}],27:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file property.js @@ -4279,20 +4279,20 @@ module.exports = Property; },{"../utils/utils":7,"./requestmanager":28}],28:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file requestmanager.js @@ -4311,7 +4311,7 @@ var errors = require('./errors'); /** * It's responsible for passing messages to providers - * It's also responsible for polling the ethereum node for incoming messages + * It's also responsible for polling the expanse node for incoming messages * Default poll timeout is 1 second * Singleton */ @@ -4544,20 +4544,20 @@ module.exports = RequestManager; },{"../utils/config":5,"../utils/utils":7,"./errors":14,"./jsonrpc":23}],29:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** @file shh.js * @authors: @@ -4614,20 +4614,20 @@ module.exports = { },{"./formatters":18,"./method":24}],30:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** * @file transfer.js @@ -4680,7 +4680,7 @@ var transfer = function (from, iban, value, callback) { * @param {Function} callback, callback */ var transferToAddress = function (from, address, value, callback) { - return web3.eth.sendTransaction({ + return web3.exp.sendTransaction({ address: address, from: from, value: value @@ -4710,20 +4710,20 @@ module.exports = transfer; },{"../web3":9,"./contract":12,"./icap":21,"./namereg":25}],31:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** @file watches.js * @authors: @@ -4733,8 +4733,8 @@ module.exports = transfer; var Method = require('./method'); -/// @returns an array of objects describing web3.eth.filter api methods -var eth = function () { +/// @returns an array of objects describing web3.exp.filter api methods +var exp = function () { var newFilterCall = function (args) { var type = args[0]; @@ -4819,7 +4819,7 @@ var shh = function () { }; module.exports = { - eth: eth, + exp: exp, shh: shh }; @@ -6210,9 +6210,9 @@ var web3 = require('./lib/web3'); web3.providers.HttpProvider = require('./lib/web3/httpprovider'); web3.providers.IpcProvider = require('./lib/web3/ipcprovider'); -web3.eth.contract = require('./lib/web3/contract'); -web3.eth.namereg = require('./lib/web3/namereg'); -web3.eth.sendIBANTransaction = require('./lib/web3/transfer'); +web3.exp.contract = require('./lib/web3/contract'); +web3.exp.namereg = require('./lib/web3/namereg'); +web3.exp.sendIBANTransaction = require('./lib/web3/transfer'); // dont override global variable if (typeof window !== 'undefined' && typeof window.web3 === 'undefined') { diff --git a/jsre/jsre.go b/jsre/jsre.go index d4c9828970..b1152a56b2 100644 --- a/jsre/jsre.go +++ b/jsre/jsre.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Package jsre provides execution environment for JavaScript. package jsre @@ -23,7 +23,7 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" "github.com/robertkrimen/otto" ) diff --git a/jsre/jsre_test.go b/jsre/jsre_test.go index ad210932a0..61818c0e8b 100644 --- a/jsre/jsre_test.go +++ b/jsre/jsre_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package jsre diff --git a/jsre/pp_js.go b/jsre/pp_js.go index 80fe523c14..ad07f6c53f 100644 --- a/jsre/pp_js.go +++ b/jsre/pp_js.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package jsre diff --git a/logger/example_test.go b/logger/example_test.go index ce5f9da67f..d25aec715b 100644 --- a/logger/example_test.go +++ b/logger/example_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package logger diff --git a/logger/log.go b/logger/log.go index 38a6ce1391..9364aac347 100644 --- a/logger/log.go +++ b/logger/log.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package logger @@ -22,7 +22,7 @@ import ( "log" "os" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) func openLogFile(datadir string, filename string) *os.File { diff --git a/logger/loggers.go b/logger/loggers.go index e63355d0bf..4c2be388b5 100644 --- a/logger/loggers.go +++ b/logger/loggers.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . /* Package logger implements a multi-output leveled logger. @@ -47,7 +47,7 @@ const ( ) // A Logger prints messages prefixed by a given tag. It provides named -// Printf and Println style methods for all loglevels. Each ethereum +// Printf and Println style methods for all loglevels. Each expanse // component should have its own logger with a unique prefix. type Logger struct { tag string diff --git a/logger/loggers_test.go b/logger/loggers_test.go index 85564698bc..3dd23a494c 100644 --- a/logger/loggers_test.go +++ b/logger/loggers_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package logger diff --git a/logger/logsystem.go b/logger/logsystem.go index 24f4351d49..e36d1c6953 100644 --- a/logger/logsystem.go +++ b/logger/logsystem.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package logger diff --git a/logger/sys.go b/logger/sys.go index 18d4ea641c..1f5aafd793 100644 --- a/logger/sys.go +++ b/logger/sys.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package logger diff --git a/logger/types.go b/logger/types.go index ee7e845de8..23fd332c6b 100644 --- a/logger/types.go +++ b/logger/types.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package logger @@ -83,7 +83,7 @@ type EthMinerNewBlock struct { } func (l *EthMinerNewBlock) EventName() string { - return "eth.miner.new_block" + return "exp.miner.new_block" } type EthChainReceivedNewBlock struct { @@ -96,7 +96,7 @@ type EthChainReceivedNewBlock struct { } func (l *EthChainReceivedNewBlock) EventName() string { - return "eth.chain.received.new_block" + return "exp.chain.received.new_block" } type EthChainNewHead struct { @@ -108,7 +108,7 @@ type EthChainNewHead struct { } func (l *EthChainNewHead) EventName() string { - return "eth.chain.new_head" + return "exp.chain.new_head" } type EthTxReceived struct { @@ -118,7 +118,7 @@ type EthTxReceived struct { } func (l *EthTxReceived) EventName() string { - return "eth.tx.received" + return "exp.tx.received" } // @@ -212,7 +212,7 @@ func (l *EthTxReceived) EventName() string { // } // func (l *P2PEthDisconnectingBadBlock) EventName() string { -// return "p2p.eth.disconnecting.bad_block" +// return "p2p.exp.disconnecting.bad_block" // } // type P2PEthDisconnectingBadTx struct { @@ -223,7 +223,7 @@ func (l *EthTxReceived) EventName() string { // } // func (l *P2PEthDisconnectingBadTx) EventName() string { -// return "p2p.eth.disconnecting.bad_tx" +// return "p2p.exp.disconnecting.bad_tx" // } // type EthNewBlockBroadcasted struct { @@ -236,7 +236,7 @@ func (l *EthTxReceived) EventName() string { // } // func (l *EthNewBlockBroadcasted) EventName() string { -// return "eth.newblock.broadcasted" +// return "exp.newblock.broadcasted" // } // type EthNewBlockIsKnown struct { @@ -249,7 +249,7 @@ func (l *EthTxReceived) EventName() string { // } // func (l *EthNewBlockIsKnown) EventName() string { -// return "eth.newblock.is_known" +// return "exp.newblock.is_known" // } // type EthNewBlockIsNew struct { @@ -262,7 +262,7 @@ func (l *EthTxReceived) EventName() string { // } // func (l *EthNewBlockIsNew) EventName() string { -// return "eth.newblock.is_new" +// return "exp.newblock.is_new" // } // type EthNewBlockMissingParent struct { @@ -275,7 +275,7 @@ func (l *EthTxReceived) EventName() string { // } // func (l *EthNewBlockMissingParent) EventName() string { -// return "eth.newblock.missing_parent" +// return "exp.newblock.missing_parent" // } // type EthNewBlockIsInvalid struct { @@ -288,7 +288,7 @@ func (l *EthTxReceived) EventName() string { // } // func (l *EthNewBlockIsInvalid) EventName() string { -// return "eth.newblock.is_invalid" +// return "exp.newblock.is_invalid" // } // type EthNewBlockChainIsOlder struct { @@ -301,7 +301,7 @@ func (l *EthTxReceived) EventName() string { // } // func (l *EthNewBlockChainIsOlder) EventName() string { -// return "eth.newblock.chain.is_older" +// return "exp.newblock.chain.is_older" // } // type EthNewBlockChainIsCanonical struct { @@ -314,7 +314,7 @@ func (l *EthTxReceived) EventName() string { // } // func (l *EthNewBlockChainIsCanonical) EventName() string { -// return "eth.newblock.chain.is_cannonical" +// return "exp.newblock.chain.is_cannonical" // } // type EthNewBlockChainNotCanonical struct { @@ -327,7 +327,7 @@ func (l *EthTxReceived) EventName() string { // } // func (l *EthNewBlockChainNotCanonical) EventName() string { -// return "eth.newblock.chain.not_cannonical" +// return "exp.newblock.chain.not_cannonical" // } // type EthTxCreated struct { @@ -340,7 +340,7 @@ func (l *EthTxReceived) EventName() string { // } // func (l *EthTxCreated) EventName() string { -// return "eth.tx.created" +// return "exp.tx.created" // } // type EthTxBroadcasted struct { @@ -352,7 +352,7 @@ func (l *EthTxReceived) EventName() string { // } // func (l *EthTxBroadcasted) EventName() string { -// return "eth.tx.broadcasted" +// return "exp.tx.broadcasted" // } // type EthTxValidated struct { @@ -364,7 +364,7 @@ func (l *EthTxReceived) EventName() string { // } // func (l *EthTxValidated) EventName() string { -// return "eth.tx.validated" +// return "exp.tx.validated" // } // type EthTxIsInvalid struct { @@ -377,5 +377,5 @@ func (l *EthTxReceived) EventName() string { // } // func (l *EthTxIsInvalid) EventName() string { -// return "eth.tx.is_invalid" +// return "exp.tx.is_invalid" // } diff --git a/logger/verbosity.go b/logger/verbosity.go index aa3d59c30d..713ad1c65a 100644 --- a/logger/verbosity.go +++ b/logger/verbosity.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package logger diff --git a/metrics/disk.go b/metrics/disk.go index 25142d2ad1..18bf3879a9 100644 --- a/metrics/disk.go +++ b/metrics/disk.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package metrics diff --git a/metrics/disk_linux.go b/metrics/disk_linux.go index 8967d490e8..8bb19458fe 100644 --- a/metrics/disk_linux.go +++ b/metrics/disk_linux.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Contains the Linux implementation of process disk IO counter retrieval. diff --git a/metrics/disk_nop.go b/metrics/disk_nop.go index 4319f8b277..47c0a0d2e1 100644 --- a/metrics/disk_nop.go +++ b/metrics/disk_nop.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // +build !linux diff --git a/metrics/metrics.go b/metrics/metrics.go index 6d1a065edb..3b865bff99 100644 --- a/metrics/metrics.go +++ b/metrics/metrics.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Package metrics provides general system and process level metrics collection. package metrics @@ -23,8 +23,8 @@ import ( "strings" "time" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" "github.com/rcrowley/go-metrics" ) diff --git a/miner/agent.go b/miner/agent.go index 2f8d9fee42..f23da4f96d 100644 --- a/miner/agent.go +++ b/miner/agent.go @@ -1,28 +1,28 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package miner import ( "sync" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/pow" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/pow" ) type CpuAgent struct { diff --git a/miner/miner.go b/miner/miner.go index bf6a488020..c203ddf6de 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -1,35 +1,35 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -// Package miner implements Ethereum block creation and mining. +// Package miner implements Expanse block creation and mining. package miner import ( "math/big" "sync/atomic" - "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/eth/downloader" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/pow" + "github.com/expanse-project/go-expanse/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/exp/downloader" + "github.com/expanse-project/go-expanse/event" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/pow" ) type Miner struct { @@ -42,15 +42,15 @@ type Miner struct { threads int coinbase common.Address mining int32 - eth core.Backend + exp core.Backend pow pow.PoW canStart int32 // can start indicates whether we can start the mining operation shouldStart int32 // should start indicates whether we should start after sync } -func New(eth core.Backend, mux *event.TypeMux, pow pow.PoW) *Miner { - miner := &Miner{eth: eth, mux: mux, pow: pow, worker: newWorker(common.Address{}, eth), canStart: 1} +func New(exp core.Backend, mux *event.TypeMux, pow pow.PoW) *Miner { + miner := &Miner{exp: exp, mux: mux, pow: pow, worker: newWorker(common.Address{}, exp), canStart: 1} go miner.update() return miner diff --git a/miner/remote_agent.go b/miner/remote_agent.go index 674ca40acd..6818c67cff 100644 --- a/miner/remote_agent.go +++ b/miner/remote_agent.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package miner @@ -21,10 +21,10 @@ import ( "sync" "time" - "github.com/ethereum/ethash" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/ethash" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" ) type RemoteAgent struct { diff --git a/miner/worker.go b/miner/worker.go index 535ce51447..f74e9580a6 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package miner @@ -24,15 +24,15 @@ import ( "sync/atomic" "time" - "github.com/ethereum/go-ethereum/accounts" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/pow" + "github.com/expanse-project/go-expanse/accounts" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/event" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/pow" "gopkg.in/fatih/set.v0" ) @@ -97,7 +97,7 @@ type worker struct { quit chan struct{} pow pow.PoW - eth core.Backend + exp core.Backend chain *core.ChainManager proc *core.BlockProcessor extraDb common.Database @@ -122,15 +122,15 @@ type worker struct { fullValidation bool } -func newWorker(coinbase common.Address, eth core.Backend) *worker { +func newWorker(coinbase common.Address, exp core.Backend) *worker { worker := &worker{ - eth: eth, - mux: eth.EventMux(), - extraDb: eth.ExtraDb(), + exp: exp, + mux: exp.EventMux(), + extraDb: exp.ExtraDb(), recv: make(chan *Result, resultQueueSize), gasPrice: new(big.Int), - chain: eth.ChainManager(), - proc: eth.BlockProcessor(), + chain: exp.ChainManager(), + proc: exp.BlockProcessor(), possibleUncles: make(map[common.Hash]*types.Block), coinbase: coinbase, txQueue: make(map[common.Hash]*types.Transaction), @@ -278,7 +278,7 @@ func (self *worker) wait() { glog.V(logger.Error).Infoln("Invalid block found during mining") continue } - if err := core.ValidateHeader(self.eth.BlockProcessor().Pow, block.Header(), parent, true); err != nil && err != core.BlockFutureErr { + if err := core.ValidateHeader(self.exp.BlockProcessor().Pow, block.Header(), parent, true); err != nil && err != core.BlockFutureErr { glog.V(logger.Error).Infoln("Invalid header on mined block:", err) continue } @@ -344,7 +344,7 @@ func (self *worker) push(work *Work) { // makeCurrent creates a new environment for the current cycle. func (self *worker) makeCurrent(parent *types.Block, header *types.Header) { - state := state.New(parent.Root(), self.eth.StateDb()) + state := state.New(parent.Root(), self.exp.StateDb()) work := &Work{ state: state, ancestors: set.New(), @@ -363,7 +363,7 @@ func (self *worker) makeCurrent(parent *types.Block, header *types.Header) { work.family.Add(ancestor.Hash()) work.ancestors.Add(ancestor.Hash()) } - accounts, _ := self.eth.AccountManager().Accounts() + accounts, _ := self.exp.AccountManager().Accounts() // Keep track of transactions which return errors so they can be removed work.remove = set.New() @@ -458,19 +458,19 @@ func (self *worker) commitNewWork() { work := self.current /* //approach 1 - transactions := self.eth.TxPool().GetTransactions() + transactions := self.exp.TxPool().GetTransactions() sort.Sort(types.TxByNonce{transactions}) */ //approach 2 - transactions := self.eth.TxPool().GetTransactions() + transactions := self.exp.TxPool().GetTransactions() sort.Sort(types.TxByPriceAndNonce{transactions}) /* // approach 3 // commit transactions for this run. txPerOwner := make(map[common.Address]types.Transactions) // Sort transactions by owner - for _, tx := range self.eth.TxPool().GetTransactions() { + for _, tx := range self.exp.TxPool().GetTransactions() { from, _ := tx.From() // we can ignore the sender error txPerOwner[from] = append(txPerOwner[from], tx) } @@ -495,7 +495,7 @@ func (self *worker) commitNewWork() { work.coinbase.SetGasLimit(header.GasLimit) work.commitTransactions(transactions, self.gasPrice, self.proc) - self.eth.TxPool().RemoveTransactions(work.lowGasTxs) + self.exp.TxPool().RemoveTransactions(work.lowGasTxs) // compute uncles for the new block. var ( diff --git a/p2p/dial.go b/p2p/dial.go index 8b210bacd2..9371028324 100644 --- a/p2p/dial.go +++ b/p2p/dial.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package p2p @@ -23,10 +23,10 @@ import ( "net" "time" - "github.com/ethereum/go-ethereum/fdtrack" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/p2p/discover" + "github.com/expanse-project/go-expanse/fdtrack" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/p2p/discover" ) const ( diff --git a/p2p/dial_test.go b/p2p/dial_test.go index d24e03e292..d9d385807c 100644 --- a/p2p/dial_test.go +++ b/p2p/dial_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package p2p @@ -23,7 +23,7 @@ import ( "time" "github.com/davecgh/go-spew/spew" - "github.com/ethereum/go-ethereum/p2p/discover" + "github.com/expanse-project/go-expanse/p2p/discover" ) func init() { diff --git a/p2p/discover/database.go b/p2p/discover/database.go index d5c594364f..0c182934f9 100644 --- a/p2p/discover/database.go +++ b/p2p/discover/database.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Contains the node database, storing previously seen nodes and any collected // metadata about them for QoS purposes. @@ -26,10 +26,10 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/rlp" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/errors" "github.com/syndtr/goleveldb/leveldb/iterator" diff --git a/p2p/discover/database_test.go b/p2p/discover/database_test.go index 569585903f..ed1b29a591 100644 --- a/p2p/discover/database_test.go +++ b/p2p/discover/database_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package discover @@ -105,8 +105,8 @@ func TestNodeDBFetchStore(t *testing.T) { node := newNode( MustHexID("0x1dd9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"), net.IP{192, 168, 0, 1}, - 30303, - 30303, + 60606, + 60606, ) inst := time.Now() num := 314 @@ -166,8 +166,8 @@ var nodeDBSeedQueryNodes = []struct { node: newNode( MustHexID("0x01d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"), net.IP{127, 0, 0, 1}, - 30303, - 30303, + 60606, + 60606, ), pong: time.Now().Add(-2 * time.Second), }, @@ -175,8 +175,8 @@ var nodeDBSeedQueryNodes = []struct { node: newNode( MustHexID("0x02d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"), net.IP{127, 0, 0, 2}, - 30303, - 30303, + 60606, + 60606, ), pong: time.Now().Add(-3 * time.Second), }, @@ -184,8 +184,8 @@ var nodeDBSeedQueryNodes = []struct { node: newNode( MustHexID("0x03d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"), net.IP{127, 0, 0, 3}, - 30303, - 30303, + 60606, + 60606, ), pong: time.Now().Add(-1 * time.Second), }, @@ -335,8 +335,8 @@ var nodeDBExpirationNodes = []struct { node: newNode( MustHexID("0x01d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"), net.IP{127, 0, 0, 1}, - 30303, - 30303, + 60606, + 60606, ), pong: time.Now().Add(-nodeDBNodeExpiration + time.Minute), exp: false, @@ -344,8 +344,8 @@ var nodeDBExpirationNodes = []struct { node: newNode( MustHexID("0x02d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"), net.IP{127, 0, 0, 2}, - 30303, - 30303, + 60606, + 60606, ), pong: time.Now().Add(-nodeDBNodeExpiration - time.Minute), exp: true, diff --git a/p2p/discover/node.go b/p2p/discover/node.go index b6956e197d..4acaef5e80 100644 --- a/p2p/discover/node.go +++ b/p2p/discover/node.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package discover @@ -29,9 +29,9 @@ import ( "strconv" "strings" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/crypto/secp256k1" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/crypto/secp256k1" ) const nodeIDBits = 512 @@ -94,10 +94,10 @@ func (n *Node) String() string { // parameter "discport". // // In the following example, the node URL describes -// a node with IP address 10.3.58.6, TCP listening port 30303 +// a node with IP address 10.3.58.6, TCP listening port 60606 // and UDP discovery port 30301. // -// enode://@10.3.58.6:30303?discport=30301 +// enode://@10.3.58.6:60606?discport=30301 func ParseNode(rawurl string) (*Node, error) { var ( id NodeID diff --git a/p2p/discover/node_test.go b/p2p/discover/node_test.go index e523e12d2f..5f02f02296 100644 --- a/p2p/discover/node_test.go +++ b/p2p/discover/node_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package discover @@ -25,8 +25,8 @@ import ( "testing/quick" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" ) var parseNodeTests = []struct { diff --git a/p2p/discover/table.go b/p2p/discover/table.go index 48c4734757..1156cf0744 100644 --- a/p2p/discover/table.go +++ b/p2p/discover/table.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Package discover implements the Node Discovery Protocol. // @@ -30,10 +30,10 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" ) const ( diff --git a/p2p/discover/table_test.go b/p2p/discover/table_test.go index 310fe2b7bc..d03016cafa 100644 --- a/p2p/discover/table_test.go +++ b/p2p/discover/table_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package discover @@ -27,8 +27,8 @@ import ( "testing/quick" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" ) func TestTable_pingReplace(t *testing.T) { diff --git a/p2p/discover/udp.go b/p2p/discover/udp.go index d7ca9000d4..da68f37567 100644 --- a/p2p/discover/udp.go +++ b/p2p/discover/udp.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package discover @@ -24,12 +24,12 @@ import ( "net" "time" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/fdtrack" - "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/rlp" + "github.com/expanse-project/go-expanse/crypto" + "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/p2p/nat" + "github.com/expanse-project/go-expanse/rlp" ) const Version = 4 @@ -219,7 +219,7 @@ func newUDP(priv *ecdsa.PrivateKey, c conn, natm nat.Interface, nodeDBPath strin realaddr := c.LocalAddr().(*net.UDPAddr) if natm != nil { if !realaddr.IP.IsLoopback() { - go nat.Map(natm, udp.closing, "udp", realaddr.Port, realaddr.Port, "ethereum discovery") + go nat.Map(natm, udp.closing, "udp", realaddr.Port, realaddr.Port, "expanse discovery") } // TODO: react to external IP changes over time. if ext, err := natm.ExternalIP(); err == nil { diff --git a/p2p/discover/udp_test.go b/p2p/discover/udp_test.go index 8d6d3e8557..0704b256d4 100644 --- a/p2p/discover/udp_test.go +++ b/p2p/discover/udp_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package discover @@ -32,8 +32,8 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/logger" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/logger" ) func init() { @@ -65,7 +65,7 @@ func newUDPTest(t *testing.T) *udpTest { pipe: newpipe(), localkey: newkey(), remotekey: newkey(), - remoteaddr: &net.UDPAddr{IP: net.IP{1, 2, 3, 4}, Port: 30303}, + remoteaddr: &net.UDPAddr{IP: net.IP{1, 2, 3, 4}, Port: 60606}, } test.table, test.udp = newUDP(test.localkey, test.pipe, nil, "") return test @@ -223,10 +223,10 @@ func TestUDP_findnodeMultiReply(t *testing.T) { // send the reply as two packets. list := []*Node{ - MustParseNode("enode://ba85011c70bcc5c04d8607d3a0ed29aa6179c092cbdda10d5d32684fb33ed01bd94f588ca8f91ac48318087dcb02eaf36773a7a453f0eedd6742af668097b29c@10.0.1.16:30303?discport=30304"), - MustParseNode("enode://81fa361d25f157cd421c60dcc28d8dac5ef6a89476633339c5df30287474520caca09627da18543d9079b5b288698b542d56167aa5c09111e55acdbbdf2ef799@10.0.1.16:30303"), + MustParseNode("enode://ba85011c70bcc5c04d8607d3a0ed29aa6179c092cbdda10d5d32684fb33ed01bd94f588ca8f91ac48318087dcb02eaf36773a7a453f0eedd6742af668097b29c@10.0.1.16:60606?discport=30304"), + MustParseNode("enode://81fa361d25f157cd421c60dcc28d8dac5ef6a89476633339c5df30287474520caca09627da18543d9079b5b288698b542d56167aa5c09111e55acdbbdf2ef799@10.0.1.16:60606"), MustParseNode("enode://9bffefd833d53fac8e652415f4973bee289e8b1a5c6c4cbe70abf817ce8a64cee11b823b66a987f51aaa9fba0d6a91b3e6bf0d5a5d1042de8e9eeea057b217f8@10.0.1.36:30301?discport=17"), - MustParseNode("enode://1b5b4aa662d7cb44a7221bfba67302590b643028197a7d5214790f3bac7aaa4a3241be9e83c09cf1f6c69d007c634faae3dc1b1221793e8446c0b3a09de65960@10.0.1.16:30303"), + MustParseNode("enode://1b5b4aa662d7cb44a7221bfba67302590b643028197a7d5214790f3bac7aaa4a3241be9e83c09cf1f6c69d007c634faae3dc1b1221793e8446c0b3a09de65960@10.0.1.16:60606"), } rpclist := make([]rpcNode, len(list)) for i := range list { diff --git a/p2p/message.go b/p2p/message.go index 1292d21213..30affb780d 100644 --- a/p2p/message.go +++ b/p2p/message.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package p2p @@ -27,7 +27,7 @@ import ( "sync/atomic" "time" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/rlp" ) // Msg defines the structure of a p2p message. diff --git a/p2p/message_test.go b/p2p/message_test.go index 8599b7e87c..1457ea0dc3 100644 --- a/p2p/message_test.go +++ b/p2p/message_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package p2p diff --git a/p2p/metrics.go b/p2p/metrics.go index 8ee4ed04b6..4b26104208 100644 --- a/p2p/metrics.go +++ b/p2p/metrics.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Contains the meters and timers used by the networking layer. @@ -21,7 +21,7 @@ package p2p import ( "net" - "github.com/ethereum/go-ethereum/metrics" + "github.com/expanse-project/go-expanse/metrics" ) var ( diff --git a/p2p/nat/nat.go b/p2p/nat/nat.go index 505a1fc77b..4fbe6c6f35 100644 --- a/p2p/nat/nat.go +++ b/p2p/nat/nat.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Package nat provides access to common network port mapping protocols. package nat @@ -25,8 +25,8 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" "github.com/jackpal/go-nat-pmp" ) diff --git a/p2p/nat/nat_test.go b/p2p/nat/nat_test.go index a079e7a22c..420b595fd1 100644 --- a/p2p/nat/nat_test.go +++ b/p2p/nat/nat_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package nat diff --git a/p2p/nat/natpmp.go b/p2p/nat/natpmp.go index c2f9408914..01687d49c0 100644 --- a/p2p/nat/natpmp.go +++ b/p2p/nat/natpmp.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package nat diff --git a/p2p/nat/natupnp.go b/p2p/nat/natupnp.go index 0bcb262bf6..4a46e75d9b 100644 --- a/p2p/nat/natupnp.go +++ b/p2p/nat/natupnp.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package nat diff --git a/p2p/nat/natupnp_test.go b/p2p/nat/natupnp_test.go index c1e322af70..5ac972057f 100644 --- a/p2p/nat/natupnp_test.go +++ b/p2p/nat/natupnp_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package nat diff --git a/p2p/peer.go b/p2p/peer.go index 1b3b19c798..4af6c8f7e8 100644 --- a/p2p/peer.go +++ b/p2p/peer.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package p2p @@ -25,10 +25,10 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/p2p/discover" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/p2p/discover" + "github.com/expanse-project/go-expanse/rlp" ) const ( diff --git a/p2p/peer_error.go b/p2p/peer_error.go index b1762a6ee8..f29edfeec4 100644 --- a/p2p/peer_error.go +++ b/p2p/peer_error.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package p2p diff --git a/p2p/peer_test.go b/p2p/peer_test.go index 6f96a823b4..33908f3115 100644 --- a/p2p/peer_test.go +++ b/p2p/peer_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package p2p diff --git a/p2p/protocol.go b/p2p/protocol.go index ac0c3d9426..d441ef3d5c 100644 --- a/p2p/protocol.go +++ b/p2p/protocol.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package p2p diff --git a/p2p/rlpx.go b/p2p/rlpx.go index fd43f565e4..cd5126db9c 100644 --- a/p2p/rlpx.go +++ b/p2p/rlpx.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package p2p @@ -32,12 +32,12 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/crypto/ecies" - "github.com/ethereum/go-ethereum/crypto/secp256k1" - "github.com/ethereum/go-ethereum/crypto/sha3" - "github.com/ethereum/go-ethereum/p2p/discover" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/crypto/ecies" + "github.com/expanse-project/go-expanse/crypto/secp256k1" + "github.com/expanse-project/go-expanse/crypto/sha3" + "github.com/expanse-project/go-expanse/p2p/discover" + "github.com/expanse-project/go-expanse/rlp" ) const ( diff --git a/p2p/rlpx_test.go b/p2p/rlpx_test.go index 900353f0ee..79e33b20a1 100644 --- a/p2p/rlpx_test.go +++ b/p2p/rlpx_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package p2p @@ -30,11 +30,11 @@ import ( "time" "github.com/davecgh/go-spew/spew" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/crypto/ecies" - "github.com/ethereum/go-ethereum/crypto/sha3" - "github.com/ethereum/go-ethereum/p2p/discover" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/crypto/ecies" + "github.com/expanse-project/go-expanse/crypto/sha3" + "github.com/expanse-project/go-expanse/p2p/discover" + "github.com/expanse-project/go-expanse/rlp" ) func TestSharedSecret(t *testing.T) { diff --git a/p2p/server.go b/p2p/server.go index 7351a26544..b7f74c4588 100644 --- a/p2p/server.go +++ b/p2p/server.go @@ -1,20 +1,20 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -// Package p2p implements the Ethereum p2p network protocols. +// Package p2p implements the Expanse p2p network protocols. package p2p import ( @@ -25,11 +25,11 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/fdtrack" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/p2p/discover" - "github.com/ethereum/go-ethereum/p2p/nat" + "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/p2p/discover" + "github.com/expanse-project/go-expanse/p2p/nat" ) const ( @@ -380,7 +380,7 @@ func (srv *Server) startListening() error { if !laddr.IP.IsLoopback() && srv.NAT != nil { srv.loopWG.Add(1) go func() { - nat.Map(srv.NAT, srv.quit, "tcp", laddr.Port, laddr.Port, "ethereum p2p") + nat.Map(srv.NAT, srv.quit, "tcp", laddr.Port, laddr.Port, "expanse p2p") srv.loopWG.Done() }() } diff --git a/p2p/server_test.go b/p2p/server_test.go index 976d5baf59..18c6c0a107 100644 --- a/p2p/server_test.go +++ b/p2p/server_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package p2p @@ -25,9 +25,9 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/crypto/sha3" - "github.com/ethereum/go-ethereum/p2p/discover" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/crypto/sha3" + "github.com/expanse-project/go-expanse/p2p/discover" ) func init() { diff --git a/params/protocol_params.go b/params/protocol_params.go index dcc17e05d7..665c8b5d99 100755 --- a/params/protocol_params.go +++ b/params/protocol_params.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // DO NOT EDIT!!! // AUTOGENERATED FROM generators/defaults.go @@ -40,7 +40,7 @@ var ( Sha256WordGas = big.NewInt(12) // MinGasLimit = big.NewInt(5000) // Minimum the gas limit may ever be. - GenesisGasLimit = big.NewInt(3141592) // Gas limit of the Genesis block. + GenesisGasLimit = big.NewInt(31415926) // Gas limit of the Genesis block. Sha3Gas = big.NewInt(30) // Once per SHA3 operation. Sha256Gas = big.NewInt(60) // @@ -59,7 +59,7 @@ var ( Ripemd160WordGas = big.NewInt(120) // MinimumDifficulty = big.NewInt(131072) // The minimum that the difficulty may ever be. CallCreateDepth = big.NewInt(1024) // Maximum depth of call/create stack. - ExpGas = big.NewInt(10) // Once per EXP instuction. + ExpGas = big.NewInt(10) // Once per EXP instruction. LogGas = big.NewInt(375) // Per LOG* operation. CopyGas = big.NewInt(3) // StackLimit = big.NewInt(1024) // Maximum size of VM stack allowed. diff --git a/pow/block.go b/pow/block.go index 11807113dc..d39770e6dd 100644 --- a/pow/block.go +++ b/pow/block.go @@ -1,26 +1,26 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package pow import ( "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/types" ) type Block interface { diff --git a/pow/dagger/dagger.go b/pow/dagger/dagger.go index f54ba71ca1..9d761e3af0 100644 --- a/pow/dagger/dagger.go +++ b/pow/dagger/dagger.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package dagger @@ -22,9 +22,9 @@ import ( "math/rand" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto/sha3" - "github.com/ethereum/go-ethereum/logger" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto/sha3" + "github.com/expanse-project/go-expanse/logger" ) var powlogger = logger.NewLogger("POW") diff --git a/pow/dagger/dagger_test.go b/pow/dagger/dagger_test.go index 39b74df306..c66c02c0e0 100644 --- a/pow/dagger/dagger_test.go +++ b/pow/dagger/dagger_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package dagger @@ -20,7 +20,7 @@ import ( "math/big" "testing" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) func BenchmarkDaggerSearch(b *testing.B) { diff --git a/pow/ezp/pow.go b/pow/ezp/pow.go index 03bb3da291..935913b26d 100644 --- a/pow/ezp/pow.go +++ b/pow/ezp/pow.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package ezp @@ -22,10 +22,10 @@ import ( "math/rand" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto/sha3" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/pow" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto/sha3" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/pow" ) var powlogger = logger.NewLogger("POW") diff --git a/pow/pow.go b/pow/pow.go index 22daf35e4d..be9d8f637f 100644 --- a/pow/pow.go +++ b/pow/pow.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package pow diff --git a/rlp/decode.go b/rlp/decode.go index c0b5f06994..3f9e909197 100644 --- a/rlp/decode.go +++ b/rlp/decode.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package rlp diff --git a/rlp/decode_test.go b/rlp/decode_test.go index 331faa9d83..e30dfa3e0e 100644 --- a/rlp/decode_test.go +++ b/rlp/decode_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package rlp diff --git a/rlp/doc.go b/rlp/doc.go index 72667416cf..32af758b9b 100644 --- a/rlp/doc.go +++ b/rlp/doc.go @@ -1,27 +1,27 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . /* Package rlp implements the RLP serialization format. The purpose of RLP (Recursive Linear Prefix) qis to encode arbitrarily nested arrays of binary data, and RLP is the main encoding method used -to serialize objects in Ethereum. The only purpose of RLP is to encode +to serialize objects in Expanse. The only purpose of RLP is to encode structure; encoding specific atomic data types (eg. strings, ints, -floats) is left up to higher-order protocols; in Ethereum integers +floats) is left up to higher-order protocols; in Expanse integers must be represented in big endian binary form with no leading zeroes (thus making the integer value zero be equivalent to the empty byte array). diff --git a/rlp/encode.go b/rlp/encode.go index 0ddef7bbb5..c9b12a4950 100644 --- a/rlp/encode.go +++ b/rlp/encode.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package rlp diff --git a/rlp/encode_test.go b/rlp/encode_test.go index e83c76b51e..dd55b51078 100644 --- a/rlp/encode_test.go +++ b/rlp/encode_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package rlp diff --git a/rlp/encoder_example_test.go b/rlp/encoder_example_test.go index 1cffa241c2..80f92528b8 100644 --- a/rlp/encoder_example_test.go +++ b/rlp/encoder_example_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package rlp diff --git a/rlp/typecache.go b/rlp/typecache.go index 0ab096695f..152061b66a 100644 --- a/rlp/typecache.go +++ b/rlp/typecache.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package rlp diff --git a/rpc/api/admin.go b/rpc/api/admin.go index 29f342ab63..d8b09bf9e6 100644 --- a/rpc/api/admin.go +++ b/rpc/api/admin.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api @@ -23,21 +23,21 @@ import ( "os" "time" - "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/core/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/rlp" - "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/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/core/types" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/rlp" + "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" ) const ( @@ -80,17 +80,17 @@ type adminhandler func(*adminApi, *shared.Request) (interface{}, error) // admin api provider type adminApi struct { xeth *xeth.XEth - ethereum *eth.Ethereum + expanse *exp.Expanse codec codec.Codec coder codec.ApiCoder ds *docserver.DocServer } // create a new admin api instance -func NewAdminApi(xeth *xeth.XEth, ethereum *eth.Ethereum, codec codec.Codec) *adminApi { +func NewAdminApi(xeth *xeth.XEth, expanse *exp.Expanse, codec codec.Codec) *adminApi { return &adminApi{ xeth: xeth, - ethereum: ethereum, + expanse: expanse, codec: codec, coder: codec.New(nil), ds: docserver.New("/"), @@ -131,7 +131,7 @@ func (self *adminApi) AddPeer(req *shared.Request) (interface{}, error) { return nil, shared.NewDecodeParamError(err.Error()) } - err := self.ethereum.AddPeer(args.Url) + err := self.expanse.AddPeer(args.Url) if err == nil { return true, nil } @@ -139,15 +139,15 @@ func (self *adminApi) AddPeer(req *shared.Request) (interface{}, error) { } func (self *adminApi) Peers(req *shared.Request) (interface{}, error) { - return self.ethereum.PeersInfo(), nil + return self.expanse.PeersInfo(), nil } func (self *adminApi) NodeInfo(req *shared.Request) (interface{}, error) { - return self.ethereum.NodeInfo(), nil + return self.expanse.NodeInfo(), nil } func (self *adminApi) DataDir(req *shared.Request) (interface{}, error) { - return self.ethereum.DataDir, nil + return self.expanse.DataDir, nil } func hasAllBlocks(chain *core.ChainManager, bs []*types.Block) bool { @@ -192,10 +192,10 @@ func (self *adminApi) ImportChain(req *shared.Request) (interface{}, error) { break } // Import the batch. - if hasAllBlocks(self.ethereum.ChainManager(), blocks[:i]) { + if hasAllBlocks(self.expanse.ChainManager(), blocks[:i]) { continue } - if _, err := self.ethereum.ChainManager().InsertChain(blocks[:i]); err != nil { + if _, err := self.expanse.ChainManager().InsertChain(blocks[:i]); err != nil { return false, fmt.Errorf("invalid block %d: %v", n, err) } } @@ -213,7 +213,7 @@ func (self *adminApi) ExportChain(req *shared.Request) (interface{}, error) { return false, err } defer fh.Close() - if err := self.ethereum.ChainManager().Export(fh); err != nil { + if err := self.expanse.ChainManager().Export(fh); err != nil { return false, err } @@ -231,7 +231,7 @@ func (self *adminApi) Verbosity(req *shared.Request) (interface{}, error) { } func (self *adminApi) ChainSyncStatus(req *shared.Request) (interface{}, error) { - pending, cached, importing, estimate := self.ethereum.Downloader().Stats() + pending, cached, importing, estimate := self.expanse.Downloader().Stats() return map[string]interface{}{ "blocksAvailable": pending, @@ -266,7 +266,7 @@ func (self *adminApi) StartRPC(req *shared.Request) (interface{}, error) { CorsDomain: args.CorsDomain, } - apis, err := ParseApiString(args.Apis, self.codec, self.xeth, self.ethereum) + apis, err := ParseApiString(args.Apis, self.codec, self.xeth, self.expanse) if err != nil { return false, err } @@ -432,12 +432,12 @@ func (self *adminApi) RegisterUrl(req *shared.Request) (interface{}, error) { } func (self *adminApi) StartNatSpec(req *shared.Request) (interface{}, error) { - self.ethereum.NatSpec = true + self.expanse.NatSpec = true return true, nil } func (self *adminApi) StopNatSpec(req *shared.Request) (interface{}, error) { - self.ethereum.NatSpec = false + self.expanse.NatSpec = false return true, nil } diff --git a/rpc/api/admin_args.go b/rpc/api/admin_args.go index e3a2f72bf9..08e08db02e 100644 --- a/rpc/api/admin_args.go +++ b/rpc/api/admin_args.go @@ -1,26 +1,26 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api import ( "encoding/json" - "github.com/ethereum/go-ethereum/common/compiler" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/common/compiler" + "github.com/expanse-project/go-expanse/rpc/shared" ) type AddPeerArgs struct { @@ -127,8 +127,8 @@ func (args *StartRPCArgs) UnmarshalJSON(b []byte) (err error) { } args.ListenAddress = "127.0.0.1" - args.ListenPort = 8545 - args.Apis = "net,eth,web3" + args.ListenPort = 9656 + args.Apis = "net,exp,web3" if len(obj) >= 1 && obj[0] != nil { if addr, ok := obj[0].(string); ok { diff --git a/rpc/api/admin_js.go b/rpc/api/admin_js.go index 25dbb4a8d3..fb27e35eeb 100644 --- a/rpc/api/admin_js.go +++ b/rpc/api/admin_js.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api diff --git a/rpc/api/api.go b/rpc/api/api.go index e03250ec6d..5cbb1402f6 100644 --- a/rpc/api/api.go +++ b/rpc/api/api.go @@ -1,26 +1,26 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api import ( - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/rpc/shared" ) // Merge multiple API's to a single API instance -func Merge(apis ...shared.EthereumApi) shared.EthereumApi { +func Merge(apis ...shared.ExpanseApi) shared.ExpanseApi { return newMergedApi(apis...) } diff --git a/rpc/api/api_test.go b/rpc/api/api_test.go index 131ef68f81..d1c6c0594c 100644 --- a/rpc/api/api_test.go +++ b/rpc/api/api_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api @@ -22,11 +22,11 @@ import ( "encoding/json" "strconv" - "github.com/ethereum/go-ethereum/common/compiler" - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" - "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/go-expanse/common/compiler" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" + "github.com/expanse-project/go-expanse/xeth" ) func TestParseApiString(t *testing.T) { @@ -39,7 +39,7 @@ func TestParseApiString(t *testing.T) { t.Errorf("Expected 0 apis from empty API string") } - apis, err = ParseApiString("eth", codec.JSON, nil, nil) + apis, err = ParseApiString("exp", codec.JSON, nil, nil) if err != nil { t.Errorf("Expected nil err from parsing empty API string but got %v", err) } @@ -48,7 +48,7 @@ func TestParseApiString(t *testing.T) { t.Errorf("Expected 1 apis but got %d - %v", apis, apis) } - apis, err = ParseApiString("eth,eth", codec.JSON, nil, nil) + apis, err = ParseApiString("exp,exp", codec.JSON, nil, nil) if err != nil { t.Errorf("Expected nil err from parsing empty API string but got \"%v\"", err) } @@ -57,7 +57,7 @@ func TestParseApiString(t *testing.T) { t.Errorf("Expected 2 apis but got %d - %v", apis, apis) } - apis, err = ParseApiString("eth,invalid", codec.JSON, nil, nil) + apis, err = ParseApiString("exp,invalid", codec.JSON, nil, nil) if err == nil { t.Errorf("Expected an err but got no err") } @@ -92,9 +92,9 @@ func TestCompileSolidity(t *testing.T) { expLanguageVersion := "0" expSource := source - eth := ð.Ethereum{} - xeth := xeth.NewTest(eth, nil) - api := NewEthApi(xeth, eth, codec.JSON) + exp := &exp.Expanse{} + xeth := xeth.NewTest(exp, nil) + api := NewEthApi(xeth, exp, codec.JSON) var rpcRequest shared.Request json.Unmarshal([]byte(jsonstr), &rpcRequest) diff --git a/rpc/api/args.go b/rpc/api/args.go index 20f073b670..f9cfe50878 100644 --- a/rpc/api/args.go +++ b/rpc/api/args.go @@ -1,25 +1,25 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api import ( "encoding/json" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/rpc/shared" ) type CompileArgs struct { diff --git a/rpc/api/args_test.go b/rpc/api/args_test.go index 23ae2930d0..2661acae50 100644 --- a/rpc/api/args_test.go +++ b/rpc/api/args_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api @@ -23,7 +23,7 @@ import ( "math/big" "testing" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/rpc/shared" ) func TestBlockheightInvalidString(t *testing.T) { diff --git a/rpc/api/db.go b/rpc/api/db.go index 0eddc410ed..38917891e9 100644 --- a/rpc/api/db.go +++ b/rpc/api/db.go @@ -1,26 +1,26 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api import ( - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" - "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" + "github.com/expanse-project/go-expanse/xeth" ) const ( @@ -43,16 +43,16 @@ type dbhandler func(*dbApi, *shared.Request) (interface{}, error) // db api provider type dbApi struct { xeth *xeth.XEth - ethereum *eth.Ethereum + expanse *exp.Expanse methods map[string]dbhandler codec codec.ApiCoder } // create a new db api instance -func NewDbApi(xeth *xeth.XEth, ethereum *eth.Ethereum, coder codec.Codec) *dbApi { +func NewDbApi(xeth *xeth.XEth, expanse *exp.Expanse, coder codec.Codec) *dbApi { return &dbApi{ xeth: xeth, - ethereum: ethereum, + expanse: expanse, methods: DbMapping, codec: coder.New(nil), } diff --git a/rpc/api/db_args.go b/rpc/api/db_args.go index d61ea77ee0..10faecfe7e 100644 --- a/rpc/api/db_args.go +++ b/rpc/api/db_args.go @@ -1,26 +1,26 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api import ( "encoding/json" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/rpc/shared" ) type DbArgs struct { diff --git a/rpc/api/db_js.go b/rpc/api/db_js.go index 899f8abd9a..59fff32fef 100644 --- a/rpc/api/db_js.go +++ b/rpc/api/db_js.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api diff --git a/rpc/api/debug.go b/rpc/api/debug.go index cdacd6c62e..64bfd298d8 100644 --- a/rpc/api/debug.go +++ b/rpc/api/debug.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api @@ -21,14 +21,14 @@ import ( "strings" "time" - "github.com/ethereum/ethash" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/vm" - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/rlp" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" - "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/ethash" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/vm" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/rlp" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" + "github.com/expanse-project/go-expanse/xeth" "github.com/rcrowley/go-metrics" ) @@ -55,16 +55,16 @@ type debughandler func(*debugApi, *shared.Request) (interface{}, error) // admin api provider type debugApi struct { xeth *xeth.XEth - ethereum *eth.Ethereum + expanse *exp.Expanse methods map[string]debughandler codec codec.ApiCoder } // create a new debug api instance -func NewDebugApi(xeth *xeth.XEth, ethereum *eth.Ethereum, coder codec.Codec) *debugApi { +func NewDebugApi(xeth *xeth.XEth, expanse *exp.Expanse, coder codec.Codec) *debugApi { return &debugApi{ xeth: xeth, - ethereum: ethereum, + expanse: expanse, methods: DebugMapping, codec: coder.New(nil), } @@ -119,7 +119,7 @@ func (self *debugApi) DumpBlock(req *shared.Request) (interface{}, error) { return nil, fmt.Errorf("block #%d not found", args.BlockNumber) } - stateDb := state.New(block.Root(), self.ethereum.StateDb()) + stateDb := state.New(block.Root(), self.expanse.StateDb()) if stateDb == nil { return nil, nil } @@ -152,7 +152,7 @@ func (self *debugApi) SetHead(req *shared.Request) (interface{}, error) { return nil, fmt.Errorf("block #%d not found", args.BlockNumber) } - self.ethereum.ChainManager().SetHead(block) + self.expanse.ChainManager().SetHead(block) return nil, nil } @@ -172,7 +172,7 @@ func (self *debugApi) ProcessBlock(req *shared.Request) (interface{}, error) { defer func() { vm.Debug = old }() vm.Debug = true - _, err := self.ethereum.BlockProcessor().RetryProcess(block) + _, err := self.expanse.BlockProcessor().RetryProcess(block) if err == nil { return true, nil } diff --git a/rpc/api/debug_args.go b/rpc/api/debug_args.go index 041ad6b6ad..dee8ae54db 100644 --- a/rpc/api/debug_args.go +++ b/rpc/api/debug_args.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api @@ -22,7 +22,7 @@ import ( "math/big" "reflect" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/rpc/shared" ) type WaitForBlockArgs struct { diff --git a/rpc/api/debug_js.go b/rpc/api/debug_js.go index 0eb9f97f15..18b1587823 100644 --- a/rpc/api/debug_js.go +++ b/rpc/api/debug_js.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api diff --git a/rpc/api/eth.go b/rpc/api/eth.go index 4041811f06..bb49233d30 100644 --- a/rpc/api/eth.go +++ b/rpc/api/eth.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api @@ -23,11 +23,11 @@ import ( "fmt" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" - "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" + "github.com/expanse-project/go-expanse/xeth" "gopkg.in/fatih/set.v0" ) @@ -35,16 +35,16 @@ const ( EthApiVersion = "1.0" ) -// eth api provider -// See https://github.com/ethereum/wiki/wiki/JSON-RPC +// exp api provider +// See https://github.com/expanse-project/wiki/wiki/JSON-RPC type ethApi struct { xeth *xeth.XEth - ethereum *eth.Ethereum + expanse *exp.Expanse methods map[string]ethhandler codec codec.ApiCoder } -// eth callback handler +// exp callback handler type ethhandler func(*ethApi, *shared.Request) (interface{}, error) var ( @@ -99,8 +99,8 @@ var ( ) // create new ethApi instance -func NewEthApi(xeth *xeth.XEth, eth *eth.Ethereum, codec codec.Codec) *ethApi { - return ðApi{xeth, eth, ethMapping, codec.New(nil)} +func NewEthApi(xeth *xeth.XEth, exp *exp.Expanse, codec codec.Codec) *ethApi { + return ðApi{xeth, exp, ethMapping, codec.New(nil)} } // collection with supported methods @@ -581,10 +581,10 @@ func (self *ethApi) Resend(req *shared.Request) (interface{}, error) { from := common.HexToAddress(args.Tx.From) - pending := self.ethereum.TxPool().GetTransactions() + pending := self.expanse.TxPool().GetTransactions() for _, p := range pending { if pFrom, err := p.From(); err == nil && pFrom == from && p.SigHash() == args.Tx.tx.SigHash() { - self.ethereum.TxPool().RemoveTx(common.HexToHash(args.Tx.Hash)) + self.expanse.TxPool().RemoveTx(common.HexToHash(args.Tx.Hash)) return self.xeth.Transact(args.Tx.From, args.Tx.To, args.Tx.Nonce, args.Tx.Value, args.GasLimit, args.GasPrice, args.Tx.Data) } } @@ -593,11 +593,11 @@ func (self *ethApi) Resend(req *shared.Request) (interface{}, error) { } func (self *ethApi) PendingTransactions(req *shared.Request) (interface{}, error) { - txs := self.ethereum.TxPool().GetTransactions() + txs := self.expanse.TxPool().GetTransactions() // grab the accounts from the account manager. This will help with determining which // transactions should be returned. - accounts, err := self.ethereum.AccountManager().Accounts() + accounts, err := self.expanse.AccountManager().Accounts() if err != nil { return nil, err } diff --git a/rpc/api/eth_args.go b/rpc/api/eth_args.go index 1218bd6254..5b97d16f6a 100644 --- a/rpc/api/eth_args.go +++ b/rpc/api/eth_args.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api @@ -23,10 +23,10 @@ import ( "strconv" "strings" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/rpc/shared" ) const ( diff --git a/rpc/api/eth_js.go b/rpc/api/eth_js.go index 393dac22f4..728a20d782 100644 --- a/rpc/api/eth_js.go +++ b/rpc/api/eth_js.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api @@ -21,7 +21,7 @@ package api const Eth_JS = ` web3._extend({ - property: 'eth', + property: 'exp', methods: [ new web3._extend.Method({ diff --git a/rpc/api/mergedapi.go b/rpc/api/mergedapi.go index 8f4ef8e603..79993481e3 100644 --- a/rpc/api/mergedapi.go +++ b/rpc/api/mergedapi.go @@ -1,25 +1,25 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api import ( - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/rpc/shared" ) const ( @@ -29,14 +29,14 @@ const ( // combines multiple API's type MergedApi struct { apis map[string]string - methods map[string]shared.EthereumApi + methods map[string]shared.ExpanseApi } // create new merged api instance -func newMergedApi(apis ...shared.EthereumApi) *MergedApi { +func newMergedApi(apis ...shared.ExpanseApi) *MergedApi { mergedApi := new(MergedApi) mergedApi.apis = make(map[string]string, len(apis)) - mergedApi.methods = make(map[string]shared.EthereumApi) + mergedApi.methods = make(map[string]shared.ExpanseApi) for _, api := range apis { mergedApi.apis[api.Name()] = api.ApiVersion() diff --git a/rpc/api/miner.go b/rpc/api/miner.go index 3c3d1ee0b3..e3e71a9ccf 100644 --- a/rpc/api/miner.go +++ b/rpc/api/miner.go @@ -1,30 +1,30 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api import ( "fmt" - "github.com/ethereum/ethash" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/params" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/ethash" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/params" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" ) const ( @@ -51,15 +51,15 @@ type minerhandler func(*minerApi, *shared.Request) (interface{}, error) // miner api provider type minerApi struct { - ethereum *eth.Ethereum + expanse *exp.Expanse methods map[string]minerhandler codec codec.ApiCoder } // create a new miner api instance -func NewMinerApi(ethereum *eth.Ethereum, coder codec.Codec) *minerApi { +func NewMinerApi(expanse *exp.Expanse, coder codec.Codec) *minerApi { return &minerApi{ - ethereum: ethereum, + expanse: expanse, methods: MinerMapping, codec: coder.New(nil), } @@ -99,11 +99,11 @@ func (self *minerApi) StartMiner(req *shared.Request) (interface{}, error) { return nil, err } if args.Threads == -1 { // (not specified by user, use default) - args.Threads = self.ethereum.MinerThreads + args.Threads = self.expanse.MinerThreads } - self.ethereum.StartAutoDAG() - err := self.ethereum.StartMining(args.Threads) + self.expanse.StartAutoDAG() + err := self.expanse.StartMining(args.Threads) if err == nil { return true, nil } @@ -112,12 +112,12 @@ func (self *minerApi) StartMiner(req *shared.Request) (interface{}, error) { } func (self *minerApi) StopMiner(req *shared.Request) (interface{}, error) { - self.ethereum.StopMining() + self.expanse.StopMining() return true, nil } func (self *minerApi) Hashrate(req *shared.Request) (interface{}, error) { - return self.ethereum.Miner().HashRate(), nil + return self.expanse.Miner().HashRate(), nil } func (self *minerApi) SetExtra(req *shared.Request) (interface{}, error) { @@ -130,7 +130,7 @@ func (self *minerApi) SetExtra(req *shared.Request) (interface{}, error) { return false, fmt.Errorf("extra datasize can be no longer than %v bytes", params.MaximumExtraDataSize) } - self.ethereum.Miner().SetExtra([]byte(args.Data)) + self.expanse.Miner().SetExtra([]byte(args.Data)) return true, nil } @@ -140,7 +140,7 @@ func (self *minerApi) SetGasPrice(req *shared.Request) (interface{}, error) { return false, err } - self.ethereum.Miner().SetGasPrice(common.String2Big(args.Price)) + self.expanse.Miner().SetGasPrice(common.String2Big(args.Price)) return true, nil } @@ -149,17 +149,17 @@ func (self *minerApi) SetEtherbase(req *shared.Request) (interface{}, error) { if err := self.codec.Decode(req.Params, &args); err != nil { return false, err } - self.ethereum.SetEtherbase(args.Etherbase) + self.expanse.SetEtherbase(args.Etherbase) return nil, nil } func (self *minerApi) StartAutoDAG(req *shared.Request) (interface{}, error) { - self.ethereum.StartAutoDAG() + self.expanse.StartAutoDAG() return true, nil } func (self *minerApi) StopAutoDAG(req *shared.Request) (interface{}, error) { - self.ethereum.StopAutoDAG() + self.expanse.StopAutoDAG() return true, nil } diff --git a/rpc/api/miner_args.go b/rpc/api/miner_args.go index 5ceb244feb..868304d668 100644 --- a/rpc/api/miner_args.go +++ b/rpc/api/miner_args.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api @@ -21,8 +21,8 @@ import ( "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/rpc/shared" ) type StartMinerArgs struct { diff --git a/rpc/api/miner_js.go b/rpc/api/miner_js.go index 0998a9f41c..3a7fcdd9a1 100644 --- a/rpc/api/miner_js.go +++ b/rpc/api/miner_js.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api diff --git a/rpc/api/net.go b/rpc/api/net.go index 39c230e143..1d1b0015db 100644 --- a/rpc/api/net.go +++ b/rpc/api/net.go @@ -1,26 +1,26 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api import ( - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" - "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" + "github.com/expanse-project/go-expanse/xeth" ) const ( @@ -42,16 +42,16 @@ type nethandler func(*netApi, *shared.Request) (interface{}, error) // net api provider type netApi struct { xeth *xeth.XEth - ethereum *eth.Ethereum + expanse *exp.Expanse methods map[string]nethandler codec codec.ApiCoder } // create a new net api instance -func NewNetApi(xeth *xeth.XEth, eth *eth.Ethereum, coder codec.Codec) *netApi { +func NewNetApi(xeth *xeth.XEth, exp *exp.Expanse, coder codec.Codec) *netApi { return &netApi{ xeth: xeth, - ethereum: eth, + expanse: exp, methods: netMapping, codec: coder.New(nil), } diff --git a/rpc/api/net_js.go b/rpc/api/net_js.go index 2ee1f0041a..139c01ebd0 100644 --- a/rpc/api/net_js.go +++ b/rpc/api/net_js.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api diff --git a/rpc/api/parsing.go b/rpc/api/parsing.go index 0698e8dbe7..cd73a60090 100644 --- a/rpc/api/parsing.go +++ b/rpc/api/parsing.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api @@ -24,9 +24,9 @@ import ( "math/big" "strings" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/rpc/shared" ) type hexdata struct { diff --git a/rpc/api/personal.go b/rpc/api/personal.go index e9942c1e55..685a637601 100644 --- a/rpc/api/personal.go +++ b/rpc/api/personal.go @@ -1,29 +1,29 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api import ( "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" - "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" + "github.com/expanse-project/go-expanse/xeth" ) const ( @@ -46,16 +46,16 @@ type personalhandler func(*personalApi, *shared.Request) (interface{}, error) // net api provider type personalApi struct { xeth *xeth.XEth - ethereum *eth.Ethereum + expanse *exp.Expanse methods map[string]personalhandler codec codec.ApiCoder } // create a new net api instance -func NewPersonalApi(xeth *xeth.XEth, eth *eth.Ethereum, coder codec.Codec) *personalApi { +func NewPersonalApi(xeth *xeth.XEth, exp *exp.Expanse, coder codec.Codec) *personalApi { return &personalApi{ xeth: xeth, - ethereum: eth, + expanse: exp, methods: personalMapping, codec: coder.New(nil), } @@ -99,7 +99,7 @@ func (self *personalApi) NewAccount(req *shared.Request) (interface{}, error) { return nil, shared.NewDecodeParamError(err.Error()) } - am := self.ethereum.AccountManager() + am := self.expanse.AccountManager() acc, err := am.NewAccount(args.Passphrase) return acc.Address.Hex(), err } @@ -111,7 +111,7 @@ func (self *personalApi) DeleteAccount(req *shared.Request) (interface{}, error) } addr := common.HexToAddress(args.Address) - am := self.ethereum.AccountManager() + am := self.expanse.AccountManager() if err := am.DeleteAccount(addr, args.Passphrase); err == nil { return true, nil } else { @@ -126,7 +126,7 @@ func (self *personalApi) UnlockAccount(req *shared.Request) (interface{}, error) } var err error - am := self.ethereum.AccountManager() + am := self.expanse.AccountManager() addr := common.HexToAddress(args.Address) if args.Duration == -1 { diff --git a/rpc/api/personal_args.go b/rpc/api/personal_args.go index 7f00701e32..809c42698f 100644 --- a/rpc/api/personal_args.go +++ b/rpc/api/personal_args.go @@ -1,25 +1,25 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api import ( "encoding/json" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/rpc/shared" ) type NewAccountArgs struct { diff --git a/rpc/api/personal_js.go b/rpc/api/personal_js.go index 81c5d4a366..412c2c120e 100644 --- a/rpc/api/personal_js.go +++ b/rpc/api/personal_js.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api diff --git a/rpc/api/shh.go b/rpc/api/shh.go index 9ca6f9dda4..747bc9e975 100644 --- a/rpc/api/shh.go +++ b/rpc/api/shh.go @@ -1,28 +1,28 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api import ( "math/big" - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" - "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" + "github.com/expanse-project/go-expanse/xeth" ) const ( @@ -52,16 +52,16 @@ type shhhandler func(*shhApi, *shared.Request) (interface{}, error) // shh api provider type shhApi struct { xeth *xeth.XEth - ethereum *eth.Ethereum + expanse *exp.Expanse methods map[string]shhhandler codec codec.ApiCoder } // create a new whisper api instance -func NewShhApi(xeth *xeth.XEth, eth *eth.Ethereum, coder codec.Codec) *shhApi { +func NewShhApi(xeth *xeth.XEth, exp *exp.Expanse, coder codec.Codec) *shhApi { return &shhApi{ xeth: xeth, - ethereum: eth, + expanse: exp, methods: shhMapping, codec: coder.New(nil), } diff --git a/rpc/api/shh_args.go b/rpc/api/shh_args.go index 468a0b98fc..a1300c4e47 100644 --- a/rpc/api/shh_args.go +++ b/rpc/api/shh_args.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api @@ -21,7 +21,7 @@ import ( "fmt" "math/big" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/rpc/shared" ) type WhisperMessageArgs struct { diff --git a/rpc/api/ssh_js.go b/rpc/api/ssh_js.go index a92ad1644b..93d90ad985 100644 --- a/rpc/api/ssh_js.go +++ b/rpc/api/ssh_js.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api diff --git a/rpc/api/txpool.go b/rpc/api/txpool.go index 27e40cae59..cf92692934 100644 --- a/rpc/api/txpool.go +++ b/rpc/api/txpool.go @@ -1,26 +1,26 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api import ( - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" - "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" + "github.com/expanse-project/go-expanse/xeth" ) const ( @@ -40,16 +40,16 @@ type txpoolhandler func(*txPoolApi, *shared.Request) (interface{}, error) // txpool api provider type txPoolApi struct { xeth *xeth.XEth - ethereum *eth.Ethereum + expanse *exp.Expanse methods map[string]txpoolhandler codec codec.ApiCoder } // create a new txpool api instance -func NewTxPoolApi(xeth *xeth.XEth, eth *eth.Ethereum, coder codec.Codec) *txPoolApi { +func NewTxPoolApi(xeth *xeth.XEth, exp *exp.Expanse, coder codec.Codec) *txPoolApi { return &txPoolApi{ xeth: xeth, - ethereum: eth, + expanse: exp, methods: txpoolMapping, codec: coder.New(nil), } @@ -84,7 +84,7 @@ func (self *txPoolApi) ApiVersion() string { } func (self *txPoolApi) Status(req *shared.Request) (interface{}, error) { - pending, queue := self.ethereum.TxPool().Stats() + pending, queue := self.expanse.TxPool().Stats() return map[string]int{ "pending": pending, "queued": queue, diff --git a/rpc/api/txpool_js.go b/rpc/api/txpool_js.go index b6c29871a2..355dc2b845 100644 --- a/rpc/api/txpool_js.go +++ b/rpc/api/txpool_js.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api diff --git a/rpc/api/utils.go b/rpc/api/utils.go index 50c607d16b..7857347365 100644 --- a/rpc/api/utils.go +++ b/rpc/api/utils.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api @@ -21,10 +21,10 @@ import ( "fmt" - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" - "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" + "github.com/expanse-project/go-expanse/xeth" ) var ( @@ -64,7 +64,7 @@ var ( "seedHash", "setHead", }, - "eth": []string{ + "exp": []string{ "accounts", "blockNumber", "call", @@ -147,34 +147,34 @@ var ( ) // Parse a comma separated API string to individual api's -func ParseApiString(apistr string, codec codec.Codec, xeth *xeth.XEth, eth *eth.Ethereum) ([]shared.EthereumApi, error) { +func ParseApiString(apistr string, codec codec.Codec, xeth *xeth.XEth, exp *exp.Expanse) ([]shared.ExpanseApi, error) { if len(strings.TrimSpace(apistr)) == 0 { return nil, fmt.Errorf("Empty apistr provided") } names := strings.Split(apistr, ",") - apis := make([]shared.EthereumApi, len(names)) + apis := make([]shared.ExpanseApi, len(names)) for i, name := range names { switch strings.ToLower(strings.TrimSpace(name)) { case shared.AdminApiName: - apis[i] = NewAdminApi(xeth, eth, codec) + apis[i] = NewAdminApi(xeth, exp, codec) case shared.DebugApiName: - apis[i] = NewDebugApi(xeth, eth, codec) + apis[i] = NewDebugApi(xeth, exp, codec) case shared.DbApiName: - apis[i] = NewDbApi(xeth, eth, codec) + apis[i] = NewDbApi(xeth, exp, codec) case shared.EthApiName: - apis[i] = NewEthApi(xeth, eth, codec) + apis[i] = NewEthApi(xeth, exp, codec) case shared.MinerApiName: - apis[i] = NewMinerApi(eth, codec) + apis[i] = NewMinerApi(exp, codec) case shared.NetApiName: - apis[i] = NewNetApi(xeth, eth, codec) + apis[i] = NewNetApi(xeth, exp, codec) case shared.ShhApiName: - apis[i] = NewShhApi(xeth, eth, codec) + apis[i] = NewShhApi(xeth, exp, codec) case shared.TxPoolApiName: - apis[i] = NewTxPoolApi(xeth, eth, codec) + apis[i] = NewTxPoolApi(xeth, exp, codec) case shared.PersonalApiName: - apis[i] = NewPersonalApi(xeth, eth, codec) + apis[i] = NewPersonalApi(xeth, exp, codec) case shared.Web3ApiName: apis[i] = NewWeb3Api(xeth, codec) default: diff --git a/rpc/api/web3.go b/rpc/api/web3.go index e2d8543d34..422595b476 100644 --- a/rpc/api/web3.go +++ b/rpc/api/web3.go @@ -1,27 +1,27 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api import ( - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" - "github.com/ethereum/go-ethereum/xeth" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" + "github.com/expanse-project/go-expanse/xeth" ) const ( diff --git a/rpc/api/web3_args.go b/rpc/api/web3_args.go index 9e39f7130f..d520a42a2e 100644 --- a/rpc/api/web3_args.go +++ b/rpc/api/web3_args.go @@ -1,25 +1,25 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package api import ( "encoding/json" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/rpc/shared" ) type Sha3Args struct { diff --git a/rpc/codec/codec.go b/rpc/codec/codec.go index 2fdb0d8f3e..398b18a2c4 100644 --- a/rpc/codec/codec.go +++ b/rpc/codec/codec.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package codec @@ -20,7 +20,7 @@ import ( "net" "strconv" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/rpc/shared" ) type Codec int diff --git a/rpc/codec/json.go b/rpc/codec/json.go index d811b20968..d517cf83ce 100644 --- a/rpc/codec/json.go +++ b/rpc/codec/json.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package codec @@ -22,7 +22,7 @@ import ( "net" "time" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/rpc/shared" ) const ( diff --git a/rpc/codec/json_test.go b/rpc/codec/json_test.go index 01ef77e57d..40b586c112 100644 --- a/rpc/codec/json_test.go +++ b/rpc/codec/json_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package codec diff --git a/rpc/comms/comms.go b/rpc/comms/comms.go index f5eeae84fb..53c05ed647 100644 --- a/rpc/comms/comms.go +++ b/rpc/comms/comms.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package comms @@ -25,10 +25,10 @@ import ( "strconv" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" ) const ( @@ -48,7 +48,7 @@ var ( }, ",") ) -type EthereumClient interface { +type ExpanseClient interface { // Close underlaying connection Close() // Send request @@ -59,7 +59,7 @@ type EthereumClient interface { SupportedModules() (map[string]string, error) } -func handle(id int, conn net.Conn, api shared.EthereumApi, c codec.Codec) { +func handle(id int, conn net.Conn, api shared.ExpanseApi, c codec.Codec) { codec := c.New(conn) for { @@ -108,9 +108,9 @@ func handle(id int, conn net.Conn, api shared.EthereumApi, c codec.Codec) { // Endpoint must be in the form of: // ${protocol}:${path} -// e.g. ipc:/tmp/geth.ipc -// rpc:localhost:8545 -func ClientFromEndpoint(endpoint string, c codec.Codec) (EthereumClient, error) { +// e.g. ipc:/tmp/gexp.ipc +// rpc:localhost:9656 +func ClientFromEndpoint(endpoint string, c codec.Codec) (ExpanseClient, error) { if strings.HasPrefix(endpoint, "ipc:") { cfg := IpcConfig{ Endpoint: endpoint[4:], @@ -121,7 +121,7 @@ func ClientFromEndpoint(endpoint string, c codec.Codec) (EthereumClient, error) if strings.HasPrefix(endpoint, "rpc:") { parts := strings.Split(endpoint, ":") addr := "http://localhost" - port := uint(8545) + port := uint(9656) if len(parts) >= 3 { addr = parts[1] + ":" + parts[2] } diff --git a/rpc/comms/http.go b/rpc/comms/http.go index c08b744a13..090f2f595d 100644 --- a/rpc/comms/http.go +++ b/rpc/comms/http.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package comms @@ -29,11 +29,11 @@ import ( "io" "io/ioutil" - "github.com/ethereum/go-ethereum/fdtrack" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/fdtrack" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" "github.com/rs/cors" ) @@ -67,11 +67,11 @@ type stopServer struct { type handler struct { codec codec.Codec - api shared.EthereumApi + api shared.ExpanseApi } // StartHTTP starts listening for RPC requests sent via HTTP. -func StartHttp(cfg HttpConfig, codec codec.Codec, api shared.EthereumApi) error { +func StartHttp(cfg HttpConfig, codec codec.Codec, api shared.ExpanseApi) error { httpServerMu.Lock() defer httpServerMu.Unlock() diff --git a/rpc/comms/inproc.go b/rpc/comms/inproc.go index f279f0163d..cf4af63340 100644 --- a/rpc/comms/inproc.go +++ b/rpc/comms/inproc.go @@ -1,30 +1,30 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package comms import ( "fmt" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" ) type InProcClient struct { - api shared.EthereumApi + api shared.ExpanseApi codec codec.Codec lastId interface{} lastJsonrpc string @@ -44,7 +44,7 @@ func (self *InProcClient) Close() { } // Need to setup api support -func (self *InProcClient) Initialize(offeredApi shared.EthereumApi) { +func (self *InProcClient) Initialize(offeredApi shared.ExpanseApi) { self.api = offeredApi } diff --git a/rpc/comms/ipc.go b/rpc/comms/ipc.go index 0250aa01e0..122546c18d 100644 --- a/rpc/comms/ipc.go +++ b/rpc/comms/ipc.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package comms @@ -23,8 +23,8 @@ import ( "encoding/json" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" ) type IpcConfig struct { @@ -109,7 +109,7 @@ func NewIpcClient(cfg IpcConfig, codec codec.Codec) (*ipcClient, error) { } // Start IPC server -func StartIpc(cfg IpcConfig, codec codec.Codec, offeredApi shared.EthereumApi) error { +func StartIpc(cfg IpcConfig, codec codec.Codec, offeredApi shared.ExpanseApi) error { return startIpc(cfg, codec, offeredApi) } diff --git a/rpc/comms/ipc_unix.go b/rpc/comms/ipc_unix.go index 432bf93b53..3e8094445e 100644 --- a/rpc/comms/ipc_unix.go +++ b/rpc/comms/ipc_unix.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris @@ -22,11 +22,11 @@ import ( "net" "os" - "github.com/ethereum/go-ethereum/fdtrack" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/fdtrack" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" ) func newIpcClient(cfg IpcConfig, codec codec.Codec) (*ipcClient, error) { @@ -48,7 +48,7 @@ func (self *ipcClient) reconnect() error { return err } -func startIpc(cfg IpcConfig, codec codec.Codec, api shared.EthereumApi) error { +func startIpc(cfg IpcConfig, codec codec.Codec, api shared.ExpanseApi) error { os.Remove(cfg.Endpoint) // in case it still exists from a previous run l, err := net.Listen("unix", cfg.Endpoint) diff --git a/rpc/comms/ipc_windows.go b/rpc/comms/ipc_windows.go index ee49f069bf..7dd0699d10 100644 --- a/rpc/comms/ipc_windows.go +++ b/rpc/comms/ipc_windows.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // +build windows @@ -28,10 +28,10 @@ import ( "time" "unsafe" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/rpc/codec" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/rpc/codec" + "github.com/expanse-project/go-expanse/rpc/shared" ) var ( @@ -667,7 +667,7 @@ func (self *ipcClient) reconnect() error { return err } -func startIpc(cfg IpcConfig, codec codec.Codec, api shared.EthereumApi) error { +func startIpc(cfg IpcConfig, codec codec.Codec, api shared.ExpanseApi) error { os.Remove(cfg.Endpoint) // in case it still exists from a previous run l, err := Listen(cfg.Endpoint) diff --git a/rpc/jeth.go b/rpc/jeth.go index 07add2bad8..86d75e6896 100644 --- a/rpc/jeth.go +++ b/rpc/jeth.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package rpc @@ -21,19 +21,19 @@ import ( "fmt" - "github.com/ethereum/go-ethereum/jsre" - "github.com/ethereum/go-ethereum/rpc/comms" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/jsre" + "github.com/expanse-project/go-expanse/rpc/comms" + "github.com/expanse-project/go-expanse/rpc/shared" "github.com/robertkrimen/otto" ) type Jeth struct { - ethApi shared.EthereumApi + ethApi shared.ExpanseApi re *jsre.JSRE - client comms.EthereumClient + client comms.ExpanseClient } -func NewJeth(ethApi shared.EthereumApi, re *jsre.JSRE, client comms.EthereumClient) *Jeth { +func NewJeth(ethApi shared.ExpanseApi, re *jsre.JSRE, client comms.ExpanseClient) *Jeth { return &Jeth{ethApi, re, client} } diff --git a/rpc/shared/errors.go b/rpc/shared/errors.go index 85af1bb2f4..5df8996c30 100644 --- a/rpc/shared/errors.go +++ b/rpc/shared/errors.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package shared diff --git a/rpc/shared/types.go b/rpc/shared/types.go index 659b74bf60..8dba495de4 100644 --- a/rpc/shared/types.go +++ b/rpc/shared/types.go @@ -1,30 +1,30 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package shared import ( "encoding/json" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" ) -// Ethereum RPC API interface -type EthereumApi interface { +// Expanse RPC API interface +type ExpanseApi interface { // API identifier Name() string diff --git a/rpc/shared/utils.go b/rpc/shared/utils.go index b13e9eb1b4..eb241d0097 100644 --- a/rpc/shared/utils.go +++ b/rpc/shared/utils.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package shared @@ -20,7 +20,7 @@ import "strings" const ( AdminApiName = "admin" - EthApiName = "eth" + EthApiName = "exp" DbApiName = "db" DebugApiName = "debug" MergedApiName = "merged" diff --git a/rpc/xeth.go b/rpc/xeth.go index 65a1edeb8a..8488a88aca 100644 --- a/rpc/xeth.go +++ b/rpc/xeth.go @@ -1,20 +1,20 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -// Package rpc implements the Ethereum JSON-RPC API. +// Package rpc implements the Expanse JSON-RPC API. package rpc import ( @@ -23,18 +23,18 @@ import ( "reflect" "sync/atomic" - "github.com/ethereum/go-ethereum/rpc/comms" - "github.com/ethereum/go-ethereum/rpc/shared" + "github.com/expanse-project/go-expanse/rpc/comms" + "github.com/expanse-project/go-expanse/rpc/shared" ) // Xeth is a native API interface to a remote node. type Xeth struct { - client comms.EthereumClient + client comms.ExpanseClient reqId uint32 } // NewXeth constructs a new native API interface to a remote node. -func NewXeth(client comms.EthereumClient) *Xeth { +func NewXeth(client comms.ExpanseClient) *Xeth { return &Xeth{ client: client, } diff --git a/tests/block_test.go b/tests/block_test.go index f42b474b72..910884fadf 100644 --- a/tests/block_test.go +++ b/tests/block_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package tests diff --git a/tests/block_test_util.go b/tests/block_test_util.go index 42e4383d1c..35e086df7a 100644 --- a/tests/block_test_util.go +++ b/tests/block_test_util.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package tests @@ -28,16 +28,16 @@ import ( "strings" "time" - "github.com/ethereum/go-ethereum/accounts" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/accounts" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/rlp" ) // Block Test JSON Format @@ -162,23 +162,23 @@ func runBlockTest(test *BlockTest) error { cfg := test.makeEthConfig() cfg.GenesisBlock = test.Genesis - ethereum, err := eth.New(cfg) + expanse, err := exp.New(cfg) if err != nil { return err } - err = ethereum.Start() + err = expanse.Start() if err != nil { return err } // import pre accounts - statedb, err := test.InsertPreState(ethereum) + statedb, err := test.InsertPreState(expanse) if err != nil { return fmt.Errorf("InsertPreState: %v", err) } - err = test.TryBlocksInsert(ethereum.ChainManager()) + err = test.TryBlocksInsert(expanse.ChainManager()) if err != nil { return err } @@ -189,10 +189,10 @@ func runBlockTest(test *BlockTest) error { return nil } -func (test *BlockTest) makeEthConfig() *eth.Config { +func (test *BlockTest) makeEthConfig() *exp.Config { ks := crypto.NewKeyStorePassphrase(filepath.Join(common.DefaultDataDir(), "keystore")) - return ð.Config{ + return &exp.Config{ DataDir: common.DefaultDataDir(), Verbosity: 5, Etherbase: common.Address{}, @@ -203,8 +203,8 @@ func (test *BlockTest) makeEthConfig() *eth.Config { // InsertPreState populates the given database with the genesis // accounts defined by the test. -func (t *BlockTest) InsertPreState(ethereum *eth.Ethereum) (*state.StateDB, error) { - db := ethereum.StateDb() +func (t *BlockTest) InsertPreState(expanse *exp.Expanse) (*state.StateDB, error) { + db := expanse.StateDb() statedb := state.New(common.Hash{}, db) for addrString, acct := range t.preAccounts { addr, err := hex.DecodeString(addrString) @@ -227,7 +227,7 @@ func (t *BlockTest) InsertPreState(ethereum *eth.Ethereum) (*state.StateDB, erro if acct.PrivateKey != "" { privkey, err := hex.DecodeString(strings.TrimPrefix(acct.PrivateKey, "0x")) err = crypto.ImportBlockTestKey(privkey) - err = ethereum.AccountManager().TimedUnlock(common.BytesToAddress(addr), "", 999999*time.Second) + err = expanse.AccountManager().TimedUnlock(common.BytesToAddress(addr), "", 999999*time.Second) if err != nil { return nil, err } @@ -252,7 +252,7 @@ func (t *BlockTest) InsertPreState(ethereum *eth.Ethereum) (*state.StateDB, erro return statedb, nil } -/* See https://github.com/ethereum/tests/wiki/Blockchain-Tests-II +/* See https://github.com/expanse-project/tests/wiki/Blockchain-Tests-II Whether a block is valid or not is a bit subtle, it's defined by presence of blockHeader, transactions and uncleHeaders fields. If they are missing, the block is diff --git a/tests/files/ansible/roles/common/tasks/main.yml b/tests/files/ansible/roles/common/tasks/main.yml index 6c0c7a1197..df92ba07a3 100755 --- a/tests/files/ansible/roles/common/tasks/main.yml +++ b/tests/files/ansible/roles/common/tasks/main.yml @@ -8,6 +8,6 @@ - name: checkout test repo git: - repo: https://github.com/ethereum/tests.git + repo: https://github.com/expanse-project/tests.git version: develop dest: git diff --git a/tests/files/ansible/roles/ec2/vars/main.yml b/tests/files/ansible/roles/ec2/vars/main.yml index 3166da02cd..0dec1612e0 100755 --- a/tests/files/ansible/roles/ec2/vars/main.yml +++ b/tests/files/ansible/roles/ec2/vars/main.yml @@ -12,6 +12,6 @@ keypair: christoph ip_access_range: 0.0.0.0/0 -project_description: https://github.com/ethereum/tests +project_description: https://github.com/expanse-project/tests total_no_instances: 3 diff --git a/tests/files/ansible/roles/testrunner/tasks/main.yml b/tests/files/ansible/roles/testrunner/tasks/main.yml index 41c195f245..d4b00ebe56 100755 --- a/tests/files/ansible/roles/testrunner/tasks/main.yml +++ b/tests/files/ansible/roles/testrunner/tasks/main.yml @@ -2,7 +2,7 @@ - name: update C++ client docker_image: path: /home/{{ ansible_ssh_user }}/git/ansible/test-files/docker-cppjit - name: ethereum/cppjit-testrunner + name: expanse/cppjit-testrunner state: build async: 1200 poll: 5 @@ -10,7 +10,7 @@ - name: update Go client docker_image: path: /home/{{ ansible_ssh_user }}/git/ansible/test-files/docker-go - name: ethereum/go-testrunner + name: expanse/go-testrunner state: build async: 1200 poll: 5 @@ -18,7 +18,7 @@ - name: update Python client docker_image: path: /home/{{ ansible_ssh_user }}/git/ansible/test-files/docker-python - name: ethereum/python-testrunner + name: expanse/python-testrunner state: build async: 1200 poll: 5 diff --git a/tests/files/ansible/test-files/create-docker-images.sh b/tests/files/ansible/test-files/create-docker-images.sh index 06728c6d72..a6b149a20f 100755 --- a/tests/files/ansible/test-files/create-docker-images.sh +++ b/tests/files/ansible/test-files/create-docker-images.sh @@ -2,6 +2,6 @@ # creates the necessary docker images to run testrunner.sh locally -docker build --tag="ethereum/cppjit-testrunner" docker-cppjit -docker build --tag="ethereum/python-testrunner" docker-python -docker build --tag="ethereum/go-testrunner" docker-go +docker build --tag="expanse/cppjit-testrunner" docker-cppjit +docker build --tag="expanse/python-testrunner" docker-python +docker build --tag="expanse/go-testrunner" docker-go diff --git a/tests/files/ansible/test-files/docker-cpp/Dockerfile b/tests/files/ansible/test-files/docker-cpp/Dockerfile index a3b0e4ca6d..40b5f353a1 100755 --- a/tests/files/ansible/test-files/docker-cpp/Dockerfile +++ b/tests/files/ansible/test-files/docker-cpp/Dockerfile @@ -1,32 +1,32 @@ -# adjusted from https://github.com/ethereum/cpp-ethereum/blob/develop/docker/Dockerfile +# adjusted from https://github.com/expanse-project/cpp-expanse/blob/develop/docker/Dockerfile FROM ubuntu:14.04 ENV DEBIAN_FRONTEND noninteractive RUN apt-get update RUN apt-get upgrade -y -# Ethereum dependencies +# Expanse dependencies RUN apt-get install -qy build-essential g++-4.8 git cmake libboost-all-dev libcurl4-openssl-dev wget RUN apt-get install -qy automake unzip libgmp-dev libtool libleveldb-dev yasm libminiupnpc-dev libreadline-dev scons RUN apt-get install -qy libjsoncpp-dev libargtable2-dev -# NCurses based GUI (not optional though for a succesful compilation, see https://github.com/ethereum/cpp-ethereum/issues/452 ) +# NCurses based GUI (not optional though for a succesful compilation, see https://github.com/expanse-project/cpp-expanse/issues/452 ) RUN apt-get install -qy libncurses5-dev # Qt-based GUI # RUN apt-get install -qy qtbase5-dev qt5-default qtdeclarative5-dev libqt5webkit5-dev -# Ethereum PPA +# Expanse PPA RUN apt-get install -qy software-properties-common -RUN add-apt-repository ppa:ethereum/ethereum +RUN add-apt-repository ppa:expanse/expanse RUN apt-get update RUN apt-get install -qy libcryptopp-dev libjson-rpc-cpp-dev -# Build Ethereum (HEADLESS) -RUN git clone --depth=1 --branch develop https://github.com/ethereum/cpp-ethereum -RUN mkdir -p cpp-ethereum/build -RUN cd cpp-ethereum/build && cmake .. -DCMAKE_BUILD_TYPE=Release -DHEADLESS=1 && make -j $(cat /proc/cpuinfo | grep processor | wc -l) && make install +# Build Expanse (HEADLESS) +RUN git clone --depth=1 --branch develop https://github.com/expanse-project/cpp-expanse +RUN mkdir -p cpp-expanse/build +RUN cd cpp-expanse/build && cmake .. -DCMAKE_BUILD_TYPE=Release -DHEADLESS=1 && make -j $(cat /proc/cpuinfo | grep processor | wc -l) && make install RUN ldconfig -ENTRYPOINT ["/cpp-ethereum/build/test/createRandomTest"] +ENTRYPOINT ["/cpp-expanse/build/test/createRandomTest"] diff --git a/tests/files/ansible/test-files/docker-cppjit/Dockerfile b/tests/files/ansible/test-files/docker-cppjit/Dockerfile index 2b10727f05..fef8e31242 100755 --- a/tests/files/ansible/test-files/docker-cppjit/Dockerfile +++ b/tests/files/ansible/test-files/docker-cppjit/Dockerfile @@ -1,16 +1,16 @@ -# adjusted from https://github.com/ethereum/cpp-ethereum/blob/develop/docker/Dockerfile +# adjusted from https://github.com/expanse-project/cpp-expanse/blob/develop/docker/Dockerfile FROM ubuntu:14.04 ENV DEBIAN_FRONTEND noninteractive RUN apt-get update RUN apt-get upgrade -y -# Ethereum dependencies +# Expanse dependencies RUN apt-get install -qy build-essential g++-4.8 git cmake libboost-all-dev libcurl4-openssl-dev wget RUN apt-get install -qy automake unzip libgmp-dev libtool libleveldb-dev yasm libminiupnpc-dev libreadline-dev scons RUN apt-get install -qy libjsoncpp-dev libargtable2-dev -# NCurses based GUI (not optional though for a succesful compilation, see https://github.com/ethereum/cpp-ethereum/issues/452 ) +# NCurses based GUI (not optional though for a succesful compilation, see https://github.com/expanse-project/cpp-expanse/issues/452 ) RUN apt-get install -qy libncurses5-dev # Qt-based GUI @@ -28,19 +28,19 @@ RUN apt-get install -qy llvm-3.5 libedit-dev RUN mkdir -p /usr/lib/llvm-3.5/share/llvm && ln -s /usr/share/llvm-3.5/cmake /usr/lib/llvm-3.5/share/llvm/cmake -# Ethereum PPA +# Expanse PPA RUN apt-get install -qy software-properties-common -RUN add-apt-repository ppa:ethereum/ethereum +RUN add-apt-repository ppa:expanse/expanse RUN apt-get update RUN apt-get install -qy libcryptopp-dev libjson-rpc-cpp-dev # this is a workaround, to make sure that docker's cache is invalidated whenever the git repo changes -ADD https://api.github.com/repos/ethereum/cpp-ethereum/git/refs/heads/develop unused.txt +ADD https://api.github.com/repos/expanse/cpp-expanse/git/refs/heads/develop unused.txt -# Build Ethereum (HEADLESS) -RUN git clone --depth=1 --branch develop https://github.com/ethereum/cpp-ethereum -RUN mkdir -p cpp-ethereum/build -RUN cd cpp-ethereum/build && cmake .. -DCMAKE_BUILD_TYPE=Debug -DVMTRACE=1 -DPARANOIA=1 -DEVMJIT=1 && make -j $(cat /proc/cpuinfo | grep processor | wc -l) && make install +# Build Expanse (HEADLESS) +RUN git clone --depth=1 --branch develop https://github.com/expanse-project/cpp-expanse +RUN mkdir -p cpp-expanse/build +RUN cd cpp-expanse/build && cmake .. -DCMAKE_BUILD_TYPE=Debug -DVMTRACE=1 -DPARANOIA=1 -DEVMJIT=1 && make -j $(cat /proc/cpuinfo | grep processor | wc -l) && make install RUN ldconfig -ENTRYPOINT ["/cpp-ethereum/build/test/checkRandomStateTest"] +ENTRYPOINT ["/cpp-expanse/build/test/checkRandomStateTest"] diff --git a/tests/files/ansible/test-files/docker-go/Dockerfile b/tests/files/ansible/test-files/docker-go/Dockerfile index a5a2f0f231..e132659e59 100755 --- a/tests/files/ansible/test-files/docker-go/Dockerfile +++ b/tests/files/ansible/test-files/docker-go/Dockerfile @@ -1,4 +1,4 @@ -# Adjusted from https://github.com/ethereum/go-ethereum/blob/develop/Dockerfile +# Adjusted from https://github.com/expanse-project/go-expanse/blob/develop/Dockerfile FROM ubuntu:14.04 ## Environment setup @@ -31,17 +31,17 @@ RUN git checkout v1 RUN go install -v # this is a workaround, to make sure that docker's cache is invalidated whenever the git repo changes -ADD https://api.github.com/repos/ethereum/go-ethereum/git/refs/heads/develop unused.txt +ADD https://api.github.com/repos/expanse/go-expanse/git/refs/heads/develop unused.txt -## Fetch and install go-ethereum -RUN go get -u -v -d github.com/ethereum/go-ethereum/... -WORKDIR $GOPATH/src/github.com/ethereum/go-ethereum +## Fetch and install go-expanse +RUN go get -u -v -d github.com/expanse-project/go-expanse/... +WORKDIR $GOPATH/src/github.com/expanse-project/go-expanse RUN git checkout develop RUN git pull -RUN ETH_DEPS=$(go list -f '{{.Imports}} {{.TestImports}} {{.XTestImports}}' github.com/ethereum/go-ethereum/... | sed -e 's/\[//g' | sed -e 's/\]//g' | sed -e 's/C //g'); if [ "$ETH_DEPS" ]; then go get $ETH_DEPS; fi +RUN ETH_DEPS=$(go list -f '{{.Imports}} {{.TestImports}} {{.XTestImports}}' github.com/expanse-project/go-expanse/... | sed -e 's/\[//g' | sed -e 's/\]//g' | sed -e 's/C //g'); if [ "$ETH_DEPS" ]; then go get $ETH_DEPS; fi RUN go install -v ./cmd/ethtest ENTRYPOINT ["ethtest"] diff --git a/tests/files/ansible/test-files/docker-python/Dockerfile b/tests/files/ansible/test-files/docker-python/Dockerfile index e83faf3d6e..c8e0427f63 100755 --- a/tests/files/ansible/test-files/docker-python/Dockerfile +++ b/tests/files/ansible/test-files/docker-python/Dockerfile @@ -7,16 +7,16 @@ RUN apt-get upgrade -y RUN apt-get install -qy curl git python2.7 python-pip python-dev # this is a workaround, to make sure that docker's cache is invalidated whenever the git repo changes -ADD https://api.github.com/repos/ethereum/pyethereum/git/refs/heads/develop unused.txt +ADD https://api.github.com/repos/expanse/pyethereum/git/refs/heads/develop unused.txt -RUN git clone --branch develop --recursive https://github.com/ethereum/pyethereum.git +RUN git clone --branch develop --recursive https://github.com/expanse-project/pyethereum.git RUN cd pyethereum && curl https://bootstrap.pypa.io/bootstrap-buildout.py | python RUN cd pyethereum && bin/buildout #default port for incoming requests -EXPOSE 30303 +EXPOSE 60606 WORKDIR /pyethereum diff --git a/tests/files/ansible/test-files/testrunner.sh b/tests/files/ansible/test-files/testrunner.sh index c7763b1f12..91f310ba4f 100755 --- a/tests/files/ansible/test-files/testrunner.sh +++ b/tests/files/ansible/test-files/testrunner.sh @@ -7,19 +7,19 @@ cd ~/testout export EVMJIT="-cache=0" while [ 1 ] do - TEST="$(docker run --rm --entrypoint=\"/cpp-ethereum/build/test/createRandomStateTest\" ethereum/cppjit-testrunner)" + TEST="$(docker run --rm --entrypoint=\"/cpp-expanse/build/test/createRandomStateTest\" expanse/cppjit-testrunner)" # echo "$TEST" # test pyethereum - OUTPUT_PYTHON="$(docker run --rm ethereum/python-testrunner --notrace <<< "$TEST")" + OUTPUT_PYTHON="$(docker run --rm expanse/python-testrunner --notrace <<< "$TEST")" RESULT_PYTHON=$? # test go - OUTPUT_GO="$(docker run --rm ethereum/go-testrunner "$TEST")" + OUTPUT_GO="$(docker run --rm expanse/go-testrunner "$TEST")" RESULT_GO=$? # test cpp-jit - OUTPUT_CPPJIT="$(docker run --rm ethereum/cppjit-testrunner "$TEST")" + OUTPUT_CPPJIT="$(docker run --rm expanse/cppjit-testrunner "$TEST")" RESULT_CPPJIT=$? # go fails diff --git a/tests/files/package.json b/tests/files/package.json index 1e0ad9c289..c4050a7a82 100755 --- a/tests/files/package.json +++ b/tests/files/package.json @@ -1,25 +1,25 @@ { - "name": "ethereum-tests", + "name": "expanse-tests", "version": "0.0.6", - "description": "tests for ethereum", + "description": "tests for expanse", "main": "index.js", "scripts": { "test": "echo \"There are no tests for there tests\" && exit 1" }, "repository": { "type": "git", - "url": "https://github.com/ethereum/tests" + "url": "https://github.com/expanse-project/tests" }, "keywords": [ "tests", - "ethereum" + "expanse" ], "author": "", "license": "MIT", "bugs": { - "url": "https://github.com/ethereum/tests/issues" + "url": "https://github.com/expanse-project/tests/issues" }, - "homepage": "https://github.com/ethereum/tests", + "homepage": "https://github.com/expanse-project/tests", "dependencies": { "require-all": "^1.0.0" } diff --git a/tests/init.go b/tests/init.go index 3f8b8c6844..154498554f 100644 --- a/tests/init.go +++ b/tests/init.go @@ -1,20 +1,20 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -// Package tests implements execution of Ethereum JSON tests. +// Package tests implements execution of Expanse JSON tests. package tests import ( @@ -26,7 +26,7 @@ import ( "os" "path/filepath" - "github.com/ethereum/go-ethereum/core" + "github.com/expanse-project/go-expanse/core" ) var ( diff --git a/tests/rlp_test.go b/tests/rlp_test.go index 2469ce0dbc..77135feb01 100644 --- a/tests/rlp_test.go +++ b/tests/rlp_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package tests diff --git a/tests/rlp_test_util.go b/tests/rlp_test_util.go index ac53a4f52c..51e3c1e6f6 100644 --- a/tests/rlp_test_util.go +++ b/tests/rlp_test_util.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package tests @@ -26,7 +26,7 @@ import ( "os" "strings" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/rlp" ) // RLPTest is the JSON structure of a single RLP test. diff --git a/tests/state_test.go b/tests/state_test.go index 1684614df2..a0c98faae8 100644 --- a/tests/state_test.go +++ b/tests/state_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package tests diff --git a/tests/state_test_util.go b/tests/state_test_util.go index 7086de3897..189b61f061 100644 --- a/tests/state_test_util.go +++ b/tests/state_test_util.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package tests @@ -24,13 +24,13 @@ import ( "math/big" "strconv" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/vm" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/vm" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/logger/glog" ) func RunStateTestWithReader(r io.Reader, skipTests []string) error { diff --git a/tests/transaction_test.go b/tests/transaction_test.go index f1dfbd0a7f..2439bf1391 100644 --- a/tests/transaction_test.go +++ b/tests/transaction_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package tests diff --git a/tests/transaction_test_util.go b/tests/transaction_test_util.go index 09511acb79..bc633fb717 100644 --- a/tests/transaction_test_util.go +++ b/tests/transaction_test_util.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package tests @@ -23,10 +23,10 @@ import ( "io" "runtime" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/rlp" ) // Transaction Test JSON Format diff --git a/tests/util.go b/tests/util.go index 6ee1a42db7..caf3ed3947 100644 --- a/tests/util.go +++ b/tests/util.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package tests @@ -22,12 +22,12 @@ import ( "fmt" "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/core/vm" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/core/vm" + "github.com/expanse-project/go-expanse/crypto" ) func checkLogs(tlog []Log, logs state.Logs) error { diff --git a/tests/vm_test.go b/tests/vm_test.go index 3674ed440e..ec7089a590 100644 --- a/tests/vm_test.go +++ b/tests/vm_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package tests diff --git a/tests/vm_test_util.go b/tests/vm_test_util.go index e63a92558d..b4581c63d8 100644 --- a/tests/vm_test_util.go +++ b/tests/vm_test_util.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package tests @@ -23,11 +23,11 @@ import ( "math/big" "strconv" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/vm" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/vm" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/logger/glog" ) func RunVmTestWithReader(r io.Reader, skipTests []string) error { diff --git a/trie/cache.go b/trie/cache.go index 2705b0e450..b4174f0bdf 100644 --- a/trie/cache.go +++ b/trie/cache.go @@ -1,24 +1,24 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package trie import ( - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/ethdb" + "github.com/expanse-project/go-expanse/logger/glog" "github.com/syndtr/goleveldb/leveldb" ) diff --git a/trie/encoding.go b/trie/encoding.go index 524807f06b..1d52e9a869 100644 --- a/trie/encoding.go +++ b/trie/encoding.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package trie diff --git a/trie/encoding_test.go b/trie/encoding_test.go index e52c6ba8d8..656e08e938 100644 --- a/trie/encoding_test.go +++ b/trie/encoding_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package trie diff --git a/trie/fullnode.go b/trie/fullnode.go index 8ff019ec43..730b602f23 100644 --- a/trie/fullnode.go +++ b/trie/fullnode.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package trie diff --git a/trie/hashnode.go b/trie/hashnode.go index d4a0bc7ec9..8f8135f2c4 100644 --- a/trie/hashnode.go +++ b/trie/hashnode.go @@ -1,22 +1,22 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package trie -import "github.com/ethereum/go-ethereum/common" +import "github.com/expanse-project/go-expanse/common" type HashNode struct { key []byte diff --git a/trie/iterator.go b/trie/iterator.go index 698e64b34d..b3056fd4b5 100644 --- a/trie/iterator.go +++ b/trie/iterator.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package trie diff --git a/trie/iterator_test.go b/trie/iterator_test.go index 148f9adf99..ef397b250d 100644 --- a/trie/iterator_test.go +++ b/trie/iterator_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package trie diff --git a/trie/node.go b/trie/node.go index 9d49029ded..c8b9614ab6 100644 --- a/trie/node.go +++ b/trie/node.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package trie diff --git a/trie/secure_trie.go b/trie/secure_trie.go index 47c7542bb0..7ac8c2f34b 100644 --- a/trie/secure_trie.go +++ b/trie/secure_trie.go @@ -1,22 +1,22 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package trie -import "github.com/ethereum/go-ethereum/crypto" +import "github.com/expanse-project/go-expanse/crypto" var keyPrefix = []byte("secure-key-") diff --git a/trie/shortnode.go b/trie/shortnode.go index b5fc6d1f95..9d197528c1 100644 --- a/trie/shortnode.go +++ b/trie/shortnode.go @@ -1,22 +1,22 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package trie -import "github.com/ethereum/go-ethereum/common" +import "github.com/expanse-project/go-expanse/common" type ShortNode struct { trie *Trie diff --git a/trie/slice.go b/trie/slice.go index ccefbd0643..6bf5d46303 100644 --- a/trie/slice.go +++ b/trie/slice.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package trie diff --git a/trie/trie.go b/trie/trie.go index e7ee864021..0e803848df 100644 --- a/trie/trie.go +++ b/trie/trie.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Package trie implements Merkle Patricia Tries. package trie @@ -23,8 +23,8 @@ import ( "fmt" "sync" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" ) func ParanoiaCheck(t1 *Trie, backend Backend) (bool, *Trie) { diff --git a/trie/trie_test.go b/trie/trie_test.go index ae4e5efe40..8b96fe5653 100644 --- a/trie/trie_test.go +++ b/trie/trie_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package trie @@ -21,8 +21,8 @@ import ( "fmt" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" ) type Db map[string][]byte diff --git a/trie/valuenode.go b/trie/valuenode.go index 0afa64d54c..86739318e3 100644 --- a/trie/valuenode.go +++ b/trie/valuenode.go @@ -1,22 +1,22 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package trie -import "github.com/ethereum/go-ethereum/common" +import "github.com/expanse-project/go-expanse/common" type ValueNode struct { trie *Trie diff --git a/whisper/doc.go b/whisper/doc.go index cfb0b51175..0ce1541dd2 100644 --- a/whisper/doc.go +++ b/whisper/doc.go @@ -1,23 +1,23 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . /* Package whisper implements the Whisper PoC-1. -(https://github.com/ethereum/wiki/wiki/Whisper-PoC-1-Protocol-Spec) +(https://github.com/expanse-project/wiki/wiki/Whisper-PoC-1-Protocol-Spec) Whisper combines aspects of both DHTs and datagram messaging systems (e.g. UDP). As such it may be likened and compared to both, not dissimilar to the diff --git a/whisper/envelope.go b/whisper/envelope.go index b231c6b44f..a309053521 100644 --- a/whisper/envelope.go +++ b/whisper/envelope.go @@ -1,21 +1,21 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Contains the Whisper protocol Envelope element. For formal details please see -// the specs at https://github.com/ethereum/wiki/wiki/Whisper-PoC-1-Protocol-Spec#envelopes. +// the specs at https://github.com/expanse-project/wiki/wiki/Whisper-PoC-1-Protocol-Spec#envelopes. package whisper @@ -25,10 +25,10 @@ import ( "fmt" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/crypto/ecies" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/crypto/ecies" + "github.com/expanse-project/go-expanse/rlp" ) // Envelope represents a clear-text data packet to transmit through the Whisper diff --git a/whisper/envelope_test.go b/whisper/envelope_test.go index 3bfe527372..5440beae5a 100644 --- a/whisper/envelope_test.go +++ b/whisper/envelope_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package whisper @@ -21,8 +21,8 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/crypto/ecies" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/crypto/ecies" ) func TestEnvelopeOpen(t *testing.T) { diff --git a/whisper/filter.go b/whisper/filter.go index 9f6d6b7817..9e82756b37 100644 --- a/whisper/filter.go +++ b/whisper/filter.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Contains the message filter for fine grained subscriptions. @@ -21,7 +21,7 @@ package whisper import ( "crypto/ecdsa" - "github.com/ethereum/go-ethereum/event/filter" + "github.com/expanse-project/go-expanse/event/filter" ) // Filter is used to subscribe to specific types of whisper messages. diff --git a/whisper/filter_test.go b/whisper/filter_test.go index b805b2baf1..8b1adf6568 100644 --- a/whisper/filter_test.go +++ b/whisper/filter_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package whisper diff --git a/whisper/main.go b/whisper/main.go index be41604890..eca5f942cf 100644 --- a/whisper/main.go +++ b/whisper/main.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // +build none @@ -27,12 +27,12 @@ import ( "os" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/p2p/nat" - "github.com/ethereum/go-ethereum/whisper" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/p2p" + "github.com/expanse-project/go-expanse/p2p/nat" + "github.com/expanse-project/go-expanse/whisper" ) func main() { @@ -47,7 +47,7 @@ func main() { name := common.MakeName("whisper-go", "1.0") shh := whisper.New() - // Create an Ethereum peer to communicate through + // Create an Expanse peer to communicate through server := p2p.Server{ PrivateKey: key, MaxPeers: 10, @@ -56,9 +56,9 @@ func main() { ListenAddr: ":30300", NAT: nat.Any(), } - fmt.Println("Starting Ethereum peer...") + fmt.Println("Starting Expanse peer...") if err := server.Start(); err != nil { - fmt.Printf("Failed to start Ethereum peer: %v.\n", err) + fmt.Printf("Failed to start Expanse peer: %v.\n", err) os.Exit(1) } diff --git a/whisper/message.go b/whisper/message.go index 506f142edd..5780b5d8ce 100644 --- a/whisper/message.go +++ b/whisper/message.go @@ -1,21 +1,21 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Contains the Whisper protocol Message element. For formal details please see -// the specs at https://github.com/ethereum/wiki/wiki/Whisper-PoC-1-Protocol-Spec#messages. +// the specs at https://github.com/expanse-project/wiki/wiki/Whisper-PoC-1-Protocol-Spec#messages. package whisper @@ -24,10 +24,10 @@ import ( "math/rand" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" ) // Message represents an end-user data packet to transmit through the Whisper diff --git a/whisper/message_test.go b/whisper/message_test.go index 6ff95efff5..23f03d8094 100644 --- a/whisper/message_test.go +++ b/whisper/message_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package whisper @@ -22,7 +22,7 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/crypto" + "github.com/expanse-project/go-expanse/crypto" ) // Tests whether a message can be wrapped without any identity or encryption. diff --git a/whisper/peer.go b/whisper/peer.go index ee10e66e79..a6f9b48b3f 100644 --- a/whisper/peer.go +++ b/whisper/peer.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package whisper @@ -20,11 +20,11 @@ import ( "fmt" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/p2p" + "github.com/expanse-project/go-expanse/rlp" "gopkg.in/fatih/set.v0" ) diff --git a/whisper/peer_test.go b/whisper/peer_test.go index 594671ee14..81dd7f80cb 100644 --- a/whisper/peer_test.go +++ b/whisper/peer_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package whisper @@ -20,8 +20,8 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/p2p/discover" + "github.com/expanse-project/go-expanse/p2p" + "github.com/expanse-project/go-expanse/p2p/discover" ) type testPeer struct { diff --git a/whisper/topic.go b/whisper/topic.go index 7ac3e8dc1d..a47f1bb34b 100644 --- a/whisper/topic.go +++ b/whisper/topic.go @@ -1,25 +1,25 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Contains the Whisper protocol Topic element. For formal details please see -// the specs at https://github.com/ethereum/wiki/wiki/Whisper-PoC-1-Protocol-Spec#topics. +// the specs at https://github.com/expanse-project/wiki/wiki/Whisper-PoC-1-Protocol-Spec#topics. package whisper -import "github.com/ethereum/go-ethereum/crypto" +import "github.com/expanse-project/go-expanse/crypto" // Topic represents a cryptographically secure, probabilistic partial // classifications of a message, determined as the first (left) 4 bytes of the diff --git a/whisper/topic_test.go b/whisper/topic_test.go index 9c45f67408..c70923ed2c 100644 --- a/whisper/topic_test.go +++ b/whisper/topic_test.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package whisper diff --git a/whisper/whisper.go b/whisper/whisper.go index 676d8ae7a3..b38ecc0510 100644 --- a/whisper/whisper.go +++ b/whisper/whisper.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package whisper @@ -21,13 +21,13 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/crypto/ecies" - "github.com/ethereum/go-ethereum/event/filter" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/p2p" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/crypto/ecies" + "github.com/expanse-project/go-expanse/event/filter" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/p2p" "gopkg.in/fatih/set.v0" ) @@ -56,7 +56,7 @@ type MessageEvent struct { Message *Message } -// Whisper represents a dark communication interface through the Ethereum +// Whisper represents a dark communication interface through the Expanse // network, using its very own P2P communication layer. type Whisper struct { protocol p2p.Protocol @@ -74,7 +74,7 @@ type Whisper struct { quit chan struct{} } -// New creates a Whisper client ready to communicate through the Ethereum P2P +// New creates a Whisper client ready to communicate through the Expanse P2P // network. func New() *Whisper { whisper := &Whisper{ diff --git a/whisper/whisper_test.go b/whisper/whisper_test.go index b5a919984b..c036b354e5 100644 --- a/whisper/whisper_test.go +++ b/whisper/whisper_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package whisper @@ -20,8 +20,8 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/p2p/discover" + "github.com/expanse-project/go-expanse/p2p" + "github.com/expanse-project/go-expanse/p2p/discover" ) func startTestCluster(n int) []*Whisper { diff --git a/xeth/frontend.go b/xeth/frontend.go index e892822428..d52f4c3063 100644 --- a/xeth/frontend.go +++ b/xeth/frontend.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package xeth diff --git a/xeth/state.go b/xeth/state.go index 16bfb523d2..03960a8f3e 100644 --- a/xeth/state.go +++ b/xeth/state.go @@ -1,24 +1,24 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package xeth import ( - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core/state" ) type State struct { diff --git a/xeth/types.go b/xeth/types.go index ad5101d61f..9ad9da2f8b 100644 --- a/xeth/types.go +++ b/xeth/types.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package xeth @@ -21,13 +21,13 @@ import ( "fmt" "strings" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/p2p" + "github.com/expanse-project/go-expanse/rlp" ) type Object struct { diff --git a/xeth/whisper.go b/xeth/whisper.go index e7130978f2..97eee34a4c 100644 --- a/xeth/whisper.go +++ b/xeth/whisper.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Contains the external API to the whisper sub-protocol. @@ -22,10 +22,10 @@ import ( "fmt" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/whisper" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/whisper" ) var qlogger = logger.NewLogger("XSHH") diff --git a/xeth/whisper_filter.go b/xeth/whisper_filter.go index fdf5cebae1..25dfb730a3 100644 --- a/xeth/whisper_filter.go +++ b/xeth/whisper_filter.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Contains the external API side message filter for watching, pooling and polling // matched whisper messages, also serializing data access to avoid duplications. @@ -23,7 +23,7 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/common" + "github.com/expanse-project/go-expanse/common" ) // whisperFilter is the message cache matching a specific filter, accumulating diff --git a/xeth/whisper_message.go b/xeth/whisper_message.go index b3014a6972..992d5a51b7 100644 --- a/xeth/whisper_message.go +++ b/xeth/whisper_message.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . // Contains the external API representation of a whisper message. @@ -21,9 +21,9 @@ package xeth import ( "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/whisper" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/whisper" ) // WhisperMessage is the external API representation of a whisper.Message. diff --git a/xeth/xeth.go b/xeth/xeth.go index 5d54c1f7e4..da44cb2e5a 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -1,20 +1,20 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . -// Package xeth is the interface to all Ethereum functionality. +// Package xeth is the interface to all Expanse functionality. package xeth import ( @@ -25,19 +25,19 @@ import ( "sync" "time" - "github.com/ethereum/go-ethereum/accounts" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/compiler" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/event/filter" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/miner" - "github.com/ethereum/go-ethereum/rlp" + "github.com/expanse-project/go-expanse/accounts" + "github.com/expanse-project/go-expanse/common" + "github.com/expanse-project/go-expanse/common/compiler" + "github.com/expanse-project/go-expanse/core" + "github.com/expanse-project/go-expanse/core/state" + "github.com/expanse-project/go-expanse/core/types" + "github.com/expanse-project/go-expanse/crypto" + "github.com/expanse-project/go-expanse/exp" + "github.com/expanse-project/go-expanse/event/filter" + "github.com/expanse-project/go-expanse/logger" + "github.com/expanse-project/go-expanse/logger/glog" + "github.com/expanse-project/go-expanse/miner" + "github.com/expanse-project/go-expanse/rlp" ) var ( @@ -59,13 +59,13 @@ func DefaultGas() *big.Int { return new(big.Int).Set(defaultGas) } func (self *XEth) DefaultGasPrice() *big.Int { if self.gpo == nil { - self.gpo = eth.NewGasPriceOracle(self.backend) + self.gpo = exp.NewGasPriceOracle(self.backend) } return self.gpo.SuggestPrice() } type XEth struct { - backend *eth.Ethereum + backend *exp.Expanse frontend Frontend state *State @@ -91,12 +91,12 @@ type XEth struct { agent *miner.RemoteAgent - gpo *eth.GasPriceOracle + gpo *exp.GasPriceOracle } -func NewTest(eth *eth.Ethereum, frontend Frontend) *XEth { +func NewTest(exp *exp.Expanse, frontend Frontend) *XEth { return &XEth{ - backend: eth, + backend: exp, frontend: frontend, } } @@ -104,22 +104,22 @@ func NewTest(eth *eth.Ethereum, frontend Frontend) *XEth { // New creates an XEth that uses the given frontend. // If a nil Frontend is provided, a default frontend which // confirms all transactions will be used. -func New(ethereum *eth.Ethereum, frontend Frontend) *XEth { +func New(expanse *exp.Expanse, frontend Frontend) *XEth { xeth := &XEth{ - backend: ethereum, + backend: expanse, frontend: frontend, quit: make(chan struct{}), - filterManager: filter.NewFilterManager(ethereum.EventMux()), + filterManager: filter.NewFilterManager(expanse.EventMux()), logQueue: make(map[int]*logQueue), blockQueue: make(map[int]*hashQueue), transactionQueue: make(map[int]*hashQueue), messages: make(map[int]*whisperFilter), agent: miner.NewRemoteAgent(), } - if ethereum.Whisper() != nil { - xeth.whisper = NewWhisper(ethereum.Whisper()) + if expanse.Whisper() != nil { + xeth.whisper = NewWhisper(expanse.Whisper()) } - ethereum.Miner().Register(xeth.agent) + expanse.Miner().Register(xeth.agent) if frontend == nil { xeth.frontend = dummyFrontend{} } From 5008f4cabd99c90a37d152fbe85a3273bdf3c75e Mon Sep 17 00:00:00 2001 From: Christopher Franko Date: Fri, 7 Aug 2015 15:38:43 -0400 Subject: [PATCH 2/7] change folder because why not --- {eth => exp}/backend.go | 0 {eth => exp}/downloader/downloader.go | 0 {eth => exp}/downloader/downloader_test.go | 0 {eth => exp}/downloader/events.go | 0 {eth => exp}/downloader/peer.go | 0 {eth => exp}/downloader/queue.go | 0 {eth => exp}/fetcher/fetcher.go | 0 {eth => exp}/fetcher/fetcher_test.go | 0 {eth => exp}/fetcher/metrics.go | 0 {eth => exp}/gasprice.go | 0 {eth => exp}/handler.go | 0 {eth => exp}/metrics.go | 0 {eth => exp}/peer.go | 0 {eth => exp}/protocol.go | 0 {eth => exp}/protocol_test.go | 0 {eth => exp}/sync.go | 0 16 files changed, 0 insertions(+), 0 deletions(-) rename {eth => exp}/backend.go (100%) rename {eth => exp}/downloader/downloader.go (100%) rename {eth => exp}/downloader/downloader_test.go (100%) rename {eth => exp}/downloader/events.go (100%) rename {eth => exp}/downloader/peer.go (100%) rename {eth => exp}/downloader/queue.go (100%) rename {eth => exp}/fetcher/fetcher.go (100%) rename {eth => exp}/fetcher/fetcher_test.go (100%) rename {eth => exp}/fetcher/metrics.go (100%) rename {eth => exp}/gasprice.go (100%) rename {eth => exp}/handler.go (100%) rename {eth => exp}/metrics.go (100%) rename {eth => exp}/peer.go (100%) rename {eth => exp}/protocol.go (100%) rename {eth => exp}/protocol_test.go (100%) rename {eth => exp}/sync.go (100%) diff --git a/eth/backend.go b/exp/backend.go similarity index 100% rename from eth/backend.go rename to exp/backend.go diff --git a/eth/downloader/downloader.go b/exp/downloader/downloader.go similarity index 100% rename from eth/downloader/downloader.go rename to exp/downloader/downloader.go diff --git a/eth/downloader/downloader_test.go b/exp/downloader/downloader_test.go similarity index 100% rename from eth/downloader/downloader_test.go rename to exp/downloader/downloader_test.go diff --git a/eth/downloader/events.go b/exp/downloader/events.go similarity index 100% rename from eth/downloader/events.go rename to exp/downloader/events.go diff --git a/eth/downloader/peer.go b/exp/downloader/peer.go similarity index 100% rename from eth/downloader/peer.go rename to exp/downloader/peer.go diff --git a/eth/downloader/queue.go b/exp/downloader/queue.go similarity index 100% rename from eth/downloader/queue.go rename to exp/downloader/queue.go diff --git a/eth/fetcher/fetcher.go b/exp/fetcher/fetcher.go similarity index 100% rename from eth/fetcher/fetcher.go rename to exp/fetcher/fetcher.go diff --git a/eth/fetcher/fetcher_test.go b/exp/fetcher/fetcher_test.go similarity index 100% rename from eth/fetcher/fetcher_test.go rename to exp/fetcher/fetcher_test.go diff --git a/eth/fetcher/metrics.go b/exp/fetcher/metrics.go similarity index 100% rename from eth/fetcher/metrics.go rename to exp/fetcher/metrics.go diff --git a/eth/gasprice.go b/exp/gasprice.go similarity index 100% rename from eth/gasprice.go rename to exp/gasprice.go diff --git a/eth/handler.go b/exp/handler.go similarity index 100% rename from eth/handler.go rename to exp/handler.go diff --git a/eth/metrics.go b/exp/metrics.go similarity index 100% rename from eth/metrics.go rename to exp/metrics.go diff --git a/eth/peer.go b/exp/peer.go similarity index 100% rename from eth/peer.go rename to exp/peer.go diff --git a/eth/protocol.go b/exp/protocol.go similarity index 100% rename from eth/protocol.go rename to exp/protocol.go diff --git a/eth/protocol_test.go b/exp/protocol_test.go similarity index 100% rename from eth/protocol_test.go rename to exp/protocol_test.go diff --git a/eth/sync.go b/exp/sync.go similarity index 100% rename from eth/sync.go rename to exp/sync.go From f44685d5b1bc42a8152bad21eed437a8e8a0aac4 Mon Sep 17 00:00:00 2001 From: Christopher Franko Date: Fri, 7 Aug 2015 15:40:29 -0400 Subject: [PATCH 3/7] gexp change again --- cmd/{geth => gexp}/blocktestcmd.go | 0 cmd/{geth => gexp}/chaincmd.go | 0 cmd/{geth => gexp}/info_test.json | 0 cmd/{geth => gexp}/js.go | 0 cmd/{geth => gexp}/js_test.go | 0 cmd/{geth => gexp}/main.go | 0 cmd/{geth => gexp}/monitorcmd.go | 0 7 files changed, 0 insertions(+), 0 deletions(-) rename cmd/{geth => gexp}/blocktestcmd.go (100%) rename cmd/{geth => gexp}/chaincmd.go (100%) rename cmd/{geth => gexp}/info_test.json (100%) rename cmd/{geth => gexp}/js.go (100%) rename cmd/{geth => gexp}/js_test.go (100%) rename cmd/{geth => gexp}/main.go (100%) rename cmd/{geth => gexp}/monitorcmd.go (100%) diff --git a/cmd/geth/blocktestcmd.go b/cmd/gexp/blocktestcmd.go similarity index 100% rename from cmd/geth/blocktestcmd.go rename to cmd/gexp/blocktestcmd.go diff --git a/cmd/geth/chaincmd.go b/cmd/gexp/chaincmd.go similarity index 100% rename from cmd/geth/chaincmd.go rename to cmd/gexp/chaincmd.go diff --git a/cmd/geth/info_test.json b/cmd/gexp/info_test.json similarity index 100% rename from cmd/geth/info_test.json rename to cmd/gexp/info_test.json diff --git a/cmd/geth/js.go b/cmd/gexp/js.go similarity index 100% rename from cmd/geth/js.go rename to cmd/gexp/js.go diff --git a/cmd/geth/js_test.go b/cmd/gexp/js_test.go similarity index 100% rename from cmd/geth/js_test.go rename to cmd/gexp/js_test.go diff --git a/cmd/geth/main.go b/cmd/gexp/main.go similarity index 100% rename from cmd/geth/main.go rename to cmd/gexp/main.go diff --git a/cmd/geth/monitorcmd.go b/cmd/gexp/monitorcmd.go similarity index 100% rename from cmd/geth/monitorcmd.go rename to cmd/gexp/monitorcmd.go From 272d0f5c4717f851bb23e2ff928133df037e0b80 Mon Sep 17 00:00:00 2001 From: Christopher Franko Date: Fri, 7 Aug 2015 15:45:17 -0400 Subject: [PATCH 4/7] ethash --- .idea/workspace.xml | 538 +----------------- .../ethash/.gitignore | 0 .../ethash/.travis.yml | 0 .../ethash/CMakeLists.txt | 0 .../ethash/MANIFEST.in | 0 .../ethash/Makefile | 0 .../ethash/README.md | 0 .../ethash/Vagrantfile | 0 .../ethash/appveyor.yml | 0 .../cmake/modules/CMakeParseArguments.cmake | 0 .../ethash/cmake/modules/FindCryptoPP.cmake | 0 .../ethash/cmake/modules/FindOpenCL.cmake | 0 .../FindPackageHandleStandardArgs.cmake | 0 .../cmake/modules/FindPackageMessage.cmake | 0 .../ethash/cryptopp/CMakeLists.txt | 0 .../ethash/ethash.go | 0 .../ethash/ethash_test.go | 0 .../ethash/ethashc.go | 0 .../ethash/js/LICENSE | 0 .../ethash/js/ethash.js | 0 .../ethash/js/keccak.js | 0 .../ethash/js/makekeccak.js | 0 .../ethash/js/test.js | 0 .../ethash/js/util.js | 0 .../ethash/setup.py | 0 .../ethash/src/benchmark/CMakeLists.txt | 0 .../ethash/src/benchmark/benchmark.cpp | 0 .../ethash/src/libethash/CMakeLists.txt | 0 .../ethash/src/libethash/compiler.h | 0 .../ethash/src/libethash/data_sizes.h | 0 .../ethash/src/libethash/endian.h | 0 .../ethash/src/libethash/ethash.h | 0 .../ethash/src/libethash/fnv.h | 0 .../ethash/src/libethash/internal.c | 0 .../ethash/src/libethash/internal.h | 0 .../ethash/src/libethash/io.c | 0 .../ethash/src/libethash/io.h | 0 .../ethash/src/libethash/io_posix.c | 0 .../ethash/src/libethash/io_win32.c | 0 .../ethash/src/libethash/mmap.h | 0 .../ethash/src/libethash/mmap_win32.c | 0 .../ethash/src/libethash/sha3.c | 0 .../ethash/src/libethash/sha3.h | 0 .../ethash/src/libethash/sha3_cryptopp.cpp | 0 .../ethash/src/libethash/sha3_cryptopp.h | 0 .../ethash/src/libethash/util.h | 0 .../ethash/src/libethash/util_win32.c | 0 .../ethash/src/python/core.c | 0 .../ethash/test/c/CMakeLists.txt | 0 .../ethash/test/c/test.cpp | 0 .../ethash/test/c/test.sh | 0 .../ethash/test/python/.gitignore | 0 .../ethash/test/python/requirements.txt | 0 .../ethash/test/python/test.sh | 0 .../ethash/test/python/test_pyethash.py | 0 .../ethash/test/test.sh | 0 56 files changed, 3 insertions(+), 535 deletions(-) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/.gitignore (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/.travis.yml (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/CMakeLists.txt (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/MANIFEST.in (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/Makefile (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/README.md (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/Vagrantfile (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/appveyor.yml (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/cmake/modules/CMakeParseArguments.cmake (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/cmake/modules/FindCryptoPP.cmake (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/cmake/modules/FindOpenCL.cmake (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/cmake/modules/FindPackageHandleStandardArgs.cmake (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/cmake/modules/FindPackageMessage.cmake (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/cryptopp/CMakeLists.txt (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/ethash.go (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/ethash_test.go (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/ethashc.go (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/js/LICENSE (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/js/ethash.js (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/js/keccak.js (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/js/makekeccak.js (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/js/test.js (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/js/util.js (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/setup.py (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/src/benchmark/CMakeLists.txt (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/src/benchmark/benchmark.cpp (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/src/libethash/CMakeLists.txt (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/src/libethash/compiler.h (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/src/libethash/data_sizes.h (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/src/libethash/endian.h (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/src/libethash/ethash.h (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/src/libethash/fnv.h (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/src/libethash/internal.c (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/src/libethash/internal.h (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/src/libethash/io.c (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/src/libethash/io.h (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/src/libethash/io_posix.c (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/src/libethash/io_win32.c (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/src/libethash/mmap.h (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/src/libethash/mmap_win32.c (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/src/libethash/sha3.c (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/src/libethash/sha3.h (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/src/libethash/sha3_cryptopp.cpp (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/src/libethash/sha3_cryptopp.h (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/src/libethash/util.h (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/src/libethash/util_win32.c (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/src/python/core.c (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/test/c/CMakeLists.txt (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/test/c/test.cpp (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/test/c/test.sh (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/test/python/.gitignore (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/test/python/requirements.txt (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/test/python/test.sh (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/test/python/test_pyethash.py (100%) rename Godeps/_workspace/src/github.com/{ethereum => expanse-project}/ethash/test/test.sh (100%) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index b88a882863..651952c7b1 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,385 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -479,26 +101,6 @@ - - - - - - - - - - - - - - - - - - - - @@ -669,11 +271,11 @@ - + - + @@ -801,22 +403,6 @@ - - - - - - - - - - - - - - - - @@ -889,97 +475,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1004,17 +499,6 @@ - - - - - - - - - - - @@ -1061,22 +545,6 @@ - - - - - - - - - - - - - - - - diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/.gitignore b/Godeps/_workspace/src/github.com/expanse-project/ethash/.gitignore similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/.gitignore rename to Godeps/_workspace/src/github.com/expanse-project/ethash/.gitignore diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/.travis.yml b/Godeps/_workspace/src/github.com/expanse-project/ethash/.travis.yml similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/.travis.yml rename to Godeps/_workspace/src/github.com/expanse-project/ethash/.travis.yml diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/CMakeLists.txt b/Godeps/_workspace/src/github.com/expanse-project/ethash/CMakeLists.txt similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/CMakeLists.txt rename to Godeps/_workspace/src/github.com/expanse-project/ethash/CMakeLists.txt diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/MANIFEST.in b/Godeps/_workspace/src/github.com/expanse-project/ethash/MANIFEST.in similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/MANIFEST.in rename to Godeps/_workspace/src/github.com/expanse-project/ethash/MANIFEST.in diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/Makefile b/Godeps/_workspace/src/github.com/expanse-project/ethash/Makefile similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/Makefile rename to Godeps/_workspace/src/github.com/expanse-project/ethash/Makefile diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/README.md b/Godeps/_workspace/src/github.com/expanse-project/ethash/README.md similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/README.md rename to Godeps/_workspace/src/github.com/expanse-project/ethash/README.md diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/Vagrantfile b/Godeps/_workspace/src/github.com/expanse-project/ethash/Vagrantfile similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/Vagrantfile rename to Godeps/_workspace/src/github.com/expanse-project/ethash/Vagrantfile diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/appveyor.yml b/Godeps/_workspace/src/github.com/expanse-project/ethash/appveyor.yml similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/appveyor.yml rename to Godeps/_workspace/src/github.com/expanse-project/ethash/appveyor.yml diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/cmake/modules/CMakeParseArguments.cmake b/Godeps/_workspace/src/github.com/expanse-project/ethash/cmake/modules/CMakeParseArguments.cmake similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/cmake/modules/CMakeParseArguments.cmake rename to Godeps/_workspace/src/github.com/expanse-project/ethash/cmake/modules/CMakeParseArguments.cmake diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/cmake/modules/FindCryptoPP.cmake b/Godeps/_workspace/src/github.com/expanse-project/ethash/cmake/modules/FindCryptoPP.cmake similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/cmake/modules/FindCryptoPP.cmake rename to Godeps/_workspace/src/github.com/expanse-project/ethash/cmake/modules/FindCryptoPP.cmake diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/cmake/modules/FindOpenCL.cmake b/Godeps/_workspace/src/github.com/expanse-project/ethash/cmake/modules/FindOpenCL.cmake similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/cmake/modules/FindOpenCL.cmake rename to Godeps/_workspace/src/github.com/expanse-project/ethash/cmake/modules/FindOpenCL.cmake diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/cmake/modules/FindPackageHandleStandardArgs.cmake b/Godeps/_workspace/src/github.com/expanse-project/ethash/cmake/modules/FindPackageHandleStandardArgs.cmake similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/cmake/modules/FindPackageHandleStandardArgs.cmake rename to Godeps/_workspace/src/github.com/expanse-project/ethash/cmake/modules/FindPackageHandleStandardArgs.cmake diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/cmake/modules/FindPackageMessage.cmake b/Godeps/_workspace/src/github.com/expanse-project/ethash/cmake/modules/FindPackageMessage.cmake similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/cmake/modules/FindPackageMessage.cmake rename to Godeps/_workspace/src/github.com/expanse-project/ethash/cmake/modules/FindPackageMessage.cmake diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/cryptopp/CMakeLists.txt b/Godeps/_workspace/src/github.com/expanse-project/ethash/cryptopp/CMakeLists.txt similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/cryptopp/CMakeLists.txt rename to Godeps/_workspace/src/github.com/expanse-project/ethash/cryptopp/CMakeLists.txt diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go b/Godeps/_workspace/src/github.com/expanse-project/ethash/ethash.go similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go rename to Godeps/_workspace/src/github.com/expanse-project/ethash/ethash.go diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash_test.go b/Godeps/_workspace/src/github.com/expanse-project/ethash/ethash_test.go similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/ethash_test.go rename to Godeps/_workspace/src/github.com/expanse-project/ethash/ethash_test.go diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/ethashc.go b/Godeps/_workspace/src/github.com/expanse-project/ethash/ethashc.go similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/ethashc.go rename to Godeps/_workspace/src/github.com/expanse-project/ethash/ethashc.go diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/js/LICENSE b/Godeps/_workspace/src/github.com/expanse-project/ethash/js/LICENSE similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/js/LICENSE rename to Godeps/_workspace/src/github.com/expanse-project/ethash/js/LICENSE diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/js/ethash.js b/Godeps/_workspace/src/github.com/expanse-project/ethash/js/ethash.js similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/js/ethash.js rename to Godeps/_workspace/src/github.com/expanse-project/ethash/js/ethash.js diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/js/keccak.js b/Godeps/_workspace/src/github.com/expanse-project/ethash/js/keccak.js similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/js/keccak.js rename to Godeps/_workspace/src/github.com/expanse-project/ethash/js/keccak.js diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/js/makekeccak.js b/Godeps/_workspace/src/github.com/expanse-project/ethash/js/makekeccak.js similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/js/makekeccak.js rename to Godeps/_workspace/src/github.com/expanse-project/ethash/js/makekeccak.js diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/js/test.js b/Godeps/_workspace/src/github.com/expanse-project/ethash/js/test.js similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/js/test.js rename to Godeps/_workspace/src/github.com/expanse-project/ethash/js/test.js diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/js/util.js b/Godeps/_workspace/src/github.com/expanse-project/ethash/js/util.js similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/js/util.js rename to Godeps/_workspace/src/github.com/expanse-project/ethash/js/util.js diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/setup.py b/Godeps/_workspace/src/github.com/expanse-project/ethash/setup.py similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/setup.py rename to Godeps/_workspace/src/github.com/expanse-project/ethash/setup.py diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/benchmark/CMakeLists.txt b/Godeps/_workspace/src/github.com/expanse-project/ethash/src/benchmark/CMakeLists.txt similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/src/benchmark/CMakeLists.txt rename to Godeps/_workspace/src/github.com/expanse-project/ethash/src/benchmark/CMakeLists.txt diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/benchmark/benchmark.cpp b/Godeps/_workspace/src/github.com/expanse-project/ethash/src/benchmark/benchmark.cpp similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/src/benchmark/benchmark.cpp rename to Godeps/_workspace/src/github.com/expanse-project/ethash/src/benchmark/benchmark.cpp diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/CMakeLists.txt b/Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/CMakeLists.txt similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/CMakeLists.txt rename to Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/CMakeLists.txt diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/compiler.h b/Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/compiler.h similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/compiler.h rename to Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/compiler.h diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/data_sizes.h b/Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/data_sizes.h similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/data_sizes.h rename to Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/data_sizes.h diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/endian.h b/Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/endian.h similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/endian.h rename to Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/endian.h diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/ethash.h b/Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/ethash.h similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/ethash.h rename to Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/ethash.h diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/fnv.h b/Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/fnv.h similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/fnv.h rename to Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/fnv.h diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/internal.c b/Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/internal.c similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/internal.c rename to Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/internal.c diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/internal.h b/Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/internal.h similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/internal.h rename to Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/internal.h diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io.c b/Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/io.c similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io.c rename to Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/io.c diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io.h b/Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/io.h similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io.h rename to Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/io.h diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io_posix.c b/Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/io_posix.c similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io_posix.c rename to Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/io_posix.c diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io_win32.c b/Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/io_win32.c similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/io_win32.c rename to Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/io_win32.c diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/mmap.h b/Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/mmap.h similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/mmap.h rename to Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/mmap.h diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/mmap_win32.c b/Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/mmap_win32.c similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/mmap_win32.c rename to Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/mmap_win32.c diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/sha3.c b/Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/sha3.c similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/sha3.c rename to Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/sha3.c diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/sha3.h b/Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/sha3.h similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/sha3.h rename to Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/sha3.h diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/sha3_cryptopp.cpp b/Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/sha3_cryptopp.cpp similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/sha3_cryptopp.cpp rename to Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/sha3_cryptopp.cpp diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/sha3_cryptopp.h b/Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/sha3_cryptopp.h similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/sha3_cryptopp.h rename to Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/sha3_cryptopp.h diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/util.h b/Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/util.h similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/util.h rename to Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/util.h diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/util_win32.c b/Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/util_win32.c similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/src/libethash/util_win32.c rename to Godeps/_workspace/src/github.com/expanse-project/ethash/src/libethash/util_win32.c diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/src/python/core.c b/Godeps/_workspace/src/github.com/expanse-project/ethash/src/python/core.c similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/src/python/core.c rename to Godeps/_workspace/src/github.com/expanse-project/ethash/src/python/core.c diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/test/c/CMakeLists.txt b/Godeps/_workspace/src/github.com/expanse-project/ethash/test/c/CMakeLists.txt similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/test/c/CMakeLists.txt rename to Godeps/_workspace/src/github.com/expanse-project/ethash/test/c/CMakeLists.txt diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/test/c/test.cpp b/Godeps/_workspace/src/github.com/expanse-project/ethash/test/c/test.cpp similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/test/c/test.cpp rename to Godeps/_workspace/src/github.com/expanse-project/ethash/test/c/test.cpp diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/test/c/test.sh b/Godeps/_workspace/src/github.com/expanse-project/ethash/test/c/test.sh similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/test/c/test.sh rename to Godeps/_workspace/src/github.com/expanse-project/ethash/test/c/test.sh diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/test/python/.gitignore b/Godeps/_workspace/src/github.com/expanse-project/ethash/test/python/.gitignore similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/test/python/.gitignore rename to Godeps/_workspace/src/github.com/expanse-project/ethash/test/python/.gitignore diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/test/python/requirements.txt b/Godeps/_workspace/src/github.com/expanse-project/ethash/test/python/requirements.txt similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/test/python/requirements.txt rename to Godeps/_workspace/src/github.com/expanse-project/ethash/test/python/requirements.txt diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/test/python/test.sh b/Godeps/_workspace/src/github.com/expanse-project/ethash/test/python/test.sh similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/test/python/test.sh rename to Godeps/_workspace/src/github.com/expanse-project/ethash/test/python/test.sh diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/test/python/test_pyethash.py b/Godeps/_workspace/src/github.com/expanse-project/ethash/test/python/test_pyethash.py similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/test/python/test_pyethash.py rename to Godeps/_workspace/src/github.com/expanse-project/ethash/test/python/test_pyethash.py diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/test/test.sh b/Godeps/_workspace/src/github.com/expanse-project/ethash/test/test.sh similarity index 100% rename from Godeps/_workspace/src/github.com/ethereum/ethash/test/test.sh rename to Godeps/_workspace/src/github.com/expanse-project/ethash/test/test.sh From 589c3d38a6c53370234f46534092355cf25d4f01 Mon Sep 17 00:00:00 2001 From: Christopher Franko Date: Fri, 7 Aug 2015 15:51:32 -0400 Subject: [PATCH 5/7] update env --- build/env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/env.sh b/build/env.sh index 1ba0936131..d2fd786383 100755 --- a/build/env.sh +++ b/build/env.sh @@ -10,7 +10,7 @@ fi # Create fake Go workspace if it doesn't exist yet. workspace="$PWD/build/_workspace" root="$PWD" -ethdir="$workspace/src/github.com/expanse" +ethdir="$workspace/src/github.com/expanse-project" if [ ! -L "$ethdir/go-expanse" ]; then mkdir -p "$ethdir" cd "$ethdir" From b7c8f95179fc25a42de6119894139583ad42a415 Mon Sep 17 00:00:00 2001 From: Christopher Franko Date: Fri, 7 Aug 2015 19:15:06 -0400 Subject: [PATCH 6/7] add genesis file --- common/registrar/registrar.go | 2 +- expanse_genesis.json | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 expanse_genesis.json diff --git a/common/registrar/registrar.go b/common/registrar/registrar.go index 9d09d8c6e8..d6e28c0cad 100644 --- a/common/registrar/registrar.go +++ b/common/registrar/registrar.go @@ -57,7 +57,7 @@ contracts var ( UrlHintAddr = "0x0" HashRegAddr = "0x0" - GlobalRegistrarAddr = "0x0" + GlobalRegistrarAddr = "0x90c4384bb05d96d2f54b27e0102da5240f7833ae" // GlobalRegistrarAddr = "0xc6d9d2cd449a754c494264e1809c50e34d64562b" zero = regexp.MustCompile("^(0x)?0*$") diff --git a/expanse_genesis.json b/expanse_genesis.json new file mode 100644 index 0000000000..96df5bbb5a --- /dev/null +++ b/expanse_genesis.json @@ -0,0 +1,13 @@ +{ + "nonce": "0xdefaceddefacedcf", + "timestamp": "0x0", + "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "extraData": "0x4672616e6b6f497346726565646f6d", + "gasLimit": "0x1388", + "difficulty": "0x400000000", + "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "coinbase": "0x90c4384bb05d96d2f54b27e0102da5240f7833ae", + "alloc": { + "0x90c4384bb05d96d2f54b27e0102da5240f7833ae": { "balance": "1000000000000000000000000" } + } +} \ No newline at end of file From 08e13456824d3b93f7118b1444375fd56c78ebc2 Mon Sep 17 00:00:00 2001 From: Christopher Franko Date: Thu, 13 Aug 2015 09:03:28 -0400 Subject: [PATCH 7/7] ether to expanse --- .gitignore | 2 +- .idea/misc.xml | 4 + .idea/workspace.xml | 330 ++++++++---------- README.md | 6 +- cmd/ethtest/main.go | 4 +- cmd/gexp/main.go | 14 +- cmd/gexp/monitorcmd.go | 4 +- common/natspec/natspec_js.go | 66 ++-- common/size_test.go | 4 +- core/bench_test.go | 2 +- core/chain_makers_test.go | 4 +- crypto/mnemonic_words.go | 4 + jsre/ethereum_js.go | 108 +++--- tests/files/TrieTests/trietest.json | 4 +- .../files/TrieTests/trietest_secureTrie.json | 4 +- .../ansible/test-files/docker-go/Dockerfile | 4 +- trie/iterator_test.go | 2 +- trie/trie_test.go | 26 +- 18 files changed, 280 insertions(+), 312 deletions(-) create mode 100644 .idea/misc.xml diff --git a/.gitignore b/.gitignore index 48077ede1c..4c12be4a81 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,7 @@ *un~ .DS_Store */**/.DS_Store -.ethtest +.exptest */**/*tx_database* */**/*dapps* Godeps/_workspace/pkg diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000000..8662aa97f9 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 651952c7b1..4f054aeb80 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,7 +1,25 @@ - + + + + + + + + + + + + + + + + + + + @@ -25,87 +43,37 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - - + + + + + - - + + + + + + + + + + + + + + + @@ -119,12 +87,6 @@ @@ -206,6 +174,7 @@ + @@ -226,7 +195,6 @@ - @@ -248,10 +216,16 @@ - + + + + + + true + - + @@ -270,28 +244,28 @@ - + - - - - - - + + - - + + + + + - + + @@ -315,11 +289,26 @@ + + + + + + + + + + + + + + + + - @@ -327,7 +316,6 @@ - @@ -335,7 +323,6 @@ - @@ -343,7 +330,6 @@ - @@ -351,7 +337,6 @@ - @@ -359,7 +344,6 @@ - @@ -367,7 +351,6 @@ - @@ -375,15 +358,6 @@ - - - - - - - - - @@ -391,7 +365,6 @@ - @@ -399,7 +372,6 @@ - @@ -407,7 +379,6 @@ - @@ -415,7 +386,6 @@ - @@ -423,7 +393,6 @@ - @@ -431,7 +400,6 @@ - @@ -439,7 +407,6 @@ - @@ -455,7 +422,6 @@ - @@ -463,7 +429,6 @@ - @@ -471,7 +436,6 @@ - @@ -479,7 +443,6 @@ - @@ -487,7 +450,6 @@ - @@ -495,26 +457,6 @@ - - - - - - - - - - - - - - - - - - - - @@ -525,7 +467,6 @@ - @@ -533,15 +474,6 @@ - - - - - - - - - @@ -553,56 +485,80 @@ - + - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - + + diff --git a/README.md b/README.md index 2699fd6eb3..d421867180 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ The following builds are build automatically by our build servers after each pus * 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) +* [Windows 64-bit](https://build.ethdev.com/builds/Windows%20Go%20develop%20branch/Gexp-Win64-latest.zip) * [ARM](https://build.ethdev.com/builds/ARM%20Go%20develop%20branch/gexp-ARM-latest.tar.bz2) Building the source @@ -46,8 +46,8 @@ Go Expanse comes with several wrappers/executables found in * `gexp` Expanse CLI (expanse command line interface client) * `bootnode` runs a bootstrap node for the Discovery Protocol -* `ethtest` test tool which runs with the [tests](https://github.com/expanse-project/tests) suite: - `/path/to/test.json > ethtest --test BlockTests --stdin`. +* `exptest` test tool which runs with the [tests](https://github.com/expanse-project/tests) suite: + `/path/to/test.json > exptest --test BlockTests --stdin`. * `evm` is a generic Expanse Virtual Machine: `evm -code 60ff60ff -gas 10000 -price 0 -dump`. See `-h` for a detailed description. * `disasm` disassembles EVM code: `echo "6001" | disasm` diff --git a/cmd/ethtest/main.go b/cmd/ethtest/main.go index ec020918f7..938effdc6d 100644 --- a/cmd/ethtest/main.go +++ b/cmd/ethtest/main.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with go-expanse. If not, see . -// ethtest executes Expanse JSON tests. +// exptest executes Expanse JSON tests. package main import ( @@ -199,7 +199,7 @@ func main() { glog.SetToStderr(true) app := cli.NewApp() - app.Name = "ethtest" + app.Name = "exptest" app.Usage = "go-expanse test interface" app.Action = setupApp app.Version = "0.2.0" diff --git a/cmd/gexp/main.go b/cmd/gexp/main.go index d8e34a3f28..7903233ed9 100644 --- a/cmd/gexp/main.go +++ b/cmd/gexp/main.go @@ -49,7 +49,7 @@ import ( ) const ( - ClientIdentifier = "Geth" + ClientIdentifier = "Gexp" Version = "1.0.1" ) @@ -123,7 +123,7 @@ The output of this command is supposed to be machine-readable. get wallet import /path/to/my/presale.wallet -will prompt for your password and imports your ether presale account. +will prompt for your password and imports your expanse presale account. It can be used non-interactively with the --password option taking a passwordfile as argument containing the wallet password in plaintext. @@ -246,18 +246,18 @@ nodes. { Action: console, Name: "console", - Usage: `Geth Console: interactive JavaScript environment`, + Usage: `Gexp Console: interactive JavaScript environment`, Description: ` -The Geth console is an interactive shell for the JavaScript runtime environment +The Gexp 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/expanse-project/go-expanse/wiki/Javascipt-Console `}, { Action: attach, Name: "attach", - Usage: `Geth Console: interactive JavaScript environment (connect to node)`, + Usage: `Gexp Console: interactive JavaScript environment (connect to node)`, Description: ` -The Geth console is an interactive shell for the JavaScript runtime environment +The Gexp 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/expanse-project/go-expanse/wiki/Javascipt-Console. This command allows to open a console on a running gexp node. @@ -266,7 +266,7 @@ This command allows to open a console on a running gexp node. { Action: execJSFiles, Name: "js", - Usage: `executes the given JavaScript files in the Geth JavaScript VM`, + Usage: `executes the given JavaScript files in the Gexp JavaScript VM`, Description: ` The JavaScript VM exposes a node admin interface as well as the Ðapp JavaScript API. See https://github.com/expanse-project/go-expanse/wiki/Javascipt-Console diff --git a/cmd/gexp/monitorcmd.go b/cmd/gexp/monitorcmd.go index 4634ce5184..945eab5beb 100644 --- a/cmd/gexp/monitorcmd.go +++ b/cmd/gexp/monitorcmd.go @@ -53,9 +53,9 @@ var ( monitorCommand = cli.Command{ Action: monitor, Name: "monitor", - Usage: `Geth Monitor: node metrics monitoring and visualization`, + Usage: `Gexp Monitor: node metrics monitoring and visualization`, Description: ` -The Geth monitor is a tool to collect and visualize various internal metrics +The Gexp monitor is a tool to collect and visualize various internal metrics gathered by the node, supporting different chart types as well as the capacity to display multiple metrics simultaneously. `, diff --git a/common/natspec/natspec_js.go b/common/natspec/natspec_js.go index 7af296bbe1..dd1ceee16e 100644 --- a/common/natspec/natspec_js.go +++ b/common/natspec/natspec_js.go @@ -16,7 +16,7 @@ package natspec -const natspecJS = //`require=function t(e,n,r){function i(f,u){if(!n[f]){if(!e[f]){var s="function"==typeof require&&require;if(!u&&s)return s(f,!0);if(o)return o(f,!0);var c=new Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c}var a=n[f]={exports:{}};e[f][0].call(a.exports,function(t){var n=e[f][1][t];return i(n?n:t)},a,a.exports,t,e,n,r)}return n[f].exports}for(var o="function"==typeof require&&require,f=0;fv;v++)d.push(g(e.slice(0,s))),e=e.slice(s);n.push(d)}else r.prefixedType("string")(t[c].type)?(a=a.slice(s),n.push(g(e.slice(0,s))),e=e.slice(s)):(n.push(g(e.slice(0,s))),e=e.slice(s))}),n},g=function(t){var e={};return t.forEach(function(t){var r=n.extractDisplayName(t.name),i=n.extractTypeName(t.name),o=function(){var e=Array.prototype.slice.call(arguments);return a(t.inputs,e)};void 0===e[r]&&(e[r]=o),e[r][i]=o}),e},m=function(t){var e={};return t.forEach(function(t){var r=n.extractDisplayName(t.name),i=n.extractTypeName(t.name),o=function(e){return h(t.outputs,e)};void 0===e[r]&&(e[r]=o),e[r][i]=o}),e};e.exports={inputParser:g,outputParser:m,formatInput:a,formatOutput:h}},{"./const":4,"./formatters":5,"./types":6,"./utils":7}],4:[function(t,e){(function(n){if("build"!==n.env.NODE_ENV)var r=t("bignumber.js");var i=["wei","Kwei","Mwei","Gwei","szabo","finney","ether","grand","Mether","Gether","Tether","Pether","Eether","Zether","Yether","Nether","Dether","Vether","Uether"];e.exports={ETH_PADDING:32,ETH_SIGNATURE_LENGTH:4,ETH_UNITS:i,ETH_BIGNUMBER_ROUNDING_MODE:{ROUNDING_MODE:r.ROUND_DOWN},ETH_POLLING_TIMEOUT:1e3}}).call(this,t("_process"))},{_process:2,"bignumber.js":8}],5:[function(t,e){(function(n){if("build"!==n.env.NODE_ENV)var r=t("bignumber.js");var i=t("./utils"),o=t("./const"),f=function(t,e,n){return new Array(e-t.length+1).join(n?n:"0")+t},u=function(t){var e=2*o.ETH_PADDING;return t instanceof r||"number"==typeof t?("number"==typeof t&&(t=new r(t)),r.config(o.ETH_BIGNUMBER_ROUNDING_MODE),t=t.round(),t.lessThan(0)&&(t=new r("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16).plus(t).plus(1)),t=t.toString(16)):t=0===t.indexOf("0x")?t.substr(2):"string"==typeof t?u(new r(t)):(+t).toString(16),f(t,e)},s=function(t){return i.fromAscii(t,o.ETH_PADDING).substr(2)},c=function(t){return"000000000000000000000000000000000000000000000000000000000000000"+(t?"1":"0")},a=function(t){return u(new r(t).times(new r(2).pow(128)))},l=function(t){return"1"===new r(t.substr(0,1),16).toString(2).substr(0,1)},p=function(t){return t=t||"0",l(t)?new r(t,16).minus(new r("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16)).minus(1):new r(t,16)},h=function(t){return t=t||"0",new r(t,16)},g=function(t){return p(t).dividedBy(new r(2).pow(128))},m=function(t){return h(t).dividedBy(new r(2).pow(128))},d=function(t){return"0x"+t},v=function(t){return"0000000000000000000000000000000000000000000000000000000000000001"===t?!0:!1},w=function(t){return i.toAscii(t)},y=function(t){return"0x"+t.slice(t.length-40,t.length)};e.exports={formatInputInt:u,formatInputString:s,formatInputBool:c,formatInputReal:a,formatOutputInt:p,formatOutputUInt:h,formatOutputReal:g,formatOutputUReal:m,formatOutputHash:d,formatOutputBool:v,formatOutputString:w,formatOutputAddress:y}}).call(this,t("_process"))},{"./const":4,"./utils":7,_process:2,"bignumber.js":8}],6:[function(t,e){var n=t("./formatters"),r=function(t){return function(e){return 0===e.indexOf(t)}},i=function(t){return function(e){return t===e}},o=function(){return[{type:r("uint"),format:n.formatInputInt},{type:r("int"),format:n.formatInputInt},{type:r("hash"),format:n.formatInputInt},{type:r("string"),format:n.formatInputString},{type:r("real"),format:n.formatInputReal},{type:r("ureal"),format:n.formatInputReal},{type:i("address"),format:n.formatInputInt},{type:i("bool"),format:n.formatInputBool}]},f=function(){return[{type:r("uint"),format:n.formatOutputUInt},{type:r("int"),format:n.formatOutputInt},{type:r("hash"),format:n.formatOutputHash},{type:r("string"),format:n.formatOutputString},{type:r("real"),format:n.formatOutputReal},{type:r("ureal"),format:n.formatOutputUReal},{type:i("address"),format:n.formatOutputAddress},{type:i("bool"),format:n.formatOutputBool}]};e.exports={prefixedType:r,namedType:i,inputTypes:o,outputTypes:f}},{"./formatters":5}],7:[function(t,e){var n=t("./const"),r=function(t,e){for(var n=!1,r=0;rn;n+=2){var i=parseInt(t.substr(n,2),16);if(0===i)break;e+=String.fromCharCode(i)}return e},o=function(t){for(var e="",n=0;n3e3&&rr?"i":"").test(c))return m(a,c,u,r);u?(a.s=0>1/t?(c=c.slice(1),-1):1,$&&c.replace(/^0\.0*|\./,"").length>15&&U(L,O,t),u=!1):a.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1,c=n(c,10,r,a.s)}else{if(t instanceof e)return a.s=t.s,a.e=t.e,a.c=(t=t.c)?t.slice():t,void(L=0);if((u="number"==typeof t)&&0*t==0){if(a.s=0>1/t?(t=-t,-1):1,t===~~t){for(o=0,f=t;f>=10;f/=10,o++);return a.e=o,a.c=[t],void(L=0)}c=t+""}else{if(!d.test(c=t+""))return m(a,c,u);a.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1}}for((o=c.indexOf("."))>-1&&(c=c.replace(".","")),(f=c.search(/e/i))>0?(0>o&&(o=f),o+=+c.slice(f+1),c=c.substring(0,f)):0>o&&(o=c.length),f=0;48===c.charCodeAt(f);f++);for(s=c.length;48===c.charCodeAt(--s););if(c=c.slice(f,s+1))if(s=c.length,u&&$&&s>15&&U(L,O,a.s*t),o=o-f-1,o>q)a.c=a.e=null;else if(k>o)a.c=[a.e=0];else{if(a.e=o,a.c=[],f=(o+1)%I,0>o&&(f+=I),s>f){for(f&&a.c.push(+c.slice(0,f)),s-=I;s>f;)a.c.push(+c.slice(f,f+=I));c=c.slice(f),f=I-c.length}else f-=s;for(;f--;c+="0");a.c.push(+c)}else a.c=[a.e=0];L=0}function n(t,n,r,i){var f,u,s,a,p,h,g,m=t.indexOf("."),d=B,v=H;for(37>r&&(t=t.toLowerCase()),m>=0&&(s=Y,Y=0,t=t.replace(".",""),g=new e(r),p=g.pow(t.length-m),Y=s,g.c=c(l(o(p.c),p.e),10,n),g.e=g.c.length),h=c(t,r,n),u=s=h.length;0==h[--s];h.pop());if(!h[0])return"0";if(0>m?--u:(p.c=h,p.e=u,p.s=i,p=G(p,g,d,v,n),h=p.c,a=p.r,u=p.e),f=u+d+1,m=h[f],s=n/2,a=a||0>f||null!=h[f+1],a=4>v?(null!=m||a)&&(0==v||v==(p.s<0?3:2)):m>s||m==s&&(4==v||a||6==v&&1&h[f-1]||v==(p.s<0?8:7)),1>f||!h[0])t=a?l("1",-d):"0";else{if(h.length=f,a)for(--n;++h[--f]>n;)h[f]=0,f||(++u,h.unshift(1));for(s=h.length;!h[--s];);for(m=0,t="";s>=m;t+=N.charAt(h[m++]));t=l(t,u)}return t}function h(t,n,r,i){var f,u,s,c,p;if(r=null!=r&&z(r,0,8,i,b)?0|r:H,!t.c)return t.toString();if(f=t.c[0],s=t.e,null==n)p=o(t.c),p=19==i||24==i&&C>=s?a(p,s):l(p,s);else if(t=F(new e(t),n,r),u=t.e,p=o(t.c),c=p.length,19==i||24==i&&(u>=n||C>=u)){for(;n>c;p+="0",c++);p=a(p,u)}else if(n-=s,p=l(p,u),u+1>c){if(--n>0)for(p+=".";n--;p+="0");}else if(n+=u-c,n>0)for(u+1==c&&(p+=".");n--;p+="0");return t.s<0&&f?"-"+p:p}function S(t,n){var r,i,o=0;for(s(t[0])&&(t=t[0]),r=new e(t[0]);++ot||t>n||t!=p(t))&&U(r,(i||"decimal places")+(e>t||t>n?" out of range":" not an integer"),t),!0}function R(t,e,n){for(var r=1,i=e.length;!e[--i];e.pop());for(i=e[0];i>=10;i/=10,r++);return(n=r+n*I-1)>q?t.c=t.e=null:k>n?t.c=[t.e=0]:(t.e=n,t.c=e),t}function U(t,e,n){var r=new Error(["new BigNumber","cmp","config","div","divToInt","eq","gt","gte","lt","lte","minus","mod","plus","precision","random","round","shift","times","toDigits","toExponential","toFixed","toFormat","toFraction","pow","toPrecision","toString","BigNumber"][t]+"() "+e+": "+n);throw r.name="BigNumber Error",L=0,r}function F(t,e,n,r){var i,o,f,u,s,c,a,l=t.c,p=_;if(l){t:{for(i=1,u=l[0];u>=10;u/=10,i++);if(o=e-i,0>o)o+=I,f=e,s=l[c=0],a=s/p[i-f-1]%10|0;else if(c=v((o+1)/I),c>=l.length){if(!r)break t;for(;l.length<=c;l.push(0));s=a=0,i=1,o%=I,f=o-I+1}else{for(s=u=l[c],i=1;u>=10;u/=10,i++);o%=I,f=o-I+i,a=0>f?0:s/p[i-f-1]%10|0}if(r=r||0>e||null!=l[c+1]||(0>f?s:s%p[i-f-1]),r=4>n?(a||r)&&(0==n||n==(t.s<0?3:2)):a>5||5==a&&(4==n||r||6==n&&(o>0?f>0?s/p[i-f]:0:l[c-1])%10&1||n==(t.s<0?8:7)),1>e||!l[0])return l.length=0,r?(e-=t.e+1,l[0]=p[e%I],t.e=-e||0):l[0]=t.e=0,t;if(0==o?(l.length=c,u=1,c--):(l.length=c+1,u=p[I-o],l[c]=f>0?w(s/p[i-f]%p[f])*u:0),r)for(;;){if(0==c){for(o=1,f=l[0];f>=10;f/=10,o++);for(f=l[0]+=u,u=1;f>=10;f/=10,u++);o!=u&&(t.e++,l[0]==E&&(l[0]=1));break}if(l[c]+=u,l[c]!=E)break;l[c--]=0,u=1}for(o=l.length;0===l[--o];l.pop());}t.e>q?t.c=t.e=null:t.en?null!=(t=i[n++]):void 0};return f(e="DECIMAL_PLACES")&&z(t,0,D,2,e)&&(B=0|t),r[e]=B,f(e="ROUNDING_MODE")&&z(t,0,8,2,e)&&(H=0|t),r[e]=H,f(e="EXPONENTIAL_AT")&&(s(t)?z(t[0],-D,0,2,e)&&z(t[1],0,D,2,e)&&(C=0|t[0],j=0|t[1]):z(t,-D,D,2,e)&&(C=-(j=0|(0>t?-t:t)))),r[e]=[C,j],f(e="RANGE")&&(s(t)?z(t[0],-D,-1,2,e)&&z(t[1],1,D,2,e)&&(k=0|t[0],q=0|t[1]):z(t,-D,D,2,e)&&(0|t?k=-(q=0|(0>t?-t:t)):$&&U(2,e+" cannot be zero",t))),r[e]=[k,q],f(e="ERRORS")&&(t===!!t||1===t||0===t?(L=0,z=($=!!t)?A:u):$&&U(2,e+y,t)),r[e]=$,f(e="CRYPTO")&&(t===!!t||1===t||0===t?(V=!(!t||!g||"object"!=typeof g),t&&!V&&$&&U(2,"crypto unavailable",g)):$&&U(2,e+y,t)),r[e]=V,f(e="MODULO_MODE")&&z(t,0,9,2,e)&&(W=0|t),r[e]=W,f(e="POW_PRECISION")&&z(t,0,D,2,e)&&(Y=0|t),r[e]=Y,f(e="FORMAT")&&("object"==typeof t?Z=t:$&&U(2,e+" not an object",t)),r[e]=Z,r},e.max=function(){return S(arguments,M.lt)},e.min=function(){return S(arguments,M.gt)},e.random=function(){var t=9007199254740992,n=Math.random()*t&2097151?function(){return w(Math.random()*t)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(t){var r,i,o,f,u,s=0,c=[],a=new e(P);if(t=null!=t&&z(t,0,D,14)?0|t:B,f=v(t/I),V)if(g&&g.getRandomValues){for(r=g.getRandomValues(new Uint32Array(f*=2));f>s;)u=131072*r[s]+(r[s+1]>>>11),u>=9e15?(i=g.getRandomValues(new Uint32Array(2)),r[s]=i[0],r[s+1]=i[1]):(c.push(u%1e14),s+=2);s=f/2}else if(g&&g.randomBytes){for(r=g.randomBytes(f*=7);f>s;)u=281474976710656*(31&r[s])+1099511627776*r[s+1]+4294967296*r[s+2]+16777216*r[s+3]+(r[s+4]<<16)+(r[s+5]<<8)+r[s+6],u>=9e15?g.randomBytes(7).copy(r,s):(c.push(u%1e14),s+=7);s=f/7}else $&&U(14,"crypto unavailable",g);if(!s)for(;f>s;)u=n(),9e15>u&&(c[s++]=u%1e14);for(f=c[--s],t%=I,f&&t&&(u=_[I-t],c[s]=w(f/u)*u);0===c[s];c.pop(),s--);if(0>s)c=[o=0];else{for(o=-1;0===c[0];c.shift(),o-=I);for(s=1,u=c[0];u>=10;u/=10,s++);I>s&&(o-=I-s)}return a.e=o,a.c=c,a}}(),G=function(){function t(t,e,n){var r,i,o,f,u=0,s=t.length,c=e%T,a=e/T|0;for(t=t.slice();s--;)o=t[s]%T,f=t[s]/T|0,r=a*o+f*c,i=c*o+r%T*T+u,u=(i/n|0)+(r/T|0)+a*f,t[s]=i%n;return u&&t.unshift(u),t}function n(t,e,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;n>i;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function r(t,e,n,r){for(var i=0;n--;)t[n]-=i,i=t[n]1;t.shift());}return function(o,f,u,s,c){var a,l,p,h,g,m,d,v,y,b,O,N,x,_,T,D,S,A=o.s==f.s?1:-1,R=o.c,U=f.c;if(!(R&&R[0]&&U&&U[0]))return new e(o.s&&f.s&&(R?!U||R[0]!=U[0]:U)?R&&0==R[0]||!U?0*A:A/0:0/0);for(v=new e(A),y=v.c=[],l=o.e-f.e,A=u+l+1,c||(c=E,l=i(o.e/I)-i(f.e/I),A=A/I|0),p=0;U[p]==(R[p]||0);p++);if(U[p]>(R[p]||0)&&l--,0>A)y.push(1),h=!0;else{for(_=R.length,D=U.length,p=0,A+=2,g=w(c/(U[0]+1)),g>1&&(U=t(U,g,c),R=t(R,g,c),D=U.length,_=R.length),x=D,b=R.slice(0,D),O=b.length;D>O;b[O++]=0);S=U.slice(),S.unshift(0),T=U[0],U[1]>=c/2&&T++;do g=0,a=n(U,b,D,O),0>a?(N=b[0],D!=O&&(N=N*c+(b[1]||0)),g=w(N/T),g>1?(g>=c&&(g=c-1),m=t(U,g,c),d=m.length,O=b.length,a=n(m,b,d,O),1==a&&(g--,r(m,d>D?S:U,d,c))):(0==g&&(a=g=1),m=U.slice()),d=m.length,O>d&&m.unshift(0),r(b,m,O,c),-1==a&&(O=b.length,a=n(U,b,D,O),1>a&&(g++,r(b,O>D?S:U,O,c))),O=b.length):0===a&&(g++,b=[0]),y[p++]=g,a&&b[0]?b[O++]=R[x]||0:(b=[R[x]],O=1);while((x++<_||null!=b[0])&&A--);h=null!=b[0],y[0]||y.shift()}if(c==E){for(p=1,A=y[0];A>=10;A/=10,p++);F(v,u+(v.e=p+l*I-1)+1,s,h)}else v.e=l,v.r=+h;return v}}(),m==function(){var t=/^(-?)0([xbo])(\w[\w.]*$)/i,n=/^([^.]+)\.$/,r=/^\.([^.]+)$/,i=/^-?(Infinity|NaN)$/,o=/^\s*\+([\w.])|^\s+|\s+$/g;return function(f,u,s,c){var a,l=s?u:u.replace(o,"$1");if(i.test(l))f.s=isNaN(l)?null:0>l?-1:1;else{if(!s&&(l=l.replace(t,function(t,e,n){return a="x"==(n=n.toLowerCase())?16:"b"==n?2:8,c&&c!=a?t:e}),c&&(a=c,l=l.replace(n,"$1").replace(r,"0.$1")),u!=l))return new e(l,a);$&&U(L,"not a"+(c?" base "+c:"")+" number",u),f.s=null}f.c=f.e=null,L=0}}(),M.absoluteValue=M.abs=function(){var t=new e(this);return t.s<0&&(t.s=1),t},M.ceil=function(){return F(new e(this),this.e+1,2)},M.comparedTo=M.cmp=function(t,n){return L=1,f(this,new e(t,n))},M.decimalPlaces=M.dp=function(){var t,e,n=this.c;if(!n)return null;if(t=((e=n.length-1)-i(this.e/I))*I,e=n[e])for(;e%10==0;e/=10,t--);return 0>t&&(t=0),t},M.dividedBy=M.div=function(t,n){return L=3,G(this,new e(t,n),B,H)},M.dividedToIntegerBy=M.divToInt=function(t,n){return L=4,G(this,new e(t,n),0,1)},M.equals=M.eq=function(t,n){return L=5,0===f(this,new e(t,n))},M.floor=function(){return F(new e(this),this.e+1,3)},M.greaterThan=M.gt=function(t,n){return L=6,f(this,new e(t,n))>0},M.greaterThanOrEqualTo=M.gte=function(t,n){return L=7,1===(n=f(this,new e(t,n)))||0===n},M.isFinite=function(){return!!this.c},M.isInteger=M.isInt=function(){return!!this.c&&i(this.e/I)>this.c.length-2},M.isNaN=function(){return!this.s},M.isNegative=M.isNeg=function(){return this.s<0},M.isZero=function(){return!!this.c&&0==this.c[0]},M.lessThan=M.lt=function(t,n){return L=8,f(this,new e(t,n))<0},M.lessThanOrEqualTo=M.lte=function(t,n){return L=9,-1===(n=f(this,new e(t,n)))||0===n},M.minus=M.sub=function(t,n){var r,o,f,u,s=this,c=s.s;if(L=10,t=new e(t,n),n=t.s,!c||!n)return new e(0/0);if(c!=n)return t.s=-n,s.plus(t);var a=s.e/I,l=t.e/I,p=s.c,h=t.c;if(!a||!l){if(!p||!h)return p?(t.s=-n,t):new e(h?s:0/0);if(!p[0]||!h[0])return h[0]?(t.s=-n,t):new e(p[0]?s:3==H?-0:0)}if(a=i(a),l=i(l),p=p.slice(),c=a-l){for((u=0>c)?(c=-c,f=p):(l=a,f=h),f.reverse(),n=c;n--;f.push(0));f.reverse()}else for(o=(u=(c=p.length)<(n=h.length))?c:n,c=n=0;o>n;n++)if(p[n]!=h[n]){u=p[n]0)for(;n--;p[r++]=0);for(n=E-1;o>c;){if(p[--o]0?(s=u,r=a):(f=-f,r=c),r.reverse();f--;r.push(0));r.reverse()}for(f=c.length,n=a.length,0>f-n&&(r=a,a=c,c=r,n=f),f=0;n;)f=(c[--n]=c[n]+a[n]+f)/E|0,c[n]%=E;return f&&(c.unshift(f),++s),R(t,c,s)},M.precision=M.sd=function(t){var e,n,r=this,i=r.c;if(null!=t&&t!==!!t&&1!==t&&0!==t&&($&&U(13,"argument"+y,t),t!=!!t&&(t=null)),!i)return null;if(n=i.length-1,e=n*I+1,n=i[n]){for(;n%10==0;n/=10,e--);for(n=i[0];n>=10;n/=10,e++);}return t&&r.e+1>e&&(e=r.e+1),e},M.round=function(t,n){var r=new e(this);return(null==t||z(t,0,D,15))&&F(r,~~t+this.e+1,null!=n&&z(n,0,8,15,b)?0|n:H),r},M.shift=function(t){var n=this;return z(t,-x,x,16,"argument")?n.times("1e"+p(t)):new e(n.c&&n.c[0]&&(-x>t||t>x)?n.s*(0>t?0:1/0):n)},M.squareRoot=M.sqrt=function(){var t,n,r,f,u,s=this,c=s.c,a=s.s,l=s.e,p=B+4,h=new e("0.5");if(1!==a||!c||!c[0])return new e(!a||0>a&&(!c||c[0])?0/0:c?s:1/0);if(a=Math.sqrt(+s),0==a||a==1/0?(n=o(c),(n.length+l)%2==0&&(n+="0"),a=Math.sqrt(n),l=i((l+1)/2)-(0>l||l%2),a==1/0?n="1e"+l:(n=a.toExponential(),n=n.slice(0,n.indexOf("e")+1)+l),r=new e(n)):r=new e(a+""),r.c[0])for(l=r.e,a=l+p,3>a&&(a=0);;)if(u=r,r=h.times(u.plus(G(s,u,p,1))),o(u.c).slice(0,a)===(n=o(r.c)).slice(0,a)){if(r.ea&&(d=b,b=O,O=d,f=a,a=h,h=f),f=a+h,d=[];f--;d.push(0));for(v=E,w=T,f=h;--f>=0;){for(r=0,g=O[f]%w,m=O[f]/w|0,s=a,u=f+s;u>f;)l=b[--s]%w,p=b[s]/w|0,c=m*l+p*g,l=g*l+c%w*w+d[u]+r,r=(l/v|0)+(c/w|0)+m*p,d[u--]=l%v;d[u]=r}return r?++o:d.shift(),R(t,d,o)},M.toDigits=function(t,n){var r=new e(this);return t=null!=t&&z(t,1,D,18,"precision")?0|t:null,n=null!=n&&z(n,0,8,18,b)?0|n:H,t?F(r,t,n):r},M.toExponential=function(t,e){return h(this,null!=t&&z(t,0,D,19)?~~t+1:null,e,19)},M.toFixed=function(t,e){return h(this,null!=t&&z(t,0,D,20)?~~t+this.e+1:null,e,20)},M.toFormat=function(t,e){var n=h(this,null!=t&&z(t,0,D,21)?~~t+this.e+1:null,e,21);if(this.c){var r,i=n.split("."),o=+Z.groupSize,f=+Z.secondaryGroupSize,u=Z.groupSeparator,s=i[0],c=i[1],a=this.s<0,l=a?s.slice(1):s,p=l.length;if(f&&(r=o,o=f,f=r,p-=r),o>0&&p>0){for(r=p%o||o,s=l.substr(0,r);p>r;r+=o)s+=u+l.substr(r,o);f>0&&(s+=u+l.slice(r)),a&&(s="-"+s)}n=c?s+Z.decimalSeparator+((f=+Z.fractionGroupSize)?c.replace(new RegExp("\\d{"+f+"}\\B","g"),"$&"+Z.fractionGroupSeparator):c):s}return n},M.toFraction=function(t){var n,r,i,f,u,s,c,a,l,p=$,h=this,g=h.c,m=new e(P),d=r=new e(P),v=c=new e(P);if(null!=t&&($=!1,s=new e(t),$=p,(!(p=s.isInt())||s.lt(P))&&($&&U(22,"max denominator "+(p?"out of range":"not an integer"),t),t=!p&&s.c&&F(s,s.e+1,1).gte(P)?s:null)),!g)return h.toString();for(l=o(g),f=m.e=l.length-h.e-1,m.c[0]=_[(u=f%I)<0?I+u:u],t=!t||s.cmp(m)>0?f>0?m:d:s,u=q,q=1/0,s=new e(l),c.c[0]=0;a=G(s,m,0,1),i=r.plus(a.times(v)),1!=i.cmp(t);)r=v,v=i,d=c.plus(a.times(i=d)),c=i,m=s.minus(a.times(i=m)),s=i;return i=G(t.minus(r),v,0,1),c=c.plus(i.times(d)),r=r.plus(i.times(v)),c.s=d.s=h.s,f*=2,n=G(d,v,f,H).minus(h).abs().cmp(G(c,r,f,H).minus(h).abs())<1?[d.toString(),v.toString()]:[c.toString(),r.toString()],q=u,n},M.toNumber=function(){var t=this;return+t||(t.s?0*t.s:0/0)},M.toPower=M.pow=function(t){var n,r,i=w(0>t?-t:+t),o=this;if(!z(t,-x,x,23,"exponent")&&(!isFinite(t)||i>x&&(t/=0)||parseFloat(t)!=t&&!(t=0/0)))return new e(Math.pow(+o,t));for(n=Y?v(Y/I+2):0,r=new e(P);;){if(i%2){if(r=r.times(o),!r.c)break;n&&r.c.length>n&&(r.c.length=n)}if(i=w(i/2),!i)break;o=o.times(o),n&&o.c&&o.c.length>n&&(o.c.length=n)}return 0>t&&(r=P.div(r)),n?F(r,Y,H):r},M.toPrecision=function(t,e){return h(this,null!=t&&z(t,1,D,24,"precision")?0|t:null,e,24)},M.toString=function(t){var e,r=this,i=r.s,f=r.e;return null===f?i?(e="Infinity",0>i&&(e="-"+e)):e="NaN":(e=o(r.c),e=null!=t&&z(t,2,64,25,"base")?n(l(e,f),0|t,10,i):C>=f||f>=j?a(e,f):l(e,f),0>i&&r.c[0]&&(e="-"+e)),e},M.truncated=M.trunc=function(){return F(new e(this),this.e+1,1)},M.valueOf=M.toJSON=function(){return this.toString()},null!=t&&e.config(t),e}function i(t){var e=0|t;return t>0||t===e?e:e-1}function o(t){for(var e,n,r=1,i=t.length,o=t[0]+"";i>r;){for(e=t[r++]+"",n=I-e.length;n--;e="0"+e);o+=e}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function f(t,e){var n,r,i=t.c,o=e.c,f=t.s,u=e.s,s=t.e,c=e.e;if(!f||!u)return null;if(n=i&&!i[0],r=o&&!o[0],n||r)return n?r?0:-u:f;if(f!=u)return f;if(n=0>f,r=s==c,!i||!o)return r?0:!i^n?1:-1;if(!r)return s>c^n?1:-1;for(u=(s=i.length)<(c=o.length)?s:c,f=0;u>f;f++)if(i[f]!=o[f])return i[f]>o[f]^n?1:-1;return s==c?0:s>c^n?1:-1}function u(t,e,n){return(t=p(t))>=e&&n>=t}function s(t){return"[object Array]"==Object.prototype.toString.call(t)}function c(t,e,n){for(var r,i,o=[0],f=0,u=t.length;u>f;){for(i=o.length;i--;o[i]*=e);for(o[r=0]+=N.indexOf(t.charAt(f++));rn-1&&(null==o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}function a(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(0>e?"e":"e+")+e}function l(t,e){var n,r;if(0>e){for(r="0.";++e;r+="0");t=r+t}else if(n=t.length,++e>n){for(r="0",e-=n;--e;r+="0");t+=r}else n>e&&(t=t.slice(0,e)+"."+t.slice(e));return t}function p(t){return t=parseFloat(t),0>t?v(t):w(t)}var h,g,m,d=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,v=Math.ceil,w=Math.floor,y=" not a boolean or binary digit",b="rounding mode",O="number type has more than 15 significant digits",N="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",E=1e14,I=14,x=9007199254740991,_=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],T=1e7,D=1e9;if(h=r(),"function"==typeof define&&define.amd)define(function(){return h});else if("undefined"!=typeof e&&e.exports){if(e.exports=h,!g)try{g=t("crypto")}catch(S){}}else n.BigNumber=h}(this)},{crypto:1}],natspec:[function(t,e){var n=t("./node_modules/expanse.js/lib/abi.js"),r=function(){var t=function(t,e){Object.keys(t).forEach(function(n){e[n]=t[n]})},e=function(t){return Object.keys(t).reduce(function(t,e){return t+"var "+e+" = context['"+e+"'];\n"},"")},r=function(t,e){return t.filter(function(t){return t.name===e})[0]},i=function(t,e){var r=n.formatOutput(t.inputs,"0x"+e.params[0].data.slice(10));return t.inputs.reduce(function(t,e,n){return t[e.name]=r[n],t},{})},o=function(t,e){var n,r="",i=/\` + "`" + `(?:\\.|[^` + "`" + `\\])*\` + "`" + `/gim,o=0;try{for(;null!==(n=i.exec(t));){var f=i.lastIndex-n[0].length,u=n[0].slice(1,n[0].length-1);r+=t.slice(o,f);var s=e(u);r+=s,o=i.lastIndex}r+=t.slice(o)}catch(c){throw new Error("Natspec evaluation failed, wrong input params")}return r},f=function(n,f){var u={};if(f)try{var s=r(f.abi,f.method),c=i(s,f.transaction);t(c,u)}catch(a){throw new Error("Natspec evaluation failed, method does not exist")}var l=e(u),p=o(n,function(t){var e=new Function("context",l+"return "+t+";");return e(u).toString()});return p},u=function(t,e){try{return f(t,e)}catch(n){return n.message}};return{evaluateExpression:f,evaluateExpressionSafe:u}}();e.exports=r},{"./node_modules/expanse.js/lib/abi.js":3}]},{},[]); +const natspecJS = //`require=function t(e,n,r){function i(f,u){if(!n[f]){if(!e[f]){var s="function"==typeof require&&require;if(!u&&s)return s(f,!0);if(o)return o(f,!0);var c=new Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c}var a=n[f]={exports:{}};e[f][0].call(a.exports,function(t){var n=e[f][1][t];return i(n?n:t)},a,a.exports,t,e,n,r)}return n[f].exports}for(var o="function"==typeof require&&require,f=0;fv;v++)d.push(g(e.slice(0,s))),e=e.slice(s);n.push(d)}else r.prefixedType("string")(t[c].type)?(a=a.slice(s),n.push(g(e.slice(0,s))),e=e.slice(s)):(n.push(g(e.slice(0,s))),e=e.slice(s))}),n},g=function(t){var e={};return t.forEach(function(t){var r=n.extractDisplayName(t.name),i=n.extractTypeName(t.name),o=function(){var e=Array.prototype.slice.call(arguments);return a(t.inputs,e)};void 0===e[r]&&(e[r]=o),e[r][i]=o}),e},m=function(t){var e={};return t.forEach(function(t){var r=n.extractDisplayName(t.name),i=n.extractTypeName(t.name),o=function(e){return h(t.outputs,e)};void 0===e[r]&&(e[r]=o),e[r][i]=o}),e};e.exports={inputParser:g,outputParser:m,formatInput:a,formatOutput:h}},{"./const":4,"./formatters":5,"./types":6,"./utils":7}],4:[function(t,e){(function(n){if("build"!==n.env.NODE_ENV)var r=t("bignumber.js");var i=["wei","Kwei","Mwei","Gwei","szabo","finney","expanse","grand","Mexpanse","Gexpanse","Texpanse","Pexpanse","Eexpanse","Zexpanse","Yexpanse","Nexpanse","Dexpanse","Vexpanse","Uexpanse"];e.exports={ETH_PADDING:32,ETH_SIGNATURE_LENGTH:4,ETH_UNITS:i,ETH_BIGNUMBER_ROUNDING_MODE:{ROUNDING_MODE:r.ROUND_DOWN},ETH_POLLING_TIMEOUT:1e3}}).call(this,t("_process"))},{_process:2,"bignumber.js":8}],5:[function(t,e){(function(n){if("build"!==n.env.NODE_ENV)var r=t("bignumber.js");var i=t("./utils"),o=t("./const"),f=function(t,e,n){return new Array(e-t.length+1).join(n?n:"0")+t},u=function(t){var e=2*o.ETH_PADDING;return t instanceof r||"number"==typeof t?("number"==typeof t&&(t=new r(t)),r.config(o.ETH_BIGNUMBER_ROUNDING_MODE),t=t.round(),t.lessThan(0)&&(t=new r("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16).plus(t).plus(1)),t=t.toString(16)):t=0===t.indexOf("0x")?t.substr(2):"string"==typeof t?u(new r(t)):(+t).toString(16),f(t,e)},s=function(t){return i.fromAscii(t,o.ETH_PADDING).substr(2)},c=function(t){return"000000000000000000000000000000000000000000000000000000000000000"+(t?"1":"0")},a=function(t){return u(new r(t).times(new r(2).pow(128)))},l=function(t){return"1"===new r(t.substr(0,1),16).toString(2).substr(0,1)},p=function(t){return t=t||"0",l(t)?new r(t,16).minus(new r("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16)).minus(1):new r(t,16)},h=function(t){return t=t||"0",new r(t,16)},g=function(t){return p(t).dividedBy(new r(2).pow(128))},m=function(t){return h(t).dividedBy(new r(2).pow(128))},d=function(t){return"0x"+t},v=function(t){return"0000000000000000000000000000000000000000000000000000000000000001"===t?!0:!1},w=function(t){return i.toAscii(t)},y=function(t){return"0x"+t.slice(t.length-40,t.length)};e.exports={formatInputInt:u,formatInputString:s,formatInputBool:c,formatInputReal:a,formatOutputInt:p,formatOutputUInt:h,formatOutputReal:g,formatOutputUReal:m,formatOutputHash:d,formatOutputBool:v,formatOutputString:w,formatOutputAddress:y}}).call(this,t("_process"))},{"./const":4,"./utils":7,_process:2,"bignumber.js":8}],6:[function(t,e){var n=t("./formatters"),r=function(t){return function(e){return 0===e.indexOf(t)}},i=function(t){return function(e){return t===e}},o=function(){return[{type:r("uint"),format:n.formatInputInt},{type:r("int"),format:n.formatInputInt},{type:r("hash"),format:n.formatInputInt},{type:r("string"),format:n.formatInputString},{type:r("real"),format:n.formatInputReal},{type:r("ureal"),format:n.formatInputReal},{type:i("address"),format:n.formatInputInt},{type:i("bool"),format:n.formatInputBool}]},f=function(){return[{type:r("uint"),format:n.formatOutputUInt},{type:r("int"),format:n.formatOutputInt},{type:r("hash"),format:n.formatOutputHash},{type:r("string"),format:n.formatOutputString},{type:r("real"),format:n.formatOutputReal},{type:r("ureal"),format:n.formatOutputUReal},{type:i("address"),format:n.formatOutputAddress},{type:i("bool"),format:n.formatOutputBool}]};e.exports={prefixedType:r,namedType:i,inputTypes:o,outputTypes:f}},{"./formatters":5}],7:[function(t,e){var n=t("./const"),r=function(t,e){for(var n=!1,r=0;rn;n+=2){var i=parseInt(t.substr(n,2),16);if(0===i)break;e+=String.fromCharCode(i)}return e},o=function(t){for(var e="",n=0;n3e3&&rr?"i":"").test(c))return m(a,c,u,r);u?(a.s=0>1/t?(c=c.slice(1),-1):1,$&&c.replace(/^0\.0*|\./,"").length>15&&U(L,O,t),u=!1):a.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1,c=n(c,10,r,a.s)}else{if(t instanceof e)return a.s=t.s,a.e=t.e,a.c=(t=t.c)?t.slice():t,void(L=0);if((u="number"==typeof t)&&0*t==0){if(a.s=0>1/t?(t=-t,-1):1,t===~~t){for(o=0,f=t;f>=10;f/=10,o++);return a.e=o,a.c=[t],void(L=0)}c=t+""}else{if(!d.test(c=t+""))return m(a,c,u);a.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1}}for((o=c.indexOf("."))>-1&&(c=c.replace(".","")),(f=c.search(/e/i))>0?(0>o&&(o=f),o+=+c.slice(f+1),c=c.substring(0,f)):0>o&&(o=c.length),f=0;48===c.charCodeAt(f);f++);for(s=c.length;48===c.charCodeAt(--s););if(c=c.slice(f,s+1))if(s=c.length,u&&$&&s>15&&U(L,O,a.s*t),o=o-f-1,o>q)a.c=a.e=null;else if(k>o)a.c=[a.e=0];else{if(a.e=o,a.c=[],f=(o+1)%I,0>o&&(f+=I),s>f){for(f&&a.c.push(+c.slice(0,f)),s-=I;s>f;)a.c.push(+c.slice(f,f+=I));c=c.slice(f),f=I-c.length}else f-=s;for(;f--;c+="0");a.c.push(+c)}else a.c=[a.e=0];L=0}function n(t,n,r,i){var f,u,s,a,p,h,g,m=t.indexOf("."),d=B,v=H;for(37>r&&(t=t.toLowerCase()),m>=0&&(s=Y,Y=0,t=t.replace(".",""),g=new e(r),p=g.pow(t.length-m),Y=s,g.c=c(l(o(p.c),p.e),10,n),g.e=g.c.length),h=c(t,r,n),u=s=h.length;0==h[--s];h.pop());if(!h[0])return"0";if(0>m?--u:(p.c=h,p.e=u,p.s=i,p=G(p,g,d,v,n),h=p.c,a=p.r,u=p.e),f=u+d+1,m=h[f],s=n/2,a=a||0>f||null!=h[f+1],a=4>v?(null!=m||a)&&(0==v||v==(p.s<0?3:2)):m>s||m==s&&(4==v||a||6==v&&1&h[f-1]||v==(p.s<0?8:7)),1>f||!h[0])t=a?l("1",-d):"0";else{if(h.length=f,a)for(--n;++h[--f]>n;)h[f]=0,f||(++u,h.unshift(1));for(s=h.length;!h[--s];);for(m=0,t="";s>=m;t+=N.charAt(h[m++]));t=l(t,u)}return t}function h(t,n,r,i){var f,u,s,c,p;if(r=null!=r&&z(r,0,8,i,b)?0|r:H,!t.c)return t.toString();if(f=t.c[0],s=t.e,null==n)p=o(t.c),p=19==i||24==i&&C>=s?a(p,s):l(p,s);else if(t=F(new e(t),n,r),u=t.e,p=o(t.c),c=p.length,19==i||24==i&&(u>=n||C>=u)){for(;n>c;p+="0",c++);p=a(p,u)}else if(n-=s,p=l(p,u),u+1>c){if(--n>0)for(p+=".";n--;p+="0");}else if(n+=u-c,n>0)for(u+1==c&&(p+=".");n--;p+="0");return t.s<0&&f?"-"+p:p}function S(t,n){var r,i,o=0;for(s(t[0])&&(t=t[0]),r=new e(t[0]);++ot||t>n||t!=p(t))&&U(r,(i||"decimal places")+(e>t||t>n?" out of range":" not an integer"),t),!0}function R(t,e,n){for(var r=1,i=e.length;!e[--i];e.pop());for(i=e[0];i>=10;i/=10,r++);return(n=r+n*I-1)>q?t.c=t.e=null:k>n?t.c=[t.e=0]:(t.e=n,t.c=e),t}function U(t,e,n){var r=new Error(["new BigNumber","cmp","config","div","divToInt","eq","gt","gte","lt","lte","minus","mod","plus","precision","random","round","shift","times","toDigits","toExponential","toFixed","toFormat","toFraction","pow","toPrecision","toString","BigNumber"][t]+"() "+e+": "+n);throw r.name="BigNumber Error",L=0,r}function F(t,e,n,r){var i,o,f,u,s,c,a,l=t.c,p=_;if(l){t:{for(i=1,u=l[0];u>=10;u/=10,i++);if(o=e-i,0>o)o+=I,f=e,s=l[c=0],a=s/p[i-f-1]%10|0;else if(c=v((o+1)/I),c>=l.length){if(!r)break t;for(;l.length<=c;l.push(0));s=a=0,i=1,o%=I,f=o-I+1}else{for(s=u=l[c],i=1;u>=10;u/=10,i++);o%=I,f=o-I+i,a=0>f?0:s/p[i-f-1]%10|0}if(r=r||0>e||null!=l[c+1]||(0>f?s:s%p[i-f-1]),r=4>n?(a||r)&&(0==n||n==(t.s<0?3:2)):a>5||5==a&&(4==n||r||6==n&&(o>0?f>0?s/p[i-f]:0:l[c-1])%10&1||n==(t.s<0?8:7)),1>e||!l[0])return l.length=0,r?(e-=t.e+1,l[0]=p[e%I],t.e=-e||0):l[0]=t.e=0,t;if(0==o?(l.length=c,u=1,c--):(l.length=c+1,u=p[I-o],l[c]=f>0?w(s/p[i-f]%p[f])*u:0),r)for(;;){if(0==c){for(o=1,f=l[0];f>=10;f/=10,o++);for(f=l[0]+=u,u=1;f>=10;f/=10,u++);o!=u&&(t.e++,l[0]==E&&(l[0]=1));break}if(l[c]+=u,l[c]!=E)break;l[c--]=0,u=1}for(o=l.length;0===l[--o];l.pop());}t.e>q?t.c=t.e=null:t.en?null!=(t=i[n++]):void 0};return f(e="DECIMAL_PLACES")&&z(t,0,D,2,e)&&(B=0|t),r[e]=B,f(e="ROUNDING_MODE")&&z(t,0,8,2,e)&&(H=0|t),r[e]=H,f(e="EXPONENTIAL_AT")&&(s(t)?z(t[0],-D,0,2,e)&&z(t[1],0,D,2,e)&&(C=0|t[0],j=0|t[1]):z(t,-D,D,2,e)&&(C=-(j=0|(0>t?-t:t)))),r[e]=[C,j],f(e="RANGE")&&(s(t)?z(t[0],-D,-1,2,e)&&z(t[1],1,D,2,e)&&(k=0|t[0],q=0|t[1]):z(t,-D,D,2,e)&&(0|t?k=-(q=0|(0>t?-t:t)):$&&U(2,e+" cannot be zero",t))),r[e]=[k,q],f(e="ERRORS")&&(t===!!t||1===t||0===t?(L=0,z=($=!!t)?A:u):$&&U(2,e+y,t)),r[e]=$,f(e="CRYPTO")&&(t===!!t||1===t||0===t?(V=!(!t||!g||"object"!=typeof g),t&&!V&&$&&U(2,"crypto unavailable",g)):$&&U(2,e+y,t)),r[e]=V,f(e="MODULO_MODE")&&z(t,0,9,2,e)&&(W=0|t),r[e]=W,f(e="POW_PRECISION")&&z(t,0,D,2,e)&&(Y=0|t),r[e]=Y,f(e="FORMAT")&&("object"==typeof t?Z=t:$&&U(2,e+" not an object",t)),r[e]=Z,r},e.max=function(){return S(arguments,M.lt)},e.min=function(){return S(arguments,M.gt)},e.random=function(){var t=9007199254740992,n=Math.random()*t&2097151?function(){return w(Math.random()*t)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(t){var r,i,o,f,u,s=0,c=[],a=new e(P);if(t=null!=t&&z(t,0,D,14)?0|t:B,f=v(t/I),V)if(g&&g.getRandomValues){for(r=g.getRandomValues(new Uint32Array(f*=2));f>s;)u=131072*r[s]+(r[s+1]>>>11),u>=9e15?(i=g.getRandomValues(new Uint32Array(2)),r[s]=i[0],r[s+1]=i[1]):(c.push(u%1e14),s+=2);s=f/2}else if(g&&g.randomBytes){for(r=g.randomBytes(f*=7);f>s;)u=281474976710656*(31&r[s])+1099511627776*r[s+1]+4294967296*r[s+2]+16777216*r[s+3]+(r[s+4]<<16)+(r[s+5]<<8)+r[s+6],u>=9e15?g.randomBytes(7).copy(r,s):(c.push(u%1e14),s+=7);s=f/7}else $&&U(14,"crypto unavailable",g);if(!s)for(;f>s;)u=n(),9e15>u&&(c[s++]=u%1e14);for(f=c[--s],t%=I,f&&t&&(u=_[I-t],c[s]=w(f/u)*u);0===c[s];c.pop(),s--);if(0>s)c=[o=0];else{for(o=-1;0===c[0];c.shift(),o-=I);for(s=1,u=c[0];u>=10;u/=10,s++);I>s&&(o-=I-s)}return a.e=o,a.c=c,a}}(),G=function(){function t(t,e,n){var r,i,o,f,u=0,s=t.length,c=e%T,a=e/T|0;for(t=t.slice();s--;)o=t[s]%T,f=t[s]/T|0,r=a*o+f*c,i=c*o+r%T*T+u,u=(i/n|0)+(r/T|0)+a*f,t[s]=i%n;return u&&t.unshift(u),t}function n(t,e,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;n>i;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function r(t,e,n,r){for(var i=0;n--;)t[n]-=i,i=t[n]1;t.shift());}return function(o,f,u,s,c){var a,l,p,h,g,m,d,v,y,b,O,N,x,_,T,D,S,A=o.s==f.s?1:-1,R=o.c,U=f.c;if(!(R&&R[0]&&U&&U[0]))return new e(o.s&&f.s&&(R?!U||R[0]!=U[0]:U)?R&&0==R[0]||!U?0*A:A/0:0/0);for(v=new e(A),y=v.c=[],l=o.e-f.e,A=u+l+1,c||(c=E,l=i(o.e/I)-i(f.e/I),A=A/I|0),p=0;U[p]==(R[p]||0);p++);if(U[p]>(R[p]||0)&&l--,0>A)y.push(1),h=!0;else{for(_=R.length,D=U.length,p=0,A+=2,g=w(c/(U[0]+1)),g>1&&(U=t(U,g,c),R=t(R,g,c),D=U.length,_=R.length),x=D,b=R.slice(0,D),O=b.length;D>O;b[O++]=0);S=U.slice(),S.unshift(0),T=U[0],U[1]>=c/2&&T++;do g=0,a=n(U,b,D,O),0>a?(N=b[0],D!=O&&(N=N*c+(b[1]||0)),g=w(N/T),g>1?(g>=c&&(g=c-1),m=t(U,g,c),d=m.length,O=b.length,a=n(m,b,d,O),1==a&&(g--,r(m,d>D?S:U,d,c))):(0==g&&(a=g=1),m=U.slice()),d=m.length,O>d&&m.unshift(0),r(b,m,O,c),-1==a&&(O=b.length,a=n(U,b,D,O),1>a&&(g++,r(b,O>D?S:U,O,c))),O=b.length):0===a&&(g++,b=[0]),y[p++]=g,a&&b[0]?b[O++]=R[x]||0:(b=[R[x]],O=1);while((x++<_||null!=b[0])&&A--);h=null!=b[0],y[0]||y.shift()}if(c==E){for(p=1,A=y[0];A>=10;A/=10,p++);F(v,u+(v.e=p+l*I-1)+1,s,h)}else v.e=l,v.r=+h;return v}}(),m==function(){var t=/^(-?)0([xbo])(\w[\w.]*$)/i,n=/^([^.]+)\.$/,r=/^\.([^.]+)$/,i=/^-?(Infinity|NaN)$/,o=/^\s*\+([\w.])|^\s+|\s+$/g;return function(f,u,s,c){var a,l=s?u:u.replace(o,"$1");if(i.test(l))f.s=isNaN(l)?null:0>l?-1:1;else{if(!s&&(l=l.replace(t,function(t,e,n){return a="x"==(n=n.toLowerCase())?16:"b"==n?2:8,c&&c!=a?t:e}),c&&(a=c,l=l.replace(n,"$1").replace(r,"0.$1")),u!=l))return new e(l,a);$&&U(L,"not a"+(c?" base "+c:"")+" number",u),f.s=null}f.c=f.e=null,L=0}}(),M.absoluteValue=M.abs=function(){var t=new e(this);return t.s<0&&(t.s=1),t},M.ceil=function(){return F(new e(this),this.e+1,2)},M.comparedTo=M.cmp=function(t,n){return L=1,f(this,new e(t,n))},M.decimalPlaces=M.dp=function(){var t,e,n=this.c;if(!n)return null;if(t=((e=n.length-1)-i(this.e/I))*I,e=n[e])for(;e%10==0;e/=10,t--);return 0>t&&(t=0),t},M.dividedBy=M.div=function(t,n){return L=3,G(this,new e(t,n),B,H)},M.dividedToIntegerBy=M.divToInt=function(t,n){return L=4,G(this,new e(t,n),0,1)},M.equals=M.eq=function(t,n){return L=5,0===f(this,new e(t,n))},M.floor=function(){return F(new e(this),this.e+1,3)},M.greaterThan=M.gt=function(t,n){return L=6,f(this,new e(t,n))>0},M.greaterThanOrEqualTo=M.gte=function(t,n){return L=7,1===(n=f(this,new e(t,n)))||0===n},M.isFinite=function(){return!!this.c},M.isInteger=M.isInt=function(){return!!this.c&&i(this.e/I)>this.c.length-2},M.isNaN=function(){return!this.s},M.isNegative=M.isNeg=function(){return this.s<0},M.isZero=function(){return!!this.c&&0==this.c[0]},M.lessThan=M.lt=function(t,n){return L=8,f(this,new e(t,n))<0},M.lessThanOrEqualTo=M.lte=function(t,n){return L=9,-1===(n=f(this,new e(t,n)))||0===n},M.minus=M.sub=function(t,n){var r,o,f,u,s=this,c=s.s;if(L=10,t=new e(t,n),n=t.s,!c||!n)return new e(0/0);if(c!=n)return t.s=-n,s.plus(t);var a=s.e/I,l=t.e/I,p=s.c,h=t.c;if(!a||!l){if(!p||!h)return p?(t.s=-n,t):new e(h?s:0/0);if(!p[0]||!h[0])return h[0]?(t.s=-n,t):new e(p[0]?s:3==H?-0:0)}if(a=i(a),l=i(l),p=p.slice(),c=a-l){for((u=0>c)?(c=-c,f=p):(l=a,f=h),f.reverse(),n=c;n--;f.push(0));f.reverse()}else for(o=(u=(c=p.length)<(n=h.length))?c:n,c=n=0;o>n;n++)if(p[n]!=h[n]){u=p[n]0)for(;n--;p[r++]=0);for(n=E-1;o>c;){if(p[--o]0?(s=u,r=a):(f=-f,r=c),r.reverse();f--;r.push(0));r.reverse()}for(f=c.length,n=a.length,0>f-n&&(r=a,a=c,c=r,n=f),f=0;n;)f=(c[--n]=c[n]+a[n]+f)/E|0,c[n]%=E;return f&&(c.unshift(f),++s),R(t,c,s)},M.precision=M.sd=function(t){var e,n,r=this,i=r.c;if(null!=t&&t!==!!t&&1!==t&&0!==t&&($&&U(13,"argument"+y,t),t!=!!t&&(t=null)),!i)return null;if(n=i.length-1,e=n*I+1,n=i[n]){for(;n%10==0;n/=10,e--);for(n=i[0];n>=10;n/=10,e++);}return t&&r.e+1>e&&(e=r.e+1),e},M.round=function(t,n){var r=new e(this);return(null==t||z(t,0,D,15))&&F(r,~~t+this.e+1,null!=n&&z(n,0,8,15,b)?0|n:H),r},M.shift=function(t){var n=this;return z(t,-x,x,16,"argument")?n.times("1e"+p(t)):new e(n.c&&n.c[0]&&(-x>t||t>x)?n.s*(0>t?0:1/0):n)},M.squareRoot=M.sqrt=function(){var t,n,r,f,u,s=this,c=s.c,a=s.s,l=s.e,p=B+4,h=new e("0.5");if(1!==a||!c||!c[0])return new e(!a||0>a&&(!c||c[0])?0/0:c?s:1/0);if(a=Math.sqrt(+s),0==a||a==1/0?(n=o(c),(n.length+l)%2==0&&(n+="0"),a=Math.sqrt(n),l=i((l+1)/2)-(0>l||l%2),a==1/0?n="1e"+l:(n=a.toExponential(),n=n.slice(0,n.indexOf("e")+1)+l),r=new e(n)):r=new e(a+""),r.c[0])for(l=r.e,a=l+p,3>a&&(a=0);;)if(u=r,r=h.times(u.plus(G(s,u,p,1))),o(u.c).slice(0,a)===(n=o(r.c)).slice(0,a)){if(r.ea&&(d=b,b=O,O=d,f=a,a=h,h=f),f=a+h,d=[];f--;d.push(0));for(v=E,w=T,f=h;--f>=0;){for(r=0,g=O[f]%w,m=O[f]/w|0,s=a,u=f+s;u>f;)l=b[--s]%w,p=b[s]/w|0,c=m*l+p*g,l=g*l+c%w*w+d[u]+r,r=(l/v|0)+(c/w|0)+m*p,d[u--]=l%v;d[u]=r}return r?++o:d.shift(),R(t,d,o)},M.toDigits=function(t,n){var r=new e(this);return t=null!=t&&z(t,1,D,18,"precision")?0|t:null,n=null!=n&&z(n,0,8,18,b)?0|n:H,t?F(r,t,n):r},M.toExponential=function(t,e){return h(this,null!=t&&z(t,0,D,19)?~~t+1:null,e,19)},M.toFixed=function(t,e){return h(this,null!=t&&z(t,0,D,20)?~~t+this.e+1:null,e,20)},M.toFormat=function(t,e){var n=h(this,null!=t&&z(t,0,D,21)?~~t+this.e+1:null,e,21);if(this.c){var r,i=n.split("."),o=+Z.groupSize,f=+Z.secondaryGroupSize,u=Z.groupSeparator,s=i[0],c=i[1],a=this.s<0,l=a?s.slice(1):s,p=l.length;if(f&&(r=o,o=f,f=r,p-=r),o>0&&p>0){for(r=p%o||o,s=l.substr(0,r);p>r;r+=o)s+=u+l.substr(r,o);f>0&&(s+=u+l.slice(r)),a&&(s="-"+s)}n=c?s+Z.decimalSeparator+((f=+Z.fractionGroupSize)?c.replace(new RegExp("\\d{"+f+"}\\B","g"),"$&"+Z.fractionGroupSeparator):c):s}return n},M.toFraction=function(t){var n,r,i,f,u,s,c,a,l,p=$,h=this,g=h.c,m=new e(P),d=r=new e(P),v=c=new e(P);if(null!=t&&($=!1,s=new e(t),$=p,(!(p=s.isInt())||s.lt(P))&&($&&U(22,"max denominator "+(p?"out of range":"not an integer"),t),t=!p&&s.c&&F(s,s.e+1,1).gte(P)?s:null)),!g)return h.toString();for(l=o(g),f=m.e=l.length-h.e-1,m.c[0]=_[(u=f%I)<0?I+u:u],t=!t||s.cmp(m)>0?f>0?m:d:s,u=q,q=1/0,s=new e(l),c.c[0]=0;a=G(s,m,0,1),i=r.plus(a.times(v)),1!=i.cmp(t);)r=v,v=i,d=c.plus(a.times(i=d)),c=i,m=s.minus(a.times(i=m)),s=i;return i=G(t.minus(r),v,0,1),c=c.plus(i.times(d)),r=r.plus(i.times(v)),c.s=d.s=h.s,f*=2,n=G(d,v,f,H).minus(h).abs().cmp(G(c,r,f,H).minus(h).abs())<1?[d.toString(),v.toString()]:[c.toString(),r.toString()],q=u,n},M.toNumber=function(){var t=this;return+t||(t.s?0*t.s:0/0)},M.toPower=M.pow=function(t){var n,r,i=w(0>t?-t:+t),o=this;if(!z(t,-x,x,23,"exponent")&&(!isFinite(t)||i>x&&(t/=0)||parseFloat(t)!=t&&!(t=0/0)))return new e(Math.pow(+o,t));for(n=Y?v(Y/I+2):0,r=new e(P);;){if(i%2){if(r=r.times(o),!r.c)break;n&&r.c.length>n&&(r.c.length=n)}if(i=w(i/2),!i)break;o=o.times(o),n&&o.c&&o.c.length>n&&(o.c.length=n)}return 0>t&&(r=P.div(r)),n?F(r,Y,H):r},M.toPrecision=function(t,e){return h(this,null!=t&&z(t,1,D,24,"precision")?0|t:null,e,24)},M.toString=function(t){var e,r=this,i=r.s,f=r.e;return null===f?i?(e="Infinity",0>i&&(e="-"+e)):e="NaN":(e=o(r.c),e=null!=t&&z(t,2,64,25,"base")?n(l(e,f),0|t,10,i):C>=f||f>=j?a(e,f):l(e,f),0>i&&r.c[0]&&(e="-"+e)),e},M.truncated=M.trunc=function(){return F(new e(this),this.e+1,1)},M.valueOf=M.toJSON=function(){return this.toString()},null!=t&&e.config(t),e}function i(t){var e=0|t;return t>0||t===e?e:e-1}function o(t){for(var e,n,r=1,i=t.length,o=t[0]+"";i>r;){for(e=t[r++]+"",n=I-e.length;n--;e="0"+e);o+=e}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function f(t,e){var n,r,i=t.c,o=e.c,f=t.s,u=e.s,s=t.e,c=e.e;if(!f||!u)return null;if(n=i&&!i[0],r=o&&!o[0],n||r)return n?r?0:-u:f;if(f!=u)return f;if(n=0>f,r=s==c,!i||!o)return r?0:!i^n?1:-1;if(!r)return s>c^n?1:-1;for(u=(s=i.length)<(c=o.length)?s:c,f=0;u>f;f++)if(i[f]!=o[f])return i[f]>o[f]^n?1:-1;return s==c?0:s>c^n?1:-1}function u(t,e,n){return(t=p(t))>=e&&n>=t}function s(t){return"[object Array]"==Object.prototype.toString.call(t)}function c(t,e,n){for(var r,i,o=[0],f=0,u=t.length;u>f;){for(i=o.length;i--;o[i]*=e);for(o[r=0]+=N.indexOf(t.charAt(f++));rn-1&&(null==o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}function a(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(0>e?"e":"e+")+e}function l(t,e){var n,r;if(0>e){for(r="0.";++e;r+="0");t=r+t}else if(n=t.length,++e>n){for(r="0",e-=n;--e;r+="0");t+=r}else n>e&&(t=t.slice(0,e)+"."+t.slice(e));return t}function p(t){return t=parseFloat(t),0>t?v(t):w(t)}var h,g,m,d=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,v=Math.ceil,w=Math.floor,y=" not a boolean or binary digit",b="rounding mode",O="number type has more than 15 significant digits",N="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",E=1e14,I=14,x=9007199254740991,_=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],T=1e7,D=1e9;if(h=r(),"function"==typeof define&&define.amd)define(function(){return h});else if("undefined"!=typeof e&&e.exports){if(e.exports=h,!g)try{g=t("crypto")}catch(S){}}else n.BigNumber=h}(this)},{crypto:1}],natspec:[function(t,e){var n=t("./node_modules/expanse.js/lib/abi.js"),r=function(){var t=function(t,e){Object.keys(t).forEach(function(n){e[n]=t[n]})},e=function(t){return Object.keys(t).reduce(function(t,e){return t+"var "+e+" = context['"+e+"'];\n"},"")},r=function(t,e){return t.filter(function(t){return t.name===e})[0]},i=function(t,e){var r=n.formatOutput(t.inputs,"0x"+e.params[0].data.slice(10));return t.inputs.reduce(function(t,e,n){return t[e.name]=r[n],t},{})},o=function(t,e){var n,r="",i=/\` + "`" + `(?:\\.|[^` + "`" + `\\])*\` + "`" + `/gim,o=0;try{for(;null!==(n=i.exec(t));){var f=i.lastIndex-n[0].length,u=n[0].slice(1,n[0].length-1);r+=t.slice(o,f);var s=e(u);r+=s,o=i.lastIndex}r+=t.slice(o)}catch(c){throw new Error("Natspec evaluation failed, wrong input params")}return r},f=function(n,f){var u={};if(f)try{var s=r(f.abi,f.method),c=i(s,f.transaction);t(c,u)}catch(a){throw new Error("Natspec evaluation failed, method does not exist")}var l=e(u),p=o(n,function(t){var e=new Function("context",l+"return "+t+";");return e(u).toString()});return p},u=function(t,e){try{return f(t,e)}catch(n){return n.message}};return{evaluateExpression:f,evaluateExpressionSafe:u}}();e.exports=r},{"./node_modules/expanse.js/lib/abi.js":3}]},{},[]); ` require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o