Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
walletmodeltransaction.cpp
Go to the documentation of this file.
1// Copyright (c) 2011-present The Bitcoin Core developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
6
7#include <policy/policy.h>
8
13
18
23
28
33
38
43
45{
46 const CTransaction* walletTransaction = wtx.get();
47 int i = 0;
48 for (QList<SendCoinsRecipient>::iterator it = recipients.begin(); it != recipients.end(); ++it)
49 {
50 SendCoinsRecipient& rcp = (*it);
51 {
52 if (i == nChangePosRet)
53 i++;
54 rcp.amount = walletTransaction->vout[i].nValue;
55 i++;
56 }
57 }
58}
59
int64_t CAmount
Amount in satoshis (Can be negative)
Definition amount.h:12
The basic transaction that is broadcasted on the network and contained in blocks.
void setTransactionFee(const CAmount &newFee)
void reassignAmounts(int nChangePosRet)
void setWtx(const CTransactionRef &)
QList< SendCoinsRecipient > getRecipients() const
QList< SendCoinsRecipient > recipients
WalletModelTransaction(const QList< SendCoinsRecipient > &recipients)
CAmount getTotalTransactionAmount() const
int64_t GetVirtualTransactionSize(int64_t nWeight, int64_t nSigOpCost, unsigned int bytes_per_sigop)
Compute the virtual transaction size (weight reinterpreted as bytes).
Definition policy.cpp:381
std::shared_ptr< const CTransaction > CTransactionRef
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.
Definition time.h:73