forked from lthn/blockchain
signing prefix with ado
This commit is contained in:
parent
735a5adfde
commit
f3367b895a
4 changed files with 5 additions and 5 deletions
|
|
@ -4096,7 +4096,7 @@ bool blockchain_storage::validate_ado_ownership(asset_op_verification_context& a
|
|||
CHECK_AND_ASSERT_MES(avc.asset_op_history->size() != 0, false, "asset with id " << avc.asset_id << " has invalid history size() == 0");
|
||||
|
||||
crypto::public_key owner_key = avc.asset_op_history->back().descriptor.owner;
|
||||
return crypto::verify_schnorr_sig(tx_id, owner_key, aoop.gss);
|
||||
return crypto::verify_schnorr_sig(avc.tx_id, owner_key, aoop.gss);
|
||||
}
|
||||
//------------------------------------------------------------------
|
||||
bool blockchain_storage::put_asset_info(const transaction& tx, const crypto::hash& tx_id, const asset_descriptor_operation& ado)
|
||||
|
|
|
|||
|
|
@ -783,7 +783,6 @@ namespace currency
|
|||
FIELD(descriptor)
|
||||
FIELD(amount_commitment)
|
||||
END_VERSION_UNDER(1)
|
||||
FIELD(opt_proof)
|
||||
FIELD(opt_asset_id)
|
||||
END_SERIALIZE()
|
||||
|
||||
|
|
@ -792,7 +791,6 @@ namespace currency
|
|||
BOOST_SERIALIZE(descriptor)
|
||||
BOOST_SERIALIZE(amount_commitment)
|
||||
BOOST_END_VERSION_UNDER(1)
|
||||
BOOST_SERIALIZE(opt_proof)
|
||||
BOOST_SERIALIZE(opt_asset_id)
|
||||
END_BOOST_SERIALIZATION()
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1151,6 +1151,7 @@ namespace currency
|
|||
return true;
|
||||
}
|
||||
//---------------------------------------------------------------
|
||||
/*
|
||||
crypto::hash get_signature_hash_for_asset_operation(const asset_descriptor_operation& ado)
|
||||
{
|
||||
asset_descriptor_operation ado_local = ado;
|
||||
|
|
@ -1164,6 +1165,7 @@ namespace currency
|
|||
{
|
||||
op.opt_proof = boost::none;
|
||||
}
|
||||
*/
|
||||
|
||||
//---------------------------------------------------------------
|
||||
bool construct_tx_out(const tx_destination_entry& de, const crypto::secret_key& tx_sec_key, size_t output_index, transaction& tx, std::set<uint16_t>& deriv_cache, const account_keys& self, uint8_t tx_outs_attr /* = CURRENCY_TO_KEY_OUT_RELAXED */)
|
||||
|
|
@ -2706,7 +2708,7 @@ namespace currency
|
|||
else
|
||||
{
|
||||
//generate signature by wallet account
|
||||
|
||||
crypto::generate_schnorr_sig(tx_prefix_hash, ftp.ado_current_asset_owner, sender_account_keys.spend_secret_key, aoop.gss);
|
||||
}
|
||||
tx.proofs.emplace_back(aoop);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ namespace currency
|
|||
//crypto::secret_key asset_control_key = currency::null_skey;
|
||||
crypto::public_key ado_current_asset_owner = null_pkey;
|
||||
thirdparty_sign_handler* pthirdparty_sign_handler = nullptr;
|
||||
bool need_to_generate_ado_proof = false;
|
||||
mutable bool need_to_generate_ado_proof = false;
|
||||
|
||||
|
||||
BEGIN_SERIALIZE_OBJECT()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue