Home Reference Source
public class | source

InterfaceBlockchainAgent

Extends:

InterfaceBlockchainAgentBasic → InterfaceBlockchainAgent

Agent 47 - The place I was raised, they didn't give us names. They gave us numbers. Mine was 47.

An Agent is a class that force your machine to synchronize to the network based on the protocol you use it

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public
public

lastTimeChecked: {"date": *, "blocks": *}

public
public set
public get

status: *

Private Members
private
private
private

_status: *

Method Summary

Public Methods
public
public
public

newFork(): *

public

async startAgent(firsTime: *, synchronizeComplete: boolean): *

public
Private Methods
private
private
private
private
private
private

Inherited Summary

From class InterfaceBlockchainAgentBasic
public get

consensus: *: *

Consensus Status - if needs consensus or not

public set
public
private
private
private
private
private
private

_status: *

public

setBlockchain(blockchain: *)

private

async _initializeConsensus(newConsensus: *)

Public Constructors

public constructor() source

Override:

InterfaceBlockchainAgentBasic#constructor

Public Members

public AGENT_TIME_INTERVAL: number source

public AGENT_TIME_OUT: * source

public lastTimeChecked: {"date": *, "blocks": *} source

public protocol: * source

public set status source

public get status: * source

Private Members

private _startAgentInterval: * source

private _startAgentTimeOut: * source

private _status: * source

Override:

InterfaceBlockchainAgentBasic#_status

Public Methods

public initializeAgentPromise() source

public initializeStartAgentOnce() source

public newFork(): * source

Return:

*

public async startAgent(firsTime: *, synchronizeComplete: boolean): * source

Params:

NameTypeAttributeDescription
firsTime *
synchronizeComplete boolean
  • optional
  • default: false

Return:

*

public waitSynchronizationStatus(): * source

Return:

*

Private Methods

private _agentConfirmationIntervalFunction(): boolean source

Return:

boolean

private _determineSynchronizedSlaves(): * source

Return:

*

private _initializeProtocol() source

private _newProtocol() source

private _setStartAgentInterval() source

private _setStartAgentTimeOut(factor: number) source

Params:

NameTypeAttributeDescription
factor number
  • optional
  • default: 1