refactor(chain): calculate DescriptorId as sha256 hash of spk at index 0

Also update docs to explain how KeychainTxOutIndex handles descriptors that
generate the same spks.
This commit is contained in:
Steve Myers committed 2024-06-27 07:56:08 -05:00
1 parent 6dab68d35b
commit 46c6f18cc3
3 files changed
+16 -12

No files matched your search

+3
View File
@@ -91,6 +91,9 @@ const COINBASE_MATURITY: u32 = 100;
/// [`ChangeSet`]s (see [`take_staged`]). Also see individual functions and example for instructions
/// on when [`Wallet`] state needs to be persisted.
///
/// The `Wallet` descriptor (external) and change descriptor (internal) must not derive the same
/// script pubkeys. See [`KeychainTxOutIndex::insert_descriptor()`] for more details.
///
/// [`signer`]: crate::signer
/// [`take_staged`]: Wallet::take_staged
#[derive(Debug)]