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
1 changed files with 2 additions and 4 deletions

View File

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