mysql timestamp cast to uint64_t

pull/34/head
moneroexamples 7 years ago
parent aa44f82152
commit 83a1bfa262

@ -91,7 +91,6 @@ target_link_libraries(${PROJECT_NAME}
common common
mnemonics mnemonics
epee epee
easylogging
mysqlpp mysqlpp
mysqlclient mysqlclient
${Boost_LIBRARIES} ${Boost_LIBRARIES}

@ -181,7 +181,7 @@ YourMoneroRequests::get_address_txs(const shared_ptr< Session > session, const B
{"unlock_time" , tx.unlock_time}, {"unlock_time" , tx.unlock_time},
{"total_sent" , 0}, // to be field when checking for spent_outputs below {"total_sent" , 0}, // to be field when checking for spent_outputs below
{"total_received" , tx.total_received}, {"total_received" , tx.total_received},
{"timestamp" , tx.timestamp}, {"timestamp" , static_cast<uint64_t>(tx.timestamp)},
{"mempool" , false} // tx in database are never from mempool {"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_hash" , tx.hash},
{"tx_prefix_hash" , tx.prefix_hash}, {"tx_prefix_hash" , tx.prefix_hash},
{"tx_pub_key" , out.tx_pub_key}, {"tx_pub_key" , out.tx_pub_key},
{"timestamp" , out.timestamp}, {"timestamp" , static_cast<uint64_t>(out.timestamp)},
{"height" , tx.height}, {"height" , tx.height},
{"spend_key_images", json::array()} {"spend_key_images", json::array()}
}; };

@ -45,7 +45,7 @@ XmrTransaction::to_json() const
{"rct_type" , rct_type}, {"rct_type" , rct_type},
{"spendable" , bool {spendable}}, {"spendable" , bool {spendable}},
{"mixin" , mixin}, {"mixin" , mixin},
{"timestamp" , timestamp} {"timestamp" , static_cast<uint64_t>(timestamp)}
}; };
return j; return j;
@ -76,7 +76,7 @@ XmrOutput::to_json() const
{"global_index" , global_index}, {"global_index" , global_index},
{"out_index" , out_index}, {"out_index" , out_index},
{"mixin" , mixin}, {"mixin" , mixin},
{"timestamp" , timestamp} {"timestamp" , static_cast<uint64_t>(timestamp)}
}; };
return j; return j;
@ -98,7 +98,7 @@ XmrInput::to_json() const
{"output_id" , output_id}, {"output_id" , output_id},
{"key_image" , key_image}, {"key_image" , key_image},
{"amount" , amount}, {"amount" , amount},
{"timestamp" , timestamp} {"timestamp" , static_cast<uint64_t>(timestamp)}
}; };
return j; return j;

Loading…
Cancel
Save