Skip to content

Commit

Permalink
Merge bitcoin/bitcoin#30558: [27.x] Even more backports
Browse files Browse the repository at this point in the history
b06c4c6 [WIP] doc: update release notes for 27.x (fanquake)
57de0f5 policy/feerate.h: avoid constraint self-dependency (Matt Whitlock)
ccff378 add missing #include <cstdint> for GCC 15 (Matt Whitlock)
500bba0 test: fix constructor of msg_tx (Martin Zumsande)

Pull request description:

  Backports:
  * bitcoin/bitcoin#30552
  * bitcoin/bitcoin#30633

ACKs for top commit:
  stickies-v:
    ACK b06c4c6

Tree-SHA512: 1b669d1c7e0c6c2c2a1b123970c2b5b59a417a423ee1133296ebad2ecb50e5c3889a6ae8dc640f8ae464a969b1b0287a8005a3317ee7d7252b61d96e59c131a4
  • Loading branch information
fanquake committed Aug 23, 2024
2 parents 0cbdc6b + b06c4c6 commit 84df309
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
6 changes: 6 additions & 0 deletions doc/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,14 @@ Notable changes

- #29855 psbt: Check non witness utxo outpoint early

### Test

- #30552 test: fix constructor of msg_tx

### Build

- #30283 upnp: fix build with miniupnpc 2.2.8
- #30633 Fixes for GCC 15 compatibility

### CI

Expand All @@ -73,6 +78,7 @@ Thanks to everyone who directly contributed to this release:
- Ava Chow
- Cory Fields
- Martin Zumsande
- Matt Whitlock
- Max Edwards
- Sebastian Falbesoner
- willcl-ark
Expand Down
1 change: 1 addition & 0 deletions src/chainparamsbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include <util/chaintype.h>

#include <cstdint>
#include <memory>
#include <string>

Expand Down
3 changes: 2 additions & 1 deletion src/node/interface_ui.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
#ifndef BITCOIN_NODE_INTERFACE_UI_H
#define BITCOIN_NODE_INTERFACE_UI_H

#include <cstdint>
#include <functional>
#include <memory>
#include <string>
#include <vector>

class CBlockIndex;
enum class SynchronizationState;
Expand Down
4 changes: 1 addition & 3 deletions src/policy/feerate.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@ class CFeeRate
public:
/** Fee rate of 0 satoshis per kvB */
CFeeRate() : nSatoshisPerK(0) { }
template<typename I>
template<std::integral I> // Disallow silent float -> int conversion
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");
}

/**
Expand Down
7 changes: 5 additions & 2 deletions test/functional/test_framework/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -1293,8 +1293,11 @@ class msg_tx:
__slots__ = ("tx",)
msgtype = b"tx"

def __init__(self, tx=CTransaction()):
self.tx = tx
def __init__(self, tx=None):
if tx is None:
self.tx = CTransaction()
else:
self.tx = tx

def deserialize(self, f):
self.tx.deserialize(f)
Expand Down

0 comments on commit 84df309

Please sign in to comment.