dash/src/policy
MarcoFalke be14afca36
Merge bitcoin/bitcoin#21848: refactor: Make CFeeRate constructor architecture-independent
fafd121026c4f1e25d498983e4f88c119516552b 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 fafd121026c4f1e25d498983e4f88c119516552b
  promag:
    Code review ACK fafd121026c4f1e25d498983e4f88c119516552b.

Tree-SHA512: e16f75bad9ee8088b87e873906d9b5633449417a6996a226a2f37d33a2b7d4f2fd91df68998a77e52163de20b40c57fadabe7fe3502e599cbb98494178591833
2024-05-24 13:24:30 -05:00
..
feerate.cpp Merge bitcoin/bitcoin#21848: refactor: Make CFeeRate constructor architecture-independent 2024-05-24 13:24:30 -05:00
feerate.h Merge bitcoin/bitcoin#21848: refactor: Make CFeeRate constructor architecture-independent 2024-05-24 13:24:30 -05:00
fees.cpp Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
fees.h Merge #20787: Use C++17 std::array deduction for OUTPUT_TYPES, ALL_FEE_ESTIMATE_HORIZONS 2024-01-16 07:57:34 -06:00
packages.cpp merge bitcoin#22084: package testmempoolaccept followups 2024-02-02 23:14:06 -06:00
packages.h merge bitcoin#22084: package testmempoolaccept followups 2024-02-02 23:14:06 -06:00
policy.cpp Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
policy.h Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
settings.cpp Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
settings.h Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00