-
Notifications
You must be signed in to change notification settings - Fork 650
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
add startup message to all plugins #1467
Conversation
1- Can you explain us what you are doing and why so we don't have to try to figure out the code? thank you. |
Thank you for response, ok, can you give me a code specification? and a new branch mainly used to solve issue? i just joined BTS community. This commit that i want to decrease the use of get_required_authorities |
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.
Please do not change file permissions.
libraries/app/database_api.cpp
Outdated
_db.get_global_properties().parameters.max_authority_depth | ||
result, | ||
_db.get_global_properties().parameters.max_authority_depth, | ||
1 |
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.
We're still working on coding style guidelines. Try to format your code in a way that matches existing code.
It seems you're using tabs now instead of spaces. Please change that.
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.
already modified,please
@@ -359,6 +359,42 @@ set<public_key_type> signed_transaction::get_required_signatures( | |||
return result; | |||
} | |||
|
|||
void signed_transaction::get_required_signatures( |
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.
Your new method is mostly a copy of existing code. Please keep your code DRY.
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.
got it
const std::function<const authority*(account_id_type)>& get_owner, | ||
set<public_key_type> &conti_use_reult, | ||
uint32_t max_recursion /*= GRAPHENE_MAX_SIG_CHECK_DEPTH*/, | ||
uint32_t need_authority_type /*= 0*/ /*0 no need ,1 need other*/ |
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.
It would be simpler to make conti_use_result
a pointer instead of a reference, and use a null pointer to indicate that you don't want the keys.
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,this is a good idea
s.check_authority( get_owner( owner ) ); | ||
for( auto& active : required_active ) | ||
s.check_authority( active ); | ||
switch(need_authority_type) |
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.
Why a complicated switch
instead of a simple if
?
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.
i want to make **need_authority_type ** a enum,and swirch maybe better,but **need_authority_type ** is no more usage scenarios
Please create a separate PR for the startup message issue. |
There is maybe some good stuff in this pull request, honestly i cant tell. It is a pull of 30 files changes, it haves several different features on it ... plugin startup messages is totally different than increase efficiency and should be separated pulls. I will suggest that you make smaller pull requests only with one feature at a time if you have the intention of merging code into bitshares. Probably the easier will be to close this pull request and submit new smaller one(s) that can be reviewed. Thank you. |
thanks,got it |
add startup message to all plugins