@sec-block/secjs-transactionpool
v1.0.10
Published
sec blockchain transaction-pool lib
Downloads
17
Keywords
Readme
[]
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