Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Eliminate redundant condition check.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgiszczak committed Jul 2, 2020
1 parent 96032bb commit 4364f49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/chain/apply_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ void apply_context::execute_inline( action&& a ) {

// No need to check authorization if replaying irreversible blocks or contract is privileged
if( !control.skip_auth_check() && !privileged ) {
if( !privileged && control.is_producing_block() ) {
if( control.is_producing_block() ) {
const auto& chain_config = control.get_global_properties().configuration;

This comment has been minimized.

Copy link
@heifner

heifner Jul 6, 2020

Contributor

I think this should be outside if( !control.skip_auth_check() && !privileged ) which will make the !privileged not redundant.

EOS_ASSERT( a.data.size() < std::min(chain_config.max_inline_action_size, control.get_max_nonprivileged_inline_action_size()),
inline_action_too_big_nonprivileged,
Expand Down

0 comments on commit 4364f49

Please sign in to comment.