add a tiny optimization validating template

This commit is contained in:
Jethro Grassie 2019-09-06 18:42:10 -04:00
parent b127df87b2
commit df8bfe2a78
No known key found for this signature in database
GPG key ID: DE8ED755616565BB

View file

@ -136,10 +136,8 @@ int validate_block_from_blob(const char *blob_hex,
*/ */
block b = AUTO_VAL_INIT(b); block b = AUTO_VAL_INIT(b);
blobdata bd; blobdata bd;
secret_key v; const secret_key &v = *reinterpret_cast<const secret_key*>(sec_view);
public_key S; const public_key &S = *reinterpret_cast<const public_key*>(pub_spend);
memcpy(&unwrap(v), sec_view, 32);
memcpy(&S, pub_spend, 32);
if (!parse_hexstr_to_binbuff(blob_hex, bd)) if (!parse_hexstr_to_binbuff(blob_hex, bd))
return XMR_PARSE_ERROR; return XMR_PARSE_ERROR;