decred / dcrpool

decred mining pool
ISC License
31 stars 28 forks source link

pool: Use regular expressions to identify clients. #406

Closed davecgh closed 1 year ago

davecgh commented 1 year ago

This modifies that logic that identifies mining clients by their user agent to use regular expressions instead of requiring hard coded version numbers.

It also adds tests to ensure proper matching functionality.

The primary motivation is to allow the pool to continue to work with new patch versions of mining clients without requiring updates the pool software.

However, it also provides the flexibility to adapt to specific client software that might not conform to semver semantics in the future if is desired.