-
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
Collateral asset fee accumulator for BSIPs 74 and 87 #2159
Conversation
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.
@abitmore wrote:
Would we just be testing that an As an aside: do we ever just make one hardfork symbol, like |
Using the same macro for different feature has pros and cons. For example, we planned to release 4.0 with BSIP40 enabled, the feature is already in the release branch but is not ready for release yet, we can set its hf time to a date far away in the future so it won't be enabled at the same time. |
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.
Thanks a lot!
I'm approving and merging for progress although there are some small issues.
container_ddo->accumulated_fees : | ||
container_ddo->accumulated_collateral_fees), | ||
"Attempt to claim more fees than have accumulated within asset ${a} (${id})", | ||
("a",container_asset->symbol)("id",container_asset->id)("ddo",*container_ddo) ); |
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.
The code logic is correct. However I think it would be better to change this big and complex assertion to multiple smaller and simpler assertions for better readability and error reporting.
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.
Ambivalent on this one, but considering. May sneak a rephrasing into BSIP87 PR.
@@ -55,7 +55,16 @@ namespace detail { | |||
"Taker fee percent should not be defined before HARDFORK_BSIP_81_TIME"); | |||
} | |||
} | |||
} | |||
|
|||
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 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.
@@ -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 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.
Adds field in asset_dynamic_data_object to accumulate fees denominated in a bitasset's collateral backing asset.
Extends asset_claim_fees operation to enable claim of collateral-denominated fees.
Checks that accumulated collateral fees is empty before allowing change of backing asset.