Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Unused Channel and Make Program more robust #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ziggie1984
Copy link
Contributor

No description provided.

@ziggie1984
Copy link
Contributor Author

Had this issue in my logs, somehow the program crashed because the javascript did not evaluate to a boolean, though it did all the time before, therefore adding a check.

ERRO[2022-12-21 17:38:49] rpc error: code = NotFound desc = unable to find node
ERRO[2022-12-21 17:38:49] rpc error: code = NotFound desc = unable to find node
INFO[2022-12-21 17:38:49] Getting info from 1ml.com for 02a46393dde952f46c703d978f9e4279508d7e35d5b54bf9e6d738565d513dba97
ERRO[2022-12-21 17:38:50] [1ml] api error: invalid character '<' looking for beginning of value
INFO[2022-12-21 17:38:50] Getting info from amboss.space for 02a46393dde952f46c703d978f9e4279508d7e35d5b54bf9e6d738565d513dba97
panic: interface conversion: interface {} is string, not bool

goroutine 10 [running]:
github.com/callebtc/electronwall/rules.Apply({0x1d016c0?, 0xc0007df680?}, 0x1d8f7f7?)
        /Users/ziggie/working_freetime/electronwall/rules/rules.go:48 +0x385
main.(*App).interceptChannelEvents(0xc0004820f0, {0x2062c10, 0xc0004aa510})

In doing so I removed the decision_chan because it was not used

@ziggie1984
Copy link
Contributor Author

ziggie1984 commented Dec 21, 2022

seems like javascript fvcks up if we use values of the 1ML interface which is just a dummy because it failed with an error as you see above

This PR makes it more robust and checks for the boolean, if its not it will default to false

@ziggie1984 ziggie1984 force-pushed the fix-error-remove-chan branch from e7a8788 to 797c458 Compare December 26, 2022 13:10
@ziggie1984 ziggie1984 marked this pull request as ready for review December 27, 2022 12:26
@callebtc
Copy link
Owner

I think it would've been better if we just used the decision chan instead of the return value, what do you think?

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.

2 participants