* Improved block propagation by sending blocks only to peers to which, as
far as we know, the peer does not know about.
* Made sub protocol its own manager
* SubProtocol now contains the p2p.Protocol which is used instead of
a function-returning-protocol thing.
Properly ignore blocks coming from peers not in our peer list (blocked)
and do never request anything from bad peers. Added some checks to
account for blocks known when requesting hashes (missing parents).
Properly ignore blocks coming from peers not in our peer list (blocked)
and do never request anything from bad peers. Added some checks to
account for blocks known when requesting hashes (missing parents).
* Include tests which now has consistent HEX encodings
* Comment out two failing tests: "
"TransactionWithHihghNonce" due to wrong nonce size
"TransactionWithSvalueHigh" due to wrong ECDSA s range
* Cleanup conversion functions and fix expected encodings for
tests validation fields
NOTE: For known, non-consensus, hard to reproduce bugs consider the
following method `common.Report("extra", stuff, "you need logged")` will
give you a stack trace and a friendly request to submit it as an issue
on our issue tracker.
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.
Peer.readLoop will only terminate if the connection is closed. Fix the
hang by closing the connection before waiting for readLoop to terminate.
This also removes the british disconnect procedure where we're waiting
for the remote end to close the connection. I have confirmed with
@subtly that cpp-ethereum doesn't adhere to it either.