• zelig's avatar
    major blockpool change · 5a9952c7
    zelig authored
    - the spec says response to getBlockHashes(from, max) should return all hashes starting from PARENT of from. This required major changes and results in much hackier code.
    - Introduced a first round block request after peer introduces with current head, so that hashes can be linked to the head
    - peerInfo records currentBlockHash, currentBlock, parentHash and headSection
    - AddBlockHashes checks header section and creates the top node from the peerInfo of the best peer
    - AddBlock checks peerInfo and updates the block there rather than in a node
    - request further hashes once a section is created but then no more until the root block is found (so that we know when to stop asking)
    - in processSection, when root node is checked and receives a block, we need to check if the section has a parent known to blockchain or blockPool
    - when peers are switched, new peer launches a new requestHeadSection loop or activates its actual head section, i.e., the section for it currentBlockHash
    - all tests pass
    5a9952c7
Name
Last commit
Last update
_data Loading commit data...
cmd Loading commit data...
compression/rle Loading commit data...
core Loading commit data...
crypto Loading commit data...
eth Loading commit data...
ethdb Loading commit data...
ethutil Loading commit data...
event Loading commit data...
javascript Loading commit data...
logger Loading commit data...
miner Loading commit data...
p2p Loading commit data...
pow Loading commit data...
rlp Loading commit data...
rpc Loading commit data...
state Loading commit data...
tests Loading commit data...
trie Loading commit data...
ui Loading commit data...
vm Loading commit data...
websocket Loading commit data...
whisper Loading commit data...
xeth Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
Dockerfile Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...
gocoverage.sh Loading commit data...
install.sh Loading commit data...
update-license.go Loading commit data...