0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-09 15:37:00 -04:00
bitcoin-core/src/policy
MarcoFalke ce4a852475
Merge bitcoin/bitcoin#21848: refactor: Make CFeeRate constructor architecture-independent
fafd121026 refactor: Make CFeeRate constructor architecture-independent (MarcoFalke)

Pull request description:

  Currently the constructor is architecture dependent. This is confusing for several reasons:

  * It is impossible to create a transaction larger than the max value of `uint32_t`, so a 64-bit `size_t` is not needed
  * Policy (and consensus) code should be arch-independent
  * The current code will print spurious compile errors when compiled on 32-bit systems:

  ```
  policy/feerate.cpp:23:22: warning: result of comparison of constant 9223372036854775807 with expression of type 'size_t' (aka 'unsigned int') is always true [-Wtautological-constant-out-of-range-compare]
      assert(nBytes_ <= uint64_t(std::numeric_limits<int64_t>::max()));
  ```

  Fix all issues by making it arch-independent. Also, fix `{}` style according to dev notes.

ACKs for top commit:
  theStack:
    re-ACK fafd121026
  promag:
    Code review ACK fafd121026.

Tree-SHA512: e16f75bad9ee8088b87e873906d9b5633449417a6996a226a2f37d33a2b7d4f2fd91df68998a77e52163de20b40c57fadabe7fe3502e599cbb98494178591833
2021-05-24 11:14:23 +02:00
..
feerate.cpp refactor: Make CFeeRate constructor architecture-independent 2021-05-18 07:13:25 +02:00
feerate.h refactor: Make CFeeRate constructor architecture-independent 2021-05-18 07:13:25 +02:00
fees.cpp scripted-diff: Replace GetDataDir() calls with gArgs.GetDataDirNet() calls 2021-05-24 10:29:58 +02:00
fees.h refactor: Use C++17 std::array deduction for ALL_FEE_ESTIMATE_HORIZONS 2021-01-03 18:38:31 +01:00
policy.cpp scripted-diff: Clarify that feerates are per virtual size 2021-05-01 09:42:50 +02:00
policy.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
rbf.cpp scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
rbf.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
settings.cpp scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00
settings.h scripted-diff: Bump copyright of files changed in 2019 2019-12-30 10:42:20 +13:00