1
0
Fork 0
forked from lthn/blockchain

minor improvements

This commit is contained in:
sowle 2024-08-02 12:36:08 +02:00
parent 896eadd77b
commit e816cd969c
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC
2 changed files with 4 additions and 4 deletions

View file

@ -4113,14 +4113,14 @@ bool validate_ado_ownership(asset_op_verification_context& avc)
{
asset_operation_ownership_proof_eth aoop_eth{};
r = get_type_in_variant_container(avc.tx.proofs, aoop_eth);
CHECK_AND_ASSERT_MES(r, false, "Ownership validation failed - missing signature (asset_operation_ownership_proof)");
CHECK_AND_ASSERT_MES(r, false, "Ownership validation failed: asset_operation_ownership_proof_eth is missing");
return crypto::verify_eth_signature(avc.tx_id, last_ado.descriptor.owner_eth_pub_key.value(), aoop_eth.eth_sig);
}
// owner_eth_pub_key has no value -- falback to default
// owner_eth_pub_key has no value -- fallback to default
asset_operation_ownership_proof aoop = AUTO_VAL_INIT(aoop);
r = get_type_in_variant_container(avc.tx.proofs, aoop);
CHECK_AND_ASSERT_MES(r, false, "Ownership validation failed - missing signature (asset_operation_ownership_proof)");
CHECK_AND_ASSERT_MES(r, false, "Ownership validation failed: asset_operation_ownership_proof is missing");
return crypto::verify_schnorr_sig(avc.tx_id, last_ado.descriptor.owner, aoop.gss);
}

View file

@ -708,7 +708,7 @@ namespace currency
std::string meta_info;
crypto::public_key owner = currency::null_pkey; // consider premultipling by 1/8
bool hidden_supply = false;
std::optional<crypto::eth_public_key> owner_eth_pub_key;
std::optional<crypto::eth_public_key> owner_eth_pub_key; // note: the size is 33 bytes (if present)
uint8_t version = ASSET_DESCRIPTOR_BASE_STRUCTURE_VER;