Skip to content

Commit 55a3910

Browse files
13025f3 Merge bitcoin#24068: doc: Rework 14707 release notes (fanquake) 6cab942 Merge bitcoin#23740: test: fix test failures in test/functional/p2p_timeouts.py (MarcoFalke) 9771466 Merge bitcoin#23682: ci: Make macOS native task sqlite only (MarcoFalke) ae63468 Merge bitcoin#23495: build: Bump Fontconfig version up to 2.12.6 (fanquake) bdfbb8c Merge bitcoin#23715: test: feature_rbf.py: check specified wallet type availability (MarcoFalke) 1c2435e Merge bitcoin#23714: doc: Normalize RPC description whitespace (fanquake) 289154a Merge bitcoin#14707: [RPC] Include coinbase transactions in receivedby RPCs (MarcoFalke) 25f58cd Merge bitcoin#23687: Remove unused (and broken) functionality in SpanReader (MarcoFalke) 2b01dbd Merge bitcoin#23672: tests: Add data-driven testcases to rpc_decodescript.py (MarcoFalke) 0c1bd66 Merge bitcoin#23652: doc: Document optional RPC result fields (MarcoFalke) 9c5fd3f Merge bitcoin#23639: doc: Extract CreateTxDoc in rawtransaction (MarcoFalke) Pull request description: ## What was done? Regular backports from Bitcoin Core v23 ## How Has This Been Tested? Run unit / functional tests ## Breaking Changes Wallet `receivedby` RPCs now include coinbase transactions ------------- Previously, the following wallet RPCs excluded coinbase transactions: `getreceivedbyaddress` `getreceivedbylabel` `listreceivedbyaddress` `listreceivedbylabel` This release changes this behaviour and returns results accounting for received coins from coinbase outputs. A new option, `include_immature_coinbase` (default=`false`), determines whether to account for immature coinbase transactions. Immature coinbase transactions are coinbase transactions that have 100 or fewer confirmations, and are not spendable. The previous behaviour can be restored using the configuration `-deprecatedrpc=exclude_coinbase`, but may be removed in a future release. ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK 13025f3 Tree-SHA512: 678a0306e54d3e58770d9cc4075f25725c11272458aac0f0bb8d898d1da86ea590813f4e27d2b3eb8307bf7ef02031ee52b4dced99316f273a80c2aecb65a2e0
2 parents 65d995c + 13025f3 commit 55a3910

26 files changed

+330
-222
lines changed

.cirrus.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ task:
168168
FILE_ENV: "./ci/test/00_setup_env_mac.sh"
169169

170170
task:
171-
name: 'macOS 11 native [gui] [no depends]'
171+
name: 'macOS 11 native [gui, sqlite only] [no depends]'
172172
brew_install_script:
173-
- brew install boost libevent berkeley-db@4 qt@5 miniupnpc ccache zeromq qrencode sqlite libtool automake pkg-config gnu-getopt
173+
- brew install boost libevent qt@5 miniupnpc ccache zeromq qrencode sqlite libtool automake pkg-config gnu-getopt
174174
<< : *GLOBAL_TASK_TEMPLATE
175175
macos_instance:
176176
# Use latest image, but hardcode version to avoid silent upgrades (and breaks)

depends/packages/fontconfig.mk

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package=fontconfig
2-
$(package)_version=2.12.1
2+
$(package)_version=2.12.6
33
$(package)_download_path=https://www.freedesktop.org/software/fontconfig/release/
44
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
5-
$(package)_sha256_hash=b449a3e10c47e1d1c7a6ec6e2016cca73d3bd68fbbd4f0ae5cc6b573f7d6c7f3
5+
$(package)_sha256_hash=cf0c30807d08f6a28ab46c61b8dbd55c97d2f292cf88f3a07d3384687f31f017
66
$(package)_dependencies=freetype expat
7-
$(package)_patches=remove_char_width_usage.patch gperf_header_regen.patch
7+
$(package)_patches=gperf_header_regen.patch
88

99
define $(package)_set_vars
1010
$(package)_config_opts=--disable-docs --disable-static --disable-libxml2 --disable-iconv
@@ -13,7 +13,6 @@ define $(package)_set_vars
1313
endef
1414

1515
define $(package)_preprocess_cmds
16-
patch -p1 < $($(package)_patch_dir)/remove_char_width_usage.patch && \
1716
patch -p1 < $($(package)_patch_dir)/gperf_header_regen.patch
1817
endef
1918

depends/patches/fontconfig/gperf_header_regen.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ diff --git a/src/Makefile.in b/src/Makefile.in
1313
index f4626ad..4ae1b00 100644
1414
--- a/src/Makefile.in
1515
+++ b/src/Makefile.in
16-
@@ -903,7 +903,7 @@ fcobjshash.gperf: fcobjshash.gperf.h fcobjs.h
16+
@@ -912,7 +912,7 @@
1717
' - > $@.tmp && \
18-
mv -f $@.tmp $@ || ( $(RM) $@.tmp && false )
18+
mv -f $@.tmp fcobjshash.gperf && touch $@ || ( $(RM) $@.tmp && false )
1919

20-
-fcobjshash.h: fcobjshash.gperf
20+
-fcobjshash.h: Makefile fcobjshash.gperf
2121
+fcobjshash.h:
22-
$(AM_V_GEN) $(GPERF) -m 100 $< > $@.tmp && \
22+
$(AM_V_GEN) $(GPERF) --pic -m 100 fcobjshash.gperf > $@.tmp && \
2323
mv -f $@.tmp $@ || ( $(RM) $@.tmp && false )
2424

depends/patches/fontconfig/remove_char_width_usage.patch

Lines changed: 0 additions & 62 deletions
This file was deleted.

doc/dependencies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ You can find installation instructions in the `build-*.md` file for your platfor
3030
### GUI
3131
| Dependency | Version used | Minimum required | Runtime |
3232
| --- | --- | --- | --- |
33-
| [Fontconfig](https://www.freedesktop.org/wiki/Software/fontconfig/) | 2.12.1 | 2.6 | Yes |
33+
| [Fontconfig](https://www.freedesktop.org/wiki/Software/fontconfig/) | 2.12.6 | 2.6 | Yes |
3434
| [FreeType](https://freetype.org) | 2.11.0 | 2.3.0 | Yes |
3535
| [qrencode](https://fukuchi.org/works/qrencode/) | [4.1.1](https://fukuchi.org/works/qrencode) | | No |
3636
| [Qt](https://www.qt.io) | [5.15.13](https://download.qt.io/official_releases/qt/) | [5.11.3](https://github.com/bitcoin/bitcoin/pull/24132) | No |

doc/release-notes-14707.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Wallet
2+
------
3+
4+
- `receivedby` RPCs now include coinbase transactions. Previously, the
5+
following wallet RPCs excluded coinbase transactions: `getreceivedbyaddress`,
6+
`getreceivedbylabel`, `listreceivedbyaddress`, `listreceivedbylabel`. This
7+
release changes this behaviour and returns results accounting for received
8+
coins from coinbase outputs. The previous behaviour can be restored using the
9+
configuration `-deprecatedrpc=exclude_coinbase`, but may be removed in a
10+
future release. (#6601)
11+
12+
- A new option in the same `receivedby` RPCs, `include_immature_coinbase`
13+
(default=`false`), determines whether to account for immature coinbase
14+
transactions. Immature coinbase transactions are coinbase transactions that
15+
have 100 or fewer confirmations, and are not spendable. (#6601)

src/blockfilter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ GCSFilter::GCSFilter(const Params& params)
5050
GCSFilter::GCSFilter(const Params& params, std::vector<unsigned char> encoded_filter, bool skip_decode_check)
5151
: m_params(params), m_encoded(std::move(encoded_filter))
5252
{
53-
SpanReader stream{GCS_SER_TYPE, GCS_SER_VERSION, m_encoded, 0};
53+
SpanReader stream{GCS_SER_TYPE, GCS_SER_VERSION, m_encoded};
5454

5555
uint64_t N = ReadCompactSize(stream);
5656
m_N = static_cast<uint32_t>(N);
@@ -104,7 +104,7 @@ GCSFilter::GCSFilter(const Params& params, const ElementSet& elements)
104104

105105
bool GCSFilter::MatchInternal(const uint64_t* element_hashes, size_t size) const
106106
{
107-
SpanReader stream{GCS_SER_TYPE, GCS_SER_VERSION, m_encoded, 0};
107+
SpanReader stream{GCS_SER_TYPE, GCS_SER_VERSION, m_encoded};
108108

109109
// Seek forward by size of N
110110
uint64_t N = ReadCompactSize(stream);

src/psbt.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ struct PSBTInput
279279
}
280280

281281
// Type is compact size uint at beginning of key
282-
SpanReader skey(s.GetType(), s.GetVersion(), key, 0);
282+
SpanReader skey(s.GetType(), s.GetVersion(), key);
283283
uint64_t type = ReadCompactSize(skey);
284284

285285
// Do stuff based on type
@@ -533,7 +533,7 @@ struct PSBTOutput
533533
}
534534

535535
// Type is compact size uint at beginning of key
536-
SpanReader skey(s.GetType(), s.GetVersion(), key, 0);
536+
SpanReader skey(s.GetType(), s.GetVersion(), key);
537537
uint64_t type = ReadCompactSize(skey);
538538

539539
// Do stuff based on type
@@ -711,7 +711,7 @@ struct PartiallySignedTransaction
711711
}
712712

713713
// Type is compact size uint at beginning of key
714-
SpanReader skey(s.GetType(), s.GetVersion(), key, 0);
714+
SpanReader skey(s.GetType(), s.GetVersion(), key);
715715
uint64_t type = ReadCompactSize(skey);
716716

717717
// Do stuff based on type

src/rpc/client.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,21 @@ static const CRPCConvertParam vRPCConvertParams[] =
5050
{ "sethdseed", 0, "newkeypool" },
5151
{ "getreceivedbyaddress", 1, "minconf" },
5252
{ "getreceivedbyaddress", 2, "addlocked" },
53+
{ "getreceivedbyaddress", 3, "include_immature_coinbase" },
5354
{ "getreceivedbylabel", 1, "minconf" },
5455
{ "getreceivedbylabel", 2, "addlocked" },
56+
{ "getreceivedbylabel", 3, "include_immature_coinbase" },
5557
{ "listaddressbalances", 0, "minamount" },
5658
{ "listreceivedbyaddress", 0, "minconf" },
5759
{ "listreceivedbyaddress", 1, "addlocked" },
5860
{ "listreceivedbyaddress", 2, "include_empty" },
5961
{ "listreceivedbyaddress", 3, "include_watchonly" },
62+
{ "listreceivedbyaddress", 5, "include_immature_coinbase" },
6063
{ "listreceivedbylabel", 0, "minconf" },
6164
{ "listreceivedbylabel", 1, "addlocked" },
6265
{ "listreceivedbylabel", 2, "include_empty" },
6366
{ "listreceivedbylabel", 3, "include_watchonly" },
67+
{ "listreceivedbylabel", 4, "include_immature_coinbase" },
6468
{ "getassetunlockstatuses", 0, "indexes" },
6569
{ "getassetunlockstatuses", 1, "height" },
6670
{ "getbalance", 1, "minconf" },

src/rpc/misc.cpp

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -234,25 +234,26 @@ static RPCHelpMan sporkupdate()
234234

235235
static RPCHelpMan validateaddress()
236236
{
237-
return RPCHelpMan{"validateaddress",
238-
"\nReturn information about the given Dash address.\n",
239-
{
240-
{"address", RPCArg::Type::STR, RPCArg::Optional::NO, "The Dash address to validate"},
241-
},
242-
RPCResult{
243-
RPCResult::Type::OBJ, "", "",
244-
{
245-
{RPCResult::Type::BOOL, "isvalid", "If the address is valid or not"},
246-
{RPCResult::Type::STR, "address", /* optional */ true, "The Dash address validated"},
247-
{RPCResult::Type::STR_HEX, "scriptPubKey", /* optional */ true, "The hex-encoded scriptPubKey generated by the address"},
248-
{RPCResult::Type::BOOL, "isscript", /* optional */ true, "If the key is a script"},
249-
{RPCResult::Type::STR, "error", /* optional */ true, "Error message, if any"},
250-
}
251-
},
252-
RPCExamples{
253-
HelpExampleCli("validateaddress", "\"" + EXAMPLE_ADDRESS[0] + "\"") +
254-
HelpExampleRpc("validateaddress", "\"" + EXAMPLE_ADDRESS[0] + "\"")
255-
},
237+
return RPCHelpMan{
238+
"validateaddress",
239+
"\nReturn information about the given Dash address.\n",
240+
{
241+
{"address", RPCArg::Type::STR, RPCArg::Optional::NO, "The Dash address to validate"},
242+
},
243+
RPCResult{
244+
RPCResult::Type::OBJ, "", "",
245+
{
246+
{RPCResult::Type::BOOL, "isvalid", "If the address is valid or not"},
247+
{RPCResult::Type::STR, "address", /* optional */ true, "The Dash address validated"},
248+
{RPCResult::Type::STR_HEX, "scriptPubKey", /* optional */ true, "The hex-encoded scriptPubKey generated by the address"},
249+
{RPCResult::Type::BOOL, "isscript", /* optional */ true, "If the key is a script"},
250+
{RPCResult::Type::STR, "error", /* optional */ true, "Error message, if any"},
251+
}
252+
},
253+
RPCExamples{
254+
HelpExampleCli("validateaddress", "\"" + EXAMPLE_ADDRESS[0] + "\"") +
255+
HelpExampleRpc("validateaddress", "\"" + EXAMPLE_ADDRESS[0] + "\"")
256+
},
256257
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
257258
{
258259
std::string error_msg;

0 commit comments

Comments
 (0)