Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream merge up to 1.9.19 #1615

Merged
merged 104 commits into from
Jul 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
8e7bee9
params: begin v1.9.19 release cycle
karalabe Jul 27, 2020
79ce553
signer/storage: fix a badly ordered error check (#21379)
6543 Jul 28, 2020
93da0cf
cmd, core, eth, light, trie: dump clean cache periodically (#20391)
rjl493456442 Jul 28, 2020
c47052a
core: sort txs at the same gas price by received time
hendrikhofstadt Jul 22, 2020
298a19b
core: API-less transaction time sorting
karalabe Jul 28, 2020
28c5a8a
les: implement new les fetcher (#20692)
rjl493456442 Jul 28, 2020
37564ce
miner: refactor helper functions in worker.go (#21044)
robert-zaremba Jul 28, 2020
350a049
les: fix unittest (#21382)
rjl493456442 Jul 29, 2020
1976bb3
eth/downloader: remove eth62 (#21378)
renaynay Jul 29, 2020
abf2d7d
build: use -trimpath flag when building executables (#21374)
jyap808 Jul 29, 2020
9e04c5e
core/bloombits: use single channel for shutdown (#20878)
ucwong Jul 29, 2020
ff90894
core/rawdb: convert some comments to godoc convention (#21384)
meowsbits Jul 29, 2020
a00dc50
Merge pull request #21358 from hendrikhofstadt/fix/tx-sort-time
karalabe Jul 30, 2020
9c2ac6f
rpc: remove silly use of ReadVarint in subscription ID generator (#21…
fjl Jul 31, 2020
290d6bd
rpc: add SetHeader method to Client (#21392)
renaynay Aug 3, 2020
b2b14e6
signer/core: EIP-712 encoded data should not reject a Domain without …
natsukagami Aug 3, 2020
c0c0161
node: refactor package node (#21105)
renaynay Aug 3, 2020
90dedea
signer: EIP 712, parse `bytes` and `bytesX` as hex strings + correct …
natsukagami Aug 3, 2020
e24e05d
cmd/devp2p: print enode:// URL in enrdump (#21270)
adamschmideg Aug 4, 2020
b35e4fc
core: avoid modification of accountSet cache in tx_pool (#21159)
duanhao0814 Aug 4, 2020
82a9e11
ethstats: avoid concurrent write on websocket (#21404)
holiman Aug 4, 2020
8ead45c
core/vm: avoid map lookups for accessing jumpdest analysis
holiman Aug 4, 2020
1d25039
p2p/nat: limit UPNP request concurrency (#21390)
fjl Aug 5, 2020
5a88a7c
core: use errors.Is for consensus errors check (#21095)
robert-zaremba Aug 5, 2020
2de37f2
downloader: add eth65 tests (#21383)
renaynay Aug 5, 2020
4a04127
cmd/geth: fix import / export issues related to DB unavailability (#2…
renaynay Aug 6, 2020
4fde0ca
Merge pull request #21411 from holiman/fix_codelookup
karalabe Aug 6, 2020
d21303f
cmd/geth: fixes db unavailability for chain commands (#21415)
renaynay Aug 6, 2020
5d4512b
eth: use maxQueuedTxAnns for to limit the number of transactions anno…
timcooijmans Aug 6, 2020
68754f3
cmd/utils: grant snapshot cache to trie if disabled (#21416)
karalabe Aug 6, 2020
983cb25
les: update checktime even if check fails
holiman Aug 7, 2020
3bb8a4e
Merge pull request #21425 from holiman/leslock
karalabe Aug 7, 2020
4b9c0ea
eth/downloader: save the correct delivery time for state sync
karalabe Aug 7, 2020
8f24097
Merge pull request #21427 from karalabe/fix-statesync-delivery-time
karalabe Aug 7, 2020
6a53ce2
ethstats: overwrite old errors
holiman Aug 7, 2020
e401f5f
les: close all connected les-server when shutdown (#21426)
rjl493456442 Aug 7, 2020
9fea1a5
eth/downloader: set deliverytime on drops and timeouts too
holiman Aug 7, 2020
06125bf
Merge pull request #21429 from holiman/timerfix
karalabe Aug 7, 2020
48b484c
Merge pull request #21428 from holiman/ethstats_moar
karalabe Aug 7, 2020
7cee250
eth/downloader: allow all timers to exit
holiman Aug 10, 2020
cbbc54c
Merge pull request #21433 from holiman/statsync_exiter
karalabe Aug 10, 2020
9f45d6e
ethstats: split read and write lock, otherwise they'll lock up
karalabe Aug 10, 2020
4baa574
Merge pull request #21434 from karalabe/ethstats-split-rwlock
karalabe Aug 10, 2020
c28fd9c
tests: add Berlin-definition identical to YOLOv1 (#21435)
holiman Aug 10, 2020
7afdf79
params: update CHTs for v1.9.19
karalabe Aug 11, 2020
74925e5
Merge pull request #21437 from karalabe/cht-1.9.19
karalabe Aug 11, 2020
3e06419
params: release Geth v1.9.19
karalabe Aug 11, 2020
342881d
Merge commit '8e7bee9' into gastonponti/merge-upstream-1.9.19
gastonponti Jun 15, 2021
0473f4f
Merge commit '79ce553' into gastonponti/merge-upstream-1.9.19
gastonponti Jun 15, 2021
652e71e
Merge commit '93da0cf' into gastonponti/merge-upstream-1.9.19
gastonponti Jun 15, 2021
e298632
Merge commit 'c47052a' into gastonponti/merge-upstream-1.9.19
gastonponti Jun 15, 2021
0b94699
Merge branch 'gastonponti/merge-upstream-1.9.18' into gastonponti/mer…
gastonponti Jun 17, 2021
3463a24
Merge commit '298a19b' into gastonponti/merge-upstream-1.9.19
gastonponti Jun 17, 2021
79eaeec
Merge commit '28c5a8a' into gastonponti/merge-upstream-1.9.19
gastonponti Jun 18, 2021
f0bb31a
MockProtocol with non full chains
gastonponti Jun 25, 2021
8590e5b
Merge commit '37564ce' into gastonponti/merge-upstream-1.9.19
gastonponti Jun 29, 2021
2a99850
Merge commit '350a049' into gastonponti/merge-upstream-1.9.19
gastonponti Jun 29, 2021
36bc0ee
Merge commit '1976bb3' into gastonponti/merge-upstream-1.9.19
gastonponti Jun 29, 2021
8ae7fbd
Merge commit 'abf2d7d' into gastonponti/merge-upstream-1.9.19
gastonponti Jun 29, 2021
af8b220
Merge commit '9e04c5e' into gastonponti/merge-upstream-1.9.19
gastonponti Jun 29, 2021
4a7eade
Merge commit 'ff90894' into gastonponti/merge-upstream-1.9.19
gastonponti Jun 29, 2021
204dd91
Merge commit 'a00dc50' into gastonponti/merge-upstream-1.9.19
gastonponti Jun 29, 2021
1de5f07
Merge commit '9c2ac6f' into gastonponti/merge-upstream-1.9.19
gastonponti Jun 29, 2021
0f3e35b
Merge commit '290d6bd' into gastonponti/merge-upstream-1.9.19
gastonponti Jun 29, 2021
a13fd34
Merge commit 'b2b14e6' into gastonponti/merge-upstream-1.9.19
gastonponti Jun 29, 2021
ce0f63c
Merge commit 'c0c0161' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 2, 2021
73a8e65
Merge commit '90dedea' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 2, 2021
37f622f
Merge commit 'e24e05d' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 2, 2021
8d01dbf
Merge commit 'b35e4fc' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 2, 2021
ab7b466
Merge commit '82a9e11' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 2, 2021
50d49a5
Merge commit '8ead45c' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 2, 2021
3c34b17
Merge commit '1d25039' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 2, 2021
8fe7a44
Merge commit '5a88a7c' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 2, 2021
e589b10
Merge commit '2de37f2' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 5, 2021
555ed7a
Fix comit '1976bb3' to addapt eth versions to celo ones (+1)
gastonponti Jul 5, 2021
3642c2e
Merge commit '4a04127' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 5, 2021
baad770
Merge commit '4fde0ca' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 5, 2021
5cee54b
Merge commit 'd21303f' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 5, 2021
1f89691
Merge commit '5d4512b' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 5, 2021
e4f346c
Merge commit '68754f3' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 5, 2021
e1cfdf7
Merge commit '983cb25' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 5, 2021
3e2e759
Merge commit '3bb8a4e' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 5, 2021
80beaa3
Merge commit '4b9c0ea' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 5, 2021
616ecdc
Merge commit '8f24097' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 5, 2021
a021a43
Merge commit '6a53ce2' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 5, 2021
76bf2c2
Merge commit 'e401f5f' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 5, 2021
dce0834
Merge commit '9fea1a5' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 5, 2021
c90dcfe
Merge commit '06125bf' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 5, 2021
e4fc6e2
Merge commit '48b484c' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 5, 2021
f67c957
Merge commit '7cee250' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 5, 2021
121d308
Merge commit 'cbbc54c' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 5, 2021
39d0192
Merge commit '9f45d6e' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 5, 2021
09defc9
Merge commit '4baa574' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 5, 2021
de18fa8
Merge commit 'c28fd9c' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 5, 2021
81e8047
Merge commit '7afdf79' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 5, 2021
7941873
Merge commit '74925e5' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 5, 2021
ef1e97f
Merge commit '3e06419' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 5, 2021
469f64e
Fix lint, utils_test
gastonponti Jul 5, 2021
445cf82
Merge branch 'master' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 5, 2021
de0925d
Fix master test from node refactor
gastonponti Jul 6, 2021
a2e75b7
Merge branch 'master' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 6, 2021
19ed236
Update gitignore for graphql test files
gastonponti Jul 6, 2021
fca55eb
Fix les server handler for registered peers
gastonponti Jul 12, 2021
290c14d
Merge branch 'master' into gastonponti/merge-upstream-1.9.19
gastonponti Jul 12, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ target

# created when running tests
/miner/validatorenodes/
/graphql/roundstates/
/graphql/validatorenodes/
/graphql/versioncertificates/

#*
.#*
Expand Down
6 changes: 4 additions & 2 deletions build/ci.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@ func doInstall(cmdline []string) {
var minor int
fmt.Sscanf(strings.TrimPrefix(runtime.Version(), "go1."), "%d", &minor)

if minor < 11 {
if minor < 13 {
log.Println("You have Go version", runtime.Version())
log.Println("go-ethereum requires at least Go version 1.11 and cannot")
log.Println("go-ethereum requires at least Go version 1.13 and cannot")
log.Println("be compiled with an earlier version. Please upgrade your Go installation.")
os.Exit(1)
}
Expand All @@ -238,6 +238,7 @@ func doInstall(cmdline []string) {
if runtime.GOARCH == "arm64" {
goinstall.Args = append(goinstall.Args, "-p", "1")
}
goinstall.Args = append(goinstall.Args, "-trimpath")
goinstall.Args = append(goinstall.Args, "-v")
goinstall.Args = append(goinstall.Args, packages...)
build.MustRun(goinstall)
Expand All @@ -246,6 +247,7 @@ func doInstall(cmdline []string) {

// Seems we are cross compiling, work around forbidden GOBIN
goinstall := goToolArch(*arch, *cc, "install", buildFlags(env)...)
goinstall.Args = append(goinstall.Args, "-trimpath")
goinstall.Args = append(goinstall.Args, "-v")
goinstall.Args = append(goinstall.Args, []string{"-buildmode", "archive"}...)
goinstall.Args = append(goinstall.Args, packages...)
Expand Down
2 changes: 1 addition & 1 deletion cmd/clef/docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ with minimal requirements.
On the `client` qube, we need to create a listener which will receive the request from the Dapp, and proxy it.


[qubes-client.py](qubes/client/qubes-client.py):
[qubes-client.py](qubes/qubes-client.py):

```python

Expand Down
19 changes: 14 additions & 5 deletions cmd/devp2p/enrcmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"encoding/base64"
"encoding/hex"
"fmt"
"io"
"io/ioutil"
"net"
"os"
Expand Down Expand Up @@ -69,22 +70,30 @@ func enrdump(ctx *cli.Context) error {
if err != nil {
return fmt.Errorf("INVALID: %v", err)
}
fmt.Print(dumpRecord(r))
dumpRecord(os.Stdout, r)
return nil
}

// dumpRecord creates a human-readable description of the given node record.
func dumpRecord(r *enr.Record) string {
out := new(bytes.Buffer)
if n, err := enode.New(enode.ValidSchemes, r); err != nil {
func dumpRecord(out io.Writer, r *enr.Record) {
n, err := enode.New(enode.ValidSchemes, r)
if err != nil {
fmt.Fprintf(out, "INVALID: %v\n", err)
} else {
fmt.Fprintf(out, "Node ID: %v\n", n.ID())
dumpNodeURL(out, n)
}
kv := r.AppendElements(nil)[1:]
fmt.Fprintf(out, "Record has sequence number %d and %d key/value pairs.\n", r.Seq(), len(kv)/2)
fmt.Fprint(out, dumpRecordKV(kv, 2))
return out.String()
}

func dumpNodeURL(out io.Writer, n *enode.Node) {
var key enode.Secp256k1
if n.Load(&key) != nil {
return // no secp256k1 public key
}
fmt.Fprintf(out, "URLv4: %s\n", n.URLv4())
}

func dumpRecordKV(kv []interface{}, indent int) string {
Expand Down
25 changes: 11 additions & 14 deletions cmd/faucet/faucet.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,23 +235,20 @@ func newFaucet(genesis *core.Genesis, port int, enodes []*discv5.Node, network u
if err != nil {
return nil, err
}

// Assemble the Ethereum light client protocol
if err := stack.Register(func(ctx *node.ServiceContext) (node.Service, error) {
cfg := eth.DefaultConfig
cfg.SyncMode = downloader.LightSync
cfg.NetworkId = network
cfg.Genesis = genesis
return les.New(ctx, &cfg)
}); err != nil {
return nil, err
cfg := eth.DefaultConfig
cfg.SyncMode = downloader.LightSync
cfg.NetworkId = network
cfg.Genesis = genesis
lesBackend, err := les.New(stack, &cfg)
if err != nil {
return nil, fmt.Errorf("Failed to register the Ethereum service: %w", err)
}

// Assemble the ethstats monitoring and reporting service'
if stats != "" {
if err := stack.Register(func(ctx *node.ServiceContext) (node.Service, error) {
var serv *les.LightEthereum
ctx.Service(&serv)
return ethstats.New(stats, nil, serv)
}); err != nil {
if err := ethstats.New(stack, lesBackend.ApiBackend, lesBackend.Engine(), stats); err != nil {
return nil, err
}
}
Expand All @@ -268,7 +265,7 @@ func newFaucet(genesis *core.Genesis, port int, enodes []*discv5.Node, network u
// Attach to the client and retrieve and interesting metadatas
api, err := stack.Attach()
if err != nil {
stack.Stop()
stack.Close()
return nil, err
}
client := ethclient.NewClient(api)
Expand Down
2 changes: 1 addition & 1 deletion cmd/faucet/faucet.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h1 style="text-align: center;"><i class="fa fa-bath" aria-hidden="true"></i> {{
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
<div class="input-group">
<input id="url" name="url" type="text" class="form-control" placeholder="Social network URL containing your Ethereum address...">
<input id="url" name="url" type="text" class="form-control" placeholder="Social network URL containing your Ethereum address..."/>
<span class="input-group-btn">
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Give me Ether <i class="fa fa-caret-down" aria-hidden="true"></i></button>
<ul class="dropdown-menu dropdown-menu-right">{{range $idx, $amount := .Amounts}}
Expand Down
20 changes: 12 additions & 8 deletions cmd/geth/chaincmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ func initGenesis(ctx *cli.Context) error {
if err := json.NewDecoder(file).Decode(genesis); err != nil {
utils.Fatalf("invalid genesis file: %v", err)
}
// Open an initialise both full and light databases
stack := makeFullNode(ctx)
// Open and initialise both full and light databases
stack, _ := makeConfigNode(ctx)
defer stack.Close()

for _, name := range []string{"chaindata", "lightchaindata", "lightestchaindata"} {
Expand Down Expand Up @@ -283,7 +283,8 @@ func importChain(ctx *cli.Context) error {
utils.SetupMetrics(ctx)
// Start system runtime metrics collection
go metrics.CollectProcessMetrics(3 * time.Second)
stack := makeFullNode(ctx)

stack, _ := makeConfigNode(ctx)
defer stack.Close()

chain, db := utils.MakeChain(ctx, stack, false)
Expand Down Expand Up @@ -369,7 +370,8 @@ func exportChain(ctx *cli.Context) error {
if len(ctx.Args()) < 1 {
utils.Fatalf("This command requires an argument.")
}
stack := makeFullNode(ctx)

stack, _ := makeConfigNode(ctx)
defer stack.Close()

chain, _ := utils.MakeChain(ctx, stack, true)
Expand Down Expand Up @@ -404,7 +406,8 @@ func importPreimages(ctx *cli.Context) error {
if len(ctx.Args()) < 1 {
utils.Fatalf("This command requires an argument.")
}
stack := makeFullNode(ctx)

stack, _ := makeConfigNode(ctx)
defer stack.Close()

db := utils.MakeChainDatabase(ctx, stack)
Expand All @@ -422,7 +425,8 @@ func exportPreimages(ctx *cli.Context) error {
if len(ctx.Args()) < 1 {
utils.Fatalf("This command requires an argument.")
}
stack := makeFullNode(ctx)

stack, _ := makeConfigNode(ctx)
defer stack.Close()

db := utils.MakeChainDatabase(ctx, stack)
Expand All @@ -444,7 +448,7 @@ func copyDb(ctx *cli.Context) error {
utils.Fatalf("Source ancient chain directory path argument missing")
}
// Initialize a new chain for the running node to sync into
stack := makeFullNode(ctx)
stack, _ := makeConfigNode(ctx)
defer stack.Close()

chain, chainDb := utils.MakeChain(ctx, stack, false)
Expand Down Expand Up @@ -552,7 +556,7 @@ func confirmAndRemoveDB(database string, kind string) {
}

func dump(ctx *cli.Context) error {
stack := makeFullNode(ctx)
stack, _ := makeConfigNode(ctx)
defer stack.Close()

chain, chainDb := utils.MakeChain(ctx, stack, true)
Expand Down
13 changes: 8 additions & 5 deletions cmd/geth/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (

"github.com/celo-org/celo-blockchain/cmd/utils"
"github.com/celo-org/celo-blockchain/eth"
"github.com/celo-org/celo-blockchain/internal/ethapi"
"github.com/celo-org/celo-blockchain/log"
"github.com/celo-org/celo-blockchain/node"
"github.com/celo-org/celo-blockchain/params"
Expand Down Expand Up @@ -105,6 +106,7 @@ func defaultNodeConfig() node.Config {
return cfg
}

// makeConfigNode loads geth configuration and creates a blank node instance.
func makeConfigNode(ctx *cli.Context) (*node.Node, gethConfig) {
// Load defaults.
cfg := gethConfig{
Expand Down Expand Up @@ -149,15 +151,16 @@ func enableWhisper(ctx *cli.Context) bool {
return false
}

func makeFullNode(ctx *cli.Context) *node.Node {
// makeFullNode loads geth configuration and creates the Ethereum backend.
func makeFullNode(ctx *cli.Context) (*node.Node, ethapi.Backend) {
stack, cfg := makeConfigNode(ctx)
if ctx.GlobalIsSet(utils.OverrideChurritoFlag.Name) {
cfg.Eth.OverrideChurrito = new(big.Int).SetUint64(ctx.GlobalUint64(utils.OverrideChurritoFlag.Name))
}
if ctx.GlobalIsSet(utils.OverrideDonutFlag.Name) {
cfg.Eth.OverrideDonut = new(big.Int).SetUint64(ctx.GlobalUint64(utils.OverrideDonutFlag.Name))
}
utils.RegisterEthService(stack, &cfg.Eth)
backend := utils.RegisterEthService(stack, &cfg.Eth)

// Whisper must be explicitly enabled by specifying at least 1 whisper flag or in dev mode
shhEnabled := enableWhisper(ctx)
Expand All @@ -176,13 +179,13 @@ func makeFullNode(ctx *cli.Context) *node.Node {
}
// Configure GraphQL if requested
if ctx.GlobalIsSet(utils.GraphQLEnabledFlag.Name) {
utils.RegisterGraphQLService(stack, cfg.Node.GraphQLEndpoint(), cfg.Node.GraphQLCors, cfg.Node.GraphQLVirtualHosts, cfg.Node.HTTPTimeouts)
utils.RegisterGraphQLService(stack, backend, cfg.Node)
}
// Add the Ethereum Stats daemon if requested.
if cfg.Ethstats.URL != "" {
utils.RegisterEthStatsService(stack, cfg.Ethstats.URL)
utils.RegisterEthStatsService(stack, backend, cfg.Ethstats.URL)
}
return stack
return stack, backend
}

// dumpConfig is the dumpconfig command.
Expand Down
16 changes: 8 additions & 8 deletions cmd/geth/consolecmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ JavaScript API. See https://github.com/celo-org/celo-blockchain/wiki/JavaScript-
func localConsole(ctx *cli.Context) error {
// Create and start the node based on the CLI flags
prepare(ctx)
node := makeFullNode(ctx)
startNode(ctx, node)
defer node.Close()
stack, backend := makeFullNode(ctx)
startNode(ctx, stack, backend)
defer stack.Close()

// Attach to the newly started node and start the JavaScript console
client, err := node.Attach()
client, err := stack.Attach()
if err != nil {
utils.Fatalf("Failed to attach to the inproc geth: %v", err)
}
Expand Down Expand Up @@ -179,12 +179,12 @@ func dialRPC(endpoint string) (*rpc.Client, error) {
// everything down.
func ephemeralConsole(ctx *cli.Context) error {
// Create and start the node based on the CLI flags
node := makeFullNode(ctx)
startNode(ctx, node)
defer node.Close()
stack, backend := makeFullNode(ctx)
startNode(ctx, stack, backend)
defer stack.Close()

// Attach to the newly started node and start the JavaScript console
client, err := node.Attach()
client, err := stack.Attach()
if err != nil {
utils.Fatalf("Failed to attach to the inproc geth: %v", err)
}
Expand Down
3 changes: 1 addition & 2 deletions cmd/geth/dao_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ func testDAOForkBlockNewChain(t *testing.T, test int, genesis string, expectBloc
} else {
// Force chain initialization
args := []string{"--port", "0", "--maxpeers", "0", "--light.maxpeers", "0", "--nodiscover", "--nat", "none", "--ipcdisable", "--datadir", datadir}
geth := runGeth(t, append(args, []string{"--exec", "2+2", "console"}...)...)
geth.WaitExit()
runGeth(t, append(args, []string{"--exec", "2+2", "console"}...)...).WaitExit()
}
// Retrieve the DAO config flag from the database
path := filepath.Join(datadir, "geth", "chaindata")
Expand Down
Loading