Home Reference Source
public class | source

PPoWBlockchainProvesCalculated

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

allBlocks: {}

public
public

levels: *[]

public

Method Summary

Public Methods
public

deleteBlock(block: *, level: *)

public
public
public

updateBlock(block: *): boolean

Private Methods
private

_binarySearch(array: *, value: *): *

Return 0 <= i <= array.length such that !pred(array[i - 1]) && pred(array[i]).

Public Constructors

public constructor() source

Public Members

public allBlocks: {} source

public blockchain: * source

public levels: *[] source

public levelsLengths: *[] source

Public Methods

public deleteBlock(block: *, level: *) source

Params:

NameTypeAttributeDescription
block *
level *

public loadProvesCalculated() source

public saveProvesCalculated() source

public updateBlock(block: *): boolean source

Params:

NameTypeAttributeDescription
block *

Return:

boolean

Private Methods

private _binarySearch(array: *, value: *): * source

Return 0 <= i <= array.length such that !pred(array[i - 1]) && pred(array[i]).

Params:

NameTypeAttributeDescription
array *
value *

Return:

*