BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
|
Go to the documentation of this file.
27 #include <graphene/chain/hardfork.hpp>
37 if (block_time < HARDFORK_CORE_BSIP64_TIME)
42 "Memo unavailable until after HARDFORK BSIP64");
45 "HASH160 unavailable until after HARDFORK BSIP64" );
53 "Asset ${asset} cannot be transfered.", (
"asset", asset_to_transfer.
id) );
63 block_time < HARDFORK_CORE_BSIP64_TIME )
65 "Preimage size mismatch.");
83 "HTLC Timeout exceeds allowed length" );
86 "HTLC preimage length exceeds allowed length" );
90 const auto& from_account = o.
from( d );
91 const auto& to_account = o.
to( d );
94 "Asset ${asset} is not authorized for account ${acct}.",
95 (
"asset", asset_to_transfer.id )(
"acct", from_account.id ) );
97 "Asset ${asset} is not authorized for account ${acct}.",
98 (
"asset", asset_to_transfer.id )(
"acct", to_account.id ) );
127 const std::vector<char>& data;
132 : data( preimage ) {}
137 return T::hash( (
const char*)data.data(), (uint32_t) data.size() ) == preimage_hash;
149 "Provided preimage does not generate correct hash.");
175 "Extension would cause an invalid date");
178 "Extension pushes contract too far into the future" );
uint32_t sec_since_epoch() const
#define FC_CAPTURE_AND_RETHROW(...)
void check_htlc_redeem_hf_bsip64(const fc::time_point_sec &block_time, const htlc_redeem_operation &op, const htlc_object *htlc_obj)
tracks the blockchain state in an extensible manner
htlc_redeem_visitor(const std::vector< char > &preimage)
time_point_sec head_block_time() const
void_result do_apply(const htlc_redeem_operation &o)
const T & get(const object_id_type &id) const
asset get_balance(account_id_type owner, asset_id_type asset_id) const
Retrieve a particular account's balance in a given asset.
bool operator()(const T &preimage_hash) const
chain_parameters parameters
std::vector< char > preimage
tracks the parameters of an asset
const T & create(F &&constructor)
void adjust_balance(account_id_type account, asset delta)
Adjust a particular account's balance in a given asset by a delta.
void_result do_evaluate(const htlc_extend_operation &o)
bool is_transfer_restricted() const
fc::time_point_sec expiration
static time_point_sec maximum()
object_id_type do_apply(const htlc_create_operation &o)
uint32_t max_preimage_size
account_id_type update_issuer
extension< ext > extensions
uint32_t max_timeout_secs
uint32_t push_applied_operation(const operation &op, bool is_virtual=true)
bool is_authorized_asset(const database &d, const account_object &acct, const asset_object &asset_obj)
const htlc_object * htlc_obj
void_result do_evaluate(const htlc_redeem_operation &o)
void_result do_evaluate(const htlc_create_operation &o)
#define FC_ASSERT(TEST,...)
Checks a condition and throws an assert_exception if the test is FALSE.
account_id_type issuer
ID of the account which issued this asset.
condition_info conditions
void check_htlc_create_hf_bsip64(const fc::time_point_sec &block_time, const htlc_create_operation &op, const asset_object &asset_to_transfer)
object_id< SpaceID, TypeID > get_id() const
visitor::result_type visit(visitor &v)
const htlc_object * htlc_obj
const global_property_object & get_global_properties() const
provides stack-based nullable value similar to boost::optional
optional< htlc_options > get_committee_htlc_options(graphene::chain::database &db)
void remove(const object &obj)
void_result do_apply(const htlc_extend_operation &o)
fc::optional< memo_data > memo
extension< additional_options_type > extensions
database object to store HTLCs
uint32_t claim_period_seconds
void modify(const T &obj, const Lambda &m)