Skip to content

fix(core-transaction-pool): use sorted array (instead of tree) for storing transactions by fee and nonce#3678

Merged
faustbrian merged 9 commits into2.6from
fix/transaction-pool-sorted-array
May 4, 2020
Merged

fix(core-transaction-pool): use sorted array (instead of tree) for storing transactions by fee and nonce#3678
faustbrian merged 9 commits into2.6from
fix/transaction-pool-sorted-array

Conversation

@air1one
Copy link
Copy Markdown
Contributor

@air1one air1one commented May 4, 2020

Summary

Use sorted array instead of tree for storing transaction by fee and nonce, because tree has some issues like with recursion and max call stack. Sorted array is simpler and does the job for a lower max size of the transaction pool (now reduced to 15k transactions by default instead of 100k).

(tree memory structure is still available in core-utils and might be improved and used in the future : needs re-balancing while inserting to be usable)

Checklist

  • Documentation (if necessary)
  • Tests (if necessary)
  • Ready to be merged

@ghost ghost added Complexity: High labels May 4, 2020
@faustbrian faustbrian merged commit e0b1431 into 2.6 May 4, 2020
@ghost ghost deleted the fix/transaction-pool-sorted-array branch May 4, 2020 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants