Home Reference Source
public class | source

PPoWBlockchainBlock

Extends:

common/blockchain/interface-blockchain/blocks/Interface-Blockchain-Block~InterfaceBlockchainBlock → PPoWBlockchainBlock

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public
Private Members
private

_level: *

private

Method Summary

Public Methods
public

Algorithm 1

public

deserializeBlock(buffer: *, height: *, reward: *, difficultyTargetPrev: *, offset: number, blockLengthValidation: *, usePrevHash: *): *

public
public
public

getLevel(): *

public

importBlockFromHeader(json: *): *

public

toJSON(): *

public
public

async validateBlock(height: *): boolean

public
Private Methods
private

_computeBlockHeaderPrefix(skipPrefix: *, requestHeader: *): *

private

_deserializeInterlink(buffer: *, offset: *): *

private

_importInterlinksFromJSON(interlinks: *): *

private

_interlinksToJSON(interlinks: *): *

private
private
private

Public Constructors

public constructor() source

Public Members

public computedBlockPrefix: * source

Private Members

private _level: * source

private _provesClculatedInserted: * source

Public Methods

Algorithm 1

Return:

*

public deserializeBlock(buffer: *, height: *, reward: *, difficultyTargetPrev: *, offset: number, blockLengthValidation: *, usePrevHash: *): * source

Params:

NameTypeAttributeDescription
buffer *
height *
reward *
difficultyTargetPrev *
offset number
  • optional
  • default: 0
blockLengthValidation *
usePrevHash *

Return:

*

public destroyBlock() source

public getBlockHeader(): * source

Return:

*

public getLevel(): * source

Return:

*

public importBlockFromHeader(json: *): * source

Params:

NameTypeAttributeDescription
json *

Return:

*

public toJSON(): * source

Return:

*

public async validateBlock(height: *): boolean source

Params:

NameTypeAttributeDescription
height *

Return:

boolean

Return:

boolean

Private Methods

private _computeBlockHeaderPrefix(skipPrefix: *, requestHeader: *): * source

Params:

NameTypeAttributeDescription
skipPrefix *
requestHeader *

Return:

*

Params:

NameTypeAttributeDescription
buffer *
offset *

Return:

*

private _importInterlinksFromJSON(interlinks: *): * source

Params:

NameTypeAttributeDescription
interlinks *

Return:

*

private _interlinksToJSON(interlinks: *): * source

Params:

NameTypeAttributeDescription
interlinks *

Return:

*

Return:

*

private _supplementaryValidation(): * source

Return:

*

Return:

boolean