diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/build-osx.md | 2 | ||||
-rw-r--r-- | doc/developer-notes.md | 43 | ||||
-rw-r--r-- | doc/release-notes.md | 1 | ||||
-rw-r--r-- | doc/tor.md | 4 |
4 files changed, 31 insertions, 19 deletions
diff --git a/doc/build-osx.md b/doc/build-osx.md index f19e4f0b8d..e52a770ced 100644 --- a/doc/build-osx.md +++ b/doc/build-osx.md @@ -16,7 +16,7 @@ Then install [Homebrew](https://brew.sh). Dependencies ---------------------- - brew install automake berkeley-db4 libtool boost miniupnpc openssl pkg-config protobuf python qt libevent + brew install automake berkeley-db4 libtool boost miniupnpc openssl pkg-config protobuf python qt libevent qrencode See [dependencies.md](dependencies.md) for a complete overview. diff --git a/doc/developer-notes.md b/doc/developer-notes.md index 540f2e8b84..980eed44f3 100644 --- a/doc/developer-notes.md +++ b/doc/developer-notes.md @@ -72,7 +72,8 @@ code. - Class names, function names and method names are UpperCamelCase (PascalCase). Do not prefix class names with `C`. - Test suite naming convention: The Boost test suite in file - `src/test/foo_tests.cpp` should be named `foo_tests`. + `src/test/foo_tests.cpp` should be named `foo_tests`. Test suite names + must be unique. - **Miscellaneous** - `++i` is preferred over `i++`. @@ -450,12 +451,21 @@ C++ data structures - Vector bounds checking is only enabled in debug mode. Do not rely on it -- Make sure that constructors initialize all fields. If this is skipped for a - good reason (i.e., optimization on the critical path), add an explicit - comment about this +- Initialize all non-static class members where they are defined. + If this is skipped for a good reason (i.e., optimization on the critical + path), add an explicit comment about this - *Rationale*: Ensure determinism by avoiding accidental use of uninitialized values. Also, static analyzers balk about this. + Initializing the members in the declaration makes it easy to + spot uninitialized ones. + +```cpp +class A +{ + uint32_t m_count{0}; +} +``` - By default, declare single-argument constructors `explicit`. @@ -474,18 +484,6 @@ C++ data structures - *Rationale*: Easier to understand what is happening, thus easier to spot mistakes, even for those that are not language lawyers -- Initialize all non-static class members where they are defined - - - *Rationale*: Initializing the members in the declaration makes it easy to spot uninitialized ones, - and avoids accidentally reading uninitialized memory - -```cpp -class A -{ - uint32_t m_count{0}; -} -``` - Strings and formatting ------------------------ @@ -625,6 +623,19 @@ GUI should not interact with the user. That's where View classes come in. The converse also holds: try to not directly access core data structures from Views. +- Avoid adding slow or blocking code in the GUI thread. In particular do not + add new `interfaces::Node` and `interfaces::Wallet` method calls, even if they + may be fast now, in case they are changed to lock or communicate across + processes in the future. + + Prefer to offload work from the GUI thread to worker threads (see + `RPCExecutor` in console code as an example) or take other steps (see + https://doc.qt.io/archives/qq/qq27-responsive-guis.html) to keep the GUI + responsive. + + - *Rationale*: Blocking the GUI thread can increase latency, and lead to + hangs and deadlocks. + Subtrees ---------- diff --git a/doc/release-notes.md b/doc/release-notes.md index 48ee364c18..0a72f3fe4a 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -74,6 +74,7 @@ RPC changes add `label` fields to returned JSON objects that previously only had `account` fields. - `sendmany` now shuffles outputs to improve privacy, so any previously expected behavior with regards to output ordering can no longer be relied upon. +- The new RPC `testmempoolaccept` can be used to test acceptance of a transaction to the mempool without adding it. External wallet files --------------------- diff --git a/doc/tor.md b/doc/tor.md index a05979fca8..931c83abdd 100644 --- a/doc/tor.md +++ b/doc/tor.md @@ -31,7 +31,7 @@ outgoing connections be anonymized, but more is possible. In a typical situation, this suffices to run behind a Tor proxy: - ./bitcoin -proxy=127.0.0.1:9050 + ./bitcoind -proxy=127.0.0.1:9050 2. Run a bitcoin hidden server @@ -86,7 +86,7 @@ and open port 8333 on your firewall (or use -upnp). If you only want to use Tor to reach onion addresses, but not use it as a proxy for normal IPv4/IPv6 communication, use: - ./bitcoin -onion=127.0.0.1:9050 -externalip=57qr3yd1nyntf5k.onion -discover + ./bitcoind -onion=127.0.0.1:9050 -externalip=57qr3yd1nyntf5k.onion -discover 3. Automatically listen on Tor -------------------------------- |