• Jay Guo's avatar
    [FAB-14240] Do not use `support.Height` in chain · f7f806fd
    Jay Guo authored
    
    
    Commitment of block is doen aync win blockwritter, therefore
    `support.Height` may not correctly reflect the actual number
    of latest block. Decision made based on `support.Height` while
    chain is running may lead to replaying of same block.
    
    This CR fixes this by keeping a reference to the last block,
    which is initialized by reading the tail of ledger at start.
    
    Change-Id: I6c5e5fed4c1464c459603f4484a44b8b91b017b6
    Signed-off-by: default avatarJay Guo <guojiannan1101@gmail.com>
    f7f806fd