forked from lthn/blockchain
fixed compilation issues in wallet
This commit is contained in:
parent
78dc9164e7
commit
8101bc4932
3 changed files with 10 additions and 5 deletions
|
|
@ -190,6 +190,11 @@ namespace boost
|
|||
a & at.v;
|
||||
}
|
||||
template <class Archive>
|
||||
inline void serialize(Archive &a, currency::etc_tx_details_unlock_time2 &at, const boost::serialization::version_type ver)
|
||||
{
|
||||
a & at.unlock_time_array;
|
||||
}
|
||||
template <class Archive>
|
||||
inline void serialize(Archive &a, currency::etc_tx_details_expiration_time &at, const boost::serialization::version_type ver)
|
||||
{
|
||||
a & at.v;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ namespace tools
|
|||
{
|
||||
|
||||
//---------------------------------------------------------------
|
||||
uint64_t wallet2::get_max_unlock_time_from_receive_indices(const currency::transaction& tx, const tools::money_transfer2_details& td)
|
||||
uint64_t wallet2::get_max_unlock_time_from_receive_indices(const currency::transaction& tx, const tools::wallet_rpc::wallet_transfer_info_details& td)
|
||||
{
|
||||
uint64_t max_unlock_time = 0;
|
||||
// etc_tx_details_expiration_time have priority over etc_tx_details_expiration_time2
|
||||
|
|
@ -50,7 +50,7 @@ namespace tools
|
|||
|
||||
CHECK_AND_ASSERT_THROW_MES(ut2.unlock_time_array.size() == tx.vout.size(), "Internal error: wrong tx transfer details: ut2.unlock_time_array.size()" << ut2.unlock_time_array.size() << " is not equal transaction outputs vector size=" << tx.vout.size());
|
||||
|
||||
for (auto ri : td.receive_indices)
|
||||
for (auto ri : td.rcv)
|
||||
{
|
||||
CHECK_AND_ASSERT_THROW_MES(ri < tx.vout.size(), "Internal error: wrong tx transfer details: reciev index=" << ri << " is greater than transaction outputs vector " << tx.vout.size());
|
||||
if (tx.vout[ri].target.type() == typeid(currency::txout_to_key))
|
||||
|
|
@ -960,7 +960,7 @@ void wallet2::prepare_wti(wallet_rpc::wallet_transfer_info& wti, uint64_t height
|
|||
wti.amount = amount;
|
||||
wti.height = height;
|
||||
fill_transfer_details(tx, td, wti.td);
|
||||
wti.unlock_time = get_max_unlock_time_from_receive_indices(tx, td);
|
||||
wti.unlock_time = get_max_unlock_time_from_receive_indices(tx, wti.td);
|
||||
wti.timestamp = timestamp;
|
||||
wti.fee = currency::is_coinbase(tx) ? 0:currency::get_tx_fee(tx);
|
||||
wti.tx_blob_size = static_cast<uint32_t>(currency::get_object_blobsize(wti.tx));
|
||||
|
|
|
|||
|
|
@ -721,7 +721,7 @@ namespace tools
|
|||
void finalize_transaction(const finalize_tx_param& ftp, currency::transaction& tx, crypto::secret_key& tx_key, bool broadcast_tx);
|
||||
|
||||
std::string get_log_prefix() const { return m_log_prefix; }
|
||||
static uint64_t get_max_unlock_time_from_receive_indices(const currency::transaction& tx, const tools::money_transfer2_details& td);
|
||||
static uint64_t get_max_unlock_time_from_receive_indices(const currency::transaction& tx, const tools::wallet_rpc::wallet_transfer_info_details& td);
|
||||
private:
|
||||
void add_transfers_to_expiration_list(const std::vector<uint64_t>& selected_transfers, uint64_t expiration, uint64_t change_amount, const crypto::hash& related_tx_id);
|
||||
void remove_transfer_from_expiration_list(uint64_t transfer_index);
|
||||
|
|
@ -956,7 +956,7 @@ namespace boost
|
|||
//do not store this items in the file since it's quite easy to restore it from original tx
|
||||
if (Archive::is_loading::value)
|
||||
{
|
||||
x.unlock_time = wallet::get_max_unlock_time_from_receive_indices(x.tx, x.td)
|
||||
x.unlock_time = tools::wallet2::get_max_unlock_time_from_receive_indices(x.tx, x.td);
|
||||
x.is_service = currency::is_service_tx(x.tx);
|
||||
x.is_mixing = currency::is_mixin_tx(x.tx);
|
||||
x.is_mining = currency::is_coinbase(x.tx);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue