Implement return tx functionality for post-carrot (#33)

* return tx fixes

* save change output for return tx

* successfully receive returned tx

* complete post-carrot return txs
This commit is contained in:
akildemir
2025-07-30 17:33:35 +03:00
committed by GitHub
parent e5c9b05ed6
commit 37594fe8fa
11 changed files with 188 additions and 86 deletions

View File

@@ -355,6 +355,14 @@ bool try_load_carrot_enote_from_transaction_v1(const cryptonote::transaction &tx
//D_e
enote_out.enote_ephemeral_pubkey = enote_ephemeral_pubkeys[ephemeral_pubkey_index];
// save all output keys in order to calculate Kr values.
for (const auto& out: tx.vout) {
const cryptonote::txout_to_carrot_v1 * const carrot_out = boost::strict_get<cryptonote::txout_to_carrot_v1>(&out.target);
if (carrot_out) {
enote_out.tx_output_keys.push_back(carrot_out->key);
}
}
return true;
}