Document longest chain logic
Document longest chain logic

The longest chain logic is pretty dense. This change leaves the same
behaviour as before but adds comments to make the behaviour more clear.

clample/lambdabtc,clample/lamdabtc,clample/lamdabtc,clample/lambdabtc