189 {
190 if( std::holds_alternative<building_block>(
_block_stage) ) {
192 const auto& activated_features = bb._pending_block_header_state.prev_activated_protocol_features->protocol_features;
193
194 if( activated_features.find( feature_digest ) != activated_features.end() ) return true;
195
196 if( bb._num_new_protocol_features_that_have_activated == 0 ) return false;
197
198 auto end = bb._new_protocol_feature_activations.begin() + bb._num_new_protocol_features_that_have_activated;
199 return (std::find( bb._new_protocol_feature_activations.begin(), end, feature_digest ) != end);
200 }
201
202 if( std::holds_alternative<assembled_block>(
_block_stage) ) {
203
204
205
207 "checking if protocol feature is activated in the assembled_block stage is not yet supported" );
208
209 }
210
211 const auto& activated_features = std::get<completed_block>(
_block_stage)._block_state->activated_protocol_features->protocol_features;
212 return (activated_features.find( feature_digest ) != activated_features.end());
213 }
#define SYS_THROW(exc_type, FORMAT,...)