initial testcode for canonical chain

This commit is contained in:
Maran
2014-03-24 15:04:29 +01:00
parent ec6ec62dd4
commit 6253d10938
5 changed files with 119 additions and 14 deletions

View File

@ -342,7 +342,7 @@ func (p *Peer) HandleInbound() {
// We don't have this block, but we do have a block with the same prevHash, diversion time!
if p.ethereum.StateManager().BlockChain().HasBlockWithPrevHash(block.PrevHash) {
fmt.Printf("[PEER] Local and foreign chain have diverted after %x, we are going to get freaky with it!\n", block.PrevHash)
if p.ethereum.StateManager().BlockChain().FindCanonicalChain(msg, block.PrevHash) {
if p.ethereum.StateManager().BlockChain().FindCanonicalChainFromMsg(msg, block.PrevHash) {
return
}
} else {