Skip to content

Commit

Permalink
replaced *eth, Ethereum, geth
Browse files Browse the repository at this point in the history
  • Loading branch information
SiNZeRo committed May 15, 2019
1 parent 31dcb02 commit 7ab7a5b
Show file tree
Hide file tree
Showing 908 changed files with 6,607 additions and 6,607 deletions.
10 changes: 5 additions & 5 deletions PoolMiner/common/types.go
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
// along with the go-cortex library. If not, see <http://www.gnu.org/licenses/>.

package common

Expand Down
10 changes: 5 additions & 5 deletions PoolMiner/crypto/crypto.go
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
// along with the go-cortex library. If not, see <http://www.gnu.org/licenses/>.

package crypto

Expand Down
2 changes: 1 addition & 1 deletion PoolMiner/goconfig/read.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.

This comment has been minimized.

Copy link
@nemani

nemani Nov 28, 2023

👍

// Append files' name tocortexer.
fileNames := make([]string, 1, len(moreFiles)+1)
fileNames[0] = fileName
if len(moreFiles) > 0 {
Expand Down
10 changes: 5 additions & 5 deletions accounts/abi/abi.go
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
// along with the go-cortex library. If not, see <http://www.gnu.org/licenses/>.

package abi

Expand Down
10 changes: 5 additions & 5 deletions accounts/abi/abi_test.go
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
// along with the go-cortex library. If not, see <http://www.gnu.org/licenses/>.

package abi

Expand Down
10 changes: 5 additions & 5 deletions accounts/abi/argument.go
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
// along with the go-cortex library. If not, see <http://www.gnu.org/licenses/>.

package abi

Expand Down
10 changes: 5 additions & 5 deletions accounts/abi/bind/auth.go
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
// along with the go-cortex library. If not, see <http://www.gnu.org/licenses/>.

package bind

Expand Down
24 changes: 12 additions & 12 deletions accounts/abi/bind/backend.go
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
// along with the go-cortex library. If not, see <http://www.gnu.org/licenses/>.

package bind

Expand Down Expand Up @@ -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.
Expand All @@ -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
Expand All @@ -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
}
Expand All @@ -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.
Expand Down
36 changes: 18 additions & 18 deletions accounts/abi/bind/backends/simulated.go
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
// along with the go-cortex library. If not, see <http://www.gnu.org/licenses/>.

package backends

Expand Down Expand Up @@ -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
Expand All @@ -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",
})

Expand Down Expand Up @@ -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()

Expand All @@ -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())
Expand All @@ -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()

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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 }
Expand All @@ -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) {
Expand Down
Loading

0 comments on commit 7ab7a5b

Please sign in to comment.