mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 07:39:08 +01:00
99d012ec80refactor: return reference instead of pointer (Andrew Toth)f743e6c5ddrefactor: add missing LIFETIMEBOUND annotation for parameter (Andrew Toth)141117f5e8refactor: remove incorrect LIFETIMEBOUND annotations (Andrew Toth) Pull request description: The [developer-notes say](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#lifetimebound): > You can use the attribute by adding a `LIFETIMEBOUND` annotation defined in `src/attributes.h`; please grep the codebase for examples. While grepping, I found an incorrect usage of the `LIFETIMEBOUND` annotation on `BlockManager::CheckBlockDataAvailability`. This could be misleading about usage for other greppers. As I was looking, I also noticed a missing `LIFETIMEBOUND` on `BlockManager::GetFirstBlock`. While looking more closely at that method, it should return a reference instead of a pointer. The only reason to return a pointer is if it can be null. ACKs for top commit: maflcko: review ACK99d012ec80💧 l0rinc: ACK99d012ec80stickies-v: ACK99d012ec80optout21: ACK99d012ec80vasild: ACK99d012ec80Tree-SHA512: d6c56ee223d6614d52ee6cf5cd66e787125c98c6ae37705a17e51a6e15774e260ac55b3d60f2fc818132e766ad98dd94232d6c8829119f628498e9d0d2bd977f