Skip to content

Conversation

LogicalGuy77
Copy link

What was wrong?

Issue #908

There was a widespread typo in the codebase where the parameter name negotitate_timeout was used instead of the correct negotiate_timeout. This typo appeared in multiple files and created inconsistency in the API, making the codebase harder to understand and maintain.

The typo affected:

  • Function parameter definitions
  • Method calls and parameter passing
  • Documentation consistency across the codebase

How was it fixed?

Systematically renamed all instances of negotitate_timeout to negotiate_timeout across the affected files to maintain consistency with:

  • The correct spelling of "negotiate"
  • The parameter name already used correctly in multiselect.py
  • The constant DEFAULT_NEGOTIATE_TIMEOUT used throughout the codebase

Files modified:

  • py-libp2p/libp2p/protocol_muxer/multiselect_client.py - Fixed parameter definitions in select_one_of and select_protocol_or_fail methods
  • py-libp2p/libp2p/__init__.py - Fixed parameter definition in new_node function
  • py-libp2p/libp2p/host/basic_host.py - Fixed parameter usage in method calls to select_one_of

The fix ensures that:

  • All function signatures use the correct parameter name
  • All function calls pass parameters with the correct name
  • The API is consistent across the entire codebase
  • No breaking changes are introduced (parameter names in Python calls are positional-compatible)

To-Do

  • Clean up commit history
  • Add or update documentation related to these changes
  • Add entry to the release notes

Cute Animal Picture

A focused cat carefully checking code for typos

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.

1 participant