MCPcopy Create free account
hub / github.com/ElementsProject/elements / reassignAmounts

Method reassignAmounts

src/qt/walletmodeltransaction.cpp:51–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51void WalletModelTransaction::reassignAmounts(const std::vector<CAmount>& outAmounts, int nChangePosRet)
52{
53 const CTransaction* walletTransaction = wtx.get();
54 int i = 0;
55 for (auto it = recipients.begin(); it != recipients.end(); ++it)
56 {
57 auto& rcp = (*it);
58
59 {
60 if (i == nChangePosRet)
61 i++;
62 rcp.asset_amount = g_con_elementsmode ? outAmounts[i] : walletTransaction->vout[i].nValue.GetAmount();
63 i++;
64 }
65 }
66}
67
68CAmountMap WalletModelTransaction::getTotalTransactionAmount() const
69{

Callers 1

prepareTransactionMethod · 0.80

Calls 4

GetAmountMethod · 0.80
getMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected