-
Notifications
You must be signed in to change notification settings - Fork 649
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collateral asset fee accumulator for BSIPs 74 and 87 #2159
Merged
abitmore
merged 7 commits into
bitshares:hardfork
from
christophersanborn:cjs-collat-asset-container-pr
May 3, 2020
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d04d913
Add collateral-denominated fees container
christophersanborn 43026a8
Add accumulate_fee() method to asset_object
christophersanborn 985733e
Add ability to claim collateral-denominated fees.
christophersanborn d116fc8
Check collateral fees empty before changing backing asset.
christophersanborn f608039
Hardfork protection on asset_claim_fees extension.
christophersanborn 0caf73e
Proposal hardfork guards on asset_claim_fees_operation
christophersanborn 02f9da8
Changes requested in code review
christophersanborn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// This hardfork enables the extension to asset_claim_fees_operation to claim collateral-denominated fees. | ||
// These fees are collected by BSIPs 87 and 74. This should be set to match the earlier of either | ||
// HARDFORK_CORE_BSIP87_TIME or HARDFORK_CORE_BSIP74_TIME. | ||
// This hardfork check should be removable after the hardfork date passes. | ||
#ifndef HARDFORK_CORE_BSIP_87_74_COLLATFEE_TIME | ||
#define HARDFORK_CORE_BSIP_87_74_COLLATFEE_TIME (fc::time_point_sec( 1679955066 ) ) // Temporary date until actual hardfork date is set | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ namespace graphene { namespace chain { | |
namespace detail { | ||
void check_asset_options_hf_1774(const fc::time_point_sec& block_time, const asset_options& options); | ||
void check_asset_options_hf_bsip81(const fc::time_point_sec& block_time, const asset_options& options); | ||
void check_asset_claim_fees_hardfork_87_74_collatfee(const fc::time_point_sec& block_time, const asset_claim_fees_operation& op); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line too long. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will fix in BSIP87 PR. |
||
} | ||
|
||
struct proposal_operation_hardfork_visitor | ||
|
@@ -61,6 +62,10 @@ struct proposal_operation_hardfork_visitor | |
detail::check_asset_options_hf_bsip81(block_time, v.new_options); | ||
} | ||
|
||
void operator()(const graphene::chain::asset_claim_fees_operation &v) const { | ||
detail::check_asset_claim_fees_hardfork_87_74_collatfee(block_time, v); // HF_REMOVABLE | ||
} | ||
|
||
void operator()(const graphene::chain::committee_member_update_global_parameters_operation &op) const { | ||
if (block_time < HARDFORK_CORE_1468_TIME) { | ||
FC_ASSERT(!op.new_parameters.extensions.value.updatable_htlc_options.valid(), "Unable to set HTLC options before hardfork 1468"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line too long.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will fix in BSIP87 PR.