aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_basic
diff options
context:
space:
mode:
authorcslashm <cslashm@gmail.com>2020-04-03 22:56:55 +0200
committercslashm <cslashm@gmail.com>2020-04-08 11:12:32 +0200
commit688a3e87e712123d182ae6715610c461988f9e74 (patch)
tree8c1a262441b36a20d665a9f3c5076182be6c5308 /src/cryptonote_basic
parentMerge pull request #6336 (diff)
downloadmonero-688a3e87e712123d182ae6715610c461988f9e74.tar.xz
Add timelock verification on device
Diffstat (limited to 'src/cryptonote_basic')
-rw-r--r--src/cryptonote_basic/cryptonote_format_utils.cpp14
-rw-r--r--src/cryptonote_basic/cryptonote_format_utils.h2
2 files changed, 16 insertions, 0 deletions
diff --git a/src/cryptonote_basic/cryptonote_format_utils.cpp b/src/cryptonote_basic/cryptonote_format_utils.cpp
index 651d61b06..f0b395f43 100644
--- a/src/cryptonote_basic/cryptonote_format_utils.cpp
+++ b/src/cryptonote_basic/cryptonote_format_utils.cpp
@@ -128,6 +128,20 @@ namespace cryptonote
namespace cryptonote
{
//---------------------------------------------------------------
+ void get_transaction_prefix_hash(const transaction_prefix& tx, crypto::hash& h, hw::device &hwdev)
+ {
+ hwdev.get_transaction_prefix_hash(tx,h);
+ }
+
+ //---------------------------------------------------------------
+ crypto::hash get_transaction_prefix_hash(const transaction_prefix& tx, hw::device &hwdev)
+ {
+ crypto::hash h = null_hash;
+ get_transaction_prefix_hash(tx, h, hwdev);
+ return h;
+ }
+
+ //---------------------------------------------------------------
void get_transaction_prefix_hash(const transaction_prefix& tx, crypto::hash& h)
{
std::ostringstream s;
diff --git a/src/cryptonote_basic/cryptonote_format_utils.h b/src/cryptonote_basic/cryptonote_format_utils.h
index 8ed3b0b43..d1b24d950 100644
--- a/src/cryptonote_basic/cryptonote_format_utils.h
+++ b/src/cryptonote_basic/cryptonote_format_utils.h
@@ -48,6 +48,8 @@ namespace epee
namespace cryptonote
{
//---------------------------------------------------------------
+ void get_transaction_prefix_hash(const transaction_prefix& tx, crypto::hash& h, hw::device &hwdev);
+ crypto::hash get_transaction_prefix_hash(const transaction_prefix& tx, hw::device &hwdev);
void get_transaction_prefix_hash(const transaction_prefix& tx, crypto::hash& h);
crypto::hash get_transaction_prefix_hash(const transaction_prefix& tx);
bool parse_and_validate_tx_prefix_from_blob(const blobdata& tx_blob, transaction_prefix& tx);