ethereum/go-ethereum — pull request #193 by ebuchman (2014-11-22 19:43:06+00:00)
Title: test shorter fork (fails)

https://github.com/ethereum/go-ethereum/issues/191

`go test -test.run ShorterFork` fails, as expected from the issue.

Note this is more than just a "use BlockInfo() to get the TD" problem since the parent might not be on the canonical chain, in which case `writeBlockInfo` will have never been called, unless we want to store block info for every block we receive from peers, but that seems messy.

The proper solution afaik is to build out a working blockchain tree using the `link` struct (which tracks the td). Otherwise there's too much pressure on the blockpool/peers. I will submit a PR for that after a get a chance to rebase later today. It is not quite done but will be good for review.