From a32c51effda8682b292d04863aae7811f78abf7e Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Fri, 10 Jul 2015 14:29:40 +0200 Subject: cmd, core, eth, common: genesis preparation Implemented the --genesis flag thru which we can set a custom genesis block, including the official Ethereum genesis block. --- common/natspec/natspec_e2e_test.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'common/natspec') diff --git a/common/natspec/natspec_e2e_test.go b/common/natspec/natspec_e2e_test.go index 0cbe040c0..395cef3c7 100644 --- a/common/natspec/natspec_e2e_test.go +++ b/common/natspec/natspec_e2e_test.go @@ -33,6 +33,7 @@ import ( "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/eth" + "github.com/ethereum/go-ethereum/ethdb" xe "github.com/ethereum/go-ethereum/xeth" ) @@ -128,12 +129,12 @@ func testEth(t *testing.T) (ethereum *eth.Ethereum, err error) { if err != nil { panic(err) } + testAddress := strings.TrimPrefix(testAccount.Address.Hex(), "0x") + db, _ := ethdb.NewMemDatabase() // set up mock genesis with balance on the testAddress - core.GenesisAccounts = []byte(`{ - "` + testAddress + `": {"balance": "` + testBalance + `"} - }`) + core.WriteGenesisBlockForTesting(db, common.HexToAddress(testAddress), common.String2Big(testBalance)) // only use minimalistic stack with no networking ethereum, err = eth.New(ð.Config{ @@ -142,6 +143,7 @@ func testEth(t *testing.T) (ethereum *eth.Ethereum, err error) { MaxPeers: 0, PowTest: true, Etherbase: common.HexToAddress(testAddress), + NewDB: func(path string) (common.Database, error) { return db, nil }, }) if err != nil { -- cgit v1.2.3 From 3f047be5aa93b6222506445414ca909dd59c7eeb Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Wed, 22 Jul 2015 18:48:40 +0200 Subject: all: update license headers to distiguish GPL/LGPL All code outside of cmd/ is licensed as LGPL. The headers now reflect this by calling the whole work "the go-ethereum library". --- common/natspec/natspec.go | 8 ++++---- common/natspec/natspec_e2e_test.go | 8 ++++---- common/natspec/natspec_js.go | 8 ++++---- common/natspec/natspec_test.go | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) (limited to 'common/natspec') diff --git a/common/natspec/natspec.go b/common/natspec/natspec.go index ed16d62a0..e68f50f54 100644 --- a/common/natspec/natspec.go +++ b/common/natspec/natspec.go @@ -1,18 +1,18 @@ // Copyright 2015 The go-ethereum Authors -// This file is part of go-ethereum. +// This file is part of the go-ethereum library. // // go-ethereum is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// The go-ethereum library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with go-ethereum. If not, see . +// along with the go-ethereum library. If not, see . package natspec diff --git a/common/natspec/natspec_e2e_test.go b/common/natspec/natspec_e2e_test.go index 395cef3c7..d55c3fff7 100644 --- a/common/natspec/natspec_e2e_test.go +++ b/common/natspec/natspec_e2e_test.go @@ -1,18 +1,18 @@ // Copyright 2015 The go-ethereum Authors -// This file is part of go-ethereum. +// This file is part of the go-ethereum library. // // go-ethereum is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// The go-ethereum library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with go-ethereum. If not, see . +// along with the go-ethereum library. If not, see . package natspec diff --git a/common/natspec/natspec_js.go b/common/natspec/natspec_js.go index ce41e72c4..9db3050ec 100644 --- a/common/natspec/natspec_js.go +++ b/common/natspec/natspec_js.go @@ -1,18 +1,18 @@ // Copyright 2015 The go-ethereum Authors -// This file is part of go-ethereum. +// This file is part of the go-ethereum library. // // go-ethereum is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// The go-ethereum library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with go-ethereum. If not, see . +// along with the go-ethereum library. If not, see . package natspec diff --git a/common/natspec/natspec_test.go b/common/natspec/natspec_test.go index 654e3a62d..726b3ef67 100644 --- a/common/natspec/natspec_test.go +++ b/common/natspec/natspec_test.go @@ -1,18 +1,18 @@ // Copyright 2015 The go-ethereum Authors -// This file is part of go-ethereum. +// This file is part of the go-ethereum library. // // go-ethereum is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // -// go-ethereum is distributed in the hope that it will be useful, +// The go-ethereum library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License -// along with go-ethereum. If not, see . +// along with the go-ethereum library. If not, see . package natspec -- cgit v1.2.3 From bfbcfbe4a9dd9125391b56d6a13158cc5ec71c89 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Thu, 23 Jul 2015 18:35:11 +0200 Subject: all: fix license headers one more time I forgot to update one instance of "go-ethereum" in commit 3f047be5a. --- common/natspec/natspec.go | 2 +- common/natspec/natspec_e2e_test.go | 2 +- common/natspec/natspec_js.go | 2 +- common/natspec/natspec_test.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'common/natspec') diff --git a/common/natspec/natspec.go b/common/natspec/natspec.go index e68f50f54..0265c2e13 100644 --- a/common/natspec/natspec.go +++ b/common/natspec/natspec.go @@ -1,7 +1,7 @@ // Copyright 2015 The go-ethereum Authors // This file is part of the go-ethereum library. // -// go-ethereum is free software: you can redistribute it and/or modify +// The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. diff --git a/common/natspec/natspec_e2e_test.go b/common/natspec/natspec_e2e_test.go index d55c3fff7..fc8ca6af2 100644 --- a/common/natspec/natspec_e2e_test.go +++ b/common/natspec/natspec_e2e_test.go @@ -1,7 +1,7 @@ // Copyright 2015 The go-ethereum Authors // This file is part of the go-ethereum library. // -// go-ethereum is free software: you can redistribute it and/or modify +// The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. diff --git a/common/natspec/natspec_js.go b/common/natspec/natspec_js.go index 9db3050ec..2b30d31d3 100644 --- a/common/natspec/natspec_js.go +++ b/common/natspec/natspec_js.go @@ -1,7 +1,7 @@ // Copyright 2015 The go-ethereum Authors // This file is part of the go-ethereum library. // -// go-ethereum is free software: you can redistribute it and/or modify +// The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. diff --git a/common/natspec/natspec_test.go b/common/natspec/natspec_test.go index 726b3ef67..9ec14829a 100644 --- a/common/natspec/natspec_test.go +++ b/common/natspec/natspec_test.go @@ -1,7 +1,7 @@ // Copyright 2015 The go-ethereum Authors // This file is part of the go-ethereum library. // -// go-ethereum is free software: you can redistribute it and/or modify +// The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -- cgit v1.2.3