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

Fix schedule network recursive call #628

Merged
merged 2 commits into from
Nov 15, 2022

Conversation

bamzedev
Copy link
Contributor

@bamzedev bamzedev commented Nov 15, 2022

Signed-off-by: Emanuel Pargov [email protected]

Description:
Schedule Network update was a recursive call. This PR changes this method in client.go to use a loop instead of recursive call.
In addition also fixes ClientFor/Previewnet/Testnet/Mainnet methods setting the wrong LedgerID.

Related issue(s):

Fixes #619 #624

@bamzedev bamzedev force-pushed the fix-schedule-network-recursive-call branch from 052fb87 to fb0ca7b Compare November 15, 2022 13:58
@bamzedev bamzedev force-pushed the fix-schedule-network-recursive-call branch from b27f8d7 to 86585a0 Compare November 15, 2022 15:45
@sonarcloud
Copy link

sonarcloud bot commented Nov 15, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@bamzedev bamzedev merged commit d3717dc into develop Nov 15, 2022
@bamzedev bamzedev deleted the fix-schedule-network-recursive-call branch November 15, 2022 15:56
Execute(client)
if err == nil && len(addressbook.NodeAddresses) > 0 {
client.SetNetworkFromAddressBook(addressbook)
for {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

client._ScheduleNetworkUpdate recursively calls itself
3 participants