Skip to content

Commit

Permalink
fix bug on output extract dest
Browse files Browse the repository at this point in the history
  • Loading branch information
RosenKrumov committed Sep 26, 2023
1 parent 5de77da commit 520e73e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,7 @@ bool BlockAssembler::CheckTransactionLydraSpending(const CTxMemPool::setEntries&
addresses_balances.insert({dest, rembalance});
}
} else {
LogPrintf("FAIL EXTRACT\n");
return false;
}
}
Expand All @@ -734,12 +735,16 @@ bool BlockAssembler::CheckTransactionLydraSpending(const CTxMemPool::setEntries&
const CTxOut& out = tx.vout[j];
CTxDestination dest;
if (ExtractDestination(out.scriptPubKey, dest)) {
LogPrintf("SUCCESS EXTRACT OUT\n");
LogPrintf("DEST -> %s\n", EncodeDestination(dest));
if (addresses_outputs.find(dest) != addresses_outputs.end())
addresses_outputs[dest] += out.nValue;
else
addresses_outputs[dest] = out.nValue;
} else {
return false;
LogPrintf("FAIL EXTRACT OUT\n");
LogPrintf("DEST -> %s\n", EncodeDestination(dest));
continue;
}
}

Expand Down

0 comments on commit 520e73e

Please sign in to comment.