Skip to content

Commit 7e5c6e7

Browse files
committed
Merge #2594: [Backport] 5.3.2.1 backports
ac81ee6 GUI: bugfix, set locked label invisible for shield notes. (furszy) 6cdb6df sendmany: fix not set min depth for legacy transactions. (furszy) 74c4b9d [BUG][GUI] Refine bytes/fee/"after fee" calculation in coin-control (random-zebra) a5d236a GUI: dashboard chart, fix last day of the month not being shown. (furszy) Pull request description: List of PRs to backport to the v5.3 branch for a small and concrete bugs fixing release v5.3.2.1 (zero risk release). * #2568 * #2578 * #2592 * #2593 ACKs for top commit: random-zebra: utACK ac81ee6 Fuzzbawls: ACK ac81ee6 Tree-SHA512: 81a69e3e7ee342c4194cd34b9d230e6c2cfe5a77d3b58631aeb69406caf4e14a82f521b9df9f9953fcad6d93044e76740523b3e8eaa7d4ec6bf3079b6b2b6c95
2 parents 00ef7eb + ac81ee6 commit 7e5c6e7

File tree

7 files changed

+13
-12
lines changed

7 files changed

+13
-12
lines changed

src/qt/coincontroldialog.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,7 @@ void CoinControlDialog::updateLabelLocked()
478478
} else
479479
ui->labelLocked->setVisible(false);
480480
} else {
481+
ui->labelLocked->setVisible(false);
481482
// TODO: implement locked notes functionality inside the wallet..
482483
}
483484
}
@@ -550,9 +551,6 @@ TotalAmounts CoinControlDialog::getTotals() const
550551
t.nBytes += (GetCompactSize(nShieldIns) + GetCompactSize(nShieldOuts));
551552
}
552553

553-
// !TODO: ExtraPayload size for special txes. For now 1 byte for nullopt.
554-
t.nBytes += 1;
555-
556554
// nVersion, nType, nLockTime
557555
t.nBytes += 8;
558556

src/qt/pivx/dashboardwidget.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,9 +492,10 @@ void DashboardWidget::updateStakeFilter()
492492
if (yearFilter != 0) {
493493
if (filterByMonth) {
494494
QDate monthFirst = QDate(yearFilter, monthFilter, 1);
495+
QDate monthLast = QDate(yearFilter, monthFilter, monthFirst.daysInMonth());
495496
stakesFilter->setDateRange(
496497
QDateTime(monthFirst),
497-
QDateTime(QDate(yearFilter, monthFilter, monthFirst.daysInMonth()))
498+
QDateTime(monthLast).addSecs(86399) // last second of the day
498499
);
499500
} else {
500501
stakesFilter->setDateRange(

src/sapling/sapling_operation.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
#include "primitives/transaction.h"
1212
#include "wallet/wallet.h"
1313

14-
// transaction.h comment: spending taddr output requires CTxIn >= 148 bytes and typical taddr txout is 34 bytes
15-
#define CTXIN_SPEND_DUST_SIZE 148
16-
#define CTXOUT_REGULAR_SIZE 34
17-
1814
class CCoinControl;
1915
struct TxValues;
2016

src/sapling/sapling_transaction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <boost/variant.hpp>
1818

1919
// transaction.h comment: spending taddr output requires CTxIn >= 148 bytes and typical taddr txout is 34 bytes
20-
#define CTXIN_SPEND_DUST_SIZE 148
20+
#define CTXIN_SPEND_DUST_SIZE 149
2121
#define CTXOUT_REGULAR_SIZE 34
2222

2323
// These constants are defined in the protocol § 7.1:

src/wallet/rpcwallet.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2348,7 +2348,10 @@ static UniValue legacy_sendmany(CWallet* const pwallet, const UniValue& sendTo,
23482348
nullptr, // coinControl
23492349
true, // sign
23502350
0, // nFeePay
2351-
fIncludeDelegated);
2351+
fIncludeDelegated,
2352+
nullptr, // fStakeDelegationVoided
2353+
0, // default extra size
2354+
nMinDepth);
23522355
if (!fCreated)
23532356
throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, strFailReason);
23542357
const CWallet::CommitResult& res = pwallet->CommitTransaction(txNew, keyChange, g_connman.get());

src/wallet/wallet.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3005,7 +3005,8 @@ bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend,
30053005
CAmount nFeePay,
30063006
bool fIncludeDelegated,
30073007
bool* fStakeDelegationVoided,
3008-
int nExtraSize)
3008+
int nExtraSize,
3009+
int nMinDepth)
30093010
{
30103011
CAmount nValue = 0;
30113012
int nChangePosRequest = nChangePosInOut;
@@ -3030,6 +3031,7 @@ bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend,
30303031
CWallet::AvailableCoinsFilter coinFilter;
30313032
coinFilter.fOnlySpendable = true;
30323033
coinFilter.fIncludeDelegated = fIncludeDelegated;
3034+
coinFilter.minDepth = nMinDepth;
30333035

30343036
{
30353037
std::set<std::pair<const CWalletTx*,unsigned int> > setCoins;

src/wallet/wallet.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,8 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
10541054
CAmount nFeePay = 0,
10551055
bool fIncludeDelegated = false,
10561056
bool* fStakeDelegationVoided = nullptr,
1057-
int nExtraSize = 0);
1057+
int nExtraSize = 0,
1058+
int nMinDepth = 0);
10581059

10591060
bool CreateTransaction(CScript scriptPubKey, const CAmount& nValue, CTransactionRef& tx, CReserveKey& reservekey, CAmount& nFeeRet, std::string& strFailReason, const CCoinControl* coinControl = NULL, CAmount nFeePay = 0, bool fIncludeDelegated = false);
10601061

0 commit comments

Comments
 (0)