This commit is contained in:
Nathan Hourt 2015-07-22 13:17:49 -04:00
parent 63222183cd
commit 3196eb75a7
3 changed files with 40 additions and 6 deletions

View file

@ -2,7 +2,7 @@
#include <graphene/chain/protocol/base.hpp>
#include <graphene/chain/protocol/memo.hpp>
namespace graphene { namespace chain {
namespace graphene { namespace chain {
/**
* @ingroup operations
@ -20,9 +20,9 @@ namespace graphene { namespace chain {
*/
struct transfer_operation : public base_operation
{
struct fee_parameters_type {
uint64_t fee = 20 * GRAPHENE_BLOCKCHAIN_PRECISION;
uint32_t price_per_kbyte = 10; /// only required for large memos.
struct fee_parameters_type {
uint64_t fee = 20 * GRAPHENE_BLOCKCHAIN_PRECISION;
uint32_t price_per_kbyte = 10 * GRAPHENE_BLOCKCHAIN_PRECISION; /// only required for large memos.
};
asset fee;
@ -54,7 +54,7 @@ namespace graphene { namespace chain {
*/
struct override_transfer_operation : public base_operation
{
struct fee_parameters_type {
struct fee_parameters_type {
uint64_t fee = 20 * GRAPHENE_BLOCKCHAIN_PRECISION;
uint32_t price_per_kbyte = 10; /// only required for large memos.
};
@ -76,7 +76,7 @@ namespace graphene { namespace chain {
void validate()const;
share_type calculate_fee(const fee_parameters_type& k)const;
void get_impacted_accounts( flat_set<account_id_type>& i )const
{
{
i.insert(to);
i.insert(from);
i.insert(issuer);

View file

@ -0,0 +1,3 @@
#include "GrapheneObject.hpp"
// This space intentionally left blank

View file

@ -0,0 +1,31 @@
#pragma once
#pragma GCC diagnostic ignored "-Wunknown-pragmas"
#include <QObject>
#include <functional>
using ObjectId = qint64;
Q_DECLARE_METATYPE(ObjectId)
Q_DECLARE_METATYPE(std::function<void()>)
class GrapheneObject : public QObject
{
Q_OBJECT
Q_PROPERTY(ObjectId id MEMBER m_id READ id NOTIFY idChanged)
ObjectId m_id;
public:
GrapheneObject(ObjectId id = -1, QObject* parent = nullptr)
: QObject(parent), m_id(id)
{}
ObjectId id() const {
return m_id;
}
Q_SIGNALS:
void idChanged();
};