Skip to content

Commit 580230f

Browse files
committed
Merge #1147: [backport] Backport fixes from master to elements-22.x for rc4
85c25b1 Bump version to -rc4 (Pablo Greco) bb684f2 Update manpages (Pablo Greco) 38e9490 Elements-qt: Fix arrows to increase/decrease Amount (Andrea Bonel) 5954b10 Fixing issuance cases and half blinded cases in PSET (Allen Piscitello) 707cf20 Fix tapscript comment (roconnor-blockstream) 7fb99ff Fix Icon position in dmg (Pablo Greco) Pull request description: Backport #1140 #1141 #1145 and #1146 from master. Fix manpages Bump to -rc4 ACKs for top commit: delta1: utACK 85c25b1 Tree-SHA512: 78a30bec870530275d103b6cab630ebf96b2df39fd03fc426bb16b6743ce9311f7e7128e43bf7a6452d261377e6ac017d61b77cd9ad4e4c20040629ae20e13b4
2 parents 3e44c1f + 85c25b1 commit 580230f

File tree

13 files changed

+38
-21
lines changed

13 files changed

+38
-21
lines changed

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ AC_PREREQ([2.69])
22
define(_CLIENT_VERSION_MAJOR, 22)
33
define(_CLIENT_VERSION_MINOR, 0)
44
define(_CLIENT_VERSION_BUILD, 0)
5-
define(_CLIENT_VERSION_RC, 3)
5+
define(_CLIENT_VERSION_RC, 4)
66
define(_CLIENT_VERSION_IS_RELEASE, true)
77
define(_COPYRIGHT_YEAR, 2022)
88
define(_COPYRIGHT_HOLDERS,[The %s developers])

contrib/macdeploy/macdeployqtplus

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ ds['.']['icvp'] = icvp
536536
ds['.']['vSrn'] = ('long', 1)
537537

538538
ds['Applications']['Iloc'] = (370, 156)
539-
ds['Bitcoin-Qt.app']['Iloc'] = (128, 156)
539+
ds['Elements-Qt.app']['Iloc'] = (128, 156)
540540

541541
ds.flush()
542542
ds.close()

doc/man/elements-cli.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ elements-cli \- manual page for elements-cli v22.0.0
1515
.B elements-cli
1616
[\fI\,options\/\fR] \fI\,help <command> Get help for a command\/\fR
1717
.SH DESCRIPTION
18-
Elements Core RPC client version elements\-22.0.0
18+
Elements Core RPC client version v22.0.0
1919
.SH OPTIONS
2020
.HP
2121
\-?

doc/man/elements-qt.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ elements-qt \- manual page for elements-qt v22.0.0
66
.B elements-qt
77
[\fI\,command-line options\/\fR]
88
.SH DESCRIPTION
9-
Elements Core version elements\-22.0.0
9+
Elements Core version v22.0.0
1010
.SH OPTIONS
1111
.HP
1212
\-?

doc/man/elements-tx.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ elements-tx \- manual page for elements-tx v22.0.0
99
.B elements-tx
1010
[\fI\,options\/\fR] \fI\,-create \/\fR[\fI\,commands\/\fR] \fI\,Create hex-encoded Elements transaction\/\fR
1111
.SH DESCRIPTION
12-
Elements Core elements\-tx utility version elements\-22.0.0
12+
Elements Core elements\-tx utility version v22.0.0
1313
.SH OPTIONS
1414
.HP
1515
\-?

doc/man/elements-util.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ elements-util \- manual page for elements-util v22.0.0
66
.B elements-util
77
[\fI\,options\/\fR] [\fI\,commands\/\fR] \fI\,Do stuff\/\fR
88
.SH DESCRIPTION
9-
Elements Core elements\-util utility version elements\-22.0.0
9+
Elements Core elements\-util utility version v22.0.0
1010
.SH OPTIONS
1111
.HP
1212
\-?

doc/man/elements-wallet.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
.SH NAME
44
elements-wallet \- manual page for elements-wallet v22.0.0
55
.SH DESCRIPTION
6-
Elements Core elements\-wallet version elements\-22.0.0
6+
Elements Core elements\-wallet version v22.0.0
77
.PP
88
elements\-wallet is an offline tool for creating and interacting with Elements Core wallet files.
99
By default elements\-wallet will act on wallets in the default mainnet wallet directory in the datadir.

doc/man/elementsd.1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ elementsd \- manual page for elementsd v22.0.0
66
.B elementsd
77
[\fI\,options\/\fR] \fI\,Start Elements Core\/\fR
88
.SH DESCRIPTION
9-
Elements Core version elements\-22.0.0
10-
Copyright \(co 2009\-2021 The Elements Project developers
11-
Copyright \(co 2009\-2021 The Bitcoin Core developers
9+
Elements Core version v22.0.0
10+
Copyright \(co 2009\-2022 The Elements Project developers
11+
Copyright \(co 2009\-2022 The Bitcoin Core developers
1212
.PP
1313
Please contribute if you find Elements Core useful. Visit
1414
<https://elementsproject.org/> for further information about the software.

src/blindpsbt.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,9 @@ BlindingStatus BlindPSBT(PartiallySignedTransaction& psbt, std::map<uint32_t, st
476476
}
477477
}
478478
}
479+
else {
480+
input_asset_blinders.emplace_back();
481+
}
479482
}
480483
}
481484
}

src/psbt.cpp

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,26 @@ CMutableTransaction PartiallySignedTransaction::GetUnsignedTx(bool force_unblind
123123
txin.nSequence = input.sequence.value_or(max_sequence);
124124
txin.assetIssuance.assetBlindingNonce = input.m_issuance_blinding_nonce;
125125
txin.assetIssuance.assetEntropy = input.m_issuance_asset_entropy;
126-
if (input.m_issuance_value != std::nullopt && input.m_issuance_inflation_keys_amount != std::nullopt && force_unblinded) {
126+
// If there is a commitment we should set the value to the commitment unless we are forcing unblinded.
127+
// If we are forcing unblinded but there is no value, we just use the commitment.
128+
if (input.m_issuance_value != std::nullopt && (input.m_issuance_value_commitment.IsNull() || force_unblinded)) {
127129
txin.assetIssuance.nAmount.SetToAmount(*input.m_issuance_value);
128-
txin.assetIssuance.nInflationKeys.SetToAmount(*input.m_issuance_inflation_keys_amount);
129-
} else {
130+
}
131+
else if(!input.m_issuance_value_commitment.IsNull()) {
130132
txin.assetIssuance.nAmount = input.m_issuance_value_commitment;
133+
}
134+
else {
135+
txin.assetIssuance.nAmount.SetNull();
136+
}
137+
if (input.m_issuance_inflation_keys_amount != std::nullopt && (input.m_issuance_inflation_keys_commitment.IsNull() || force_unblinded)) {
138+
txin.assetIssuance.nInflationKeys.SetToAmount(*input.m_issuance_value);
139+
}
140+
else if(!input.m_issuance_inflation_keys_commitment.IsNull()) {
131141
txin.assetIssuance.nInflationKeys = input.m_issuance_inflation_keys_commitment;
132142
}
143+
else {
144+
txin.assetIssuance.nInflationKeys.SetNull();
145+
}
133146
mtx.vin.push_back(txin);
134147
}
135148
for (const PSBTOutput& output : outputs) {
@@ -531,12 +544,9 @@ bool PSBTOutput::Merge(const PSBTOutput& output)
531544
CTxOut PSBTOutput::GetTxOut() const
532545
{
533546
assert(script != std::nullopt);
534-
if (!m_value_commitment.IsNull() && !m_asset_commitment.IsNull()) {
535-
return CTxOut(m_asset_commitment, m_value_commitment, *script);
536-
}
537-
assert(amount != std::nullopt);
538-
assert(!m_asset.IsNull());
539-
return CTxOut(CConfidentialAsset(CAsset(m_asset)), CConfidentialValue(*amount), *script);
547+
assert(amount != std::nullopt || !m_value_commitment.IsNull());
548+
assert(!m_asset.IsNull() || !m_asset_commitment.IsNull());
549+
return CTxOut(!m_asset_commitment.IsNull() ? m_asset_commitment : CAsset(m_asset), !m_value_commitment.IsNull() ? m_value_commitment : CConfidentialValue(*amount), *script);
540550
}
541551

542552
bool PSBTOutput::IsBlinded() const

0 commit comments

Comments
 (0)