Complete Go-EtherFact

Chưa hoàn tất các kết nối node ✌️
This commit is contained in:
huuhadz2k 2018-04-14 11:58:00 +07:00
parent 12a5c130b1
commit c960f5627a
66 changed files with 298 additions and 263 deletions

View file

@ -49,7 +49,7 @@ type ContractCaller interface {
CodeAt(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error) CodeAt(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error)
// ContractCall executes an EtherFact contract call with the specified data as the // ContractCall executes an EtherFact contract call with the specified data as the
// input. // input.
CallContract(ctx context.Context, call etherfact.CallMsg, blockNumber *big.Int) ([]byte, error) CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)
} }
// PendingContractCaller defines methods to perform contract calls on the pending state. // PendingContractCaller defines methods to perform contract calls on the pending state.
@ -59,7 +59,7 @@ type PendingContractCaller interface {
// PendingCodeAt returns the code of the given account in the pending state. // PendingCodeAt returns the code of the given account in the pending state.
PendingCodeAt(ctx context.Context, contract common.Address) ([]byte, error) PendingCodeAt(ctx context.Context, contract common.Address) ([]byte, error)
// PendingCallContract executes an EtherFact contract call against the pending state. // PendingCallContract executes an EtherFact contract call against the pending state.
PendingCallContract(ctx context.Context, call etherfact.CallMsg) ([]byte, error) PendingCallContract(ctx context.Context, call ethereum.CallMsg) ([]byte, error)
} }
// ContractTransactor defines the methods needed to allow operating with contract // 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 // 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 // transactions may be added or removed by miners, but it should provide a basis
// for setting a reasonable default. // for setting a reasonable default.
EstimateGas(ctx context.Context, call etherfact.CallMsg) (gas uint64, err error) EstimateGas(ctx context.Context, call ethereum.CallMsg) (gas uint64, err error)
// SendTransaction injects the transaction into the pending pool for execution. // SendTransaction injects the transaction into the pending pool for execution.
SendTransaction(ctx context.Context, tx *types.Transaction) error SendTransaction(ctx context.Context, tx *types.Transaction) error
} }
@ -91,11 +91,11 @@ type ContractFilterer interface {
// returning all the results in one batch. // returning all the results in one batch.
// //
// TODO(karalabe): Deprecate when the subscription one can return past data too. // TODO(karalabe): Deprecate when the subscription one can return past data too.
FilterLogs(ctx context.Context, query etherfact.FilterQuery) ([]types.Log, error) FilterLogs(ctx context.Context, query ethereum.FilterQuery) ([]types.Log, error)
// SubscribeFilterLogs creates a background log filtering operation, returning // SubscribeFilterLogs creates a background log filtering operation, returning
// a subscription immediately, which can be used to stream the found events. // a subscription immediately, which can be used to stream the found events.
SubscribeFilterLogs(ctx context.Context, query etherfact.FilterQuery, ch chan<- types.Log) (etherfact.Subscription, error) SubscribeFilterLogs(ctx context.Context, query ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error)
} }
// DeployBackend wraps the operations needed by WaitMined and WaitDeployed. // DeployBackend wraps the operations needed by WaitMined and WaitDeployed.

View file

@ -427,8 +427,8 @@ const tmplSourceJava = `
package {{.Package}}; package {{.Package}};
import org.ethereum.geth.*; import org.ethereum.getf.*;
import org.ethereum.geth.internal.*; import org.ethereum.getf.internal.*;
{{range $contract := .Contracts}} {{range $contract := .Contracts}}
public class {{.Type}} { public class {{.Type}} {

View file

@ -32,7 +32,7 @@ import (
) )
func tmpKeyStoreIface(t *testing.T, encrypted bool) (dir string, ks keyStore) { func tmpKeyStoreIface(t *testing.T, encrypted bool) (dir string, ks keyStore) {
d, err := ioutil.TempDir("", "geth-keystore-test") d, err := ioutil.TempDir("", "getf-keystore-test")
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }

View file

@ -62,19 +62,19 @@ import (
) )
var ( var (
// Files that end up in the geth*.zip archive. // Files that end up in the getf*.zip archive.
gethArchiveFiles = []string{ gethArchiveFiles = []string{
"COPYING", "COPYING",
executablePath("geth"), executablePath("getf"),
} }
// Files that end up in the geth-alltools*.zip archive. // Files that end up in the getf-alltools*.zip archive.
allToolsArchiveFiles = []string{ allToolsArchiveFiles = []string{
"COPYING", "COPYING",
executablePath("abigen"), executablePath("abigen"),
executablePath("bootnode"), executablePath("bootnode"),
executablePath("evm"), executablePath("evm"),
executablePath("geth"), executablePath("getf"),
executablePath("puppeth"), executablePath("puppeth"),
executablePath("rlpdump"), executablePath("rlpdump"),
executablePath("swarm"), executablePath("swarm"),
@ -96,7 +96,7 @@ var (
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 (Ethereum Virtual Machine) that is capable of running bytecode snippets within a configurable environment and execution mode.",
}, },
{ {
Name: "geth", Name: "getf",
Description: "Ethereum CLI client.", Description: "Ethereum CLI client.",
}, },
{ {
@ -368,17 +368,17 @@ func doArchive(cmdline []string) {
var ( var (
env = build.Env() env = build.Env()
base = archiveBasename(*arch, env) base = archiveBasename(*arch, env)
geth = "geth-" + base + ext getf = "getf-" + base + ext
alltools = "geth-alltools-" + base + ext alltools = "getf-alltools-" + base + ext
) )
maybeSkipArchive(env) maybeSkipArchive(env)
if err := build.WriteArchive(geth, gethArchiveFiles); err != nil { if err := build.WriteArchive(getf, gethArchiveFiles); err != nil {
log.Fatal(err) log.Fatal(err)
} }
if err := build.WriteArchive(alltools, allToolsArchiveFiles); err != nil { if err := build.WriteArchive(alltools, allToolsArchiveFiles); err != nil {
log.Fatal(err) log.Fatal(err)
} }
for _, archive := range []string{geth, alltools} { for _, archive := range []string{getf, alltools} {
if err := archiveUpload(archive, *upload, *signer); err != nil { if err := archiveUpload(archive, *upload, *signer); err != nil {
log.Fatal(err) log.Fatal(err)
} }
@ -505,7 +505,7 @@ func makeWorkdir(wdflag string) string {
if wdflag != "" { if wdflag != "" {
err = os.MkdirAll(wdflag, 0744) err = os.MkdirAll(wdflag, 0744)
} else { } else {
wdflag, err = ioutil.TempDir("", "geth-build-") wdflag, err = ioutil.TempDir("", "getf-build-")
} }
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
@ -661,7 +661,7 @@ func doWindowsInstaller(cmdline []string) {
continue continue
} }
allTools = append(allTools, filepath.Base(file)) allTools = append(allTools, filepath.Base(file))
if filepath.Base(file) == "geth.exe" { if filepath.Base(file) == "getf.exe" {
gethTool = file gethTool = file
} else { } else {
devTools = append(devTools, file) devTools = append(devTools, file)
@ -669,13 +669,13 @@ func doWindowsInstaller(cmdline []string) {
} }
// Render NSIS scripts: Installer NSIS contains two installer sections, // 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 getf binary, second section holds the dev tools.
templateData := map[string]interface{}{ templateData := map[string]interface{}{
"License": "COPYING", "License": "COPYING",
"Geth": gethTool, "Geth": gethTool,
"DevTools": devTools, "DevTools": devTools,
} }
build.Render("build/nsis.geth.nsi", filepath.Join(*workdir, "geth.nsi"), 0644, nil) build.Render("build/nsis.getf.nsi", filepath.Join(*workdir, "getf.nsi"), 0644, nil)
build.Render("build/nsis.install.nsh", filepath.Join(*workdir, "install.nsh"), 0644, templateData) 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.uninstall.nsh", filepath.Join(*workdir, "uninstall.nsh"), 0644, allTools)
build.Render("build/nsis.pathupdate.nsh", filepath.Join(*workdir, "PathUpdate.nsh"), 0644, nil) build.Render("build/nsis.pathupdate.nsh", filepath.Join(*workdir, "PathUpdate.nsh"), 0644, nil)
@ -690,14 +690,14 @@ func doWindowsInstaller(cmdline []string) {
if env.Commit != "" { if env.Commit != "" {
version[2] += "-" + env.Commit[:8] version[2] += "-" + env.Commit[:8]
} }
installer, _ := filepath.Abs("geth-" + archiveBasename(*arch, env) + ".exe") installer, _ := filepath.Abs("getf-" + archiveBasename(*arch, env) + ".exe")
build.MustRunCommand("makensis.exe", build.MustRunCommand("makensis.exe",
"/DOUTPUTFILE="+installer, "/DOUTPUTFILE="+installer,
"/DMAJORVERSION="+version[0], "/DMAJORVERSION="+version[0],
"/DMINORVERSION="+version[1], "/DMINORVERSION="+version[1],
"/DBUILDVERSION="+version[2], "/DBUILDVERSION="+version[2],
"/DARCH="+*arch, "/DARCH="+*arch,
filepath.Join(*workdir, "geth.nsi"), filepath.Join(*workdir, "getf.nsi"),
) )
// Sign and publish installer. // Sign and publish installer.
@ -732,7 +732,7 @@ func doAndroidArchive(cmdline []string) {
if *local { if *local {
// If we're building locally, copy bundle to build dir and skip Maven // If we're building locally, copy bundle to build dir and skip Maven
os.Rename("geth.aar", filepath.Join(GOBIN, "geth.aar")) os.Rename("getf.aar", filepath.Join(GOBIN, "getf.aar"))
return return
} }
meta := newMavenMetadata(env) meta := newMavenMetadata(env)
@ -742,8 +742,8 @@ func doAndroidArchive(cmdline []string) {
maybeSkipArchive(env) maybeSkipArchive(env)
// Sign and upload the archive to Azure // Sign and upload the archive to Azure
archive := "geth-" + archiveBasename("android", env) + ".aar" archive := "getf-" + archiveBasename("android", env) + ".aar"
os.Rename("geth.aar", archive) os.Rename("getf.aar", archive)
if err := archiveUpload(archive, *upload, *signer); err != nil { if err := archiveUpload(archive, *upload, *signer); err != nil {
log.Fatal(err) log.Fatal(err)
@ -828,7 +828,7 @@ func newMavenMetadata(env build.Environment) mavenMetadata {
} }
return mavenMetadata{ return mavenMetadata{
Version: version, Version: version,
Package: "geth-" + version, Package: "getf-" + version,
Develop: isUnstableBuild(env), Develop: isUnstableBuild(env),
Contributors: contribs, Contributors: contribs,
} }
@ -857,7 +857,7 @@ func doXCodeFramework(cmdline []string) {
build.MustRun(bind) build.MustRun(bind)
return return
} }
archive := "geth-" + archiveBasename("ios", env) archive := "getf-" + archiveBasename("ios", env)
if err := os.Mkdir(archive, os.ModePerm); err != nil { if err := os.Mkdir(archive, os.ModePerm); err != nil {
log.Fatal(err) log.Fatal(err)
} }

View file

@ -215,7 +215,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) { 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 // Assemble the raw devp2p protocol stack
stack, err := node.New(&node.Config{ stack, err := node.New(&node.Config{
Name: "geth", Name: "getf",
Version: params.Version, Version: params.Version,
DataDir: filepath.Join(os.Getenv("HOME"), ".faucet"), DataDir: filepath.Join(os.Getenv("HOME"), ".faucet"),
P2P: p2p.Config{ P2P: p2p.Config{

View file

@ -36,7 +36,7 @@ var (
ArgsUsage: "", ArgsUsage: "",
Category: "ACCOUNT COMMANDS", Category: "ACCOUNT COMMANDS",
Description: ` Description: `
geth wallet import /path/to/my/presale.wallet getf 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 ether presale account.
It can be used non-interactively with the --password option taking a It can be used non-interactively with the --password option taking a
@ -56,7 +56,7 @@ passwordfile as argument containing the wallet password in plaintext.`,
utils.LightKDFFlag, utils.LightKDFFlag,
}, },
Description: ` Description: `
geth wallet [options] /path/to/my/presale.wallet getf 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 ether presale account.
It can be used non-interactively with the --password option taking a It can be used non-interactively with the --password option taking a
@ -112,7 +112,7 @@ Print a short summary of all accounts`,
utils.LightKDFFlag, utils.LightKDFFlag,
}, },
Description: ` Description: `
geth account new getf account new
Creates a new account and prints the address. Creates a new account and prints the address.
@ -137,7 +137,7 @@ password to file or expose in any other way.
utils.LightKDFFlag, utils.LightKDFFlag,
}, },
Description: ` Description: `
geth account update <address> getf account update <address>
Update an existing account. 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: For non-interactive use the passphrase can be specified with the --password flag:
geth account update [options] <address> getf account update [options] <address>
Since only one password can be given, only format update can be performed, Since only one password can be given, only format update can be performed,
changing your password is only possible interactively. changing your password is only possible interactively.
@ -167,7 +167,7 @@ changing your password is only possible interactively.
}, },
ArgsUsage: "<keyFile>", ArgsUsage: "<keyFile>",
Description: ` Description: `
geth account import <keyfile> getf account import <keyfile>
Imports an unencrypted private key from <keyfile> and creates a new account. Imports an unencrypted private key from <keyfile> and creates a new account.
Prints the address. Prints the address.
@ -180,7 +180,7 @@ You must remember this passphrase to unlock your account in the future.
For non-interactive use the passphrase can be specified with the -password flag: For non-interactive use the passphrase can be specified with the -password flag:
geth account import [options] <keyfile> getf account import [options] <keyfile>
Note: Note:
As you can directly copy your encrypted accounts to another ethereum instance, As you can directly copy your encrypted accounts to another ethereum instance,

View file

@ -43,22 +43,22 @@ func tmpDatadirWithKeystore(t *testing.T) string {
} }
func TestAccountListEmpty(t *testing.T) { func TestAccountListEmpty(t *testing.T) {
geth := runGeth(t, "account", "list") getf := runGeth(t, "account", "list")
geth.ExpectExit() getf.ExpectExit()
} }
func TestAccountList(t *testing.T) { func TestAccountList(t *testing.T) {
datadir := tmpDatadirWithKeystore(t) datadir := tmpDatadirWithKeystore(t)
geth := runGeth(t, "account", "list", "--datadir", datadir) getf := runGeth(t, "account", "list", "--datadir", datadir)
defer geth.ExpectExit() defer getf.ExpectExit()
if runtime.GOOS == "windows" { if runtime.GOOS == "windows" {
geth.Expect(` getf.Expect(`
Account #0: {7ef5a6135f1fd6a02593eedc869c6d41d934aef8} keystore://{{.Datadir}}\keystore\UTC--2016-03-22T12-57-55.920751759Z--7ef5a6135f1fd6a02593eedc869c6d41d934aef8 Account #0: {7ef5a6135f1fd6a02593eedc869c6d41d934aef8} keystore://{{.Datadir}}\keystore\UTC--2016-03-22T12-57-55.920751759Z--7ef5a6135f1fd6a02593eedc869c6d41d934aef8
Account #1: {f466859ead1932d743d622cb74fc058882e8648a} keystore://{{.Datadir}}\keystore\aaa Account #1: {f466859ead1932d743d622cb74fc058882e8648a} keystore://{{.Datadir}}\keystore\aaa
Account #2: {289d485d9771714cce91d3393d764e1311907acc} keystore://{{.Datadir}}\keystore\zzz Account #2: {289d485d9771714cce91d3393d764e1311907acc} keystore://{{.Datadir}}\keystore\zzz
`) `)
} else { } else {
geth.Expect(` getf.Expect(`
Account #0: {7ef5a6135f1fd6a02593eedc869c6d41d934aef8} keystore://{{.Datadir}}/keystore/UTC--2016-03-22T12-57-55.920751759Z--7ef5a6135f1fd6a02593eedc869c6d41d934aef8 Account #0: {7ef5a6135f1fd6a02593eedc869c6d41d934aef8} keystore://{{.Datadir}}/keystore/UTC--2016-03-22T12-57-55.920751759Z--7ef5a6135f1fd6a02593eedc869c6d41d934aef8
Account #1: {f466859ead1932d743d622cb74fc058882e8648a} keystore://{{.Datadir}}/keystore/aaa Account #1: {f466859ead1932d743d622cb74fc058882e8648a} keystore://{{.Datadir}}/keystore/aaa
Account #2: {289d485d9771714cce91d3393d764e1311907acc} keystore://{{.Datadir}}/keystore/zzz Account #2: {289d485d9771714cce91d3393d764e1311907acc} keystore://{{.Datadir}}/keystore/zzz
@ -67,21 +67,21 @@ Account #2: {289d485d9771714cce91d3393d764e1311907acc} keystore://{{.Datadir}}/k
} }
func TestAccountNew(t *testing.T) { func TestAccountNew(t *testing.T) {
geth := runGeth(t, "account", "new", "--lightkdf") getf := runGeth(t, "account", "new", "--lightkdf")
defer geth.ExpectExit() defer getf.ExpectExit()
geth.Expect(` getf.Expect(`
Your new account is locked with a password. Please give a password. Do not forget this password. Your new account is locked with a password. Please give a password. Do not forget this password.
!! Unsupported terminal, password will be echoed. !! Unsupported terminal, password will be echoed.
Passphrase: {{.InputLine "foobar"}} Passphrase: {{.InputLine "foobar"}}
Repeat passphrase: {{.InputLine "foobar"}} Repeat passphrase: {{.InputLine "foobar"}}
`) `)
geth.ExpectRegexp(`Address: \{[0-9a-f]{40}\}\n`) getf.ExpectRegexp(`Address: \{[0-9a-f]{40}\}\n`)
} }
func TestAccountNewBadRepeat(t *testing.T) { func TestAccountNewBadRepeat(t *testing.T) {
geth := runGeth(t, "account", "new", "--lightkdf") getf := runGeth(t, "account", "new", "--lightkdf")
defer geth.ExpectExit() defer getf.ExpectExit()
geth.Expect(` getf.Expect(`
Your new account is locked with a password. Please give a password. Do not forget this password. Your new account is locked with a password. Please give a password. Do not forget this password.
!! Unsupported terminal, password will be echoed. !! Unsupported terminal, password will be echoed.
Passphrase: {{.InputLine "something"}} Passphrase: {{.InputLine "something"}}
@ -92,11 +92,11 @@ Fatal: Passphrases do not match
func TestAccountUpdate(t *testing.T) { func TestAccountUpdate(t *testing.T) {
datadir := tmpDatadirWithKeystore(t) datadir := tmpDatadirWithKeystore(t)
geth := runGeth(t, "account", "update", getf := runGeth(t, "account", "update",
"--datadir", datadir, "--lightkdf", "--datadir", datadir, "--lightkdf",
"f466859ead1932d743d622cb74fc058882e8648a") "f466859ead1932d743d622cb74fc058882e8648a")
defer geth.ExpectExit() defer getf.ExpectExit()
geth.Expect(` getf.Expect(`
Unlocking account f466859ead1932d743d622cb74fc058882e8648a | Attempt 1/3 Unlocking account f466859ead1932d743d622cb74fc058882e8648a | Attempt 1/3
!! Unsupported terminal, password will be echoed. !! Unsupported terminal, password will be echoed.
Passphrase: {{.InputLine "foobar"}} Passphrase: {{.InputLine "foobar"}}
@ -107,24 +107,24 @@ Repeat passphrase: {{.InputLine "foobar2"}}
} }
func TestWalletImport(t *testing.T) { func TestWalletImport(t *testing.T) {
geth := runGeth(t, "wallet", "import", "--lightkdf", "testdata/guswallet.json") getf := runGeth(t, "wallet", "import", "--lightkdf", "testdata/guswallet.json")
defer geth.ExpectExit() defer getf.ExpectExit()
geth.Expect(` getf.Expect(`
!! Unsupported terminal, password will be echoed. !! Unsupported terminal, password will be echoed.
Passphrase: {{.InputLine "foo"}} Passphrase: {{.InputLine "foo"}}
Address: {d4584b5f6229b7be90727b0fc8c6b91bb427821f} Address: {d4584b5f6229b7be90727b0fc8c6b91bb427821f}
`) `)
files, err := ioutil.ReadDir(filepath.Join(geth.Datadir, "keystore")) files, err := ioutil.ReadDir(filepath.Join(getf.Datadir, "keystore"))
if len(files) != 1 { if len(files) != 1 {
t.Errorf("expected one key file in keystore directory, found %d files (error: %v)", len(files), err) t.Errorf("expected one key file in keystore directory, found %d files (error: %v)", len(files), err)
} }
} }
func TestWalletImportBadPassword(t *testing.T) { func TestWalletImportBadPassword(t *testing.T) {
geth := runGeth(t, "wallet", "import", "--lightkdf", "testdata/guswallet.json") getf := runGeth(t, "wallet", "import", "--lightkdf", "testdata/guswallet.json")
defer geth.ExpectExit() defer getf.ExpectExit()
geth.Expect(` getf.Expect(`
!! Unsupported terminal, password will be echoed. !! Unsupported terminal, password will be echoed.
Passphrase: {{.InputLine "wrong"}} Passphrase: {{.InputLine "wrong"}}
Fatal: could not decrypt key with given passphrase 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) { func TestUnlockFlag(t *testing.T) {
datadir := tmpDatadirWithKeystore(t) datadir := tmpDatadirWithKeystore(t)
geth := runGeth(t, getf := runGeth(t,
"--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0", "--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0",
"--unlock", "f466859ead1932d743d622cb74fc058882e8648a", "--unlock", "f466859ead1932d743d622cb74fc058882e8648a",
"js", "testdata/empty.js") "js", "testdata/empty.js")
geth.Expect(` getf.Expect(`
Unlocking account f466859ead1932d743d622cb74fc058882e8648a | Attempt 1/3 Unlocking account f466859ead1932d743d622cb74fc058882e8648a | Attempt 1/3
!! Unsupported terminal, password will be echoed. !! Unsupported terminal, password will be echoed.
Passphrase: {{.InputLine "foobar"}} Passphrase: {{.InputLine "foobar"}}
`) `)
geth.ExpectExit() getf.ExpectExit()
wantMessages := []string{ wantMessages := []string{
"Unlocked account", "Unlocked account",
"=0xf466859eAD1932D743d622CB74FC058882E8648A", "=0xf466859eAD1932D743d622CB74FC058882E8648A",
} }
for _, m := range wantMessages { for _, m := range wantMessages {
if !strings.Contains(geth.StderrText(), m) { if !strings.Contains(getf.StderrText(), m) {
t.Errorf("stderr text does not contain %q", m) t.Errorf("stderr text does not contain %q", m)
} }
} }
@ -157,11 +157,11 @@ Passphrase: {{.InputLine "foobar"}}
func TestUnlockFlagWrongPassword(t *testing.T) { func TestUnlockFlagWrongPassword(t *testing.T) {
datadir := tmpDatadirWithKeystore(t) datadir := tmpDatadirWithKeystore(t)
geth := runGeth(t, getf := runGeth(t,
"--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0", "--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0",
"--unlock", "f466859ead1932d743d622cb74fc058882e8648a") "--unlock", "f466859ead1932d743d622cb74fc058882e8648a")
defer geth.ExpectExit() defer getf.ExpectExit()
geth.Expect(` getf.Expect(`
Unlocking account f466859ead1932d743d622cb74fc058882e8648a | Attempt 1/3 Unlocking account f466859ead1932d743d622cb74fc058882e8648a | Attempt 1/3
!! Unsupported terminal, password will be echoed. !! Unsupported terminal, password will be echoed.
Passphrase: {{.InputLine "wrong1"}} Passphrase: {{.InputLine "wrong1"}}
@ -176,18 +176,18 @@ Fatal: Failed to unlock account f466859ead1932d743d622cb74fc058882e8648a (could
// https://github.com/EtherFact-Project/go-etherfact/issues/1785 // https://github.com/EtherFact-Project/go-etherfact/issues/1785
func TestUnlockFlagMultiIndex(t *testing.T) { func TestUnlockFlagMultiIndex(t *testing.T) {
datadir := tmpDatadirWithKeystore(t) datadir := tmpDatadirWithKeystore(t)
geth := runGeth(t, getf := runGeth(t,
"--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0", "--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0",
"--unlock", "0,2", "--unlock", "0,2",
"js", "testdata/empty.js") "js", "testdata/empty.js")
geth.Expect(` getf.Expect(`
Unlocking account 0 | Attempt 1/3 Unlocking account 0 | Attempt 1/3
!! Unsupported terminal, password will be echoed. !! Unsupported terminal, password will be echoed.
Passphrase: {{.InputLine "foobar"}} Passphrase: {{.InputLine "foobar"}}
Unlocking account 2 | Attempt 1/3 Unlocking account 2 | Attempt 1/3
Passphrase: {{.InputLine "foobar"}} Passphrase: {{.InputLine "foobar"}}
`) `)
geth.ExpectExit() getf.ExpectExit()
wantMessages := []string{ wantMessages := []string{
"Unlocked account", "Unlocked account",
@ -195,7 +195,7 @@ Passphrase: {{.InputLine "foobar"}}
"=0x289d485D9771714CCe91D3393D764E1311907ACc", "=0x289d485D9771714CCe91D3393D764E1311907ACc",
} }
for _, m := range wantMessages { for _, m := range wantMessages {
if !strings.Contains(geth.StderrText(), m) { if !strings.Contains(getf.StderrText(), m) {
t.Errorf("stderr text does not contain %q", m) t.Errorf("stderr text does not contain %q", m)
} }
} }
@ -203,11 +203,11 @@ Passphrase: {{.InputLine "foobar"}}
func TestUnlockFlagPasswordFile(t *testing.T) { func TestUnlockFlagPasswordFile(t *testing.T) {
datadir := tmpDatadirWithKeystore(t) datadir := tmpDatadirWithKeystore(t)
geth := runGeth(t, getf := runGeth(t,
"--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0", "--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0",
"--password", "testdata/passwords.txt", "--unlock", "0,2", "--password", "testdata/passwords.txt", "--unlock", "0,2",
"js", "testdata/empty.js") "js", "testdata/empty.js")
geth.ExpectExit() getf.ExpectExit()
wantMessages := []string{ wantMessages := []string{
"Unlocked account", "Unlocked account",
@ -215,7 +215,7 @@ func TestUnlockFlagPasswordFile(t *testing.T) {
"=0x289d485D9771714CCe91D3393D764E1311907ACc", "=0x289d485D9771714CCe91D3393D764E1311907ACc",
} }
for _, m := range wantMessages { for _, m := range wantMessages {
if !strings.Contains(geth.StderrText(), m) { if !strings.Contains(getf.StderrText(), m) {
t.Errorf("stderr text does not contain %q", m) t.Errorf("stderr text does not contain %q", m)
} }
} }
@ -223,29 +223,29 @@ func TestUnlockFlagPasswordFile(t *testing.T) {
func TestUnlockFlagPasswordFileWrongPassword(t *testing.T) { func TestUnlockFlagPasswordFileWrongPassword(t *testing.T) {
datadir := tmpDatadirWithKeystore(t) datadir := tmpDatadirWithKeystore(t)
geth := runGeth(t, getf := runGeth(t,
"--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0", "--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0",
"--password", "testdata/wrong-passwords.txt", "--unlock", "0,2") "--password", "testdata/wrong-passwords.txt", "--unlock", "0,2")
defer geth.ExpectExit() defer getf.ExpectExit()
geth.Expect(` getf.Expect(`
Fatal: Failed to unlock account 0 (could not decrypt key with given passphrase) Fatal: Failed to unlock account 0 (could not decrypt key with given passphrase)
`) `)
} }
func TestUnlockFlagAmbiguous(t *testing.T) { func TestUnlockFlagAmbiguous(t *testing.T) {
store := filepath.Join("..", "..", "accounts", "keystore", "testdata", "dupes") store := filepath.Join("..", "..", "accounts", "keystore", "testdata", "dupes")
geth := runGeth(t, getf := runGeth(t,
"--keystore", store, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0", "--keystore", store, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0",
"--unlock", "f466859ead1932d743d622cb74fc058882e8648a", "--unlock", "f466859ead1932d743d622cb74fc058882e8648a",
"js", "testdata/empty.js") "js", "testdata/empty.js")
defer geth.ExpectExit() defer getf.ExpectExit()
// Helper for the expect template, returns absolute keystore path. // Helper for the expect template, returns absolute keystore path.
geth.SetTemplateFunc("keypath", func(file string) string { getf.SetTemplateFunc("keypath", func(file string) string {
abs, _ := filepath.Abs(filepath.Join(store, file)) abs, _ := filepath.Abs(filepath.Join(store, file))
return abs return abs
}) })
geth.Expect(` getf.Expect(`
Unlocking account f466859ead1932d743d622cb74fc058882e8648a | Attempt 1/3 Unlocking account f466859ead1932d743d622cb74fc058882e8648a | Attempt 1/3
!! Unsupported terminal, password will be echoed. !! Unsupported terminal, password will be echoed.
Passphrase: {{.InputLine "foobar"}} 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: In order to avoid this warning, you need to remove the following duplicate key files:
keystore://{{keypath "2"}} keystore://{{keypath "2"}}
`) `)
geth.ExpectExit() getf.ExpectExit()
wantMessages := []string{ wantMessages := []string{
"Unlocked account", "Unlocked account",
"=0xf466859eAD1932D743d622CB74FC058882E8648A", "=0xf466859eAD1932D743d622CB74FC058882E8648A",
} }
for _, m := range wantMessages { for _, m := range wantMessages {
if !strings.Contains(geth.StderrText(), m) { if !strings.Contains(getf.StderrText(), m) {
t.Errorf("stderr text does not contain %q", 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) { func TestUnlockFlagAmbiguousWrongPassword(t *testing.T) {
store := filepath.Join("..", "..", "accounts", "keystore", "testdata", "dupes") store := filepath.Join("..", "..", "accounts", "keystore", "testdata", "dupes")
geth := runGeth(t, getf := runGeth(t,
"--keystore", store, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0", "--keystore", store, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0",
"--unlock", "f466859ead1932d743d622cb74fc058882e8648a") "--unlock", "f466859ead1932d743d622cb74fc058882e8648a")
defer geth.ExpectExit() defer getf.ExpectExit()
// Helper for the expect template, returns absolute keystore path. // Helper for the expect template, returns absolute keystore path.
geth.SetTemplateFunc("keypath", func(file string) string { getf.SetTemplateFunc("keypath", func(file string) string {
abs, _ := filepath.Abs(filepath.Join(store, file)) abs, _ := filepath.Abs(filepath.Join(store, file))
return abs return abs
}) })
geth.Expect(` getf.Expect(`
Unlocking account f466859ead1932d743d622cb74fc058882e8648a | Attempt 1/3 Unlocking account f466859ead1932d743d622cb74fc058882e8648a | Attempt 1/3
!! Unsupported terminal, password will be echoed. !! Unsupported terminal, password will be echoed.
Passphrase: {{.InputLine "wrong"}} Passphrase: {{.InputLine "wrong"}}
@ -292,5 +292,5 @@ Multiple key files exist for address f466859ead1932d743d622cb74fc058882e8648a:
Testing your passphrase against all of them... Testing your passphrase against all of them...
Fatal: None of the listed files could be unlocked. Fatal: None of the listed files could be unlocked.
`) `)
geth.ExpectExit() getf.ExpectExit()
} }

View file

@ -36,7 +36,7 @@ import (
var bugCommand = cli.Command{ var bugCommand = cli.Command{
Action: utils.MigrateFlags(reportBug), Action: utils.MigrateFlags(reportBug),
Name: "bug", Name: "bug",
Usage: "opens a window to report a bug on the geth repo", Usage: "opens a window to report a bug on the getf repo",
ArgsUsage: " ", ArgsUsage: " ",
Category: "MISCELLANEOUS COMMANDS", Category: "MISCELLANEOUS COMMANDS",
} }

View file

@ -103,7 +103,7 @@ func defaultNodeConfig() node.Config {
cfg.Version = params.VersionWithCommit(gitCommit) cfg.Version = params.VersionWithCommit(gitCommit)
cfg.HTTPModules = append(cfg.HTTPModules, "eth", "shh") cfg.HTTPModules = append(cfg.HTTPModules, "eth", "shh")
cfg.WSModules = append(cfg.WSModules, "eth", "shh") cfg.WSModules = append(cfg.WSModules, "eth", "shh")
cfg.IPCPath = "geth.ipc" cfg.IPCPath = "getf.ipc"
return cfg return cfg
} }

View file

@ -57,7 +57,7 @@ See https://github.com/EtherFact-Project/go-etherfact/wiki/JavaScript-Console.`,
The Geth console is an interactive shell for the JavaScript runtime environment 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. which exposes a node admin interface as well as the Ðapp JavaScript API.
See https://github.com/EtherFact-Project/go-etherfact/wiki/JavaScript-Console. See https://github.com/EtherFact-Project/go-etherfact/wiki/JavaScript-Console.
This command allows to open a console on a running geth node.`, This command allows to open a console on a running getf node.`,
} }
javascriptCommand = cli.Command{ javascriptCommand = cli.Command{
@ -73,7 +73,7 @@ JavaScript API. See https://github.com/EtherFact-Project/go-etherfact/wiki/JavaS
} }
) )
// localConsole starts a new geth node, attaching a JavaScript console to it at the // localConsole starts a new getf node, attaching a JavaScript console to it at the
// same time. // same time.
func localConsole(ctx *cli.Context) error { func localConsole(ctx *cli.Context) error {
// Create and start the node based on the CLI flags // 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 // Attach to the newly started node and start the JavaScript console
client, err := node.Attach() client, err := node.Attach()
if err != nil { if err != nil {
utils.Fatalf("Failed to attach to the inproc geth: %v", err) utils.Fatalf("Failed to attach to the inproc getf: %v", err)
} }
config := console.Config{ config := console.Config{
DataDir: utils.MakeDataDir(ctx), DataDir: utils.MakeDataDir(ctx),
@ -111,10 +111,10 @@ func localConsole(ctx *cli.Context) error {
return nil return nil
} }
// remoteConsole will connect to a remote geth instance, attaching a JavaScript // remoteConsole will connect to a remote getf instance, attaching a JavaScript
// console to it. // console to it.
func remoteConsole(ctx *cli.Context) error { func remoteConsole(ctx *cli.Context) error {
// Attach to a remotely running geth instance and start the JavaScript console // Attach to a remotely running getf instance and start the JavaScript console
endpoint := ctx.Args().First() endpoint := ctx.Args().First()
if endpoint == "" { if endpoint == "" {
path := node.DefaultDataDir() path := node.DefaultDataDir()
@ -128,11 +128,11 @@ func remoteConsole(ctx *cli.Context) error {
path = filepath.Join(path, "rinkeby") path = filepath.Join(path, "rinkeby")
} }
} }
endpoint = fmt.Sprintf("%s/geth.ipc", path) endpoint = fmt.Sprintf("%s/getf.ipc", path)
} }
client, err := dialRPC(endpoint) client, err := dialRPC(endpoint)
if err != nil { if err != nil {
utils.Fatalf("Unable to attach to remote geth: %v", err) utils.Fatalf("Unable to attach to remote getf: %v", err)
} }
config := console.Config{ config := console.Config{
DataDir: utils.MakeDataDir(ctx), DataDir: utils.MakeDataDir(ctx),
@ -161,19 +161,19 @@ func remoteConsole(ctx *cli.Context) error {
// dialRPC returns a RPC client which connects to the given endpoint. // dialRPC returns a RPC client which connects to the given endpoint.
// The check for empty endpoint implements the defaulting logic // The check for empty endpoint implements the defaulting logic
// for "geth attach" and "geth monitor" with no argument. // for "getf attach" and "getf monitor" with no argument.
func dialRPC(endpoint string) (*rpc.Client, error) { func dialRPC(endpoint string) (*rpc.Client, error) {
if endpoint == "" { if endpoint == "" {
endpoint = node.DefaultIPCEndpoint(clientIdentifier) endpoint = node.DefaultIPCEndpoint(clientIdentifier)
} else if strings.HasPrefix(endpoint, "rpc:") || strings.HasPrefix(endpoint, "ipc:") { } else if strings.HasPrefix(endpoint, "rpc:") || strings.HasPrefix(endpoint, "ipc:") {
// Backwards compatibility with geth < 1.5 which required // Backwards compatibility with getf < 1.5 which required
// these prefixes. // these prefixes.
endpoint = endpoint[4:] endpoint = endpoint[4:]
} }
return rpc.Dial(endpoint) return rpc.Dial(endpoint)
} }
// ephemeralConsole starts a new geth node, attaches an ephemeral JavaScript // ephemeralConsole starts a new getf node, attaches an ephemeral JavaScript
// console to it, executes each of the files specified as arguments and tears // console to it, executes each of the files specified as arguments and tears
// everything down. // everything down.
func ephemeralConsole(ctx *cli.Context) error { func ephemeralConsole(ctx *cli.Context) error {
@ -185,7 +185,7 @@ func ephemeralConsole(ctx *cli.Context) error {
// Attach to the newly started node and start the JavaScript console // Attach to the newly started node and start the JavaScript console
client, err := node.Attach() client, err := node.Attach()
if err != nil { if err != nil {
utils.Fatalf("Failed to attach to the inproc geth: %v", err) utils.Fatalf("Failed to attach to the inproc getf: %v", err)
} }
config := console.Config{ config := console.Config{
DataDir: utils.MakeDataDir(ctx), DataDir: utils.MakeDataDir(ctx),

View file

@ -40,22 +40,22 @@ const (
func TestConsoleWelcome(t *testing.T) { func TestConsoleWelcome(t *testing.T) {
coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182" coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182"
// Start a geth console, make sure it's cleaned up and terminate the console // Start a getf console, make sure it's cleaned up and terminate the console
geth := runGeth(t, getf := runGeth(t,
"--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none", "--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none",
"--etherbase", coinbase, "--shh", "--etherbase", coinbase, "--shh",
"console") "console")
// Gather all the infos the welcome message needs to contain // Gather all the infos the welcome message needs to contain
geth.SetTemplateFunc("goos", func() string { return runtime.GOOS }) getf.SetTemplateFunc("goos", func() string { return runtime.GOOS })
geth.SetTemplateFunc("goarch", func() string { return runtime.GOARCH }) getf.SetTemplateFunc("goarch", func() string { return runtime.GOARCH })
geth.SetTemplateFunc("gover", runtime.Version) getf.SetTemplateFunc("gover", runtime.Version)
geth.SetTemplateFunc("gethver", func() string { return params.Version }) getf.SetTemplateFunc("gethver", func() string { return params.Version })
geth.SetTemplateFunc("niltime", func() string { return time.Unix(0, 0).Format(time.RFC1123) }) getf.SetTemplateFunc("niltime", func() string { return time.Unix(0, 0).Format(time.RFC1123) })
geth.SetTemplateFunc("apis", func() string { return ipcAPIs }) getf.SetTemplateFunc("apis", func() string { return ipcAPIs })
// Verify the actual welcome message to the required template // Verify the actual welcome message to the required template
geth.Expect(` getf.Expect(`
Welcome to the Geth JavaScript console! Welcome to the Geth JavaScript console!
instance: Geth/v{{gethver}}/{{goos}}-{{goarch}}/{{gover}} instance: Geth/v{{gethver}}/{{goos}}-{{goarch}}/{{gover}}
@ -66,7 +66,7 @@ at block: 0 ({{niltime}})
> {{.InputLine "exit"}} > {{.InputLine "exit"}}
`) `)
geth.ExpectExit() getf.ExpectExit()
} }
// Tests that a console can be attached to a running node via various means. // 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" coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182"
var ipc string var ipc string
if runtime.GOOS == "windows" { if runtime.GOOS == "windows" {
ipc = `\\.\pipe\geth` + strconv.Itoa(trulyRandInt(100000, 999999)) ipc = `\\.\pipe\getf` + strconv.Itoa(trulyRandInt(100000, 999999))
} else { } else {
ws := tmpdir(t) ws := tmpdir(t)
defer os.RemoveAll(ws) defer os.RemoveAll(ws)
ipc = filepath.Join(ws, "geth.ipc") ipc = filepath.Join(ws, "getf.ipc")
} }
// Note: we need --shh because testAttachWelcome checks for default // Note: we need --shh because testAttachWelcome checks for default
// list of ipc modules and shh is included there. // list of ipc modules and shh is included there.
geth := runGeth(t, getf := runGeth(t,
"--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none", "--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none",
"--etherbase", coinbase, "--shh", "--ipcpath", ipc) "--etherbase", coinbase, "--shh", "--ipcpath", ipc)
time.Sleep(2 * time.Second) // Simple way to wait for the RPC endpoint to open time.Sleep(2 * time.Second) // Simple way to wait for the RPC endpoint to open
testAttachWelcome(t, geth, "ipc:"+ipc, ipcAPIs) testAttachWelcome(t, getf, "ipc:"+ipc, ipcAPIs)
geth.Interrupt() getf.Interrupt()
geth.ExpectExit() getf.ExpectExit()
} }
func TestHTTPAttachWelcome(t *testing.T) { func TestHTTPAttachWelcome(t *testing.T) {
coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182" coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182"
port := strconv.Itoa(trulyRandInt(1024, 65536)) // Yeah, sometimes this will fail, sorry :P port := strconv.Itoa(trulyRandInt(1024, 65536)) // Yeah, sometimes this will fail, sorry :P
geth := runGeth(t, getf := runGeth(t,
"--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none", "--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none",
"--etherbase", coinbase, "--rpc", "--rpcport", port) "--etherbase", coinbase, "--rpc", "--rpcport", port)
time.Sleep(2 * time.Second) // Simple way to wait for the RPC endpoint to open time.Sleep(2 * time.Second) // Simple way to wait for the RPC endpoint to open
testAttachWelcome(t, geth, "http://localhost:"+port, httpAPIs) testAttachWelcome(t, getf, "http://localhost:"+port, httpAPIs)
geth.Interrupt() getf.Interrupt()
geth.ExpectExit() getf.ExpectExit()
} }
func TestWSAttachWelcome(t *testing.T) { func TestWSAttachWelcome(t *testing.T) {
coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182" coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182"
port := strconv.Itoa(trulyRandInt(1024, 65536)) // Yeah, sometimes this will fail, sorry :P port := strconv.Itoa(trulyRandInt(1024, 65536)) // Yeah, sometimes this will fail, sorry :P
geth := runGeth(t, getf := runGeth(t,
"--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none", "--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none",
"--etherbase", coinbase, "--ws", "--wsport", port) "--etherbase", coinbase, "--ws", "--wsport", port)
time.Sleep(2 * time.Second) // Simple way to wait for the RPC endpoint to open time.Sleep(2 * time.Second) // Simple way to wait for the RPC endpoint to open
testAttachWelcome(t, geth, "ws://localhost:"+port, httpAPIs) testAttachWelcome(t, getf, "ws://localhost:"+port, httpAPIs)
geth.Interrupt() getf.Interrupt()
geth.ExpectExit() getf.ExpectExit()
} }
func testAttachWelcome(t *testing.T, geth *testgeth, endpoint, apis string) { func testAttachWelcome(t *testing.T, getf *testgeth, endpoint, apis string) {
// Attach to a running geth note and terminate immediately // Attach to a running getf note and terminate immediately
attach := runGeth(t, "attach", endpoint) attach := runGeth(t, "attach", endpoint)
defer attach.ExpectExit() defer attach.ExpectExit()
attach.CloseStdin() attach.CloseStdin()
@ -134,10 +134,10 @@ func testAttachWelcome(t *testing.T, geth *testgeth, endpoint, apis string) {
attach.SetTemplateFunc("goarch", func() string { return runtime.GOARCH }) attach.SetTemplateFunc("goarch", func() string { return runtime.GOARCH })
attach.SetTemplateFunc("gover", runtime.Version) attach.SetTemplateFunc("gover", runtime.Version)
attach.SetTemplateFunc("gethver", func() string { return params.Version }) attach.SetTemplateFunc("gethver", func() string { return params.Version })
attach.SetTemplateFunc("etherbase", func() string { return geth.Etherbase }) attach.SetTemplateFunc("etherbase", func() string { return getf.Etherbase })
attach.SetTemplateFunc("niltime", func() string { return time.Unix(0, 0).Format(time.RFC1123) }) 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("ipc", func() bool { return strings.HasPrefix(endpoint, "ipc") })
attach.SetTemplateFunc("datadir", func() string { return geth.Datadir }) attach.SetTemplateFunc("datadir", func() string { return getf.Datadir })
attach.SetTemplateFunc("apis", func() string { return apis }) attach.SetTemplateFunc("apis", func() string { return apis })
// Verify the actual welcome message to the required template // Verify the actual welcome message to the required template

View file

@ -116,11 +116,11 @@ func testDAOForkBlockNewChain(t *testing.T, test int, genesis string, expectBloc
} else { } else {
// Force chain initialization // Force chain initialization
args := []string{"--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none", "--ipcdisable", "--datadir", datadir} args := []string{"--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none", "--ipcdisable", "--datadir", datadir}
geth := runGeth(t, append(args, []string{"--exec", "2+2", "console"}...)...) getf := runGeth(t, append(args, []string{"--exec", "2+2", "console"}...)...)
geth.WaitExit() getf.WaitExit()
} }
// Retrieve the DAO config flag from the database // Retrieve the DAO config flag from the database
path := filepath.Join(datadir, "geth", "chaindata") path := filepath.Join(datadir, "getf", "chaindata")
db, err := ethdb.NewLDBDatabase(path, 0, 0) db, err := ethdb.NewLDBDatabase(path, 0, 0)
if err != nil { if err != nil {
t.Fatalf("test %d: failed to open test database: %v", test, err) t.Fatalf("test %d: failed to open test database: %v", test, err)

View file

@ -100,11 +100,11 @@ func TestCustomGenesis(t *testing.T) {
runGeth(t, "--datadir", datadir, "init", json).WaitExit() runGeth(t, "--datadir", datadir, "init", json).WaitExit()
// Query the custom genesis block // Query the custom genesis block
geth := runGeth(t, getf := runGeth(t,
"--datadir", datadir, "--maxpeers", "0", "--port", "0", "--datadir", datadir, "--maxpeers", "0", "--port", "0",
"--nodiscover", "--nat", "none", "--ipcdisable", "--nodiscover", "--nat", "none", "--ipcdisable",
"--exec", tt.query, "console") "--exec", tt.query, "console")
geth.ExpectRegexp(tt.result) getf.ExpectRegexp(tt.result)
geth.ExpectExit() getf.ExpectExit()
} }
} }

View file

@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with go-etherfact. If not, see <http://www.gnu.org/licenses/>. // along with go-etherfact. If not, see <http://www.gnu.org/licenses/>.
// geth is the official command-line client for Ethereum. // getf is the official command-line client for Ethereum.
package main package main
import ( import (
@ -39,7 +39,7 @@ import (
) )
const ( const (
clientIdentifier = "geth" // Client identifier to advertise over the network clientIdentifier = "getf" // Client identifier to advertise over the network
) )
var ( var (
@ -144,7 +144,7 @@ var (
func init() { func init() {
// Initialize the CLI app and start Geth // Initialize the CLI app and start Geth
app.Action = geth app.Action = getf
app.HideVersion = true // we have a command to print the version app.HideVersion = true // we have a command to print the version
app.Copyright = "Copyright 2013-2017 The go-etherfact Authors" app.Copyright = "Copyright 2013-2017 The go-etherfact Authors"
app.Commands = []cli.Command{ app.Commands = []cli.Command{
@ -209,10 +209,10 @@ func main() {
} }
} }
// geth is the main entry point into the system if no special subcommand is ran. // getf 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 // It creates a default node based on the command line arguments and runs it in
// blocking mode, waiting for it to be shut down. // blocking mode, waiting for it to be shut down.
func geth(ctx *cli.Context) error { func getf(ctx *cli.Context) error {
node := makeFullNode(ctx) node := makeFullNode(ctx)
startNode(ctx, node) startNode(ctx, node)
node.Wait() node.Wait()

View file

@ -80,7 +80,7 @@ The output of this command is supposed to be machine-readable.
func makecache(ctx *cli.Context) error { func makecache(ctx *cli.Context) error {
args := ctx.Args() args := ctx.Args()
if len(args) != 2 { if len(args) != 2 {
utils.Fatalf(`Usage: geth makecache <block number> <outputdir>`) utils.Fatalf(`Usage: getf makecache <block number> <outputdir>`)
} }
block, err := strconv.ParseUint(args[0], 0, 64) block, err := strconv.ParseUint(args[0], 0, 64)
if err != nil { if err != nil {
@ -95,7 +95,7 @@ func makecache(ctx *cli.Context) error {
func makedag(ctx *cli.Context) error { func makedag(ctx *cli.Context) error {
args := ctx.Args() args := ctx.Args()
if len(args) != 2 { if len(args) != 2 {
utils.Fatalf(`Usage: geth makedag <block number> <outputdir>`) utils.Fatalf(`Usage: getf makedag <block number> <outputdir>`)
} }
block, err := strconv.ParseUint(args[0], 0, 64) block, err := strconv.ParseUint(args[0], 0, 64)
if err != nil { if err != nil {
@ -134,6 +134,6 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with geth. If not, see <http://www.gnu.org/licenses/>.`) along with getf. If not, see <http://www.gnu.org/licenses/>.`)
return nil return nil
} }

View file

@ -76,7 +76,7 @@ func monitor(ctx *cli.Context) error {
// Attach to an Ethereum node over IPC or RPC // Attach to an Ethereum node over IPC or RPC
endpoint := ctx.String(monitorCommandAttachFlag.Name) endpoint := ctx.String(monitorCommandAttachFlag.Name)
if client, err = dialRPC(endpoint); err != nil { if client, err = dialRPC(endpoint); err != nil {
utils.Fatalf("Unable to attach to geth node: %v", err) utils.Fatalf("Unable to attach to getf node: %v", err)
} }
defer client.Close() defer client.Close()
@ -93,7 +93,7 @@ func monitor(ctx *cli.Context) error {
if len(list) > 0 { if len(list) > 0 {
utils.Fatalf("No metrics specified.\n\nAvailable:\n - %s", strings.Join(list, "\n - ")) utils.Fatalf("No metrics specified.\n\nAvailable:\n - %s", strings.Join(list, "\n - "))
} else { } else {
utils.Fatalf("No metrics collected by geth (--%s).\n", utils.MetricsEnabledFlag.Name) utils.Fatalf("No metrics collected by getf (--%s).\n", utils.MetricsEnabledFlag.Name)
} }
} }
sort.Strings(monitored) sort.Strings(monitored)
@ -158,7 +158,7 @@ func monitor(ctx *cli.Context) error {
return nil return nil
} }
// retrieveMetrics contacts the attached geth node and retrieves the entire set // retrieveMetrics contacts the attached getf node and retrieves the entire set
// of collected system metrics. // of collected system metrics.
func retrieveMetrics(client *rpc.Client) (map[string]interface{}, error) { func retrieveMetrics(client *rpc.Client) (map[string]interface{}, error) {
var metrics map[string]interface{} var metrics map[string]interface{}

View file

@ -27,7 +27,7 @@ import (
) )
func tmpdir(t *testing.T) string { func tmpdir(t *testing.T) string {
dir, err := ioutil.TempDir("", "geth-test") dir, err := ioutil.TempDir("", "getf-test")
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
@ -43,8 +43,8 @@ type testgeth struct {
} }
func init() { func init() {
// Run the app if we've been exec'd as "geth-test" in runGeth. // Run the app if we've been exec'd as "getf-test" in runGeth.
reexec.Register("geth-test", func() { reexec.Register("getf-test", func() {
if err := app.Run(os.Args); err != nil { if err := app.Run(os.Args); err != nil {
fmt.Fprintln(os.Stderr, err) fmt.Fprintln(os.Stderr, err)
os.Exit(1) os.Exit(1)
@ -61,7 +61,7 @@ func TestMain(m *testing.M) {
os.Exit(m.Run()) os.Exit(m.Run())
} }
// spawns geth with the given command line args. If the args don't set --datadir, the // spawns getf with the given command line args. If the args don't set --datadir, the
// child g gets a temporary data directory. // child g gets a temporary data directory.
func runGeth(t *testing.T, args ...string) *testgeth { func runGeth(t *testing.T, args ...string) *testgeth {
tt := &testgeth{} tt := &testgeth{}
@ -90,9 +90,9 @@ func runGeth(t *testing.T, args ...string) *testgeth {
}() }()
} }
// Boot "geth". This actually runs the test binary but the TestMain // Boot "getf". This actually runs the test binary but the TestMain
// function will prevent any tests from running. // function will prevent any tests from running.
tt.Run("geth-test", args...) tt.Run("getf-test", args...)
return tt return tt
} }

View file

@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with go-etherfact. If not, see <http://www.gnu.org/licenses/>. // along with go-etherfact. If not, see <http://www.gnu.org/licenses/>.
// Contains the geth command usage template and generator. // Contains the getf command usage template and generator.
package main package main

View file

@ -84,7 +84,7 @@ var dashboardContent = `
{{if .FaucetPage}}<li id="faucet_menu"><a onclick="load('#faucet')"><i class="fa fa-bath"></i> Crypto Faucet</a></li>{{end}} {{if .FaucetPage}}<li id="faucet_menu"><a onclick="load('#faucet')"><i class="fa fa-bath"></i> Crypto Faucet</a></li>{{end}}
<li id="connect_menu"><a><i class="fa fa-plug"></i> Connect Yourself</a> <li id="connect_menu"><a><i class="fa fa-plug"></i> Connect Yourself</a>
<ul id="connect_list" class="nav child_menu"> <ul id="connect_list" class="nav child_menu">
<li><a onclick="$('#connect_menu').removeClass('active'); $('#connect_list').toggle(); load('#geth')">Go Ethereum: Geth</a></li> <li><a onclick="$('#connect_menu').removeClass('active'); $('#connect_list').toggle(); load('#getf')">Go Ethereum: Geth</a></li>
<li><a onclick="$('#connect_menu').removeClass('active'); $('#connect_list').toggle(); load('#mist')">Go Ethereum: Wallet & Mist</a></li> <li><a onclick="$('#connect_menu').removeClass('active'); $('#connect_list').toggle(); load('#mist')">Go Ethereum: Wallet & Mist</a></li>
<li><a onclick="$('#connect_menu').removeClass('active'); $('#connect_list').toggle(); load('#mobile')">Go Ethereum: Android & iOS</a></li>{{if .Ethash}} <li><a onclick="$('#connect_menu').removeClass('active'); $('#connect_list').toggle(); load('#mobile')">Go Ethereum: Android & iOS</a></li>{{if .Ethash}}
<li><a onclick="$('#connect_menu').removeClass('active'); $('#connect_list').toggle(); load('#other')">Other Ethereum Clients</a></li>{{end}} <li><a onclick="$('#connect_menu').removeClass('active'); $('#connect_list').toggle(); load('#other')">Other Ethereum Clients</a></li>{{end}}
@ -97,7 +97,7 @@ var dashboardContent = `
</div> </div>
</div> </div>
<div class="right_col" role="main" style="padding: 0 !important"> <div class="right_col" role="main" style="padding: 0 !important">
<div id="geth" hidden style="padding: 16px;"> <div id="getf" hidden style="padding: 16px;">
<div class="page-title"> <div class="page-title">
<div class="title_left"> <div class="title_left">
<h3>Connect Yourself &ndash; Go Ethereum: Geth</h3> <h3>Connect Yourself &ndash; Go Ethereum: Geth</h3>
@ -116,11 +116,11 @@ var dashboardContent = `
<p>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.</p> <p>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.</p>
<br/> <br/>
<p>To run an archive node, download <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> and start Geth with: <p>To run an archive node, download <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> and start Geth with:
<pre>geth --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre> <pre>getf --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre>
<pre>geth --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=1024 --syncmode=full{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}</pre> <pre>getf --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=1024 --syncmode=full{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}</pre>
</p> </p>
<br/> <br/>
<p>You can download Geth from <a href="https://geth.ethereum.org/downloads/" target="about:blank">https://geth.ethereum.org/downloads/</a>.</p> <p>You can download Geth from <a href="https://getf.ethereum.org/downloads/" target="about:blank">https://getf.ethereum.org/downloads/</a>.</p>
</div> </div>
</div> </div>
</div> </div>
@ -135,11 +135,11 @@ var dashboardContent = `
<p>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.</p> <p>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.</p>
<br/> <br/>
<p>To run a full node, download <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> and start Geth with: <p>To run a full node, download <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> and start Geth with:
<pre>geth --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre> <pre>getf --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre>
<pre>geth --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=512{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}</pre> <pre>getf --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=512{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}</pre>
</p> </p>
<br/> <br/>
<p>You can download Geth from <a href="https://geth.ethereum.org/downloads/" target="about:blank">https://geth.ethereum.org/downloads/</a>.</p> <p>You can download Geth from <a href="https://getf.ethereum.org/downloads/" target="about:blank">https://getf.ethereum.org/downloads/</a>.</p>
</div> </div>
</div> </div>
</div> </div>
@ -157,11 +157,11 @@ var dashboardContent = `
<p>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.</p> <p>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.</p>
<br/> <br/>
<p>To run a light node, download <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> and start Geth with: <p>To run a light node, download <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> and start Geth with:
<pre>geth --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre> <pre>getf --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre>
<pre>geth --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --syncmode=light{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}</pre> <pre>getf --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --syncmode=light{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}</pre>
</p> </p>
<br/> <br/>
<p>You can download Geth from <a href="https://geth.ethereum.org/downloads/" target="about:blank">https://geth.ethereum.org/downloads/</a>.</p> <p>You can download Geth from <a href="https://getf.ethereum.org/downloads/" target="about:blank">https://getf.ethereum.org/downloads/</a>.</p>
</div> </div>
</div> </div>
</div> </div>
@ -176,11 +176,11 @@ var dashboardContent = `
<p>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.</p> <p>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.</p>
<br/> <br/>
<p>To run an embedded node, download <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> and start Geth with: <p>To run an embedded node, download <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> and start Geth with:
<pre>geth --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre> <pre>getf --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre>
<pre>geth --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=16 --ethash.cachesinmem=1 --syncmode=light{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}</pre> <pre>getf --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=16 --ethash.cachesinmem=1 --syncmode=light{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}</pre>
</p> </p>
<br/> <br/>
<p>You can download Geth from <a href="https://geth.ethereum.org/downloads/" target="about:blank">https://geth.ethereum.org/downloads/</a>.</p> <p>You can download Geth from <a href="https://getf.ethereum.org/downloads/" target="about:blank">https://getf.ethereum.org/downloads/</a>.</p>
</div> </div>
</div> </div>
</div> </div>
@ -205,10 +205,10 @@ var dashboardContent = `
<p>Under the hood the wallet is backed by a go-etherfact full node, meaning that a mid range machine is assumed. Similarly, synchronization is based on <strong>fast-sync</strong>, 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.</p> <p>Under the hood the wallet is backed by a go-etherfact full node, meaning that a mid range machine is assumed. Similarly, synchronization is based on <strong>fast-sync</strong>, 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.</p>
<br/> <br/>
<p>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 <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> and run: <p>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 <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> and run:
<pre>geth --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre> <pre>getf --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre>
</p> </p>
<p>With your local chain initialized, you can start the Ethereum Wallet: <p>With your local chain initialized, you can start the Ethereum Wallet:
<pre>ethereumwallet --rpc $HOME/.{{.Network}}/geth.ipc --node-networkid={{.NetworkID}} --node-datadir=$HOME/.{{.Network}}{{if .Ethstats}} --node-ethstats='{{.Ethstats}}'{{end}} --node-bootnodes={{.BootnodesFlat}}</pre> <pre>ethereumwallet --rpc $HOME/.{{.Network}}/getf.ipc --node-networkid={{.NetworkID}} --node-datadir=$HOME/.{{.Network}}{{if .Ethstats}} --node-ethstats='{{.Ethstats}}'{{end}} --node-bootnodes={{.BootnodesFlat}}</pre>
<p> <p>
<br/> <br/>
<p>You can download the Ethereum Wallet from <a href="https://github.com/ethereum/mist/releases" target="about:blank">https://github.com/ethereum/mist/releases</a>.</p> <p>You can download the Ethereum Wallet from <a href="https://github.com/ethereum/mist/releases" target="about:blank">https://github.com/ethereum/mist/releases</a>.</p>
@ -226,10 +226,10 @@ var dashboardContent = `
<p>Under the hood the browser is backed by a go-etherfact full node, meaning that a mid range machine is assumed. Similarly, synchronization is based on <strong>fast-sync</strong>, 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.</p> <p>Under the hood the browser is backed by a go-etherfact full node, meaning that a mid range machine is assumed. Similarly, synchronization is based on <strong>fast-sync</strong>, 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.</p>
<br/> <br/>
<p>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 <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> and run: <p>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 <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> and run:
<pre>geth --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre> <pre>getf --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre>
</p> </p>
<p>With your local chain initialized, you can start Mist: <p>With your local chain initialized, you can start Mist:
<pre>mist --rpc $HOME/.{{.Network}}/geth.ipc --node-networkid={{.NetworkID}} --node-datadir=$HOME/.{{.Network}}{{if .Ethstats}} --node-ethstats='{{.Ethstats}}'{{end}} --node-bootnodes={{.BootnodesFlat}}</pre> <pre>mist --rpc $HOME/.{{.Network}}/getf.ipc --node-networkid={{.NetworkID}} --node-datadir=$HOME/.{{.Network}}{{if .Ethstats}} --node-ethstats='{{.Ethstats}}'{{end}} --node-bootnodes={{.BootnodesFlat}}</pre>
<p> <p>
<br/> <br/>
<p>You can download the Mist browser from <a href="https://github.com/ethereum/mist/releases" target="about:blank">https://github.com/ethereum/mist/releases</a>.</p> <p>You can download the Mist browser from <a href="https://github.com/ethereum/mist/releases" target="about:blank">https://github.com/ethereum/mist/releases</a>.</p>
@ -258,8 +258,8 @@ var dashboardContent = `
<br/> <br/>
<p>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 <a href="https://github.com/EtherFact-Project/go-etherfact/wiki/Mobile:-Introduction#android-archive" target="about:blank">Mobile: Introduction &ndash; Android archive</a>. <p>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 <a href="https://github.com/EtherFact-Project/go-etherfact/wiki/Mobile:-Introduction#android-archive" target="about:blank">Mobile: Introduction &ndash; Android archive</a>.
<p>Before connecting to the Ethereum network, download the <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> 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.</p> <p>Before connecting to the Ethereum network, download the <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> 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.</p>
<p>Inside your Java code you can now import the geth archive and connect to Ethereum: <p>Inside your Java code you can now import the getf archive and connect to Ethereum:
<pre>import org.ethereum.geth.*;</pre> <pre>import org.ethereum.getf.*;</pre>
<pre> <pre>
Enodes bootnodes = new Enodes();{{range .Bootnodes}} Enodes bootnodes = new Enodes();{{range .Bootnodes}}
bootnodes.append(new Enode("{{.}}"));{{end}} bootnodes.append(new Enode("{{.}}"));{{end}}
@ -289,7 +289,7 @@ node.start();
<br/> <br/>
<p>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 <a href="https://github.com/EtherFact-Project/go-etherfact/wiki/Mobile:-Introduction#ios-framework" target="about:blank">Mobile: Introduction &ndash; iOS framework</a>. <p>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 <a href="https://github.com/EtherFact-Project/go-etherfact/wiki/Mobile:-Introduction#ios-framework" target="about:blank">Mobile: Introduction &ndash; iOS framework</a>.
<p>Before connecting to the Ethereum network, download the <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> 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.</p> <p>Before connecting to the Ethereum network, download the <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> 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.</p>
<p>Inside your Swift code you can now import the geth framework and connect to Ethereum (ObjC should be analogous): <p>Inside your Swift code you can now import the getf framework and connect to Ethereum (ObjC should be analogous):
<pre>import Geth</pre> <pre>import Geth</pre>
<pre> <pre>
var error: NSError? var error: NSError?
@ -419,7 +419,7 @@ try! node?.start();
<p>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.</p> <p>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.</p>
<p>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.</p> <p>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.</p>
<br/> <br/>
<p>Puppeth is distributed as part of the <a href="https://geth.ethereum.org/downloads/" target="about:blank">Geth &amp; Tools</a> bundles, but can also be installed separately via:<pre>go get github.com/EtherFact-Project/go-etherfact/cmd/puppeth</pre></p> <p>Puppeth is distributed as part of the <a href="https://getf.ethereum.org/downloads/" target="about:blank">Geth &amp; Tools</a> bundles, but can also be installed separately via:<pre>go get github.com/EtherFact-Project/go-etherfact/cmd/puppeth</pre></p>
<br/> <br/>
<p><em>Copyright 2017. The go-etherfact Authors.</em></p> <p><em>Copyright 2017. The go-etherfact Authors.</em></p>
</div> </div>
@ -445,7 +445,7 @@ try! node?.start();
window.location.hash = hash; window.location.hash = hash;
// Fade out all possible pages (yes, ugly, no, don't care) // Fade out all possible pages (yes, ugly, no, don't care)
$("#geth").fadeOut(300) $("#getf").fadeOut(300)
$("#mist").fadeOut(300) $("#mist").fadeOut(300)
$("#mobile").fadeOut(300) $("#mobile").fadeOut(300)
$("#other").fadeOut(300) $("#other").fadeOut(300)

View file

@ -40,11 +40,11 @@ ADD genesis.json /genesis.json
ADD signer.pass /signer.pass ADD signer.pass /signer.pass
{{end}} {{end}}
RUN \ RUN \
echo 'geth --cache 512 init /genesis.json' > /root/geth.sh && \{{if .Unlock}} echo 'getf --cache 512 init /genesis.json' > /root/getf.sh && \{{if .Unlock}}
echo 'mkdir -p /root/.ethereum/keystore/ && cp /signer.json /root/.ethereum/keystore/' >> /root/geth.sh && \{{end}} echo 'mkdir -p /root/.ethereum/keystore/ && cp /signer.json /root/.ethereum/keystore/' >> /root/getf.sh && \{{end}}
echo $'geth --networkid {{.NetworkID}} --cache 512 --port {{.Port}} --maxpeers {{.Peers}} {{.LightFlag}} --ethstats \'{{.Ethstats}}\' {{if .Bootnodes}}--bootnodes {{.Bootnodes}}{{end}} {{if .Etherbase}}--etherbase {{.Etherbase}} --mine --minerthreads 1{{end}} {{if .Unlock}}--unlock 0 --password /signer.pass --mine{{end}} --targetgaslimit {{.GasTarget}} --gasprice {{.GasPrice}}' >> /root/geth.sh echo $'getf --networkid {{.NetworkID}} --cache 512 --port {{.Port}} --maxpeers {{.Peers}} {{.LightFlag}} --ethstats \'{{.Ethstats}}\' {{if .Bootnodes}}--bootnodes {{.Bootnodes}}{{end}} {{if .Etherbase}}--etherbase {{.Etherbase}} --mine --minerthreads 1{{end}} {{if .Unlock}}--unlock 0 --password /signer.pass --mine{{end}} --targetgaslimit {{.GasTarget}} --gasprice {{.GasPrice}}' >> /root/getf.sh
ENTRYPOINT ["/bin/sh", "/root/geth.sh"] ENTRYPOINT ["/bin/sh", "/root/getf.sh"]
` `
// nodeComposefile is the docker-compose.yml file required to deploy and maintain // nodeComposefile is the docker-compose.yml file required to deploy and maintain
@ -221,7 +221,7 @@ func checkNode(client *sshClient, network string, boot bool) (*nodeInfos, error)
// Container available, retrieve its node ID and its genesis json // Container available, retrieve its node ID and its genesis json
var out []byte var out []byte
if out, err = client.Run(fmt.Sprintf("docker exec %s_%s_1 geth --exec admin.nodeInfo.id attach", network, kind)); err != nil { if out, err = client.Run(fmt.Sprintf("docker exec %s_%s_1 getf --exec admin.nodeInfo.id attach", network, kind)); err != nil {
return nil, ErrServiceUnreachable return nil, ErrServiceUnreachable
} }
id := bytes.Trim(bytes.TrimSpace(out), "\"") id := bytes.Trim(bytes.TrimSpace(out), "\"")

View file

@ -36,8 +36,8 @@ ADD genesis.json /genesis.json
RUN \ RUN \
echo 'node server.js &' > wallet.sh && \ echo 'node server.js &' > wallet.sh && \
echo 'geth --cache 512 init /genesis.json' >> wallet.sh && \ echo 'getf --cache 512 init /genesis.json' >> wallet.sh && \
echo $'geth --networkid {{.NetworkID}} --port {{.NodePort}} --bootnodes {{.Bootnodes}} --ethstats \'{{.Ethstats}}\' --cache=512 --rpc --rpcaddr=0.0.0.0 --rpccorsdomain "*" --rpcvhosts "*"' >> wallet.sh echo $'getf --networkid {{.NetworkID}} --port {{.NodePort}} --bootnodes {{.Bootnodes}} --ethstats \'{{.Ethstats}}\' --cache=512 --rpc --rpcaddr=0.0.0.0 --rpccorsdomain "*" --rpcvhosts "*"' >> wallet.sh
RUN \ RUN \
sed -i 's/PuppethNetworkID/{{.NetworkID}}/g' dist/js/etherwallet-master.js && \ sed -i 's/PuppethNetworkID/{{.NetworkID}}/g' dist/js/etherwallet-master.js && \

View file

@ -116,7 +116,7 @@ func initSwarmNode(config *bzzapi.Config, stack *node.Node, ctx *cli.Context) {
//at this point, all vars should be set in the Config //at this point, all vars should be set in the Config
//get the account for the provided swarm account //get the account for the provided swarm account
prvkey := getAccount(config.BzzAccount, ctx, stack) prvkey := getAccount(config.BzzAccount, ctx, stack)
//set the resolved config path (geth --datadir) //set the resolved config path (getf --datadir)
config.Path = stack.InstanceDir() config.Path = stack.InstanceDir()
//finally, initialize the configuration //finally, initialize the configuration
config.Init(prvkey) config.Init(prvkey)

View file

@ -465,7 +465,7 @@ func TestValidateConfig(t *testing.T) {
}{ }{
{ {
cfg: &api.Config{EnsAPIs: []string{ cfg: &api.Config{EnsAPIs: []string{
"/data/testnet/geth.ipc", "/data/testnet/getf.ipc",
}}, }},
}, },
{ {
@ -480,7 +480,7 @@ func TestValidateConfig(t *testing.T) {
}, },
{ {
cfg: &api.Config{EnsAPIs: []string{ cfg: &api.Config{EnsAPIs: []string{
"test:/data/testnet/geth.ipc", "test:/data/testnet/getf.ipc",
}}, }},
}, },
{ {
@ -490,7 +490,7 @@ func TestValidateConfig(t *testing.T) {
}, },
{ {
cfg: &api.Config{EnsAPIs: []string{ cfg: &api.Config{EnsAPIs: []string{
"314159265dD8dbb310642f98f50C066173C1259b@/data/testnet/geth.ipc", "314159265dD8dbb310642f98f50C066173C1259b@/data/testnet/getf.ipc",
}}, }},
}, },
{ {
@ -505,7 +505,7 @@ func TestValidateConfig(t *testing.T) {
}, },
{ {
cfg: &api.Config{EnsAPIs: []string{ cfg: &api.Config{EnsAPIs: []string{
"test:314159265dD8dbb310642f98f50C066173C1259b@/data/testnet/geth.ipc", "test:314159265dD8dbb310642f98f50C066173C1259b@/data/testnet/getf.ipc",
}}, }},
}, },
{ {
@ -538,9 +538,9 @@ func TestValidateConfig(t *testing.T) {
}, },
{ {
cfg: &api.Config{EnsAPIs: []string{ cfg: &api.Config{EnsAPIs: []string{
"@/data/testnet/geth.ipc", "@/data/testnet/getf.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/getf.ipc\": missing contract address",
}, },
} { } {
err := validateConfig(c.cfg) err := validateConfig(c.cfg)

View file

@ -161,7 +161,7 @@ var (
var defaultNodeConfig = node.DefaultConfig 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 getf.
func init() { func init() {
defaultNodeConfig.Name = clientIdentifier defaultNodeConfig.Name = clientIdentifier
defaultNodeConfig.Version = params.VersionWithCommit(gitCommit) defaultNodeConfig.Version = params.VersionWithCommit(gitCommit)
@ -405,9 +405,9 @@ func bzzd(ctx *cli.Context) error {
} }
cfg := defaultNodeConfig cfg := defaultNodeConfig
//geth only supports --datadir via command line //getf only supports --datadir via command line
//in order to be consistent within swarm, if we pass --datadir via environment variable //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 getf and swarm
if _, err := os.Stat(bzzconfig.Path); err == nil { if _, err := os.Stat(bzzconfig.Path); err == nil {
cfg.DataDir = bzzconfig.Path cfg.DataDir = bzzconfig.Path
} }

View file

@ -761,7 +761,7 @@ func MakeAddress(ks *keystore.KeyStore, account string) (accounts.Account, error
log.Warn("-------------------------------------------------------------------") log.Warn("-------------------------------------------------------------------")
log.Warn("Referring to accounts by order in the keystore folder is dangerous!") 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("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 `getf account list`)")
log.Warn("-------------------------------------------------------------------") log.Warn("-------------------------------------------------------------------")
accs := ks.Accounts() accs := ks.Accounts()
@ -832,7 +832,7 @@ func SetP2PConfig(ctx *cli.Context, cfg *p2p.Config) {
if lightClient { if lightClient {
ethPeers = 0 ethPeers = 0
} }
log.Info("Welcome to Geth of EtherFact", "Cảm ơn bạn đã sử dụng Geth của EtherFact ^^!") log.Info("Welcome to GetF of EtherFact", "Go-EtherFact", "Beta")
log.Info("Maximum peer count", "ETHF", ethPeers, "LES", lightPeers, "total", cfg.MaxPeers) log.Info("Maximum peer count", "ETHF", ethPeers, "LES", lightPeers, "total", cfg.MaxPeers)
if ctx.GlobalIsSet(MaxPendingPeersFlag.Name) { if ctx.GlobalIsSet(MaxPendingPeersFlag.Name) {
@ -1277,11 +1277,11 @@ func MakeConsolePreloads(ctx *cli.Context) []string {
// This is a temporary function used for migrating old command/flags to the // This is a temporary function used for migrating old command/flags to the
// new format. // new format.
// //
// e.g. geth account new --keystore /tmp/mykeystore --lightkdf // e.g. getf account new --keystore /tmp/mykeystore --lightkdf
// //
// is equivalent after calling this method with: // is equivalent after calling this method with:
// //
// geth --keystore /tmp/mykeystore --lightkdf account new // getf --keystore /tmp/mykeystore --lightkdf account new
// //
// This allows the use of the existing configuration functionality. // This allows the use of the existing configuration functionality.
// When all flags are migrated this function can be removed and the existing // When all flags are migrated this function can be removed and the existing

View file

@ -313,7 +313,6 @@ func DefaultGenesisBlock() *Genesis {
return &Genesis{ return &Genesis{
Config: params.MainnetChainConfig, Config: params.MainnetChainConfig,
Nonce: 0xC261220, Nonce: 0xC261220,
ExtraData: hexutil.MustDecode("Sửa đổi sau khi hoàn thành"),
GasLimit: 5000, GasLimit: 5000,
Difficulty: big.NewInt(17179869184), Difficulty: big.NewInt(17179869184),
Alloc: decodePrealloc(mainnetAllocData), Alloc: decodePrealloc(mainnetAllocData),
@ -344,7 +343,7 @@ func DefaultRinkebyGenesisBlock() *Genesis {
} }
} }
// DeveloperGenesisBlock returns the 'geth --dev' genesis block. Note, this must // DeveloperGenesisBlock returns the 'getf --dev' genesis block. Note, this must
// be seeded with the // be seeded with the
func DeveloperGenesisBlock(period uint64, faucet common.Address) *Genesis { func DeveloperGenesisBlock(period uint64, faucet common.Address) *Genesis {
// Override the default period to the user requested one // Override the default period to the user requested one

36
core/genesis.json Normal file
View file

@ -0,0 +1,36 @@
{
"config": {
"chainId": 1,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
},
"nonce": "0x000000000c261220",
"difficulty": "0x3782dace9d90000000000000",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
"timestamp": "0x00",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x",
"gasLimit": "5000",
"alloc": {
"06219483E217c9aD479f76a95426f689eF4D5951": {
"balance": "250000000000000000000000000"
},
"bC30b98770E347b4942A79Af104ABFFA3da4f2be": {
"balance": "200000000000000000000000000"
},
"9d1703c8Cb022fC6b080f9c316B4425F38429Ee0": {
"balance": "200000000000000000000000000"
},
"CE3ab77d2AF138C65f2448bb516FE1eDC28dfCC4": {
"balance": "200000000000000000000000000"
},
"554a13d149819F8d5E181BD348829145cbcb403C": {
"balance": "200000000000000000000000000"
},
"4DBcAb262a164Db5BD0cc9828fA02dd9E9ac4EC6": {
"balance": "200000000000000000000000000"
}
}
}

View file

@ -21,6 +21,6 @@ package core
// Use mkalloc.go to create/update them. // Use mkalloc.go to create/update them.
// nolint: misspell // nolint: misspell
const mainnetAllocData = "\xf8\xcc\xe1\x94\x06!\x94\x83\xe2\x17\u026dG\x9fv\xa9T&\xf6\x89\xefMYQ\x8b)[\xe9nd\x06ir\x00\x00\x00\xe1\x94M\xbc\xab&*\x16M\xb5\xbd\f\u0242\x8f\xa0-\xd9\xe9\xacN\u018b)[\xe9nd\x06ir\x00\x00\x00\xe1\x94UJ\x13\xd1I\x81\x9f\x8d^\x18\x1b\xd3H\x82\x91E\xcb\xcb@<\x8b)[\xe9nd\x06ir\x00\x00\x00\u151d\x17\x03\xc8\xcb\x02/\u01b0\x80\xf9\xc3\x16\xb4B_8B\x9e\xe0\x8b)[\xe9nd\x06ir\x00\x00\x00\u153c0\xb9\x87p\xe3G\xb4\x94*y\xaf\x10J\xbf\xfa=\xa4\xf2\xbe\x8b)[\xe9nd\x06ir\x00\x00\x00\xe1\x94\xce:\xb7}*\xf18\xc6_$H\xbbQo\xe1\xed\u008d\xfc\u010b)[\xe9nd\x06ir\x00\x00\x00" const mainnetAllocData = "\xf8\xcc\xe1\x94\x06!\x94\x83\xe2\x17\u026dG\x9fv\xa9T&\xf6\x89\xefMYQ\x8b\xce\u02cf'\xf4 \x0f:\x00\x00\x00\xe1\x94M\xbc\xab&*\x16M\xb5\xbd\f\u0242\x8f\xa0-\xd9\xe9\xacN\u018b\xa5o\xa5\xb9\x90\x19\xa5\xc8\x00\x00\x00\xe1\x94UJ\x13\xd1I\x81\x9f\x8d^\x18\x1b\xd3H\x82\x91E\xcb\xcb@<\x8b\xa5o\xa5\xb9\x90\x19\xa5\xc8\x00\x00\x00\u151d\x17\x03\xc8\xcb\x02/\u01b0\x80\xf9\xc3\x16\xb4B_8B\x9e\xe0\x8b\xa5o\xa5\xb9\x90\x19\xa5\xc8\x00\x00\x00\u153c0\xb9\x87p\xe3G\xb4\x94*y\xaf\x10J\xbf\xfa=\xa4\U000be2e5o\xa5\xb9\x90\x19\xa5\xc8\x00\x00\x00\xe1\x94\xce:\xb7}*\xf18\xc6_$H\xbbQo\xe1\xed\u008d\xfc\u010b\xa5o\xa5\xb9\x90\x19\xa5\xc8\x00\x00\x00"
const testnetAllocData = "\xf8\xcc\xe1\x94\x06!\x94\x83\xe2\x17\u026dG\x9fv\xa9T&\xf6\x89\xefMYQ\x8b)[\xe9nd\x06ir\x00\x00\x00\xe1\x94M\xbc\xab&*\x16M\xb5\xbd\f\u0242\x8f\xa0-\xd9\xe9\xacN\u018b)[\xe9nd\x06ir\x00\x00\x00\xe1\x94UJ\x13\xd1I\x81\x9f\x8d^\x18\x1b\xd3H\x82\x91E\xcb\xcb@<\x8b)[\xe9nd\x06ir\x00\x00\x00\u151d\x17\x03\xc8\xcb\x02/\u01b0\x80\xf9\xc3\x16\xb4B_8B\x9e\xe0\x8b)[\xe9nd\x06ir\x00\x00\x00\u153c0\xb9\x87p\xe3G\xb4\x94*y\xaf\x10J\xbf\xfa=\xa4\xf2\xbe\x8b)[\xe9nd\x06ir\x00\x00\x00\xe1\x94\xce:\xb7}*\xf18\xc6_$H\xbbQo\xe1\xed\u008d\xfc\u010b)[\xe9nd\x06ir\x00\x00\x00" const testnetAllocData = "\xf8\xcc\xe1\x94\x06!\x94\x83\xe2\x17\u026dG\x9fv\xa9T&\xf6\x89\xefMYQ\x8b)[\xe9nd\x06ir\x00\x00\x00\xe1\x94M\xbc\xab&*\x16M\xb5\xbd\f\u0242\x8f\xa0-\xd9\xe9\xacN\u018b)[\xe9nd\x06ir\x00\x00\x00\xe1\x94UJ\x13\xd1I\x81\x9f\x8d^\x18\x1b\xd3H\x82\x91E\xcb\xcb@<\x8b)[\xe9nd\x06ir\x00\x00\x00\u151d\x17\x03\xc8\xcb\x02/\u01b0\x80\xf9\xc3\x16\xb4B_8B\x9e\xe0\x8b)[\xe9nd\x06ir\x00\x00\x00\u153c0\xb9\x87p\xe3G\xb4\x94*y\xaf\x10J\xbf\xfa=\xa4\xf2\xbe\x8b)[\xe9nd\x06ir\x00\x00\x00\xe1\x94\xce:\xb7}*\xf18\xc6_$H\xbbQo\xe1\xed\u008d\xfc\u010b)[\xe9nd\x06ir\x00\x00\x00"
const rinkebyAllocData = "\xf8\xcc\xe1\x94\x06!\x94\x83\xe2\x17\u026dG\x9fv\xa9T&\xf6\x89\xefMYQ\x8b)[\xe9nd\x06ir\x00\x00\x00\xe1\x94M\xbc\xab&*\x16M\xb5\xbd\f\u0242\x8f\xa0-\xd9\xe9\xacN\u018b)[\xe9nd\x06ir\x00\x00\x00\xe1\x94UJ\x13\xd1I\x81\x9f\x8d^\x18\x1b\xd3H\x82\x91E\xcb\xcb@<\x8b)[\xe9nd\x06ir\x00\x00\x00\u151d\x17\x03\xc8\xcb\x02/\u01b0\x80\xf9\xc3\x16\xb4B_8B\x9e\xe0\x8b)[\xe9nd\x06ir\x00\x00\x00\u153c0\xb9\x87p\xe3G\xb4\x94*y\xaf\x10J\xbf\xfa=\xa4\xf2\xbe\x8b)[\xe9nd\x06ir\x00\x00\x00\xe1\x94\xce:\xb7}*\xf18\xc6_$H\xbbQo\xe1\xed\u008d\xfc\u010b)[\xe9nd\x06ir\x00\x00\x00" const rinkebyAllocData = "\xf8\xcc\xe1\x94\x06!\x94\x83\xe2\x17\u026dG\x9fv\xa9T&\xf6\x89\xefMYQ\x8b)[\xe9nd\x06ir\x00\x00\x00\xe1\x94M\xbc\xab&*\x16M\xb5\xbd\f\u0242\x8f\xa0-\xd9\xe9\xacN\u018b)[\xe9nd\x06ir\x00\x00\x00\xe1\x94UJ\x13\xd1I\x81\x9f\x8d^\x18\x1b\xd3H\x82\x91E\xcb\xcb@<\x8b)[\xe9nd\x06ir\x00\x00\x00\u151d\x17\x03\xc8\xcb\x02/\u01b0\x80\xf9\xc3\x16\xb4B_8B\x9e\xe0\x8b)[\xe9nd\x06ir\x00\x00\x00\u153c0\xb9\x87p\xe3G\xb4\x94*y\xaf\x10J\xbf\xfa=\xa4\xf2\xbe\x8b)[\xe9nd\x06ir\x00\x00\x00\xe1\x94\xce:\xb7}*\xf18\xc6_$H\xbbQo\xe1\xed\u008d\xfc\u010b)[\xe9nd\x06ir\x00\x00\x00"

View file

@ -139,7 +139,7 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
if !config.SkipBcVersionCheck { if !config.SkipBcVersionCheck {
bcVersion := core.GetBlockChainVersion(chainDb) bcVersion := core.GetBlockChainVersion(chainDb)
if bcVersion != core.BlockChainVersion && bcVersion != 0 { if bcVersion != core.BlockChainVersion && bcVersion != 0 {
return nil, fmt.Errorf("Blockchain DB version mismatch (%d / %d). Run geth upgradedb.\n", bcVersion, core.BlockChainVersion) return nil, fmt.Errorf("Blockchain DB version mismatch (%d / %d). Run getf upgradedb.\n", bcVersion, core.BlockChainVersion)
} }
core.WriteBlockChainVersion(chainDb, core.BlockChainVersion) core.WriteBlockChainVersion(chainDb, core.BlockChainVersion)
} }
@ -185,7 +185,7 @@ func makeExtraData(extra []byte) []byte {
// create default extradata // create default extradata
extra, _ = rlp.EncodeToBytes([]interface{}{ extra, _ = rlp.EncodeToBytes([]interface{}{
uint(params.VersionMajor<<16 | params.VersionMinor<<8 | params.VersionPatch), uint(params.VersionMajor<<16 | params.VersionMinor<<8 | params.VersionPatch),
"geth", "getf",
runtime.Version(), runtime.Version(),
runtime.GOOS, runtime.GOOS,
}) })

View file

@ -64,7 +64,7 @@ func BenchmarkBloomBits32k(b *testing.B) {
const benchFilterCnt = 2000 const benchFilterCnt = 2000
func benchmarkBloomBits(b *testing.B, sectionSize uint64) { func benchmarkBloomBits(b *testing.B, sectionSize uint64) {
benchDataDir := node.DefaultDataDir() + "/geth/chaindata" benchDataDir := node.DefaultDataDir() + "/getf/chaindata"
fmt.Println("Running bloombits benchmark section size:", sectionSize) fmt.Println("Running bloombits benchmark section size:", sectionSize)
db, err := ethdb.NewLDBDatabase(benchDataDir, 128, 1024) db, err := ethdb.NewLDBDatabase(benchDataDir, 128, 1024)
@ -174,7 +174,7 @@ func clearBloomBits(db ethdb.Database) {
} }
func BenchmarkNoBloomBits(b *testing.B) { func BenchmarkNoBloomBits(b *testing.B) {
benchDataDir := node.DefaultDataDir() + "/geth/chaindata" benchDataDir := node.DefaultDataDir() + "/getf/chaindata"
fmt.Println("Running benchmark without bloombits") fmt.Println("Running benchmark without bloombits")
db, err := ethdb.NewLDBDatabase(benchDataDir, 128, 1024) db, err := ethdb.NewLDBDatabase(benchDataDir, 128, 1024)
if err != nil { if err != nil {

View file

@ -53,7 +53,7 @@ type TestCmd struct {
} }
// Run exec's the current binary using name as argv[0] which will trigger the // Run exec's the current binary using name as argv[0] which will trigger the
// reexec init function for that name (e.g. "geth-test" in cmd/geth/run_test.go) // reexec init function for that name (e.g. "getf-test" in cmd/getf/run_test.go)
func (tt *TestCmd) Run(name string, args ...string) { func (tt *TestCmd) Run(name string, args ...string) {
tt.stderr = &testlogger{t: tt.T} tt.stderr = &testlogger{t: tt.T}
tt.cmd = &exec.Cmd{ tt.cmd = &exec.Cmd{
@ -77,7 +77,7 @@ func (tt *TestCmd) Run(name string, args ...string) {
// InputLine writes the given text to the childs stdin. // InputLine writes the given text to the childs stdin.
// This method can also be called from an expect template, e.g.: // This method can also be called from an expect template, e.g.:
// //
// geth.expect(`Passphrase: {{.InputLine "password"}}`) // getf.expect(`Passphrase: {{.InputLine "password"}}`)
func (tt *TestCmd) InputLine(s string) string { func (tt *TestCmd) InputLine(s string) string {
io.WriteString(tt.stdin, s+"\n") io.WriteString(tt.stdin, s+"\n")
return "" return ""

View file

@ -14,7 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License // You should have received a copy of the GNU Lesser General Public License
// along with the go-etherfact library. If not, see <http://www.gnu.org/licenses/>. // along with the go-etherfact library. If not, see <http://www.gnu.org/licenses/>.
// package web3ext contains geth specific web3.js extensions. // package web3ext contains getf specific web3.js extensions.
package web3ext package web3ext
var Modules = map[string]string{ var Modules = map[string]string{

View file

@ -17,7 +17,7 @@
// Contains all the wrappers from the accounts package to support client side key // Contains all the wrappers from the accounts package to support client side key
// management on mobile platforms. // management on mobile platforms.
package geth package getf
import ( import (
"errors" "errors"

View file

@ -14,7 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License // You should have received a copy of the GNU Lesser General Public License
// along with the go-etherfact library. If not, see <http://www.gnu.org/licenses/>. // along with the go-etherfact library. If not, see <http://www.gnu.org/licenses/>.
package geth package getf
import ( import (
"io/ioutil" "io/ioutil"
@ -40,7 +40,7 @@ import android.test.MoreAsserts;
import java.math.BigInteger; import java.math.BigInteger;
import java.util.Arrays; import java.util.Arrays;
import org.ethereum.geth.*; import org.ethereum.getf.*;
public class AndroidTest extends InstrumentationTestCase { public class AndroidTest extends InstrumentationTestCase {
public AndroidTest() {} public AndroidTest() {}
@ -184,7 +184,7 @@ func TestAndroid(t *testing.T) {
t.Logf("initialization took %v", time.Since(start)) t.Logf("initialization took %v", time.Since(start))
} }
// Create and switch to a temporary workspace // Create and switch to a temporary workspace
workspace, err := ioutil.TempDir("", "geth-android-") workspace, err := ioutil.TempDir("", "getf-android-")
if err != nil { if err != nil {
t.Fatalf("failed to create temporary workspace: %v", err) t.Fatalf("failed to create temporary workspace: %v", err)
} }
@ -212,7 +212,7 @@ func TestAndroid(t *testing.T) {
t.Logf("%s", output) t.Logf("%s", output)
t.Fatalf("failed to run gomobile bind: %v", err) t.Fatalf("failed to run gomobile bind: %v", err)
} }
build.CopyFile(filepath.Join("libs", "geth.aar"), "geth.aar", os.ModePerm) build.CopyFile(filepath.Join("libs", "getf.aar"), "getf.aar", os.ModePerm)
if err = ioutil.WriteFile(filepath.Join("src", "androidTest", "java", "org", "ethereum", "gethtest", "AndroidTest.java"), []byte(androidTestClass), os.ModePerm); err != nil { if err = ioutil.WriteFile(filepath.Join("src", "androidTest", "java", "org", "ethereum", "gethtest", "AndroidTest.java"), []byte(androidTestClass), os.ModePerm); err != nil {
t.Fatalf("failed to write Android test class: %v", err) t.Fatalf("failed to write Android test class: %v", err)
@ -261,6 +261,6 @@ repositories {
} }
dependencies { dependencies {
compile 'com.android.support:appcompat-v7:19.0.0' compile 'com.android.support:appcompat-v7:19.0.0'
compile(name: "geth", ext: "aar") compile(name: "getf", ext: "aar")
} }
` `

View file

@ -16,7 +16,7 @@
// Contains all the wrappers from the math/big package. // Contains all the wrappers from the math/big package.
package geth package getf
import ( import (
"errors" "errors"

View file

@ -16,7 +16,7 @@
// Contains all the wrappers from the bind package. // Contains all the wrappers from the bind package.
package geth package getf
import ( import (
"math/big" "math/big"

View file

@ -16,7 +16,7 @@
// Contains all the wrappers from the common package. // Contains all the wrappers from the common package.
package geth package getf
import ( import (
"encoding/hex" "encoding/hex"

View file

@ -17,7 +17,7 @@
// Contains all the wrappers from the golang.org/x/net/context package to support // Contains all the wrappers from the golang.org/x/net/context package to support
// client side context management on mobile platforms. // client side context management on mobile platforms.
package geth package getf
import ( import (
"context" "context"

View file

@ -17,7 +17,7 @@
// Contains all the wrappers from the accounts package to support client side enode // Contains all the wrappers from the accounts package to support client side enode
// management on mobile platforms. // management on mobile platforms.
package geth package getf
import ( import (
"errors" "errors"

View file

@ -14,7 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License // You should have received a copy of the GNU Lesser General Public License
// along with the go-etherfact library. If not, see <http://www.gnu.org/licenses/>. // along with the go-etherfact library. If not, see <http://www.gnu.org/licenses/>.
// Package geth contains the simplified mobile APIs to go-etherfact. // Package getf contains the simplified mobile APIs to go-etherfact.
// //
// The scope of this package is *not* to allow writing a custom Ethereum client // The scope of this package is *not* to allow writing a custom Ethereum client
// with pieces plucked from go-etherfact, rather to allow writing native dapps on // with pieces plucked from go-etherfact, rather to allow writing native dapps on
@ -58,4 +58,4 @@
// Note, a panic *cannot* cross over language boundaries, instead will result in // Note, a panic *cannot* cross over language boundaries, instead will result in
// an undebuggable SEGFAULT in the process. For error handling only ever use error // an undebuggable SEGFAULT in the process. For error handling only ever use error
// returns, which may be the only or the second return. // returns, which may be the only or the second return.
package geth package getf

View file

@ -16,7 +16,7 @@
// Contains a wrapper for the Ethereum client. // Contains a wrapper for the Ethereum client.
package geth package getf
import ( import (
"math/big" "math/big"

View file

@ -16,7 +16,7 @@
// Contains all the wrappers from the go-etherfact root package. // Contains all the wrappers from the go-etherfact root package.
package geth package getf
import ( import (
"errors" "errors"

View file

@ -17,7 +17,7 @@
// Contains all the wrappers from the node package to support client side node // Contains all the wrappers from the node package to support client side node
// management on mobile platforms. // management on mobile platforms.
package geth package getf
import ( import (
"encoding/json" "encoding/json"

View file

@ -16,7 +16,7 @@
// +build android // +build android
package geth package getf
// clientIdentifier is a hard coded identifier to report into the network. // clientIdentifier is a hard coded identifier to report into the network.
var clientIdentifier = "GethDroid" var clientIdentifier = "GethDroid"

View file

@ -16,7 +16,7 @@
// +build ios // +build ios
package geth package getf
// clientIdentifier is a hard coded identifier to report into the network. // clientIdentifier is a hard coded identifier to report into the network.
var clientIdentifier = "iGeth" var clientIdentifier = "iGeth"

View file

@ -16,7 +16,7 @@
// +build !android,!ios // +build !android,!ios
package geth package getf
// clientIdentifier is a hard coded identifier to report into the network. // clientIdentifier is a hard coded identifier to report into the network.
var clientIdentifier = "GethMobile" var clientIdentifier = "GethMobile"

View file

@ -16,7 +16,7 @@
// Contains initialization code for the mbile library. // Contains initialization code for the mbile library.
package geth package getf
import ( import (
"os" "os"

View file

@ -16,7 +16,7 @@
// Contains perverted wrappers to allow crossing over empty interfaces. // Contains perverted wrappers to allow crossing over empty interfaces.
package geth package getf
import ( import (
"errors" "errors"

View file

@ -14,7 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License // You should have received a copy of the GNU Lesser General Public License
// along with the go-etherfact library. If not, see <http://www.gnu.org/licenses/>. // along with the go-etherfact library. If not, see <http://www.gnu.org/licenses/>.
package geth package getf
import ( import (
"os" "os"

View file

@ -16,7 +16,7 @@
// Contains wrappers for the p2p package. // Contains wrappers for the p2p package.
package geth package getf
import ( import (
"errors" "errors"

View file

@ -16,7 +16,7 @@
// Contains all the wrappers from the params package. // Contains all the wrappers from the params package.
package geth package getf
import ( import (
"encoding/json" "encoding/json"

View file

@ -16,7 +16,7 @@
// Contains various wrappers for primitive types. // Contains various wrappers for primitive types.
package geth package getf
import ( import (
"errors" "errors"

View file

@ -16,7 +16,7 @@
// Contains all the wrappers from the core/types package. // Contains all the wrappers from the core/types package.
package geth package getf
import ( import (
"encoding/json" "encoding/json"

View file

@ -16,7 +16,7 @@
// Contains all the wrappers from the core/types package. // Contains all the wrappers from the core/types package.
package geth package getf
import ( import (
"errors" "errors"

View file

@ -48,7 +48,7 @@ const (
// all registered services. // all registered services.
type Config struct { type Config struct {
// Name sets the instance name of the node. It must not contain the / character and is // Name sets the instance name of the node. It must not contain the / character and is
// used in the devp2p node identifier. The instance name of geth is "geth". If no // used in the devp2p node identifier. The instance name of getf is "getf". If no
// value is specified, the basename of the current executable is used. // value is specified, the basename of the current executable is used.
Name string `toml:"-"` Name string `toml:"-"`
@ -228,7 +228,7 @@ func DefaultWSEndpoint() string {
func (c *Config) NodeName() string { func (c *Config) NodeName() string {
name := c.name() name := c.name()
// Backwards compatibility: previous versions used title-cased "Geth", keep that. // Backwards compatibility: previous versions used title-cased "Geth", keep that.
if name == "geth" || name == "geth-testnet" { if name == "getf" || name == "getf-testnet" {
name = "Geth" name = "Geth"
} }
if c.UserIdent != "" { if c.UserIdent != "" {
@ -253,7 +253,7 @@ func (c *Config) name() string {
return c.Name return c.Name
} }
// These resources are resolved differently for "geth" instances. // These resources are resolved differently for "getf" instances.
var isOldGethResource = map[string]bool{ var isOldGethResource = map[string]bool{
"chaindata": true, "chaindata": true,
"nodes": true, "nodes": true,
@ -271,10 +271,10 @@ func (c *Config) resolvePath(path string) string {
return "" return ""
} }
// Backwards-compatibility: ensure that data directory files created // Backwards-compatibility: ensure that data directory files created
// by geth 1.4 are used if they exist. // by getf 1.4 are used if they exist.
if c.name() == "geth" && isOldGethResource[path] { if c.name() == "getf" && isOldGethResource[path] {
oldpath := "" oldpath := ""
if c.Name == "geth" { if c.Name == "getf" {
oldpath = filepath.Join(c.DataDir, path) oldpath = filepath.Join(c.DataDir, path)
} }
if oldpath != "" && common.FileExist(oldpath) { if oldpath != "" && common.FileExist(oldpath) {

View file

@ -73,15 +73,15 @@ func TestIPCPathResolution(t *testing.T) {
}{ }{
{"", "", false, ""}, {"", "", false, ""},
{"data", "", false, ""}, {"data", "", false, ""},
{"", "geth.ipc", false, filepath.Join(os.TempDir(), "geth.ipc")}, {"", "getf.ipc", false, filepath.Join(os.TempDir(), "getf.ipc")},
{"data", "geth.ipc", false, "data/geth.ipc"}, {"data", "getf.ipc", false, "data/getf.ipc"},
{"data", "./geth.ipc", false, "./geth.ipc"}, {"data", "./getf.ipc", false, "./getf.ipc"},
{"data", "/geth.ipc", false, "/geth.ipc"}, {"data", "/getf.ipc", false, "/getf.ipc"},
{"", "", true, ``}, {"", "", true, ``},
{"data", "", true, ``}, {"data", "", true, ``},
{"", "geth.ipc", true, `\\.\pipe\geth.ipc`}, {"", "getf.ipc", true, `\\.\pipe\getf.ipc`},
{"data", "geth.ipc", true, `\\.\pipe\geth.ipc`}, {"data", "getf.ipc", true, `\\.\pipe\getf.ipc`},
{"data", `\\.\pipe\geth.ipc`, true, `\\.\pipe\geth.ipc`}, {"data", `\\.\pipe\getf.ipc`, true, `\\.\pipe\getf.ipc`},
} }
for i, test := range tests { for i, test := range tests {
// Only run when platform/test match // Only run when platform/test match

View file

@ -98,7 +98,7 @@ func New(conf *Config) (*Node, error) {
return nil, errors.New(`Config.Name cannot end in ".ipc"`) return nil, errors.New(`Config.Name cannot end in ".ipc"`)
} }
// Ensure that the AccountManager method works before the node has started. // Ensure that the AccountManager method works before the node has started.
// We rely on this in cmd/geth. // We rely on this in cmd/getf.
am, ephemeralKeystore, err := makeAccountManager(conf) am, ephemeralKeystore, err := makeAccountManager(conf)
if err != nil { if err != nil {
return nil, err return nil, err

View file

@ -33,7 +33,7 @@ var MainnetBootnodes = []string{
// TestnetBootnodes are the enode URLs of the P2P bootstrap nodes running on the // TestnetBootnodes are the enode URLs of the P2P bootstrap nodes running on the
// Ropsten test network. // Ropsten test network.
var TestnetBootnodes = []string{ var TestnetBootnodes = []string{
"enode://30b7ab30a01c124a6cceca36863ece12c4f5fa68e3ba9b0b51407ccc002eeed3b3102d20a88f1c1d3c3154e2449317b8ef95090e77b312d5cc39354f86d5d606@52.176.7.10:30303", // US-Azure geth "enode://30b7ab30a01c124a6cceca36863ece12c4f5fa68e3ba9b0b51407ccc002eeed3b3102d20a88f1c1d3c3154e2449317b8ef95090e77b312d5cc39354f86d5d606@52.176.7.10:30303", // US-Azure getf
"enode://865a63255b3bb68023b6bffd5095118fcc13e79dcf014fe4e47e065c350c7cc72af2e53eff895f11ba1bbb6a2b33271c1116ee870f266618eadfc2e78aa7349c@52.176.100.77:30303", // US-Azure parity "enode://865a63255b3bb68023b6bffd5095118fcc13e79dcf014fe4e47e065c350c7cc72af2e53eff895f11ba1bbb6a2b33271c1116ee870f266618eadfc2e78aa7349c@52.176.100.77:30303", // US-Azure parity
"enode://6332792c4a00e3e4ee0926ed89e0d27ef985424d97b6a45bf0f23e51f0dcb5e66b875777506458aea7af6f9e4ffb69f43f3778ee73c81ed9d34c51c4b16b0b0f@52.232.243.152:30303", // Parity "enode://6332792c4a00e3e4ee0926ed89e0d27ef985424d97b6a45bf0f23e51f0dcb5e66b875777506458aea7af6f9e4ffb69f43f3778ee73c81ed9d34c51c4b16b0b0f@52.232.243.152:30303", // Parity
"enode://94c15d1b9e2fe7ce56e458b9a3b672ef11894ddedd0c6f247e0f1d3487f52b66208fb4aeb8179fce6e3a749ea93ed147c37976d67af557508d199d9594c35f09@192.81.208.223:30303", // @gpip "enode://94c15d1b9e2fe7ce56e458b9a3b672ef11894ddedd0c6f247e0f1d3487f52b66208fb4aeb8179fce6e3a749ea93ed147c37976d67af557508d199d9594c35f09@192.81.208.223:30303", // @gpip

View file

@ -24,7 +24,7 @@ import (
) )
var ( var (
MainnetGenesisHash = common.HexToHash("sửa đổi sau khi hoàn thành!") // Mainnet genesis hash to enforce below configs on MainnetGenesisHash = common.HexToHash("0x3f9c0f661c8b2aab93eafda1c97daed0d418c87cd300292ebcc1f7e03df0d8f3") // Mainnet genesis hash to enforce below configs on
TestnetGenesisHash = common.HexToHash("0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d") // Testnet genesis hash to enforce below configs on TestnetGenesisHash = common.HexToHash("0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d") // Testnet genesis hash to enforce below configs on
) )
@ -36,9 +36,9 @@ var (
DAOForkBlock: nil, DAOForkBlock: nil,
DAOForkSupport: true, DAOForkSupport: true,
EIP150Block: big.NewInt(0), EIP150Block: big.NewInt(0),
EIP150Hash: common.HexToHash("sửa đổi sau khi hoàn thành!"), EIP150Hash: common.HexToHash("0x3f9c0f661c8b2aab93eafda1c97daed0d418c87cd300292ebcc1f7e03df0d8f3"),
EIP155Block: big.NewInt(100), EIP155Block: big.NewInt(0),
EIP158Block: big.NewInt(100), EIP158Block: big.NewInt(0),
ByzantiumBlock: big.NewInt(1000000), ByzantiumBlock: big.NewInt(1000000),
ConstantinopleBlock: nil, ConstantinopleBlock: nil,
Ethash: new(EthashConfig), Ethash: new(EthashConfig),
@ -52,8 +52,8 @@ var (
DAOForkSupport: true, DAOForkSupport: true,
EIP150Block: big.NewInt(0), EIP150Block: big.NewInt(0),
EIP150Hash: common.HexToHash("0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d"), EIP150Hash: common.HexToHash("0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d"),
EIP155Block: big.NewInt(10), EIP155Block: big.NewInt(0),
EIP158Block: big.NewInt(10), EIP158Block: big.NewInt(0),
ByzantiumBlock: big.NewInt(1700000), ByzantiumBlock: big.NewInt(1700000),
ConstantinopleBlock: nil, ConstantinopleBlock: nil,
Ethash: new(EthashConfig), Ethash: new(EthashConfig),

View file

@ -32,8 +32,8 @@ func TestParseEnsAPIAddress(t *testing.T) {
}{ }{
{ {
description: "IPC endpoint", description: "IPC endpoint",
value: "/data/testnet/geth.ipc", value: "/data/testnet/getf.ipc",
endpoint: "/data/testnet/geth.ipc", endpoint: "/data/testnet/getf.ipc",
}, },
{ {
description: "HTTP endpoint", description: "HTTP endpoint",
@ -47,8 +47,8 @@ func TestParseEnsAPIAddress(t *testing.T) {
}, },
{ {
description: "IPC Endpoint and TLD", description: "IPC Endpoint and TLD",
value: "test:/data/testnet/geth.ipc", value: "test:/data/testnet/getf.ipc",
endpoint: "/data/testnet/geth.ipc", endpoint: "/data/testnet/getf.ipc",
tld: "test", tld: "test",
}, },
{ {
@ -65,8 +65,8 @@ func TestParseEnsAPIAddress(t *testing.T) {
}, },
{ {
description: "IPC Endpoint and contract address", description: "IPC Endpoint and contract address",
value: "314159265dD8dbb310642f98f50C066173C1259b@/data/testnet/geth.ipc", value: "314159265dD8dbb310642f98f50C066173C1259b@/data/testnet/getf.ipc",
endpoint: "/data/testnet/geth.ipc", endpoint: "/data/testnet/getf.ipc",
addr: common.HexToAddress("314159265dD8dbb310642f98f50C066173C1259b"), addr: common.HexToAddress("314159265dD8dbb310642f98f50C066173C1259b"),
}, },
{ {
@ -83,8 +83,8 @@ func TestParseEnsAPIAddress(t *testing.T) {
}, },
{ {
description: "IPC Endpoint, TLD and contract address", description: "IPC Endpoint, TLD and contract address",
value: "test:314159265dD8dbb310642f98f50C066173C1259b@/data/testnet/geth.ipc", value: "test:314159265dD8dbb310642f98f50C066173C1259b@/data/testnet/getf.ipc",
endpoint: "/data/testnet/geth.ipc", endpoint: "/data/testnet/getf.ipc",
addr: common.HexToAddress("314159265dD8dbb310642f98f50C066173C1259b"), addr: common.HexToAddress("314159265dD8dbb310642f98f50C066173C1259b"),
tld: "test", tld: "test",
}, },

View file

@ -41,7 +41,7 @@ import (
const ( const (
ProtocolVersion = uint64(6) // Protocol version number ProtocolVersion = uint64(6) // Protocol version number
ProtocolVersionStr = "6.0" // The same, as a string ProtocolVersionStr = "6.0" // The same, as a string
ProtocolName = "shh" // Nickname of the protocol in geth ProtocolName = "shh" // Nickname of the protocol in getf
// whisper protocol message codes, according to EIP-627 // whisper protocol message codes, according to EIP-627
statusCode = 0 // used by whisper protocol statusCode = 0 // used by whisper protocol