Home Reference Source
public class | source

MiniBlockchainAdvanced

Extends:

inheritBlockchainMiniBlockchain → MiniBlockchainAdvanced

Direct Subclass:

MiniBlockchainLight

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public
public
Private Members
private

Method Summary

Public Methods
public

getSerializedAccountantTree(height: *, gzipped: boolean): *

public

async saveAccountantTree(serialization: *, length: *)

public
Private Methods
private
private
private

async _onBlockCreated(block: *, saveBlock: *)

Inherited Summary

From class MiniBlockchain
public
public
public
public
public

getBalances(address: *): *

public

async includeBlockchainBlock(block: *, resetMining: *, socketsAvoidBroadcast: *): Promise<*>

operate the mini-blockchain accountant tree mini-blockchain, will update reward and take in consideration all transactions

public

async simulateNewBlock(block: *, revertAutomatically: *, revertActions: *, callback: *, showUpdate: boolean): boolean

private
private

async _loadBlockchain(): *

Load blocks and check the Accountant Tree

Public Constructors

public constructor() source

Override:

MiniBlockchain#constructor

Public Members

public lightAccountantTreeSerializations: {} source

public lightAccountantTreeSerializationsGzipped: {} source

public lightGZipManager: * source

Private Members

private _miniBlockchainSaveBlocks: * source

Public Methods

public getSerializedAccountantTree(height: *, gzipped: boolean): * source

Params:

NameTypeAttributeDescription
height *
gzipped boolean
  • optional
  • default: false

Return:

*

public async saveAccountantTree(serialization: *, length: *) source

Params:

NameTypeAttributeDescription
serialization *
length *

public async saveBlockchainTerminated(): * source

Return:

*

Private Methods

private async _loadBlockchain(): boolean source

Load blocks and check the Accountant Tree

Override:

MiniBlockchain#_loadBlockchain

Return:

boolean

private async _loadBlockchainPrevious() source

private async _onBlockCreated(block: *, saveBlock: *) source

Params:

NameTypeAttributeDescription
block *
saveBlock *