Use BlockStorage.appendBlock(block: Block) if you want to automatically update state
Use BlockStorage.appendBlock(block: Block) if you want to automatically update state
Append block to a chain, based on it's reference
- block to append
Blocks to process in state
Get list of blocks generated by specified address in specified interval of blocks
Height of the a chain, or a longest chain in the explicit block-tree
Return $howMany blocks starting from $parentSignature
Quality score of a best chain, e.g.
Quality score of a best chain, e.g. cumulative difficulty in case of Bitcoin / Nxt
Average delay in milliseconds between last $blockNum blocks starting from $block
Height of a block if it's in the blocktree
Is there's no history, even genesis block
Block with maximum blockchain score
History of a blockchain system is some blocktree in fact(like this: http://image.slidesharecdn.com/sfbitcoindev-chepurnoy-2015-150322043044-conversion-gate01/95/proofofstake-its-improvements-san-francisco-bitcoin-devs-hackathon-12-638.jpg), where longest chain is being considered as canonical one, containing right kind of history.
In cryptocurrencies of today blocktree view is usually implicit, means code supports only linear history, but other options are possible.
To say "longest chain" is the canonical one is simplification, usually some kind of "cumulative difficulty" function has been used instead, even in PoW systems.