Final fixes
Last round of fixes following the rebase to Beatrice
This commit is contained in:
parent
a9135cbdd2
commit
4e3e0e010a
33 changed files with 135 additions and 104 deletions
2
.gitmodules
vendored
2
.gitmodules
vendored
|
|
@ -4,6 +4,6 @@
|
||||||
ignore = dirty
|
ignore = dirty
|
||||||
[submodule "libraries/fc"]
|
[submodule "libraries/fc"]
|
||||||
path = libraries/fc
|
path = libraries/fc
|
||||||
url = https://github.com/peerplays-network/peerplays-fc.git
|
url = https://github.com/nathanhourt/peerplays-fc
|
||||||
branch = latest-fc
|
branch = latest-fc
|
||||||
ignore = dirty
|
ignore = dirty
|
||||||
|
|
|
||||||
|
|
@ -80,9 +80,15 @@ add_library( graphene_chain
|
||||||
betting_market_evaluator.cpp
|
betting_market_evaluator.cpp
|
||||||
betting_market_object.cpp
|
betting_market_object.cpp
|
||||||
betting_market_group_object.cpp
|
betting_market_group_object.cpp
|
||||||
|
custom_permission_evaluator.cpp
|
||||||
|
custom_account_authority_evaluator.cpp
|
||||||
|
|
||||||
affiliate_payout.cpp
|
affiliate_payout.cpp
|
||||||
|
|
||||||
|
offer_object.cpp
|
||||||
|
offer_evaluator.cpp
|
||||||
|
nft_evaluator.cpp
|
||||||
|
|
||||||
${HEADERS}
|
${HEADERS}
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/include/graphene/chain/hardfork.hpp"
|
"${CMAKE_CURRENT_BINARY_DIR}/include/graphene/chain/hardfork.hpp"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,8 @@
|
||||||
#include <graphene/protocol/operations.hpp>
|
#include <graphene/protocol/operations.hpp>
|
||||||
#include <graphene/protocol/betting_market.hpp>
|
#include <graphene/protocol/betting_market.hpp>
|
||||||
|
|
||||||
|
#include <fc/crypto/digest.hpp>
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
struct proposed_operations_digest_accumulator
|
struct proposed_operations_digest_accumulator
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <graphene/chain/evaluator.hpp>
|
#include <graphene/chain/evaluator.hpp>
|
||||||
#include <graphene/chain/protocol/custom_account_authority.hpp>
|
|
||||||
|
#include <graphene/protocol/custom_account_authority.hpp>
|
||||||
|
|
||||||
namespace graphene
|
namespace graphene
|
||||||
{
|
{
|
||||||
|
|
@ -35,4 +36,4 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace chain
|
} // namespace chain
|
||||||
} // namespace graphene
|
} // namespace graphene
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <graphene/chain/protocol/types.hpp>
|
#include <graphene/chain/types.hpp>
|
||||||
|
|
||||||
#include <graphene/db/object.hpp>
|
#include <graphene/db/object.hpp>
|
||||||
#include <graphene/db/generic_index.hpp>
|
#include <graphene/db/generic_index.hpp>
|
||||||
|
|
||||||
|
|
@ -23,7 +24,6 @@ namespace graphene { namespace chain {
|
||||||
time_point_sec valid_to;
|
time_point_sec valid_to;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct by_id;
|
|
||||||
struct by_permission_and_op;
|
struct by_permission_and_op;
|
||||||
struct by_expiration;
|
struct by_expiration;
|
||||||
using custom_account_authority_multi_index_type = multi_index_container<
|
using custom_account_authority_multi_index_type = multi_index_container<
|
||||||
|
|
@ -51,5 +51,7 @@ namespace graphene { namespace chain {
|
||||||
|
|
||||||
} } // graphene::chain
|
} } // graphene::chain
|
||||||
|
|
||||||
|
MAP_OBJECT_ID_TO_TYPE(graphene::chain::custom_account_authority_object)
|
||||||
|
|
||||||
FC_REFLECT_DERIVED( graphene::chain::custom_account_authority_object, (graphene::db::object),
|
FC_REFLECT_DERIVED( graphene::chain::custom_account_authority_object, (graphene::db::object),
|
||||||
(permission_id)(operation_type)(valid_from)(valid_to) )
|
(permission_id)(operation_type)(valid_from)(valid_to) )
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <graphene/chain/evaluator.hpp>
|
#include <graphene/chain/evaluator.hpp>
|
||||||
#include <graphene/chain/protocol/custom_permission.hpp>
|
|
||||||
|
#include <graphene/protocol/custom_permission.hpp>
|
||||||
|
|
||||||
namespace graphene
|
namespace graphene
|
||||||
{
|
{
|
||||||
|
|
@ -35,4 +37,4 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace chain
|
} // namespace chain
|
||||||
} // namespace graphene
|
} // namespace graphene
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <graphene/chain/protocol/types.hpp>
|
|
||||||
|
#include <graphene/chain/types.hpp>
|
||||||
|
|
||||||
|
#include <graphene/protocol/authority.hpp>
|
||||||
|
|
||||||
#include <graphene/db/object.hpp>
|
#include <graphene/db/object.hpp>
|
||||||
#include <graphene/db/generic_index.hpp>
|
#include <graphene/db/generic_index.hpp>
|
||||||
|
|
||||||
|
|
@ -25,7 +29,6 @@ namespace graphene { namespace chain {
|
||||||
authority auth;
|
authority auth;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct by_id;
|
|
||||||
struct by_account_and_permission;
|
struct by_account_and_permission;
|
||||||
using custom_permission_multi_index_type = multi_index_container<
|
using custom_permission_multi_index_type = multi_index_container<
|
||||||
custom_permission_object,
|
custom_permission_object,
|
||||||
|
|
@ -45,5 +48,7 @@ namespace graphene { namespace chain {
|
||||||
|
|
||||||
} } // graphene::chain
|
} } // graphene::chain
|
||||||
|
|
||||||
|
MAP_OBJECT_ID_TO_TYPE(graphene::chain::custom_permission_object)
|
||||||
|
|
||||||
FC_REFLECT_DERIVED( graphene::chain::custom_permission_object, (graphene::db::object),
|
FC_REFLECT_DERIVED( graphene::chain::custom_permission_object, (graphene::db::object),
|
||||||
(account)(permission_name)(auth) )
|
(account)(permission_name)(auth) )
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,9 @@
|
||||||
|
|
||||||
#include <graphene/chain/database.hpp>
|
#include <graphene/chain/database.hpp>
|
||||||
#include <graphene/chain/evaluator.hpp>
|
#include <graphene/chain/evaluator.hpp>
|
||||||
#include <graphene/chain/protocol/operations.hpp>
|
|
||||||
#include <graphene/chain/protocol/types.hpp>
|
#include <graphene/protocol/operations.hpp>
|
||||||
|
#include <graphene/protocol/types.hpp>
|
||||||
|
|
||||||
namespace graphene { namespace chain {
|
namespace graphene { namespace chain {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <graphene/chain/protocol/types.hpp>
|
|
||||||
|
#include <graphene/chain/types.hpp>
|
||||||
|
|
||||||
#include <graphene/db/object.hpp>
|
#include <graphene/db/object.hpp>
|
||||||
#include <graphene/db/generic_index.hpp>
|
#include <graphene/db/generic_index.hpp>
|
||||||
|
|
||||||
|
|
@ -10,7 +12,7 @@ namespace graphene { namespace chain {
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static const uint8_t space_id = protocol_ids;
|
static const uint8_t space_id = protocol_ids;
|
||||||
static const uint8_t type_id = nft_metadata_type;
|
static const uint8_t type_id = nft_metadata_object_type;
|
||||||
|
|
||||||
account_id_type owner;
|
account_id_type owner;
|
||||||
std::string name;
|
std::string name;
|
||||||
|
|
@ -87,6 +89,9 @@ namespace graphene { namespace chain {
|
||||||
|
|
||||||
} } // graphene::chain
|
} } // graphene::chain
|
||||||
|
|
||||||
|
MAP_OBJECT_ID_TO_TYPE(graphene::chain::nft_metadata_object)
|
||||||
|
MAP_OBJECT_ID_TO_TYPE(graphene::chain::nft_object)
|
||||||
|
|
||||||
FC_REFLECT_DERIVED( graphene::chain::nft_metadata_object, (graphene::db::object),
|
FC_REFLECT_DERIVED( graphene::chain::nft_metadata_object, (graphene::db::object),
|
||||||
(owner)
|
(owner)
|
||||||
(name)
|
(name)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
#include <graphene/chain/protocol/operations.hpp>
|
|
||||||
#include <graphene/chain/evaluator.hpp>
|
#include <graphene/chain/evaluator.hpp>
|
||||||
#include <graphene/chain/database.hpp>
|
#include <graphene/chain/database.hpp>
|
||||||
|
|
||||||
|
#include <graphene/protocol/operations.hpp>
|
||||||
|
|
||||||
namespace graphene
|
namespace graphene
|
||||||
{
|
{
|
||||||
namespace chain
|
namespace chain
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <graphene/chain/protocol/operations.hpp>
|
|
||||||
|
#include <graphene/chain/types.hpp>
|
||||||
|
|
||||||
|
#include <graphene/protocol/operations.hpp>
|
||||||
|
|
||||||
#include <graphene/db/generic_index.hpp>
|
#include <graphene/db/generic_index.hpp>
|
||||||
|
|
||||||
namespace graphene
|
namespace graphene
|
||||||
|
|
@ -99,6 +103,9 @@ namespace graphene
|
||||||
} // namespace chain
|
} // namespace chain
|
||||||
} // namespace graphene
|
} // namespace graphene
|
||||||
|
|
||||||
|
MAP_OBJECT_ID_TO_TYPE(graphene::chain::offer_object)
|
||||||
|
MAP_OBJECT_ID_TO_TYPE(graphene::chain::offer_history_object)
|
||||||
|
|
||||||
FC_REFLECT_DERIVED(graphene::chain::offer_object, (graphene::db::object),
|
FC_REFLECT_DERIVED(graphene::chain::offer_object, (graphene::db::object),
|
||||||
(issuer)(item_ids)(bidder)(bid_price)(minimum_price)(
|
(issuer)(item_ids)(bidder)(bid_price)(minimum_price)(
|
||||||
maximum_price)(buying_item)(offer_expiration_date))
|
maximum_price)(buying_item)(offer_expiration_date))
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,6 @@ namespace graphene
|
||||||
auto now = d.head_block_time();
|
auto now = d.head_block_time();
|
||||||
FC_ASSERT(now >= HARDFORK_NFT_TIME, "Not allowed until NFT HF");
|
FC_ASSERT(now >= HARDFORK_NFT_TIME, "Not allowed until NFT HF");
|
||||||
const auto &offer = op.offer_id(d);
|
const auto &offer = op.offer_id(d);
|
||||||
op.bidder(d);
|
|
||||||
for (const auto &item : offer.item_ids)
|
for (const auto &item : offer.item_ids)
|
||||||
{
|
{
|
||||||
const auto &nft_obj = item(d);
|
const auto &nft_obj = item(d);
|
||||||
|
|
@ -335,4 +334,4 @@ namespace graphene
|
||||||
FC_CAPTURE_AND_RETHROW((op))
|
FC_CAPTURE_AND_RETHROW((op))
|
||||||
}
|
}
|
||||||
} // namespace chain
|
} // namespace chain
|
||||||
} // namespace graphene
|
} // namespace graphene
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@ list(APPEND SOURCES account.cpp
|
||||||
custom_permission.cpp
|
custom_permission.cpp
|
||||||
custom_account_authority.cpp
|
custom_account_authority.cpp
|
||||||
offer.cpp
|
offer.cpp
|
||||||
|
nft.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
#include <graphene/chain/protocol/custom_account_authority.hpp>
|
#include <graphene/protocol/custom_account_authority.hpp>
|
||||||
#include <graphene/chain/protocol/operations.hpp>
|
#include <graphene/protocol/operations.hpp>
|
||||||
|
|
||||||
namespace graphene
|
namespace graphene
|
||||||
{
|
{
|
||||||
namespace chain
|
namespace protocol
|
||||||
{
|
{
|
||||||
|
|
||||||
void custom_account_authority_create_operation::validate() const
|
void custom_account_authority_create_operation::validate() const
|
||||||
|
|
@ -39,5 +39,5 @@ share_type custom_account_authority_create_operation::calculate_fee(const fee_pa
|
||||||
return k.fee + calculate_data_fee( fc::raw::pack_size(*this), k.price_per_kbyte );
|
return k.fee + calculate_data_fee( fc::raw::pack_size(*this), k.price_per_kbyte );
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace chain
|
} // namespace protocol
|
||||||
} // namespace graphene
|
} // namespace graphene
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
#include <graphene/chain/protocol/custom_permission.hpp>
|
#include <graphene/protocol/custom_permission.hpp>
|
||||||
#include <graphene/chain/protocol/operations.hpp>
|
#include <graphene/protocol/operations.hpp>
|
||||||
|
|
||||||
namespace graphene
|
namespace graphene
|
||||||
{
|
{
|
||||||
namespace chain
|
namespace protocol
|
||||||
{
|
{
|
||||||
|
|
||||||
bool is_valid_permission_name(const string &name)
|
bool is_valid_permission_name(const string &name)
|
||||||
|
|
@ -81,5 +81,5 @@ share_type custom_permission_create_operation::calculate_fee(const fee_parameter
|
||||||
return k.fee + calculate_data_fee( fc::raw::pack_size(*this), k.price_per_kbyte );
|
return k.fee + calculate_data_fee( fc::raw::pack_size(*this), k.price_per_kbyte );
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace chain
|
} // namespace protocol
|
||||||
} // namespace graphene
|
} // namespace graphene
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
#include <graphene/protocol/ext.hpp>
|
#include <graphene/protocol/ext.hpp>
|
||||||
#include <graphene/protocol/types.hpp>
|
#include <graphene/protocol/types.hpp>
|
||||||
|
#include <graphene/protocol/asset.hpp>
|
||||||
|
|
||||||
#include <fc/thread/future.hpp>
|
#include <fc/thread/future.hpp>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@
|
||||||
|
|
||||||
#include <graphene/protocol/types.hpp>
|
#include <graphene/protocol/types.hpp>
|
||||||
#include <graphene/protocol/base.hpp>
|
#include <graphene/protocol/base.hpp>
|
||||||
#include <graphene/protocol/asset.hpp>
|
|
||||||
|
|
||||||
namespace graphene { namespace protocol {
|
namespace graphene { namespace protocol {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -152,21 +152,21 @@
|
||||||
*/
|
*/
|
||||||
///@{
|
///@{
|
||||||
/// Represents the current committee members, two-week review period
|
/// Represents the current committee members, two-week review period
|
||||||
#define GRAPHENE_COMMITTEE_ACCOUNT (graphene::chain::account_id_type(0))
|
#define GRAPHENE_COMMITTEE_ACCOUNT (graphene::protocol::account_id_type(0))
|
||||||
/// Represents the current witnesses
|
/// Represents the current witnesses
|
||||||
#define GRAPHENE_WITNESS_ACCOUNT (graphene::chain::account_id_type(1))
|
#define GRAPHENE_WITNESS_ACCOUNT (graphene::protocol::account_id_type(1))
|
||||||
/// Represents the current committee members
|
/// Represents the current committee members
|
||||||
#define GRAPHENE_RELAXED_COMMITTEE_ACCOUNT (graphene::chain::account_id_type(2))
|
#define GRAPHENE_RELAXED_COMMITTEE_ACCOUNT (graphene::protocol::account_id_type(2))
|
||||||
/// Represents the canonical account with NO authority (nobody can access funds in null account)
|
/// Represents the canonical account with NO authority (nobody can access funds in null account)
|
||||||
#define GRAPHENE_NULL_ACCOUNT (graphene::chain::account_id_type(3))
|
#define GRAPHENE_NULL_ACCOUNT (graphene::protocol::account_id_type(3))
|
||||||
/// Represents the canonical account with WILDCARD authority (anybody can access funds in temp account)
|
/// Represents the canonical account with WILDCARD authority (anybody can access funds in temp account)
|
||||||
#define GRAPHENE_TEMP_ACCOUNT (graphene::chain::account_id_type(4))
|
#define GRAPHENE_TEMP_ACCOUNT (graphene::protocol::account_id_type(4))
|
||||||
/// Represents the canonical account for specifying you will vote directly (as opposed to a proxy)
|
/// Represents the canonical account for specifying you will vote directly (as opposed to a proxy)
|
||||||
#define GRAPHENE_PROXY_TO_SELF_ACCOUNT (graphene::chain::account_id_type(5))
|
#define GRAPHENE_PROXY_TO_SELF_ACCOUNT (graphene::protocol::account_id_type(5))
|
||||||
///
|
///
|
||||||
#define GRAPHENE_RAKE_FEE_ACCOUNT_ID (graphene::chain::account_id_type(6))
|
#define GRAPHENE_RAKE_FEE_ACCOUNT_ID (graphene::protocol::account_id_type(6))
|
||||||
/// Sentinel value used in the scheduler.
|
/// Sentinel value used in the scheduler.
|
||||||
#define GRAPHENE_NULL_WITNESS (graphene::chain::witness_id_type(0))
|
#define GRAPHENE_NULL_WITNESS (graphene::protocol::witness_id_type(0))
|
||||||
///@}
|
///@}
|
||||||
|
|
||||||
#define GRAPHENE_FBA_STEALTH_DESIGNATED_ASSET (asset_id_type(743))
|
#define GRAPHENE_FBA_STEALTH_DESIGNATED_ASSET (asset_id_type(743))
|
||||||
|
|
@ -219,9 +219,10 @@
|
||||||
#define TOURNAMENT_MAX_START_TIME_IN_FUTURE (60*60*24*7*4) // 1 month
|
#define TOURNAMENT_MAX_START_TIME_IN_FUTURE (60*60*24*7*4) // 1 month
|
||||||
#define TOURNAMENT_MAX_START_DELAY (60*60*24*7) // 1 week
|
#define TOURNAMENT_MAX_START_DELAY (60*60*24*7) // 1 week
|
||||||
#define SWEEPS_DEFAULT_DISTRIBUTION_PERCENTAGE (2*GRAPHENE_1_PERCENT)
|
#define SWEEPS_DEFAULT_DISTRIBUTION_PERCENTAGE (2*GRAPHENE_1_PERCENT)
|
||||||
#define SWEEPS_DEFAULT_DISTRIBUTION_ASSET (graphene::chain::asset_id_type(0))
|
#define SWEEPS_DEFAULT_DISTRIBUTION_ASSET (graphene::protocol::asset_id_type(0))
|
||||||
#define SWEEPS_VESTING_BALANCE_MULTIPLIER 100000000
|
#define SWEEPS_VESTING_BALANCE_MULTIPLIER 100000000
|
||||||
#define SWEEPS_ACCUMULATOR_ACCOUNT (graphene::chain::account_id_type(0))
|
#define SWEEPS_ACCUMULATOR_ACCOUNT (graphene::protocol::account_id_type(0))
|
||||||
|
#define GPOS_PERIOD_START (fc::time_point_sec(1578272400))
|
||||||
#define GPOS_PERIOD (60*60*24*30*6) // 6 months
|
#define GPOS_PERIOD (60*60*24*30*6) // 6 months
|
||||||
#define GPOS_SUBPERIOD (60*60*24*30) // 1 month
|
#define GPOS_SUBPERIOD (60*60*24*30) // 1 month
|
||||||
#define GPOS_VESTING_LOCKIN_PERIOD (60*60*24*30) // 1 month
|
#define GPOS_VESTING_LOCKIN_PERIOD (60*60*24*30) // 1 month
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <graphene/chain/protocol/base.hpp>
|
#include <graphene/protocol/base.hpp>
|
||||||
|
|
||||||
namespace graphene
|
namespace graphene
|
||||||
{
|
{
|
||||||
namespace chain
|
namespace protocol
|
||||||
{
|
{
|
||||||
|
|
||||||
struct custom_account_authority_create_operation : public base_operation
|
struct custom_account_authority_create_operation : public base_operation
|
||||||
|
|
@ -60,14 +60,14 @@ struct custom_account_authority_delete_operation : public base_operation
|
||||||
share_type calculate_fee(const fee_parameters_type &k) const { return k.fee; }
|
share_type calculate_fee(const fee_parameters_type &k) const { return k.fee; }
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace chain
|
} // namespace protocol
|
||||||
} // namespace graphene
|
} // namespace graphene
|
||||||
|
|
||||||
FC_REFLECT(graphene::chain::custom_account_authority_create_operation::fee_parameters_type, (fee)(price_per_kbyte))
|
FC_REFLECT(graphene::protocol::custom_account_authority_create_operation::fee_parameters_type, (fee)(price_per_kbyte))
|
||||||
FC_REFLECT(graphene::chain::custom_account_authority_create_operation, (fee)(permission_id)(operation_type)(valid_from)(valid_to)(owner_account))
|
FC_REFLECT(graphene::protocol::custom_account_authority_create_operation, (fee)(permission_id)(operation_type)(valid_from)(valid_to)(owner_account))
|
||||||
|
|
||||||
FC_REFLECT(graphene::chain::custom_account_authority_update_operation::fee_parameters_type, (fee))
|
FC_REFLECT(graphene::protocol::custom_account_authority_update_operation::fee_parameters_type, (fee))
|
||||||
FC_REFLECT(graphene::chain::custom_account_authority_update_operation, (fee)(auth_id)(new_valid_from)(new_valid_to)(owner_account))
|
FC_REFLECT(graphene::protocol::custom_account_authority_update_operation, (fee)(auth_id)(new_valid_from)(new_valid_to)(owner_account))
|
||||||
|
|
||||||
FC_REFLECT(graphene::chain::custom_account_authority_delete_operation::fee_parameters_type, (fee))
|
FC_REFLECT(graphene::protocol::custom_account_authority_delete_operation::fee_parameters_type, (fee))
|
||||||
FC_REFLECT(graphene::chain::custom_account_authority_delete_operation, (fee)(auth_id)(owner_account))
|
FC_REFLECT(graphene::protocol::custom_account_authority_delete_operation, (fee)(auth_id)(owner_account))
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <graphene/chain/protocol/base.hpp>
|
#include <graphene/protocol/base.hpp>
|
||||||
|
#include <graphene/protocol/authority.hpp>
|
||||||
|
|
||||||
namespace graphene
|
namespace graphene
|
||||||
{
|
{
|
||||||
namespace chain
|
namespace protocol
|
||||||
{
|
{
|
||||||
|
|
||||||
struct custom_permission_create_operation : public base_operation
|
struct custom_permission_create_operation : public base_operation
|
||||||
|
|
@ -57,14 +58,14 @@ struct custom_permission_delete_operation : public base_operation
|
||||||
share_type calculate_fee(const fee_parameters_type &k) const { return k.fee; }
|
share_type calculate_fee(const fee_parameters_type &k) const { return k.fee; }
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace chain
|
} // namespace protocol
|
||||||
} // namespace graphene
|
} // namespace graphene
|
||||||
|
|
||||||
FC_REFLECT(graphene::chain::custom_permission_create_operation::fee_parameters_type, (fee)(price_per_kbyte))
|
FC_REFLECT(graphene::protocol::custom_permission_create_operation::fee_parameters_type, (fee)(price_per_kbyte))
|
||||||
FC_REFLECT(graphene::chain::custom_permission_create_operation, (fee)(owner_account)(permission_name)(auth))
|
FC_REFLECT(graphene::protocol::custom_permission_create_operation, (fee)(owner_account)(permission_name)(auth))
|
||||||
|
|
||||||
FC_REFLECT(graphene::chain::custom_permission_update_operation::fee_parameters_type, (fee))
|
FC_REFLECT(graphene::protocol::custom_permission_update_operation::fee_parameters_type, (fee))
|
||||||
FC_REFLECT(graphene::chain::custom_permission_update_operation, (fee)(permission_id)(new_auth)(owner_account))
|
FC_REFLECT(graphene::protocol::custom_permission_update_operation, (fee)(permission_id)(new_auth)(owner_account))
|
||||||
|
|
||||||
FC_REFLECT(graphene::chain::custom_permission_delete_operation::fee_parameters_type, (fee))
|
FC_REFLECT(graphene::protocol::custom_permission_delete_operation::fee_parameters_type, (fee))
|
||||||
FC_REFLECT(graphene::chain::custom_permission_delete_operation, (fee)(permission_id)(owner_account))
|
FC_REFLECT(graphene::protocol::custom_permission_delete_operation, (fee)(permission_id)(owner_account))
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@
|
||||||
|
|
||||||
#include <graphene/protocol/types.hpp>
|
#include <graphene/protocol/types.hpp>
|
||||||
#include <graphene/protocol/base.hpp>
|
#include <graphene/protocol/base.hpp>
|
||||||
#include <graphene/protocol/asset.hpp>
|
|
||||||
|
|
||||||
namespace graphene { namespace protocol {
|
namespace graphene { namespace protocol {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@
|
||||||
|
|
||||||
#include <graphene/protocol/types.hpp>
|
#include <graphene/protocol/types.hpp>
|
||||||
#include <graphene/protocol/base.hpp>
|
#include <graphene/protocol/base.hpp>
|
||||||
#include <graphene/protocol/asset.hpp>
|
|
||||||
|
|
||||||
namespace graphene { namespace protocol {
|
namespace graphene { namespace protocol {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <graphene/protocol/base.hpp>
|
#include <graphene/protocol/base.hpp>
|
||||||
#include <graphene/protocol/asset.hpp>
|
|
||||||
|
|
||||||
namespace graphene { namespace protocol {
|
namespace graphene { namespace protocol {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <graphene/chain/protocol/base.hpp>
|
#include <graphene/protocol/base.hpp>
|
||||||
#include <graphene/chain/protocol/types.hpp>
|
#include <graphene/protocol/types.hpp>
|
||||||
|
|
||||||
namespace graphene { namespace chain {
|
namespace graphene { namespace protocol {
|
||||||
|
|
||||||
struct nft_metadata_create_operation : public base_operation
|
struct nft_metadata_create_operation : public base_operation
|
||||||
{
|
{
|
||||||
|
|
@ -117,19 +117,19 @@ namespace graphene { namespace chain {
|
||||||
share_type calculate_fee(const fee_parameters_type &k) const;
|
share_type calculate_fee(const fee_parameters_type &k) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
} } // graphene::chain
|
} } // graphene::protocol
|
||||||
|
|
||||||
FC_REFLECT( graphene::chain::nft_metadata_create_operation::fee_parameters_type, (fee) (price_per_kbyte) )
|
FC_REFLECT( graphene::protocol::nft_metadata_create_operation::fee_parameters_type, (fee) (price_per_kbyte) )
|
||||||
FC_REFLECT( graphene::chain::nft_metadata_update_operation::fee_parameters_type, (fee) )
|
FC_REFLECT( graphene::protocol::nft_metadata_update_operation::fee_parameters_type, (fee) )
|
||||||
FC_REFLECT( graphene::chain::nft_mint_operation::fee_parameters_type, (fee) (price_per_kbyte) )
|
FC_REFLECT( graphene::protocol::nft_mint_operation::fee_parameters_type, (fee) (price_per_kbyte) )
|
||||||
FC_REFLECT( graphene::chain::nft_safe_transfer_from_operation::fee_parameters_type, (fee) (price_per_kbyte) )
|
FC_REFLECT( graphene::protocol::nft_safe_transfer_from_operation::fee_parameters_type, (fee) (price_per_kbyte) )
|
||||||
FC_REFLECT( graphene::chain::nft_approve_operation::fee_parameters_type, (fee) )
|
FC_REFLECT( graphene::protocol::nft_approve_operation::fee_parameters_type, (fee) )
|
||||||
FC_REFLECT( graphene::chain::nft_set_approval_for_all_operation::fee_parameters_type, (fee) )
|
FC_REFLECT( graphene::protocol::nft_set_approval_for_all_operation::fee_parameters_type, (fee) )
|
||||||
|
|
||||||
FC_REFLECT( graphene::chain::nft_metadata_create_operation, (fee) (owner) (name) (symbol) (base_uri) (revenue_partner) (revenue_split) (is_transferable) (is_sellable) )
|
FC_REFLECT( graphene::protocol::nft_metadata_create_operation, (fee) (owner) (name) (symbol) (base_uri) (revenue_partner) (revenue_split) (is_transferable) (is_sellable) )
|
||||||
FC_REFLECT( graphene::chain::nft_metadata_update_operation, (fee) (owner) (nft_metadata_id) (name) (symbol) (base_uri) (revenue_partner) (revenue_split) (is_transferable) (is_sellable) )
|
FC_REFLECT( graphene::protocol::nft_metadata_update_operation, (fee) (owner) (nft_metadata_id) (name) (symbol) (base_uri) (revenue_partner) (revenue_split) (is_transferable) (is_sellable) )
|
||||||
FC_REFLECT( graphene::chain::nft_mint_operation, (fee) (payer) (nft_metadata_id) (owner) (approved) (approved_operators) (token_uri) )
|
FC_REFLECT( graphene::protocol::nft_mint_operation, (fee) (payer) (nft_metadata_id) (owner) (approved) (approved_operators) (token_uri) )
|
||||||
FC_REFLECT( graphene::chain::nft_safe_transfer_from_operation, (fee) (operator_) (from) (to) (token_id) (data) )
|
FC_REFLECT( graphene::protocol::nft_safe_transfer_from_operation, (fee) (operator_) (from) (to) (token_id) (data) )
|
||||||
FC_REFLECT( graphene::chain::nft_approve_operation, (fee) (operator_) (approved) (token_id) )
|
FC_REFLECT( graphene::protocol::nft_approve_operation, (fee) (operator_) (approved) (token_id) )
|
||||||
FC_REFLECT( graphene::chain::nft_set_approval_for_all_operation, (fee) (owner) (operator_) (approved) )
|
FC_REFLECT( graphene::protocol::nft_set_approval_for_all_operation, (fee) (owner) (operator_) (approved) )
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ namespace graphene { namespace db {
|
||||||
using fc::flat_map;
|
using fc::flat_map;
|
||||||
using fc::variant;
|
using fc::variant;
|
||||||
using fc::unsigned_int;
|
using fc::unsigned_int;
|
||||||
using fc::signed_int;
|
|
||||||
|
|
||||||
struct object_id_type
|
struct object_id_type
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <graphene/chain/protocol/base.hpp>
|
#include <graphene/protocol/base.hpp>
|
||||||
#include <graphene/chain/protocol/memo.hpp>
|
#include <graphene/protocol/memo.hpp>
|
||||||
|
|
||||||
namespace graphene
|
namespace graphene
|
||||||
{
|
{
|
||||||
namespace chain
|
namespace protocol
|
||||||
{
|
{
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -118,26 +118,26 @@ namespace graphene
|
||||||
share_type calculate_fee(const fee_parameters_type &k) const;
|
share_type calculate_fee(const fee_parameters_type &k) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace chain
|
} // namespace protocol
|
||||||
} // namespace graphene
|
} // namespace graphene
|
||||||
|
|
||||||
FC_REFLECT(graphene::chain::offer_operation::fee_parameters_type,
|
FC_REFLECT(graphene::protocol::offer_operation::fee_parameters_type,
|
||||||
(fee)(price_per_kbyte));
|
(fee)(price_per_kbyte));
|
||||||
FC_REFLECT(graphene::chain::offer_operation,
|
FC_REFLECT(graphene::protocol::offer_operation,
|
||||||
(fee)(item_ids)(issuer)(minimum_price)(maximum_price)(buying_item)(offer_expiration_date)(memo)(extensions));
|
(fee)(item_ids)(issuer)(minimum_price)(maximum_price)(buying_item)(offer_expiration_date)(memo)(extensions));
|
||||||
|
|
||||||
FC_REFLECT(graphene::chain::bid_operation::fee_parameters_type,
|
FC_REFLECT(graphene::protocol::bid_operation::fee_parameters_type,
|
||||||
(fee));
|
(fee));
|
||||||
FC_REFLECT(graphene::chain::bid_operation,
|
FC_REFLECT(graphene::protocol::bid_operation,
|
||||||
(fee)(bidder)(bid_price)(offer_id)(extensions));
|
(fee)(bidder)(bid_price)(offer_id)(extensions));
|
||||||
|
|
||||||
FC_REFLECT(graphene::chain::cancel_offer_operation::fee_parameters_type,
|
FC_REFLECT(graphene::protocol::cancel_offer_operation::fee_parameters_type,
|
||||||
(fee));
|
(fee));
|
||||||
FC_REFLECT(graphene::chain::cancel_offer_operation,
|
FC_REFLECT(graphene::protocol::cancel_offer_operation,
|
||||||
(fee)(issuer)(offer_id)(extensions));
|
(fee)(issuer)(offer_id)(extensions));
|
||||||
|
|
||||||
FC_REFLECT_ENUM(graphene::chain::result_type, (Expired)(ExpiredNoBid)(Cancelled));
|
FC_REFLECT_ENUM(graphene::protocol::result_type, (Expired)(ExpiredNoBid)(Cancelled));
|
||||||
FC_REFLECT(graphene::chain::finalize_offer_operation::fee_parameters_type,
|
FC_REFLECT(graphene::protocol::finalize_offer_operation::fee_parameters_type,
|
||||||
(fee));
|
(fee));
|
||||||
FC_REFLECT(graphene::chain::finalize_offer_operation,
|
FC_REFLECT(graphene::protocol::finalize_offer_operation,
|
||||||
(fee)(fee_paying_account)(offer_id)(result)(extensions));
|
(fee)(fee_paying_account)(offer_id)(result)(extensions));
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@
|
||||||
|
|
||||||
#include <graphene/protocol/types.hpp>
|
#include <graphene/protocol/types.hpp>
|
||||||
#include <graphene/protocol/base.hpp>
|
#include <graphene/protocol/base.hpp>
|
||||||
#include <graphene/protocol/asset.hpp>
|
|
||||||
|
|
||||||
namespace graphene { namespace protocol {
|
namespace graphene { namespace protocol {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@
|
||||||
|
|
||||||
#include <fc/container/flat.hpp>
|
#include <fc/container/flat.hpp>
|
||||||
#include <fc/reflect/reflect.hpp>
|
#include <fc/reflect/reflect.hpp>
|
||||||
#include <graphene/protocol/asset.hpp>
|
|
||||||
#include <graphene/protocol/rock_paper_scissors.hpp>
|
#include <graphene/protocol/rock_paper_scissors.hpp>
|
||||||
#include <graphene/protocol/base.hpp>
|
#include <graphene/protocol/base.hpp>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -262,7 +262,7 @@ GRAPHENE_DEFINE_IDS(protocol, protocol_ids, /*protocol objects are not prefixed*
|
||||||
(custom_permission)
|
(custom_permission)
|
||||||
(custom_account_authority)
|
(custom_account_authority)
|
||||||
(offer)
|
(offer)
|
||||||
(nft_metadata_type)
|
(nft_metadata)
|
||||||
(nft))
|
(nft))
|
||||||
|
|
||||||
FC_REFLECT(graphene::protocol::public_key_type, (key_data))
|
FC_REFLECT(graphene::protocol::public_key_type, (key_data))
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
#include <graphene/chain/protocol/nft_ops.hpp>
|
#include <graphene/protocol/nft_ops.hpp>
|
||||||
#include <graphene/chain/protocol/operations.hpp>
|
#include <graphene/protocol/operations.hpp>
|
||||||
|
|
||||||
namespace graphene
|
namespace graphene
|
||||||
{
|
{
|
||||||
namespace chain
|
namespace protocol
|
||||||
{
|
{
|
||||||
|
|
||||||
bool is_valid_nft_token_name(const string &name)
|
bool is_valid_nft_token_name(const string &name)
|
||||||
|
|
@ -95,5 +95,5 @@ share_type nft_set_approval_for_all_operation::calculate_fee(const fee_parameter
|
||||||
return k.fee;
|
return k.fee;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace chain
|
} // namespace protocol
|
||||||
} // namespace graphene
|
} // namespace graphene
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
#include <graphene/chain/protocol/offer.hpp>
|
#include <graphene/protocol/offer.hpp>
|
||||||
#include <fc/io/raw.hpp>
|
#include <fc/io/raw.hpp>
|
||||||
|
|
||||||
namespace graphene
|
namespace graphene
|
||||||
{
|
{
|
||||||
namespace chain
|
namespace protocol
|
||||||
{
|
{
|
||||||
share_type offer_operation::calculate_fee(const fee_parameters_type &schedule) const
|
share_type offer_operation::calculate_fee(const fee_parameters_type &schedule) const
|
||||||
{
|
{
|
||||||
|
|
@ -53,5 +53,5 @@ namespace graphene
|
||||||
return core_fee_required;
|
return core_fee_required;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace chain
|
} // namespace protocol
|
||||||
} // namespace graphene
|
} // namespace graphene
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@ struct if_enum<true>
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename IsReflected=fc::false_type>
|
template<typename IsReflected=std::false_type>
|
||||||
struct if_reflected
|
struct if_reflected
|
||||||
{
|
{
|
||||||
template< typename T >
|
template< typename T >
|
||||||
|
|
@ -152,7 +152,7 @@ struct if_reflected
|
||||||
};
|
};
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
struct if_reflected<fc::true_type>
|
struct if_reflected<std::true_type>
|
||||||
{
|
{
|
||||||
template< typename T >
|
template< typename T >
|
||||||
static void process_class( class_processor* proc, const T* dummy )
|
static void process_class( class_processor* proc, const T* dummy )
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
#include <boost/test/unit_test.hpp>
|
|
||||||
#include <graphene/chain/hardfork.hpp>
|
#include <graphene/chain/hardfork.hpp>
|
||||||
#include <graphene/chain/database.hpp>
|
#include <graphene/chain/database.hpp>
|
||||||
#include <graphene/chain/protocol/protocol.hpp>
|
|
||||||
#include <graphene/chain/exceptions.hpp>
|
#include <graphene/chain/exceptions.hpp>
|
||||||
|
|
||||||
#include <graphene/chain/account_object.hpp>
|
#include <graphene/chain/account_object.hpp>
|
||||||
|
|
@ -13,7 +11,12 @@
|
||||||
|
|
||||||
#include <graphene/db/simple_index.hpp>
|
#include <graphene/db/simple_index.hpp>
|
||||||
|
|
||||||
|
#include <graphene/protocol/protocol.hpp>
|
||||||
|
|
||||||
#include <fc/crypto/digest.hpp>
|
#include <fc/crypto/digest.hpp>
|
||||||
|
|
||||||
|
#include <boost/test/unit_test.hpp>
|
||||||
|
|
||||||
#include "../common/database_fixture.hpp"
|
#include "../common/database_fixture.hpp"
|
||||||
|
|
||||||
using namespace graphene::chain;
|
using namespace graphene::chain;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue