Home Reference Source Test
public class | source

PartialAccountsTree

Extends:

ObservableAccountsTreeSynchronousAccountsTree → PartialAccountsTree

Member Summary

Public Members
public get

complete: boolean

public get

missingPrefix: string

Method Summary

Public Methods
public

abort(): Promise

public

commit(): Promise<boolean>

public

async pushChunk(chunk: AccountsTreeChunk): Promise<PartialAccountsTree.Status>

public

synchronousTransaction(enableWatchdog: boolean): PartialAccountsTree

public

transaction(enableWatchdog: boolean): AccountsTree

Inherited Summary

From class Observable
public static get

WILDCARD: string: string

public

bubble(observable: Observable, types: ...string)

public

fire(type: string, args: ...*): Promise | null

public

off(type: string, id: number)

public

on(type: string, callback: Function): number

From class AccountsTree
public static

async createVolatile(): Promise<AccountsTree>

public static

async getPersistent(jdb: *): Promise<AccountsTree>

public get
public

abort(): Promise

public

async commit(): Promise

public

async get(address: Address): PromiseAccount>

public

async getAccountsProof(addresses: Array<Address>): Promise<AccountsProof>

public

async getChunk(startPrefix: string, size: number): Promise<AccountsTreeChunk>

public

async isEmpty(): Promise<boolean>

public

async partialTree(): Promise<PartialAccountsTree>

public

put(address: Address, account: Account): Promise

public

async root(): Promise<Hash>

public
public

synchronousTransaction(enableWatchdog: boolean): Promise<SynchronousAccountsTree>

public

transaction(enableWatchdog: boolean): Promise<AccountsTree>

protected

async _init(): Promise<AccountsTree>

From class SynchronousAccountsTree
public
public

getSync(address: Address, expectedToBePresent: boolean): Account

public

async preloadAddresses(addresses: Array<Address>): Promise

public

putBatch(address: Address, account: Account)

public

putSync(address: Address, account: Account)

public
protected

_insertBatch(node: AccountsTreeNode, prefix: string, account: Account, rootPath: Array<AccountsTreeNode>): *

protected

This method updates all empty hashes (and only such).

Public Members

public get complete: boolean source

public get missingPrefix: string source

Public Methods

public abort(): Promise source

Override:

AccountsTree#abort

Return:

Promise

public commit(): Promise<boolean> source

Override:

AccountsTree#commit

Return:

Promise<boolean>

public async pushChunk(chunk: AccountsTreeChunk): Promise<PartialAccountsTree.Status> source

Params:

NameTypeAttributeDescription
chunk AccountsTreeChunk

Return:

Promise<PartialAccountsTree.Status>

public synchronousTransaction(enableWatchdog: boolean): PartialAccountsTree source

Override:

AccountsTree#synchronousTransaction

Params:

NameTypeAttributeDescription
enableWatchdog boolean
  • optional

public transaction(enableWatchdog: boolean): AccountsTree source

Override:

AccountsTree#transaction

Params:

NameTypeAttributeDescription
enableWatchdog boolean
  • optional

Return:

AccountsTree