Skip to content

[Core] Externalize a shared Mempool interface & implementation #388

@Olshansk

Description

@Olshansk

Objective

Make the Mempool interface and implementation a common high-level type that can be reused across different modules

Origin Document

This discussion in #374: #374 (comment)

Screenshot 2022-12-08 at 4 53 32 PM

Goals

  • Create a Mempool type that other modules can easily import & reuse
  • Clean up the code so all the modules are using the same mempool implementation

Deliverable

  • Create a shared mempool object based on utility/types/Mempool into shared/mempool
  • Import and use shared/mempool in the utility module
  • Import and use shared/mempool in the p2p module
  • Add a couple mempool specific tests
  • In utility/test/module_test.go: TODO(#388): Expose a GetMempoolfunction inutility_module so we can remove this reflection.

Non-goals / Non-deliverables

  • Modify existing business logic

General issue deliverables

  • Update the appropriate CHANGELOG(s)
  • Update any relevant local/global README(s)
  • Update relevant source code tree explanations
  • Add or update any relevant or supporting mermaid diagrams

Testing Methodology

  • **Mempool tests **: make test_mempool
  • All tests: make test_all
  • LocalNet: verify a LocalNet is still functioning correctly by following the instructions at docs/development/README.md

Creator: @Olshansk
Co-Owners: @deblasis

Metadata

Metadata

Assignees

Labels

coreCore infrastructure - protocol relatedp2pP2P specific changesutilityUtility specific changes

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions