Home Reference Source
public class | source

PPoWBlockchainFork

Extends:

common/blockchain/interface-blockchain/blockchain/forks/Interface-Blockchain-Fork~InterfaceBlockchainFork → PPoWBlockchainFork

Member Summary

Public Members
public
Private Members
private

Method Summary

Public Methods
public
public

getForkProofsPiBlock(height: *): *

public

async importForkProofPiHeaders(proofsList: *)

public

async initializeConstructor(blockchain: *, forkId: *, sockets: *, forkStartingHeight: *, forkChainStartingPoint: *, forkChainLength: *, forkChainWork: *, headers: *, forkReady: *)

public

async initializeFork(): *

public

preForkClone(cloneBlocks: boolean): *

public

revertFork(): *

Private Methods
private
private
private
private

_validateFork(validateHashesAgain: *, firstValidation: *): boolean

Public Members

public forkProofPi: * source

Private Members

private _forkProofPiClone: * source

Public Methods

public destroyFork() source

public getForkProofsPiBlock(height: *): * source

Params:

NameTypeAttributeDescription
height *

Return:

*

public async importForkProofPiHeaders(proofsList: *) source

Params:

NameTypeAttributeDescription
proofsList *

public async initializeConstructor(blockchain: *, forkId: *, sockets: *, forkStartingHeight: *, forkChainStartingPoint: *, forkChainLength: *, forkChainWork: *, headers: *, forkReady: *) source

Params:

NameTypeAttributeDescription
blockchain *
forkId *
sockets *
forkStartingHeight *
forkChainStartingPoint *
forkChainLength *
forkChainWork *
headers *
forkReady *

public async initializeFork(): * source

Return:

*

public preForkClone(cloneBlocks: boolean): * source

Params:

NameTypeAttributeDescription
cloneBlocks boolean
  • optional
  • default: true

Return:

*

public revertFork(): * source

Return:

*

Private Methods

private async _downloadProof(): boolean source

Return:

boolean

private _isProofBetter(LCA: *): boolean source

Params:

NameTypeAttributeDescription
LCA *

Return:

boolean

private _shouldTakeNewProof(): boolean source

Return:

boolean

private _validateFork(validateHashesAgain: *, firstValidation: *): boolean source

Params:

NameTypeAttributeDescription
validateHashesAgain *
firstValidation *

Return:

boolean