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
mnemonics
epee
easylogging
mysqlpp
mysqlclient
${Boost_LIBRARIES}

@ -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<uint64_t>(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<uint64_t>(out.timestamp)},
{"height" , tx.height},
{"spend_key_images", json::array()}
};

@ -45,7 +45,7 @@ XmrTransaction::to_json() const
{"rct_type" , rct_type},
{"spendable" , bool {spendable}},
{"mixin" , mixin},
{"timestamp" , timestamp}
{"timestamp" , static_cast<uint64_t>(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<uint64_t>(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<uint64_t>(timestamp)}
};
return j;

Loading…
Cancel
Save