Home Reference Source Test
public class | source

Mempool

Extends:

Observable → Mempool

Constructor Summary

Public Constructor
public

constructor(blockchain: IBlockchain, accounts: Accounts)

Member Summary

Public Members
public get

length: number

public get

Method Summary

Public Methods
public

evictBelowMinFeePerByte(minFeePerByte: number)

public
public
public

getTransactions(maxSize: number, minFeePerByte: number): Array<Transaction>

public

getTransactionsByAddresses(addresses: Array<Address>, maxTransactions: number): Array<Transaction>

public
public
public

async getTransactionsForBlock(maxSize: number): Promise<Array<Transaction>>

public

isFiltered(txHash: Hash): boolean

public

pushTransaction(transaction: Transaction): Promise<Mempool.ReturnCode>

public

* transactionGenerator(maxSize: number, minFeePerByte: number)

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

Public Constructors

public constructor(blockchain: IBlockchain, accounts: Accounts) source

Override:

Observable#constructor

Params:

NameTypeAttributeDescription
blockchain IBlockchain
accounts Accounts

Public Members

public get length: number source

public get queue: Synchronizer source

Public Methods

public evictBelowMinFeePerByte(minFeePerByte: number) source

Params:

NameTypeAttributeDescription
minFeePerByte number

public getPendingTransactions(address: Address): Array<Transaction> source

Params:

NameTypeAttributeDescription
address Address

Return:

Array<Transaction>

public getTransaction(hash: Hash): Transaction source

Params:

NameTypeAttributeDescription
hash Hash

Return:

Transaction

public getTransactions(maxSize: number, minFeePerByte: number): Array<Transaction> source

Params:

NameTypeAttributeDescription
maxSize number
  • optional
minFeePerByte number
  • optional

Return:

Array<Transaction>

public getTransactionsByAddresses(addresses: Array<Address>, maxTransactions: number): Array<Transaction> source

Params:

NameTypeAttributeDescription
addresses Array<Address>
maxTransactions number
  • optional

Return:

Array<Transaction>

public getTransactionsByRecipient(address: Address): Array<Transaction> source

Params:

NameTypeAttributeDescription
address Address

Return:

Array<Transaction>

public getTransactionsBySender(address: Address): Array<Transaction> source

Params:

NameTypeAttributeDescription
address Address

Return:

Array<Transaction>

public async getTransactionsForBlock(maxSize: number): Promise<Array<Transaction>> source

Params:

NameTypeAttributeDescription
maxSize number

Return:

Promise<Array<Transaction>>

public isFiltered(txHash: Hash): boolean source

Params:

NameTypeAttributeDescription
txHash Hash

Return:

boolean

public pushTransaction(transaction: Transaction): Promise<Mempool.ReturnCode> source

Params:

NameTypeAttributeDescription
transaction Transaction

Return:

Promise<Mempool.ReturnCode>

public * transactionGenerator(maxSize: number, minFeePerByte: number) source

Params:

NameTypeAttributeDescription
maxSize number
  • optional
minFeePerByte number
  • optional