forked from lthn/blockchain
fixed few compilation issues - 2
This commit is contained in:
parent
3f0bed4899
commit
66fbe640ef
3 changed files with 12 additions and 15 deletions
|
|
@ -132,17 +132,6 @@ std::string wallet2::transfer_flags_to_str(uint32_t flags)
|
|||
result[4] = 'c';
|
||||
return result;
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
uint64_t transfer_details_base_to_amount(const transfer_details_base& tdb)
|
||||
{
|
||||
return tdb.amount();
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
std::string transfer_details_base_to_tx_hash(const transfer_details_base& tdb)
|
||||
{
|
||||
return epee::string_tools::pod_to_hex(currency::get_transaction_hash(tdb.m_ptx_wallet_info->m_tx));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
void wallet2::init(const std::string& daemon_address)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -226,8 +226,6 @@ namespace tools
|
|||
static std::string transfer_flags_to_str(uint32_t flags);
|
||||
|
||||
|
||||
static uint64_t transfer_details_base_to_amount(const transfer_details_base& tdb);
|
||||
static std::string transfer_details_base_to_tx_hash(const transfer_details_base& tdb);
|
||||
|
||||
struct mining_context : public currency::pos_mining_context
|
||||
{
|
||||
|
|
|
|||
|
|
@ -321,6 +321,16 @@ namespace tools
|
|||
THROW_IF_TRUE_WALLET_INT_ERR_EX_NO_HANDLER(false, "transform_value_to_ptr shoruld never be called");
|
||||
return std::shared_ptr<transaction_wallet_info>();
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
inline uint64_t transfer_details_base_to_amount(const transfer_details_base& tdb)
|
||||
{
|
||||
return tdb.amount();
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
inline std::string transfer_details_base_to_tx_hash(const transfer_details_base& tdb)
|
||||
{
|
||||
return epee::string_tools::pod_to_hex(currency::get_transaction_hash(tdb.m_ptx_wallet_info->m_tx));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -386,8 +396,8 @@ namespace tools
|
|||
KV_SERIALIZE(m_flags)
|
||||
KV_SERIALIZE(m_amount)
|
||||
KV_SERIALIZE_N(m_zc_info_ptr, "zc_out_info")
|
||||
KV_SERIALIZE_EPHEMERAL_N(uint64_t, tools::transfer_details_base_to_amount, "amount")
|
||||
KV_SERIALIZE_EPHEMERAL_N(std::string, tools::transfer_details_base_to_tx_hash, "tx_id")
|
||||
KV_SERIALIZE_EPHEMERAL_N(uint64_t, detail::transfer_details_base_to_amount, "amount")
|
||||
KV_SERIALIZE_EPHEMERAL_N(std::string, detail::transfer_details_base_to_tx_hash, "tx_id")
|
||||
END_KV_SERIALIZE_MAP()
|
||||
|
||||
BEGIN_BOOST_SERIALIZATION()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue