Home Reference Source
public class | source

InterfaceBlockchainForksAdministrator

Blockchain contains a chain of blocks based on Proof of Work

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public

forks: *[]

public
public

Method Summary

Public Methods
public

createNewFork(sockets: *, forkStartingHeight: *, forkChainStartingPoint: *, forkChainLength: *, forkChainWork: *, headers: *, ready: *): *

public

deleteFork(fork: *): boolean

public

findFork(socket: *, hash: *, forkProof: *): *

public

findForkByHeaders(header: *): *

Find a fork by a Header (block header)

public

findForkByProofs(proof: *): *

public

findForkBySockets(sockets: *): *

Find a fork by a socket

Private Methods
private

_findForkyByHeader(header: *): *

Public Constructors

public constructor() source

Public Members

public blockchain: * source

public forks: *[] source

public forksId: number source

public socketsProcessing: *[] source

Public Methods

public createNewFork(sockets: *, forkStartingHeight: *, forkChainStartingPoint: *, forkChainLength: *, forkChainWork: *, headers: *, ready: *): * source

Params:

NameTypeAttributeDescription
sockets *
forkStartingHeight *
forkChainStartingPoint *
forkChainLength *
forkChainWork *
headers *
ready *

Return:

*

public deleteFork(fork: *): boolean source

Params:

NameTypeAttributeDescription
fork *

Return:

boolean

public findFork(socket: *, hash: *, forkProof: *): * source

Params:

NameTypeAttributeDescription
socket *
hash *
forkProof *

Return:

*

public findForkByHeaders(header: *): * source

Find a fork by a Header (block header)

Params:

NameTypeAttributeDescription
header *

Return:

*

public findForkByProofs(proof: *): * source

Params:

NameTypeAttributeDescription
proof *

Return:

*

public findForkBySockets(sockets: *): * source

Find a fork by a socket

Params:

NameTypeAttributeDescription
sockets *

Return:

*

Private Methods

private _findForkyByHeader(header: *): * source

Params:

NameTypeAttributeDescription
header *

Return:

*