-
@pacrob find libp2p -name "utils.py"
libp2p/io/utils.py
libp2p/tools/pubsub/utils.py
libp2p/tools/utils.py
libp2p/utils.py What is the current utils policy, so say where to put some util function ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yep, that's confusing. Some things in In general, a util should be added at the level it is needed, so to either The only tool that I know should stay in |
Beta Was this translation helpful? Give feedback.
Yep, that's confusing. Some things in
libp2p/tools
are actually for testing only and should be move to thetests
folder, likefactories
is being done here in #512 .In general, a util should be added at the level it is needed, so to either
libp2p/io/utils.py
orlibp2p/utils.py
from your example.The only tool that I know should stay in
libp2p/tools
isasync_service
. It was actually copied over from the unmaintained https://github.com/ethereum/async-service , and should be kept separate from other libp2p code.