File tree Expand file tree Collapse file tree 2 files changed +14
-12
lines changed
Expand file tree Collapse file tree 2 files changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -238,12 +238,8 @@ Threads
238238
239239- DumpAddresses : Dumps IP addresses of nodes to peers.dat.
240240
241- - ThreadFlushWalletDB : Close the wallet.dat file if it hasn't been used in 500ms.
242-
243241- ThreadRPCServer : Remote procedure call handler, listens on port 8332 for connections and services them.
244242
245- - BitcoinMiner : Generates bitcoins (if wallet is enabled).
246-
247243- Shutdown : Does an orderly shutdown of everything.
248244
249245Ignoring IDE/editor files
@@ -380,6 +376,18 @@ C++ data structures
380376 - * Rationale* : Easier to understand what is happening, thus easier to spot mistakes, even for those
381377 that are not language lawyers
382378
379+ - Initialize all non-static class members where they are defined
380+
381+ - * Rationale* : Initializing the members in the declaration makes it easy to spot uninitialized ones,
382+ and avoids accidentally reading uninitialized memory
383+
384+ ``` cpp
385+ class A
386+ {
387+ uint32_t m_count{0};
388+ }
389+ ```
390+
383391Strings and formatting
384392------------------------
385393
@@ -415,11 +423,11 @@ member name:
415423```c++
416424class AddressBookPage
417425{
418- Mode mode ;
426+ Mode m_mode ;
419427}
420428
421429AddressBookPage::AddressBookPage(Mode _mode) :
422- mode (_ mode)
430+ m_mode (_mode)
423431...
424432```
425433
Original file line number Diff line number Diff line change 3030#include < queue>
3131#include < utility>
3232
33- // ////////////////////////////////////////////////////////////////////////////
34- //
35- // BitcoinMiner
36- //
37-
38- //
3933// Unconfirmed transactions in the memory pool often depend on other
4034// transactions in the memory pool. When we select transactions from the
4135// pool, we select by highest fee rate of a transaction combined with all
You can’t perform that action at this time.
0 commit comments