From df8bfe2a78ee2a0be626cad38280ba540a48ca19 Mon Sep 17 00:00:00 2001 From: Jethro Grassie Date: Fri, 6 Sep 2019 18:42:10 -0400 Subject: [PATCH] add a tiny optimization validating template --- src/xmr.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/xmr.cpp b/src/xmr.cpp index 47318ed..f54e4b0 100644 --- a/src/xmr.cpp +++ b/src/xmr.cpp @@ -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(sec_view); + const public_key &S = *reinterpret_cast(pub_spend); if (!parse_hexstr_to_binbuff(blob_hex, bd)) return XMR_PARSE_ERROR;