Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@biut-block/biutjs-transactionpool

BIUT-Block4ISC1.0.0

biut blockchain transaction-pool lib

readme

JavaScript Style Guide

[JavaScript Style Guide]

SECTransactionPool

This package is for sec blockchain transaction pool

new SECTransactionPool(config)

create a transaction pool with config, such as transaction pool of token chain or transaction chain

Param Type
config Object

secTransactionPool.addTxIntoPool(transaction)

save the transaction into local transaction pool

Kind: instance method of SECTransactionPool

Param Type
transaction Object

secTransactionPool.updateBlockHashArray(blockChain)

upate the block hash array this blockChainHashBuffer is for checking the transaction in transaction pool, just compare the TxHash

Kind: instance method of SECTransactionPool

Param Type
blockChain Object

secTransactionPool.compareTxWithHashTable()

remove transactions in transaction pool, if they are already upload to blockchain

Kind: instance method of SECTransactionPool

secTransactionPool.addTxFromOtherPeerIntoPool(txFromOtherPeer)

to update the local transaction pool with transactions from other peers

Kind: instance method of SECTransactionPool

Param Type
txFromOtherPeer Object

secTransactionPool.getTxStatus(transaction) => Status

get transaction status: pending, success, error

Kind: instance method of SECTransactionPool

Param Type
transaction Object

secTransactionPool.getAllTxFromPool() => Array

return all transaction from pool

Kind: instance method of SECTransactionPool

secTransactionPool.clear()

clear the transaction pool

Kind: instance method of SECTransactionPool