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
238
238
239
239
- DumpAddresses : Dumps IP addresses of nodes to peers.dat.
240
240
241
- - ThreadFlushWalletDB : Close the wallet.dat file if it hasn't been used in 500ms.
242
-
243
241
- ThreadRPCServer : Remote procedure call handler, listens on port 8332 for connections and services them.
244
242
245
- - BitcoinMiner : Generates bitcoins (if wallet is enabled).
246
-
247
243
- Shutdown : Does an orderly shutdown of everything.
248
244
249
245
Ignoring IDE/editor files
@@ -380,6 +376,18 @@ C++ data structures
380
376
- * Rationale* : Easier to understand what is happening, thus easier to spot mistakes, even for those
381
377
that are not language lawyers
382
378
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
+
383
391
Strings and formatting
384
392
------------------------
385
393
@@ -415,11 +423,11 @@ member name:
415
423
```c++
416
424
class AddressBookPage
417
425
{
418
- Mode mode ;
426
+ Mode m_mode ;
419
427
}
420
428
421
429
AddressBookPage::AddressBookPage(Mode _mode) :
422
- mode (_ mode)
430
+ m_mode (_mode)
423
431
...
424
432
```
425
433
Original file line number Diff line number Diff line change 30
30
#include < queue>
31
31
#include < utility>
32
32
33
- // ////////////////////////////////////////////////////////////////////////////
34
- //
35
- // BitcoinMiner
36
- //
37
-
38
- //
39
33
// Unconfirmed transactions in the memory pool often depend on other
40
34
// transactions in the memory pool. When we select transactions from the
41
35
// 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