forked from lthn/blockchain
inline for is_out_burned
This commit is contained in:
parent
9b2c951d71
commit
e18f300fae
1 changed files with 6 additions and 6 deletions
|
|
@ -406,20 +406,20 @@ namespace currency
|
|||
}
|
||||
|
||||
template<typename out_t>
|
||||
bool is_out_burned(const out_t& out) { CHECK_AND_ASSERT_THROW_MES(false, "incorrect out type: " << typeid(out).name()); }
|
||||
bool is_out_burned(const tx_out_bare& o) { return is_out_burned(o.target); }
|
||||
bool is_out_burned(const txout_to_key& o) { return o.key == null_pkey; }
|
||||
bool is_out_burned(const tx_out_zarcanum& o) { return o.stealth_address == null_pkey; }
|
||||
inline bool is_out_burned(const out_t& out) { CHECK_AND_ASSERT_THROW_MES(false, "incorrect out type: " << typeid(out).name()); }
|
||||
inline bool is_out_burned(const tx_out_bare& o) { return is_out_burned(o.target); }
|
||||
inline bool is_out_burned(const txout_to_key& o) { return o.key == null_pkey; }
|
||||
inline bool is_out_burned(const tx_out_zarcanum& o) { return o.stealth_address == null_pkey; }
|
||||
struct zz_is_out_burned_helper_visitor : boost::static_visitor<bool>
|
||||
{
|
||||
template<typename T>
|
||||
bool operator()(const T& v) const { return is_out_burned(v); }
|
||||
};
|
||||
bool is_out_burned(const tx_out_v& v)
|
||||
inline bool is_out_burned(const tx_out_v& v)
|
||||
{
|
||||
return boost::apply_visitor(zz_is_out_burned_helper_visitor(), v);
|
||||
}
|
||||
bool is_out_burned(const txout_target_v& v)
|
||||
inline bool is_out_burned(const txout_target_v& v)
|
||||
{
|
||||
return boost::apply_visitor(zz_is_out_burned_helper_visitor(), v);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue