From 6d6a5a93370371a33fb815d7ae47b60c7021c86a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Tue, 24 Oct 2017 13:40:42 +0300 Subject: cmd, consensus, core, miner: instatx clique for --dev (#15323) * cmd, consensus, core, miner: instatx clique for --dev * cmd, consensus, clique: support configurable --dev block times * cmd, core: allow --dev to use persistent storage too --- console/console_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'console/console_test.go') diff --git a/console/console_test.go b/console/console_test.go index 8ac499bd1..a159b62bb 100644 --- a/console/console_test.go +++ b/console/console_test.go @@ -94,7 +94,7 @@ func newTester(t *testing.T, confOverride func(*eth.Config)) *tester { t.Fatalf("failed to create node: %v", err) } ethConf := ð.Config{ - Genesis: core.DevGenesisBlock(), + Genesis: core.DeveloperGenesisBlock(15, common.Address{}), Etherbase: common.HexToAddress(testAddress), PowTest: true, } -- cgit v1.2.3 From f14047dae57aa69e4fa08d57e19ee9c0283dfa54 Mon Sep 17 00:00:00 2001 From: gary rong Date: Fri, 24 Nov 2017 22:10:27 +0800 Subject: cmd, consensus, eth: split ethash related config to it own (#15520) * cmd, consensus, eth: split ethash related config to it own * eth, consensus: minor polish * eth, consenus, console: compress pow testing config field to single one * consensus, eth: document pow mode --- console/console_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'console/console_test.go') diff --git a/console/console_test.go b/console/console_test.go index a159b62bb..d29680785 100644 --- a/console/console_test.go +++ b/console/console_test.go @@ -27,6 +27,7 @@ import ( "time" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/consensus/ethash" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/internal/jsre" @@ -96,7 +97,9 @@ func newTester(t *testing.T, confOverride func(*eth.Config)) *tester { ethConf := ð.Config{ Genesis: core.DeveloperGenesisBlock(15, common.Address{}), Etherbase: common.HexToAddress(testAddress), - PowTest: true, + Ethash: ethash.Config{ + PowMode: ethash.ModeTest, + }, } if confOverride != nil { confOverride(ethConf) -- cgit v1.2.3 From 586198cceaf51435121b7e1166adf21910fee51a Mon Sep 17 00:00:00 2001 From: Sorin Neacsu Date: Fri, 8 Dec 2017 06:14:14 -0800 Subject: console: add admin.clearHistory command (#15614) --- console/console_test.go | 1 + 1 file changed, 1 insertion(+) (limited to 'console/console_test.go') diff --git a/console/console_test.go b/console/console_test.go index d29680785..05aec2cc0 100644 --- a/console/console_test.go +++ b/console/console_test.go @@ -68,6 +68,7 @@ func (p *hookedPrompter) PromptConfirm(prompt string) (bool, error) { } func (p *hookedPrompter) SetHistory(history []string) {} func (p *hookedPrompter) AppendHistory(command string) {} +func (p *hookedPrompter) ClearHistory() {} func (p *hookedPrompter) SetWordCompleter(completer WordCompleter) {} // tester is a console test environment for the console tests to operate on. -- cgit v1.2.3 From 3da1bf8ca18f54d9bd2c8c110854dc071ee3898b Mon Sep 17 00:00:00 2001 From: Zach Date: Tue, 12 Dec 2017 18:05:47 +0000 Subject: all: use gometalinter.v2, fix new gosimple issues (#15650) --- console/console_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'console/console_test.go') diff --git a/console/console_test.go b/console/console_test.go index 05aec2cc0..7b1629c03 100644 --- a/console/console_test.go +++ b/console/console_test.go @@ -164,7 +164,7 @@ func TestWelcome(t *testing.T) { tester.console.Welcome() - output := string(tester.output.Bytes()) + output := tester.output.String() if want := "Welcome"; !strings.Contains(output, want) { t.Fatalf("console output missing welcome message: have\n%s\nwant also %s", output, want) } @@ -188,7 +188,7 @@ func TestEvaluate(t *testing.T) { defer tester.Close(t) tester.console.Evaluate("2 + 2") - if output := string(tester.output.Bytes()); !strings.Contains(output, "4") { + if output := tester.output.String(); !strings.Contains(output, "4") { t.Fatalf("statement evaluation failed: have %s, want %s", output, "4") } } @@ -218,7 +218,7 @@ func TestInteractive(t *testing.T) { case <-time.After(time.Second): t.Fatalf("secondary prompt timeout") } - if output := string(tester.output.Bytes()); !strings.Contains(output, "4") { + if output := tester.output.String(); !strings.Contains(output, "4") { t.Fatalf("statement evaluation failed: have %s, want %s", output, "4") } } @@ -230,7 +230,7 @@ func TestPreload(t *testing.T) { defer tester.Close(t) tester.console.Evaluate("preloaded") - if output := string(tester.output.Bytes()); !strings.Contains(output, "some-preloaded-string") { + if output := tester.output.String(); !strings.Contains(output, "some-preloaded-string") { t.Fatalf("preloaded variable missing: have %s, want %s", output, "some-preloaded-string") } } @@ -243,7 +243,7 @@ func TestExecute(t *testing.T) { tester.console.Execute("exec.js") tester.console.Evaluate("execed") - if output := string(tester.output.Bytes()); !strings.Contains(output, "some-executed-string") { + if output := tester.output.String(); !strings.Contains(output, "some-executed-string") { t.Fatalf("execed variable missing: have %s, want %s", output, "some-executed-string") } } @@ -275,7 +275,7 @@ func TestPrettyPrint(t *testing.T) { string: ` + two + ` } ` - if output := string(tester.output.Bytes()); output != want { + if output := tester.output.String(); output != want { t.Fatalf("pretty print mismatch: have %s, want %s", output, want) } } @@ -287,7 +287,7 @@ func TestPrettyError(t *testing.T) { tester.console.Evaluate("throw 'hello'") want := jsre.ErrorColor("hello") + "\n" - if output := string(tester.output.Bytes()); output != want { + if output := tester.output.String(); output != want { t.Fatalf("pretty error mismatch: have %s, want %s", output, want) } } -- cgit v1.2.3