From 68a53d582bdc7819f2cda145083619540b8964ee Mon Sep 17 00:00:00 2001 From: moneroexamples Date: Thu, 12 Jan 2017 01:31:29 +0000 Subject: [PATCH] decode_ringct modified --- src/tools.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/tools.cpp b/src/tools.cpp index cd5f775..8efed77 100644 --- a/src/tools.cpp +++ b/src/tools.cpp @@ -719,22 +719,22 @@ decode_ringct(const rct::rctSig& rv, rct::key & mask, uint64_t & amount) { - crypto::key_derivation derivation; + try + { + crypto::key_derivation derivation; - bool r = crypto::generate_key_derivation(pub, sec, derivation); + bool r = crypto::generate_key_derivation(pub, sec, derivation); - if (!r) - { - cerr <<"Failed to generate key derivation to decode rct output " << i << endl; - return false; - } + if (!r) + { + cerr <<"Failed to generate key derivation to decode rct output " << i << endl; + return false; + } - crypto::secret_key scalar1; + crypto::secret_key scalar1; - crypto::derivation_to_scalar(derivation, i, scalar1); + crypto::derivation_to_scalar(derivation, i, scalar1); - try - { switch (rv.type) { case rct::RCTTypeSimple: