Updated for Salvium v0.6.0

This commit is contained in:
MoneroOcean
2024-10-23 17:45:28 +03:00
parent 01ed1460e3
commit 655f79b0e0
3 changed files with 27 additions and 4 deletions
+20 -3
View File
@@ -447,8 +447,11 @@ namespace cryptonote
// SALVIUM-SPECIFIC FIELDS
// TX type
cryptonote::salvium_transaction_type tx_type;
// Return address
crypto::public_key return_address;
// Return address list (must be at least 1 and at most BULLETPROOF_MAX_OUTPUTS-1 - the "-1" is for the change output)
std::vector<crypto::public_key> return_address_list;
//return_address_change_mask
std::vector<uint8_t> return_address_change_mask;
// Return TX public key
crypto::public_key return_pubkey;
// Source asset type
@@ -737,8 +740,13 @@ namespace cryptonote
if (tx_type != cryptonote::salvium_transaction_type::PROTOCOL) {
VARINT_FIELD(amount_burnt)
if (tx_type != cryptonote::salvium_transaction_type::MINER) {
FIELD(return_address)
FIELD(return_pubkey)
if (type == cryptonote::transaction_type::TRANSFER && version >= TRANSACTION_VERSION_N_OUTS) {
FIELD(return_address_list)
FIELD(return_address_change_mask)
} else {
FIELD(return_address)
FIELD(return_pubkey)
}
FIELD(source_asset_type)
FIELD(destination_asset_type)
VARINT_FIELD(amount_slippage_limit)
@@ -915,6 +923,15 @@ namespace cryptonote
amount_minted = 0;
output_unlock_times.clear();
collateral_indices.clear();
// SAL
tx_type = cryptonote::transaction_type::UNSET;
return_address = crypto::null_pkey;
return_address_list.clear();
return_address_change_mask.clear();
return_pubkey = crypto::null_pkey;
source_asset_type.clear();
destination_asset_type.clear();
amount_slippage_limit = 0;
}
inline