During a split parent and grand parent were included in the database but
not in the canonical chain (numbered chain). Added a `merge` function
which finds the common ancestor of the chains and reinserts the missing
blocks.
- follow up locks and fix them
- chainManager: call SetQueued for parentErr future blocks, uncomment TD checks, unskip test
- make ErrIncorrectTD non-fatal to be forgiving to genuine mistaken nodes (temp) but demote them to guard against stuck best peers.
- add purging to bounded nodeCache (config nodeCacheSize)
- use nodeCache when creating blockpool entries and let non-best peers add blocks (performance boost)
- minor error in addError
- reduce idleBestPeerTimeout to 1 minute
- correct status counts and unskip status passing status test
- glogified logging
- queued bool // flag for blockpool to skip TD check
- set to true when future block queued
- in checkTD: skip check if queued
- TODO: add test (insertchain sets future block)
* Add params package with exported variables generated from
github.com/ethereum/common/blob/master/params.json
* Use params package variables in applicable places
* Add check for minimum gas limit in validation of block's gas limit
* Remove common/params.json from go-ethereum to avoid
outdated version of it
* Add blocktest cmd and support for block tests files in
tests/BlockTests , the launched node does not connect to
network, resets state with a genesis block from the test file
and starts the RPC API