Creates a new block object
Parameters
Properties
header
Header the block's headeruncleList
Array<Header> an array of uncle headersraw
Array<Buffer> an array of buffers containing the raw blocks.
Produces a hash the RLP of the block
Determines if a given block is the genesis block
Returns any Boolean
Determines if a given block part of homestead or not
Returns any Boolean
Determines if a given block part of homestead reprice or not
Returns any Boolean
turns the block in to the canonical genesis block
Produces a serialization of the block.
Parameters
rlpEncode
Boolean whether to rlp encode the block or not
Generate transaction trie. The tx trie must be generated before the transaction trie can
be validated with validateTransactionTrie
Parameters
cb
Function the callback
Validates the transaction trie
Returns Boolean
Validates the transactions
Parameters
stringError
Boolean? whether to return a string with a dscription of why the validation failed or return a Bloolean (optional, defaultfalse
)
Returns Boolean
Validates the entire block. Returns a string to the callback if block is invalid
Parameters
blockChain
BlockChain the blockchain that this block wants to be part ofcb
Function the callback which is given aString
if the block is not valid
Validates the uncle's hash
Returns Boolean
Validates the uncles that are in the block if any. Returns a string to the callback if uncles are invalid
Parameters
blockChaina
Blockchain an instance of the Blockchaincb
Function the callbackblockChain
Converts the block toJSON
Parameters
labeled
Bool whether to create an labeled object or an array
Returns Object