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 mem leak when receiving orphans while in sync. #622

Merged

Conversation

denravonska
Copy link
Member

Fix mem leak when receiving orphans while in sync.

@@ -4754,24 +4747,26 @@ bool ProcessBlock(CNode* pfrom, CBlock* pblock, bool generated_by_me)
ResetTimerMain("CheckForFutileSync");
}


CBlock* pblock2 = new CBlock(*pblock);
if (WalletOutOfSyncByMoreThan2000Blocks() || fTestNet)
Copy link
Member Author

Choose a reason for hiding this comment

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

TL;DR: This check is removed and the allocation of the block doesn't happen until it's inserted into the map.

@denravonska denravonska merged commit 0b3a87c into gridcoin-community:development Sep 18, 2017
@denravonska denravonska deleted the orphan-leak-fix branch September 18, 2017 04:17
gridcoin added a commit that referenced this pull request Sep 28, 2017
Gridcoin Research 3.6.2.0/MSI=43.8
Leisure Upgrade
https://github.com/gridcoin/Gridcoin-Research/releases/tag/3.6.2.0

### Added
- Add "backupprivatekeys" RPC command, #593 (@Foggyx420).
- Add more transaction details to the UI, #573 (@tomasbrod).
- Add Additional logging to diagnose PoR reward loss (@tomasbrod)

### Fixed
- Reduce startup time by 15 seconds, #626 (@tomasbrod, @Foggyx420).
- Prevent email being leaked in CPIDv2 block field, #621 (@tomasbrod).
- Fixed memory leaks when receiving orphans while in sync, #622
(@denravonska).
- Unconfirmed balance was not shown in UI, #615, (@Foggyx420).
- Fix memory leaks when clearing orphans, #609, (@MagixInTheAir).
- Fix an issue where multiple beacons could be advertised in rapid
succession, #604 (@Foggyx420).
- Stake weight in the UI will no longer include old DPOR weght, #602
(@Foggyx420).
- Fix stake modifier mismatch which caused nodes to get stuck on first
V8 block, #581 (@tomasbrod).
- Fix beacon auto advertisment issue when done automatically, #580
(@Foggyx420).
- Fix for loss of PoR rewards due to reorganize, #578 (@tomasbrod).
- Fix upgrader compile error on Linux, #541 (@theMarix).
- Fix duplicate poll entries, #539 (@denravonska).
- Importing private keys will no longer require a restart for the
addresses
to show up, #634 (@Foggyx420).
- Fix invalid backup filenames on Windows, #569 (@denravonska).

### Changed
- Code cleanup (@Foggyx420, @tomasbrod, @denravonska).
- Several NN consensus sync improvements, #616 (@Foggyx420).
- Windows nodes will no longer automatically reboot/shutdown, #605
(@denravonska).
- Display "No Polls!" in poll window if no polls are running, #596
(@MagixInTheAir).
- Change poll min search length from 2 to 1, #595 (@MagixInTheAir).
- Return the results of "backupwallet" RPC command, #593 (@Foggyx420).
- Changing the community links #654 (@grctest)
denravonska pushed a commit to denravonska/Gridcoin-Research that referenced this pull request Sep 29, 2017
Gridcoin Research 3.6.2.0/MSI=43.8
Leisure Upgrade
https://github.com/gridcoin/Gridcoin-Research/releases/tag/3.6.2.0

### Added
- Add "backupprivatekeys" RPC command, gridcoin-community#593 (@Foggyx420).
- Add more transaction details to the UI, gridcoin-community#573 (@tomasbrod).
- Add Additional logging to diagnose PoR reward loss (@tomasbrod)

### Fixed
- Reduce startup time by 15 seconds, gridcoin-community#626 (@tomasbrod, @Foggyx420).
- Prevent email being leaked in CPIDv2 block field, gridcoin-community#621 (@tomasbrod).
- Fixed memory leaks when receiving orphans while in sync, gridcoin-community#622
(@denravonska).
- Unconfirmed balance was not shown in UI, gridcoin-community#615, (@Foggyx420).
- Fix memory leaks when clearing orphans, gridcoin-community#609, (@MagixInTheAir).
- Fix an issue where multiple beacons could be advertised in rapid
succession, gridcoin-community#604 (@Foggyx420).
- Stake weight in the UI will no longer include old DPOR weght, gridcoin-community#602
(@Foggyx420).
- Fix stake modifier mismatch which caused nodes to get stuck on first
V8 block, gridcoin-community#581 (@tomasbrod).
- Fix beacon auto advertisment issue when done automatically, gridcoin-community#580
(@Foggyx420).
- Fix for loss of PoR rewards due to reorganize, gridcoin-community#578 (@tomasbrod).
- Fix upgrader compile error on Linux, gridcoin-community#541 (@theMarix).
- Fix duplicate poll entries, gridcoin-community#539 (@denravonska).
- Importing private keys will no longer require a restart for the
addresses
to show up, gridcoin-community#634 (@Foggyx420).
- Fix invalid backup filenames on Windows, gridcoin-community#569 (@denravonska).

### Changed
- Code cleanup (@Foggyx420, @tomasbrod, @denravonska).
- Several NN consensus sync improvements, gridcoin-community#616 (@Foggyx420).
- Windows nodes will no longer automatically reboot/shutdown, gridcoin-community#605
(@denravonska).
- Display "No Polls!" in poll window if no polls are running, gridcoin-community#596
(@MagixInTheAir).
- Change poll min search length from 2 to 1, gridcoin-community#595 (@MagixInTheAir).
- Return the results of "backupwallet" RPC command, gridcoin-community#593 (@Foggyx420).
- Changing the community links gridcoin-community#654 (@grctest)
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.

1 participant