Home Reference Source
public class | source

InterfaceBlockchainBlocks

It creates like an Array of Blocks. In case the Block doesn't exist, it will be stored as undefined

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public

[i]: *

public
public
public set
public get
public
public get
public get

first: *

public get

last: *

public set
public get

length: *

public set
public get
Private Members
private
private
private

Method Summary

Public Methods
public

addBlock(block: *, revertActions: *, saveBlock: *, showUpdate: boolean)

public

clear()

public
public

emitBlockInserted(block: *)

public
public
public

spliceBlocks(after: *, freeMemory: boolean, showUpdate: boolean)

Public Constructors

public constructor() source

Public Members

public [.length]: * source

public [i]: * source

public blockchain: * source

public blocksStartingPoint: number source

public set chainWork source

public get chainWork: * source

public chainWorkSerialized: * source

public get endingPosition: * source

public get first: * source

public get last: * source

public set length source

public get length: * source

public set networkHashRate source

public get networkHashRate: * source

Private Members

private _chainWork: * source

private _length: number source

private _networkHashRate: number source

Public Methods

public addBlock(block: *, revertActions: *, saveBlock: *, showUpdate: boolean) source

Params:

NameTypeAttributeDescription
block *
revertActions *
saveBlock *
showUpdate boolean
  • optional
  • default: true

public clear() source

public emitBlockCountChanged() source

public emitBlockInserted(block: *) source

Params:

NameTypeAttributeDescription
block *

public freeAllBlocksTransactionsFromMemory() source

public recalculateNetworkHashRate(): * source

Return:

*

public spliceBlocks(after: *, freeMemory: boolean, showUpdate: boolean) source

Params:

NameTypeAttributeDescription
after *
freeMemory boolean
  • optional
  • default: false
showUpdate boolean
  • optional
  • default: true