Home Reference Source
public class | source

InterfaceBlockchainTipsAdministrator

Blockchain contains a chain of blocks based on Proof of Work

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

agent: *

public
Private Members
private

_tips: *[]

Method Summary

Public Methods
public

addTip(socket: *, forkChainLength: *, forkChainStartingPoint: *, forkLastBlockHeader: *): *

public

findTip(socket: *): *

public

getBestTip(): *

public

getTip(socket: *): *

public
public

updateTipNewForkLength(tip: *, forkToDoChainLength: *, forkToDoChainStartingPoint: *, forkToDoLastBlockHeader: *): *

Private Methods
private

Public Constructors

public constructor() source

Public Members

public agent: * source

public blockchain: * source

Private Members

private _tips: *[] source

Public Methods

public addTip(socket: *, forkChainLength: *, forkChainStartingPoint: *, forkLastBlockHeader: *): * source

Params:

NameTypeAttributeDescription
socket *
forkChainLength *
forkChainStartingPoint *
forkLastBlockHeader *

Return:

*

public findTip(socket: *): * source

Params:

NameTypeAttributeDescription
socket *

Return:

*

public getBestTip(): * source

Return:

*

public getTip(socket: *): * source

Params:

NameTypeAttributeDescription
socket *

Return:

*

public processTipsNewForkLengths() source

public updateTipNewForkLength(tip: *, forkToDoChainLength: *, forkToDoChainStartingPoint: *, forkToDoLastBlockHeader: *): * source

Params:

NameTypeAttributeDescription
tip *
forkToDoChainLength *
forkToDoChainStartingPoint *
forkToDoLastBlockHeader *

Return:

*

Private Methods

private _initializeProtocol() source