charon icon indicating copy to clipboard operation
charon copied to clipboard

Export more functionality from p2p package

Open KaloyanTanev opened this issue 10 months ago • 0 comments

🎯 Problem to be solved

Currently the p2p package has a lot of useful functionality that can be used in testing command, unit tests or any other packages. Functions like pingPeerOnce could be exported and reused. Consider adding setupP2P function, similar to what is used in dkg and cmd packages.

🛠️ Proposed solution

Export functionalities that seem suitable to be used outside of p2p package. Refactor arguments and outputs wherever required, to make it more general.

🧪 Tests

Existing test cases should be passing.

👐 Additional acceptance criteria

Remove the copied functionality in other packages and replace it with the new exported functions.

KaloyanTanev avatar Apr 19 '24 11:04 KaloyanTanev