btcpayserver / btcpayserver/BTCPayServer.Lightning

Change ConnectionResult enum

Open
#67 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
106
Forks
52
Avg merge
2d 1h
Merged PRs (30d)
4

Description

Maybe it will be more correct to change ConnectionResult enum from:

public enum ConnectionResult
{
Ok,
CouldNotConnect
}

to

public enum ConnectionResult
{
Unknown = 0,
Ok = 1,
CouldNotConnect = 2
}

In current implementation

connectionResult.HasFlag(ConnectionResult.Ok)

for CouldNotConnect will return true

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the ConnectionResult enum declaration and the HasFlag(ConnectionResult.Ok) usage described in the issue. Check the enum's current numeric values and verify that CouldNotConnect no longer matches Ok; done means the enum values distinguish Unknown, Ok, and CouldNotConnect as specified.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.