From 4dab840f71c802e46330cd0123dda699a6f5d496 Mon Sep 17 00:00:00 2001 From: Christopher Franko Date: Tue, 1 Sep 2015 20:42:36 -0400 Subject: [PATCH] expanse --- CONTRIBUTING.md | 2 +- cmd/gexp/js.go | 6 +++--- cmd/gexp/main.go | 2 +- cmd/utils/flags.go | 2 +- core/vm/instructions.go | 10 +++++----- core/vm/jit.go | 10 +++++----- core/vm/jit_test.go | 10 +++++----- exp/backend.go | 2 +- exp/gasprice.go | 4 ++-- jsre/ethereum_js.go | 18 +++++++++--------- jsre/pretty.go | 10 +++++----- rpc/api/miner.go | 2 +- rpc/api/personal.go | 2 +- rpc/useragent/remote_frontend.go | 10 +++++----- 14 files changed, 45 insertions(+), 45 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index be139a29c9..5f0f129eb8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -If you'd like to contribute to go-ethereum please fork, fix, commit and +If you'd like to contribute to go-expanse please fork, fix, commit and send a pull request. Commits who do not comply with the coding standards are ignored (use gofmt!). If you send pull requests make absolute sure that you commit on the `develop` branch and that you do not merge to master. diff --git a/cmd/gexp/js.go b/cmd/gexp/js.go index 65a1c28b39..4707d732bf 100644 --- a/cmd/gexp/js.go +++ b/cmd/gexp/js.go @@ -247,9 +247,9 @@ func (self *jsre) welcome() { (function () { console.log('instance: ' + web3.version.client); console.log(' datadir: ' + admin.datadir); - console.log("coinbase: " + eth.coinbase); - var ts = 1000 * eth.getBlock(eth.blockNumber).timestamp; - console.log("at block: " + eth.blockNumber + " (" + new Date(ts) + ")"); + console.log("coinbase: " + exp.coinbase); + var ts = 1000 * exp.getBlock(exp.blockNumber).timestamp; + console.log("at block: " + exp.blockNumber + " (" + new Date(ts) + ")"); })(); `) if modules, err := self.supportedApis(); err == nil { diff --git a/cmd/gexp/main.go b/cmd/gexp/main.go index af6d398307..339489d43c 100644 --- a/cmd/gexp/main.go +++ b/cmd/gexp/main.go @@ -381,7 +381,7 @@ func run(ctx *cli.Context) { cfg := utils.MakeEthConfig(ClientIdentifier, nodeNameVersion, ctx) cfg.ExtraData = makeDefaultExtra() - ethereum, err := eth.New(cfg) + expanse, err := exp.New(cfg) if err != nil { utils.Fatalf("%v", err) } diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 4e583d56c5..207c83a080 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -519,7 +519,7 @@ func StartIPC(exp *exp.Expanse, ctx *cli.Context) error { } initializer := func(conn net.Conn) (shared.ExpanseApi, error) { - fe := useragent.NewRemoteFrontend(conn, eth.AccountManager()) + fe := useragent.NewRemoteFrontend(conn, exp.AccountManager()) xeth := xeth.New(exp, fe) codec := codec.JSON diff --git a/core/vm/instructions.go b/core/vm/instructions.go index c74febc183..dd570ead3f 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm diff --git a/core/vm/jit.go b/core/vm/jit.go index df05554791..4d55d1fed5 100644 --- a/core/vm/jit.go +++ b/core/vm/jit.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm diff --git a/core/vm/jit_test.go b/core/vm/jit_test.go index 5ef501040a..9afc85a55d 100644 --- a/core/vm/jit_test.go +++ b/core/vm/jit_test.go @@ -1,18 +1,18 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2014 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package vm import ( diff --git a/exp/backend.go b/exp/backend.go index c55cdd868f..400e633e79 100644 --- a/exp/backend.go +++ b/exp/backend.go @@ -372,7 +372,7 @@ func New(config *Config) (*Expanse, error) { exp.blockProcessor = core.NewBlockProcessor(chainDb, exp.pow, exp.chainManager, exp.EventMux()) exp.chainManager.SetProcessor(exp.blockProcessor) - exp.protocolManager = NewProtocolManager(config.NetworkId, exp.eventMux, eth.txPool, exp.pow, exp.chainManager) + exp.protocolManager = NewProtocolManager(config.NetworkId, exp.eventMux, exp.txPool, exp.pow, exp.chainManager) exp.miner = miner.New(eth, exp.EventMux(), exp.pow) exp.miner.SetGasPrice(config.GasPrice) diff --git a/exp/gasprice.go b/exp/gasprice.go index d3a2185410..994e72397c 100644 --- a/exp/gasprice.go +++ b/exp/gasprice.go @@ -54,8 +54,8 @@ func NewGasPriceOracle(exp *Expanse) (self *GasPriceOracle) { core.ChainSplitEvent{}, ) - minbase := new(big.Int).Mul(self.eth.GpoMinGasPrice, big.NewInt(100)) - minbase = minbase.Div(minbase, big.NewInt(int64(self.eth.GpobaseCorrectionFactor))) + minbase := new(big.Int).Mul(self.exp.GpoMinGasPrice, big.NewInt(100)) + minbase = minbase.Div(minbase, big.NewInt(int64(self.exp.GpobaseCorrectionFactor))) self.minBase = minbase self.processPastBlocks() diff --git a/jsre/ethereum_js.go b/jsre/ethereum_js.go index ab77132d60..ddda640a58 100644 --- a/jsre/ethereum_js.go +++ b/jsre/ethereum_js.go @@ -1764,20 +1764,20 @@ if (typeof XMLHttpRequest === 'undefined') { },{}],18:[function(require,module,exports){ /* - This file is part of ethereum.js. + This file is part of expanse.js. - ethereum.js is free software: you can redistribute it and/or modify + expanse.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - ethereum.js is distributed in the hope that it will be useful, + expanse.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . + along with expanse.js. If not, see . */ /** @file config.js * @authors: @@ -4231,7 +4231,7 @@ var Iban = function (iban) { }; /** - * This method should be used to create iban object from ethereum address + * This method should be used to create iban object from expanse address * * @method fromAddress * @param {String} address @@ -4935,7 +4935,7 @@ module.exports = { along with expanse.js. If not, see . */ /** - * @file eth.js + * @file exp.js * @author Marek Kotewicz * @author Fabian Vogelsteller * @date 2015 @@ -5227,7 +5227,7 @@ module.exports = { You should have received a copy of the GNU Lesser General Public License along with expanse.js. If not, see . */ -/** @file eth.js +/** @file exp.js * @authors: * Marek Kotewicz * @date 2015 @@ -5355,7 +5355,7 @@ module.exports = { var Method = require('../method'); -/// @returns an array of objects describing web3.eth.filter api methods +/// @returns an array of objects describing web3.exp.filter api methods var eth = function () { var newFilterCall = function (args) { var type = args[0]; @@ -5965,7 +5965,7 @@ var transfer = function (from, to, value, callback) { * @param {Function} callback, callback */ var transferToAddress = function (from, to, value, callback) { - return web3.eth.sendTransaction({ + return web3.exp.sendTransaction({ address: to, from: from, value: value diff --git a/jsre/pretty.go b/jsre/pretty.go index 99aa9b33e5..07f414f5d7 100644 --- a/jsre/pretty.go +++ b/jsre/pretty.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package jsre diff --git a/rpc/api/miner.go b/rpc/api/miner.go index 05befeb520..d35558de07 100644 --- a/rpc/api/miner.go +++ b/rpc/api/miner.go @@ -123,7 +123,7 @@ func (self *minerApi) SetExtra(req *shared.Request) (interface{}, error) { return nil, err } - if err := self.ethereum.Miner().SetExtra([]byte(args.Data)); err != nil { + if err := self.expanse.Miner().SetExtra([]byte(args.Data)); err != nil { return false, err } diff --git a/rpc/api/personal.go b/rpc/api/personal.go index bad4464a30..40ba0ab830 100644 --- a/rpc/api/personal.go +++ b/rpc/api/personal.go @@ -134,7 +134,7 @@ func (self *personalApi) UnlockAccount(req *shared.Request) (interface{}, error) return fe.UnlockAccount(common.HexToAddress(args.Address).Bytes()), nil } - am := self.ethereum.AccountManager() + am := self.expanse.AccountManager() addr := common.HexToAddress(args.Address) err := am.TimedUnlock(addr, args.Passphrase, time.Duration(args.Duration)*time.Second) diff --git a/rpc/useragent/remote_frontend.go b/rpc/useragent/remote_frontend.go index 56a1008ae1..63f50d2f75 100644 --- a/rpc/useragent/remote_frontend.go +++ b/rpc/useragent/remote_frontend.go @@ -1,18 +1,18 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. +// Copyright 2015 The go-expanse Authors +// This file is part of the go-expanse library. // -// The go-ethereum library is free software: you can redistribute it and/or modify +// The go-expanse library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// The go-ethereum library is distributed in the hope that it will be useful, +// The go-expanse library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . +// along with the go-expanse library. If not, see . package useragent