aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet_errors.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/wallet_errors.h')
-rw-r--r--src/wallet/wallet_errors.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/wallet/wallet_errors.h b/src/wallet/wallet_errors.h
index 5166f868f..2bbfc3167 100644
--- a/src/wallet/wallet_errors.h
+++ b/src/wallet/wallet_errors.h
@@ -86,6 +86,7 @@ namespace tools
// zero_amount
// zero_destination
// subtract_fee_from_bad_index
+ // nonzero_unlock_time
// wallet_rpc_error *
// daemon_busy
// no_connection_to_daemon
@@ -592,20 +593,17 @@ namespace tools
std::string && loc
, sources_t const & sources
, destinations_t const & destinations
- , uint64_t unlock_time
, cryptonote::network_type nettype
)
: transfer_error(std::move(loc), "transaction was not constructed")
, m_sources(sources)
, m_destinations(destinations)
- , m_unlock_time(unlock_time)
, m_nettype(nettype)
{
}
const sources_t& sources() const { return m_sources; }
const destinations_t& destinations() const { return m_destinations; }
- uint64_t unlock_time() const { return m_unlock_time; }
std::string to_string() const
{
@@ -637,15 +635,12 @@ namespace tools
cryptonote::print_money(dst.amount);
}
- ss << "\nunlock_time: " << m_unlock_time;
-
return ss.str();
}
private:
sources_t m_sources;
destinations_t m_destinations;
- uint64_t m_unlock_time;
cryptonote::network_type m_nettype;
};
//----------------------------------------------------------------------------------------------------
@@ -789,6 +784,14 @@ namespace tools
}
};
//----------------------------------------------------------------------------------------------------
+ struct nonzero_unlock_time : public transfer_error
+ {
+ explicit nonzero_unlock_time(std::string&& loc)
+ : transfer_error(std::move(loc), "transaction cannot have non-zero unlock time")
+ {
+ }
+ };
+ //----------------------------------------------------------------------------------------------------
struct wallet_rpc_error : public wallet_logic_error
{
const std::string& request() const { return m_request; }