MCPcopy Create free account
hub / github.com/ElementsProject/lightning / feature_check_depends

Function feature_check_depends

common/features.c:351–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349}
350
351bool feature_check_depends(const u8 *their_features,
352 size_t *depender, size_t *missing_dependency)
353{
354 for (size_t i = 0; i < ARRAY_SIZE(feature_deps); i++) {
355 if (!feature_offered(their_features, feature_deps[i].depender))
356 continue;
357 if (feature_offered(their_features,
358 feature_deps[i].must_also_have))
359 continue;
360 *depender = feature_deps[i].depender;
361 *missing_dependency = feature_deps[i].must_also_have;
362 return false;
363 }
364 return true;
365}
366
367/**
368 * all_supported_features - Check if we support what's being asked

Callers 1

peer_connectedFunction · 0.85

Calls 1

feature_offeredFunction · 0.85

Tested by

no test coverage detected