isCompatible method
Check if other is compatible with this version.
Compatibility rules:
- Major versions must match (breaking changes).
- Minor of
othermust be <= this minor (backward-compatible features). - Patch is always compatible.
Implementation
bool isCompatible(BridgeProtocolVersion other) {
if (major != other.major) return false;
if (other.minor > minor) return false;
return true;
}