charon
charon copied to clipboard
Export more functionality from p2p package
🎯 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.