Home Reference Source
public class | source

MiniBlockchainLightFork

Extends:

inheritForkMiniBlockchainFork → MiniBlockchainLightFork

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

forkDifficultyCalculation: {"difficultyAdditionalBlocks": *, "difficultyCalculationStarts": *}

public
public
public
public
public
public
Private Members
private
private
private
private
private
private
private

Method Summary

Public Methods
public

getForkDifficultyTarget(height: *): *

public

getForkPrevHash(height: *): *

public

getForkTimeStamp(height: *): *

public

async preFork(revertActions: *): *

public
public

async revertFork(): *

public

async saveIncludeBlock(index: *, revertActions: *, saveBlock: boolean): *

Private Methods
private

_createBlockValidation_BlockchainValidation(height: *, forkHeight: *): *

private

_createBlockValidation_ForkValidation(height: *, forkHeight: *): *

private

Inherited Summary

From class MiniBlockchainFork
public

preFork(revertActions: *, showUpdate: boolean): *

public

preForkClone(cloneBlocks: boolean, cloneAccountantTree: boolean)

public

revertFork(): *

private

_createBlockValidation_ForkValidation(height: *, forkHeight: *): *

Fork Validation for Mini Blockchain is not checking the Accountant Tree

Public Constructors

public constructor() source

Override:

MiniBlockchainFork#constructor

Public Members

public forkDifficultyCalculation: {"difficultyAdditionalBlocks": *, "difficultyCalculationStarts": *} source

public forkPrevAccountantTree: * source

public forkPrevAccountantTreeGzipped: * source

public forkPrevChainWork: * source

public forkPrevDifficultyTarget: * source

public forkPrevHashPrev: * source

public forkPrevTimeStamp: * source

Private Members

private _blocksStartingPointClone: * source

private _lightAccountantTreeSerializationsHeightClone: * source

private _lightAccountantTreeSerializationsHeightCloneGzipped: * source

private _lightChainWorkClone: * source

private _lightPrevDifficultyTargetClone: * source

private _lightPrevHashPrevClone: * source

private _lightPrevTimeStampClone: * source

Public Methods

public getForkDifficultyTarget(height: *): * source

Params:

NameTypeAttributeDescription
height *

Return:

*

public getForkPrevHash(height: *): * source

Params:

NameTypeAttributeDescription
height *

Return:

*

public getForkTimeStamp(height: *): * source

Params:

NameTypeAttributeDescription
height *

Return:

*

public async preFork(revertActions: *): * source

Override:

MiniBlockchainFork#preFork

Params:

NameTypeAttributeDescription
revertActions *

Return:

*

public preForkClone(): * source

Override:

MiniBlockchainFork#preForkClone

Return:

*

public async revertFork(): * source

Override:

MiniBlockchainFork#revertFork

Return:

*

public async saveIncludeBlock(index: *, revertActions: *, saveBlock: boolean): * source

Params:

NameTypeAttributeDescription
index *
revertActions *
saveBlock boolean
  • optional
  • default: false

Return:

*

Private Methods

private _createBlockValidation_BlockchainValidation(height: *, forkHeight: *): * source

Params:

NameTypeAttributeDescription
height *
forkHeight *

Return:

*

private _createBlockValidation_ForkValidation(height: *, forkHeight: *): * source

Fork Validation for Mini Blockchain is not checking the Accountant Tree

Override:

MiniBlockchainFork#_createBlockValidation_ForkValidation

Params:

NameTypeAttributeDescription
height *
forkHeight *

Return:

*

private _validateChainWork() source