mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Fix wallet accounting and txn construction corner cases
This commit is contained in:
parent
fdd9c9310b
commit
97f4bad4a2
1 changed files with 2 additions and 1 deletions
|
|
@ -1523,7 +1523,7 @@ void CWalletTx::GetAmounts(list<COutputEntry>& listReceived,
|
|||
COutputEntry output = {address, nValueOut, assetID, (int)i, GetBlindingPubKey(i)};
|
||||
|
||||
// If we are debited by the transaction, add the output as a "sent" entry
|
||||
if (nDebit > CAmountMap())
|
||||
if (nDebit > CAmountMap() && !txout.IsFee())
|
||||
listSent.push_back(output);
|
||||
|
||||
// If we are receiving the output, add it as a "received" entry
|
||||
|
|
@ -2905,6 +2905,7 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
|
|||
output_pubkeys.push_back(GetBlindingPubKey(newTxOut.scriptPubKey));
|
||||
output_blinds.push_back(uint256());
|
||||
output_asset_blinds.push_back(uint256());
|
||||
output_asset_ids.push_back(BITCOINID);
|
||||
vAmounts.push_back(0);
|
||||
// Now it has to succeed
|
||||
bool ret = BlindOutputs(input_blinds, input_asset_blinds, input_asset_ids, input_amounts, output_blinds, output_asset_blinds, output_pubkeys, txNew);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue