fix komodo_args, add ParseArgumentsTests, fix LegacyEvents test#601
Merged
ca333 merged 7 commits intoGLEECBTC:devfrom Nov 8, 2023
Merged
fix komodo_args, add ParseArgumentsTests, fix LegacyEvents test#601ca333 merged 7 commits intoGLEECBTC:devfrom
ca333 merged 7 commits intoGLEECBTC:devfrom
Conversation
move extrabuf from condition block scope to the main komodo_args scope to avoid "dangling" pointer and garbage in buffer after exit from condition block. add proper init of variables.
For example, the group of test_block tests changes the value of IsInitialBlockDownload() to false after the first call to generateBlock. As a result, when komodo_connectblock is called, komodo_validate_chain should return 1 for the LegacyEvents tests. Additionally, if we are operating with various data directories between different tests, the static file pointer fp in komodo.cpp should be cleared between these tests to avoid writing to the same file in different tests.
ca333
approved these changes
Nov 8, 2023
who-biz
pushed a commit
to who-biz/komodo
that referenced
this pull request
Jun 22, 2025
Release v1.2.9-4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It has been discovered that in certain environments, such as when building a daemon on MacOS using the native
clanginstead of the defaultgccprovided in the repository, the daemon binary had a bug with thep2p/rpc portandmagic(only for ACs, KMD itself was not affected). This bug was caused by incorrect extrabuf filling. Further investigation revealed that this behavior was due to not properly clearing some internal variables and a dangling pointer issue. This pull request fixes this erroneous behavior and also resolves compatibility issues between legacy events tests and thetest_blocktest. TheLegacyEventsTestswere not functioning correctly (showing errors) when run immediately after thetest_blocktests due to changes in the values of certain global variables and the initial block download state. This has now been fixed. Additionally,ParseArgumentsTestshave been added to ensure that ACs will have the correct p2p/rpc port in magic.