You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This little monster is ultra bad bad bad, especially because in the main package, several functions ho further to compound the mischief by having cfg as parameter names, as well, to make it even harder to track down things by making the search function frustratingly non-selective as 'cfg' has at least 2 maybe more different instances that are addressible from within the btcd main package.
Here is at least one other in the same package, inside a function block namespace:
I unfortunately mutated the code I have been working on quite drastically since I started on my fork for parallelcoin but I confirm there above that this is not my error, and I am filing this issue because nobody else has and this is a really really knotty bit of ultra smelly code smell and just imho, it should be fixed as a matter of priority before the spaghetti breaks something.
The other thing is that this completely precludes the easy creation of test harnesses for the main btcd node without using external launching tools.
The text was updated successfully, but these errors were encountered:
I see your points @4avka, it is a global, and local variables created using the same name, so its not clear which is being worked on. What approach you would take to clean it up, anything more than renaming it to indicate its global scope?
btcd/btcd.go
Line 31 in 1503795
This little monster is ultra bad bad bad, especially because in the main package, several functions ho further to compound the mischief by having
cfg
as parameter names, as well, to make it even harder to track down things by making the search function frustratingly non-selective as 'cfg' has at least 2 maybe more different instances that are addressible from within the btcd main package.Here is at least one other in the same package, inside a function block namespace:
btcd/config.go
Line 407 in 1503795
I unfortunately mutated the code I have been working on quite drastically since I started on my fork for parallelcoin but I confirm there above that this is not my error, and I am filing this issue because nobody else has and this is a really really knotty bit of ultra smelly code smell and just imho, it should be fixed as a matter of priority before the spaghetti breaks something.
The other thing is that this completely precludes the easy creation of test harnesses for the main btcd node without using external launching tools.
The text was updated successfully, but these errors were encountered: