From 83a1bfa2620cb95055cb90fdd13fd3de00c6dddb Mon Sep 17 00:00:00 2001 From: moneroexamples Date: Tue, 6 Jun 2017 05:19:56 +0800 Subject: [PATCH] mysql timestamp cast to uint64_t --- CMakeLists.txt | 1 - src/YourMoneroRequests.cpp | 4 ++-- src/ssqlses.cpp | 6 +++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 311a5da..6074e21 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -91,7 +91,6 @@ target_link_libraries(${PROJECT_NAME} common mnemonics epee - easylogging mysqlpp mysqlclient ${Boost_LIBRARIES} diff --git a/src/YourMoneroRequests.cpp b/src/YourMoneroRequests.cpp index 19e6940..6a971a8 100755 --- a/src/YourMoneroRequests.cpp +++ b/src/YourMoneroRequests.cpp @@ -181,7 +181,7 @@ YourMoneroRequests::get_address_txs(const shared_ptr< Session > session, const B {"unlock_time" , tx.unlock_time}, {"total_sent" , 0}, // to be field when checking for spent_outputs below {"total_received" , tx.total_received}, - {"timestamp" , tx.timestamp}, + {"timestamp" , static_cast(tx.timestamp)}, {"mempool" , false} // tx in database are never from mempool }; @@ -547,7 +547,7 @@ YourMoneroRequests::get_unspent_outs(const shared_ptr< Session > session, const {"tx_hash" , tx.hash}, {"tx_prefix_hash" , tx.prefix_hash}, {"tx_pub_key" , out.tx_pub_key}, - {"timestamp" , out.timestamp}, + {"timestamp" , static_cast(out.timestamp)}, {"height" , tx.height}, {"spend_key_images", json::array()} }; diff --git a/src/ssqlses.cpp b/src/ssqlses.cpp index 59ab960..8f311ca 100755 --- a/src/ssqlses.cpp +++ b/src/ssqlses.cpp @@ -45,7 +45,7 @@ XmrTransaction::to_json() const {"rct_type" , rct_type}, {"spendable" , bool {spendable}}, {"mixin" , mixin}, - {"timestamp" , timestamp} + {"timestamp" , static_cast(timestamp)} }; return j; @@ -76,7 +76,7 @@ XmrOutput::to_json() const {"global_index" , global_index}, {"out_index" , out_index}, {"mixin" , mixin}, - {"timestamp" , timestamp} + {"timestamp" , static_cast(timestamp)} }; return j; @@ -98,7 +98,7 @@ XmrInput::to_json() const {"output_id" , output_id}, {"key_image" , key_image}, {"amount" , amount}, - {"timestamp" , timestamp} + {"timestamp" , static_cast(timestamp)} }; return j;