Merge bitcoin/bitcoin#30558: [27.x] Even more backports

b06c4c6550 [WIP] doc: update release notes for 27.x (fanquake)
57de0f5e77 policy/feerate.h: avoid constraint self-dependency (Matt Whitlock)
ccff378a28 add missing #include <cstdint> for GCC 15 (Matt Whitlock)
500bba0561 test: fix constructor of msg_tx (Martin Zumsande)

Pull request description:

  Backports:
  * https://github.com/bitcoin/bitcoin/pull/30552
  * https://github.com/bitcoin/bitcoin/pull/30633

ACKs for top commit:
  stickies-v:
    ACK b06c4c6550

Tree-SHA512: 1b669d1c7e0c6c2c2a1b123970c2b5b59a417a423ee1133296ebad2ecb50e5c3889a6ae8dc640f8ae464a969b1b0287a8005a3317ee7d7252b61d96e59c131a4
This commit is contained in:
merge-script
2024-08-23 15:42:57 +01:00
5 changed files with 15 additions and 6 deletions

View File

@ -56,9 +56,14 @@ Notable changes
- #29855 psbt: Check non witness utxo outpoint early - #29855 psbt: Check non witness utxo outpoint early
### Test
- #30552 test: fix constructor of msg_tx
### Build ### Build
- #30283 upnp: fix build with miniupnpc 2.2.8 - #30283 upnp: fix build with miniupnpc 2.2.8
- #30633 Fixes for GCC 15 compatibility
### CI ### CI
@ -73,6 +78,7 @@ Thanks to everyone who directly contributed to this release:
- Ava Chow - Ava Chow
- Cory Fields - Cory Fields
- Martin Zumsande - Martin Zumsande
- Matt Whitlock
- Max Edwards - Max Edwards
- Sebastian Falbesoner - Sebastian Falbesoner
- willcl-ark - willcl-ark

View File

@ -7,6 +7,7 @@
#include <util/chaintype.h> #include <util/chaintype.h>
#include <cstdint>
#include <memory> #include <memory>
#include <string> #include <string>

View File

@ -6,9 +6,10 @@
#ifndef BITCOIN_NODE_INTERFACE_UI_H #ifndef BITCOIN_NODE_INTERFACE_UI_H
#define BITCOIN_NODE_INTERFACE_UI_H #define BITCOIN_NODE_INTERFACE_UI_H
#include <cstdint>
#include <functional> #include <functional>
#include <memory>
#include <string> #include <string>
#include <vector>
class CBlockIndex; class CBlockIndex;
enum class SynchronizationState; enum class SynchronizationState;

View File

@ -38,10 +38,8 @@ private:
public: public:
/** Fee rate of 0 satoshis per kvB */ /** Fee rate of 0 satoshis per kvB */
CFeeRate() : nSatoshisPerK(0) { } CFeeRate() : nSatoshisPerK(0) { }
template<typename I> template<std::integral I> // Disallow silent float -> int conversion
explicit CFeeRate(const I _nSatoshisPerK): nSatoshisPerK(_nSatoshisPerK) { explicit CFeeRate(const I _nSatoshisPerK): nSatoshisPerK(_nSatoshisPerK) {
// We've previously had bugs creep in from silent double->int conversion...
static_assert(std::is_integral<I>::value, "CFeeRate should be used without floats");
} }
/** /**

View File

@ -1293,8 +1293,11 @@ class msg_tx:
__slots__ = ("tx",) __slots__ = ("tx",)
msgtype = b"tx" msgtype = b"tx"
def __init__(self, tx=CTransaction()): def __init__(self, tx=None):
self.tx = tx if tx is None:
self.tx = CTransaction()
else:
self.tx = tx
def deserialize(self, f): def deserialize(self, f):
self.tx.deserialize(f) self.tx.deserialize(f)