* log: delete RotatingFileHandler
We added this for the dashboard, which is gone now. The
handler never really worked well and had data race and file
handling issues.
* internal/debug: remove unused RotatingFileHandler setup code
This change works around the 32k RDATA character limit per change
request and fixes several issues in the deployer which prevented it from
working for our production trees.
This is a temporary fix for a problem which started happening when the
dialer was changed to read nodes from an enode.Iterator. Before the
iterator change, discovery queries would always return within a couple
seconds even if there was no Internet access. Since the iterator won't
return unless a node is actually found, discoverTask can take much
longer. This means that the 'emergency connect' logic might not execute
in time, leading to a stuck node.
* build: remove env.sh
This removes the dirty symlink-to-self hack we've had for years. The
script was added to enable building without GOPATH and did that job
reliably for all this time. We can remove the workaround because modern
Go supports building without GOPATH natively.
* Makefile: add GO111MODULE=on to environment
* internal/testlog: print file+line number of log call in test log
This changes the unit test logger to print the actual file and line
number of the logging call instead of "testlog.go:44".
Output of 'go test -v -run TestServerListen ./p2p' before this change:
=== RUN TestServerListen
--- PASS: TestServerListen (0.00s)
testlog.go:44: DEBUG[01-08|15:16:31.651] UDP listener up addr=127.0.0.1:62678
testlog.go:44: DEBUG[01-08|15:16:31.651] TCP listener up addr=127.0.0.1:62678
testlog.go:44: TRACE[01-08|15:16:31.652] Accepted connection addr=127.0.0.1:62679
And after:
=== RUN TestServerListen
--- PASS: TestServerListen (0.00s)
server.go:868: DEBUG[01-08|15:25:35.679] TCP listener up addr=127.0.0.1:62712
server.go:557: DEBUG[01-08|15:25:35.679] UDP listener up addr=127.0.0.1:62712
server.go:912: TRACE[01-08|15:25:35.680] Accepted connection addr=127.0.0.1:62713
* internal/testlog: document use of t.Helper
* add node.go unit test file node_test.go
* add node_test.go file license and rollback trie_test.go
* fix unused variable v
* trie: fix license year
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
* les: move the checkpoint oracle into its own package
It's first step of refactor LES package. LES package
basically can be divided into LES client and LES server.
However both sides will use checkpoint package for
status retrieval and verification. So this PR moves
checkpoint oracle into a separate package
* les: address comments
This commit intents to replicate the DialHTTPWithClient function which allows
creating a RPC Client using a custom dialer but for websockets.
We introduce a new DialWebsocketWithDialer function which allows the caller
to instantiate a new websocket client using a custom dialer.
* Add more functionality to the sim (#5)
* backends: implement more of ethclient in sim
* backends: add BlockByNumber to simulated backend
* backends: make simulated progress function agree with syncprogress interface for client
* backends: add more tests
* backends: add more comments
* backends: fix sim for index in tx and add tests
* backends: add lock back to estimategas
* backends: goimports
* backends: go ci lint
* Add more functionality to the sim (#5)
* backends: implement more of ethclient in sim
* backends: add BlockByNumber to simulated backend
* backends: make simulated progress function agree with syncprogress interface for client
* backends: add more tests
* backends: add more comments
* backends: fix sim for index in tx and add tests
* backends: add lock back to estimategas
* backends: goimports
* backends: go ci lint
* assert errs