Skip to content
This repository has been archived by the owner on Jun 7, 2019. It is now read-only.

Define listeners for transaction pool related events - Closes #873 #917

Merged

Conversation

SargeKhan
Copy link
Contributor

Add blockchain state change event listeners for the transaction pool.

packages/lisk-transaction-pool/src/transaction_pool.ts Outdated Show resolved Hide resolved
packages/lisk-transaction-pool/src/transaction_pool.ts Outdated Show resolved Hide resolved
packages/lisk-transaction-pool/src/transaction_pool.ts Outdated Show resolved Hide resolved
packages/lisk-transaction-pool/test/transaction_pool.ts Outdated Show resolved Hide resolved
packages/lisk-transaction-pool/test/transaction_pool.ts Outdated Show resolved Hide resolved
packages/lisk-transaction-pool/test/transaction_pool.ts Outdated Show resolved Hide resolved
packages/lisk-transaction-pool/test/transaction_pool.ts Outdated Show resolved Hide resolved
packages/lisk-transaction-pool/test/transaction_pool.ts Outdated Show resolved Hide resolved

private existsInTransactionPool(transaction: Transaction): boolean {}
public getProcessableTransactions(limit: number): ReadonlyArray<Transaction> {
return this._queues.ready.dequeueUntil(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasnt the idea to keep it in the queue until we removeConfirmedTransaction?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is not just the basic implementation, I'll update this function I implement this feature.

verifyTransactionAgainstOtherTransactions?(
transaction: Transaction,
containsUniqueData(): boolean;
verifyTransactionAgainstOtherTransactions(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving a comment here for future naming revision: verifyTransactionAgainstOtherTransactions -> verifyAgainstOtherTransactions

Copy link
Contributor

@mitsuaki-u mitsuaki-u left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small typo

.map(queueName => this._queues[queueName].removeFor(condition))
.reduce(
(
transactionsAccumelatedFromQueues: ReadonlyArray<Transaction>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

transactionsAccumelatedFromQueues -> transactionsAccumulatedFromQueues

@SargeKhan SargeKhan merged commit abf513a into transaction_improvement_experiment Dec 11, 2018
Version 2.1.0 automation moved this from Open PRs to Closed PRs Dec 11, 2018
@shuse2 shuse2 deleted the 873-transaction_pool_events branch January 7, 2019 11:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Version 2.1.0
  
Closed PRs
Development

Successfully merging this pull request may close these issues.

None yet

4 participants