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

Function feature_check_depends

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

Source from the content-addressed store, hash-verified

363}
364
365bool feature_check_depends(const u8 *their_features,
366 size_t *depender, size_t *missing_dependency)
367{
368 for (size_t i = 0; i < ARRAY_SIZE(feature_deps); i++) {
369 if (!feature_offered(their_features, feature_deps[i].depender))
370 continue;
371 if (feature_offered(their_features,
372 feature_deps[i].must_also_have))
373 continue;
374 *depender = feature_deps[i].depender;
375 *missing_dependency = feature_deps[i].must_also_have;
376 return false;
377 }
378 return true;
379}
380
381/**
382 * all_supported_features - Check if we support what's being asked

Callers 1

peer_connectedFunction · 0.85

Calls 1

feature_offeredFunction · 0.70

Tested by

no test coverage detected