mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-17 00:22:14 +11:00
15 lines
No EOL
541 B
C++
15 lines
No EOL
541 B
C++
#include "transaction.h"
|
|
|
|
Transaction::Transaction() = default;
|
|
Transaction::Transaction(std::string from_str, std::string to_str, uint32_t amount, uint64_t time) : amount(amount), time(time)
|
|
{
|
|
from = std::move(from_str);
|
|
to = std::move(to_str);
|
|
}
|
|
Transaction::Transaction(std::string from_str, std::string to_str, uint32_t amount) : amount(amount)
|
|
{
|
|
using namespace std::chrono;
|
|
from = std::move(from_str);
|
|
to = std::move(to_str);
|
|
time = duration_cast<milliseconds>(system_clock::now().time_since_epoch()).count();
|
|
} |