jeffro comments

This commit is contained in:
j-berman
2025-05-12 17:08:27 -07:00
committed by akildemir
parent f2f21a49b1
commit d483b9872b
4 changed files with 40 additions and 2 deletions
+5 -1
View File
@@ -34,6 +34,7 @@
#include "cryptonote_basic/cryptonote_format_utils.h"
#include "profile_tools.h"
#include "ringct/rctOps.h"
#include "ringct/rctSigs.h"
#include "lmdb/db_lmdb.h"
@@ -240,7 +241,10 @@ void BlockchainDB::add_transaction(const crypto::hash& blk_hash, const std::pair
if (miner_tx && tx.version == 2)
{
cryptonote::tx_out vout = tx.vout[i];
rct::key commitment = rct::zeroCommit(vout.amount);
// TODO: avoid multiple expensive zeroCommitVartime call here + get_outs_by_last_locked_block + ver_non_input_consensus
rct::key commitment;
if (!rct::getCommitment(tx, i, commitment))
throw std::runtime_error("Failed to get miner tx commitment, aborting");
vout.amount = 0;
amount_output_indices[i] = add_output(tx_hash, vout, i, unlock_time,
&commitment);