While reviewing the MuSig2 descriptors PR #31244, I realized that the enum
DeriveType
here logically refers to the derive type for ranged descriptors.
This became evident to me while going through the implementations of IsRange
& IsHardened
functions of BIP32PubkeyProvider
, and the ParsePubkeyInner
function. Initially I got confused by reading IsRange
translating to
!= DeriveType::NO
, but later realised it specifically referred to the presence
of ranged derivations. I propose explicitly mentioning “ranged” in the values
of the DeriveType
enum would make it easier to parse the descriptors code.
This enum is used in one file only - script/descriptors.cpp
. That’s why I
explicitly passed it as the argument in the sed
command in the script.