• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

bitcoindevkit / bdk / 11582766320

29 Oct 2024 09:28PM UTC coverage: 82.61%. Remained the same
11582766320

push

github

notmandatory
Merge bitcoindevkit/bdk#1657: chore(deps): bump tibdex/github-app-token from 1 to 2

96c65761e ci: fix dependabot clippy_check error (Steve Myers)
80b4ecac4 chore(deps): bump tibdex/github-app-token from 1 to 2 (dependabot[bot])

Pull request description:

  Bumps [tibdex/github-app-token](https://github.com/tibdex/github-app-token) from 1 to 2.
  <details>
  <summary>Release notes</summary>
  <p><em>Sourced from <a href="https://github.com/tibdex/github-app-token/releases">tibdex/github-app-token's releases</a>.</em></p>
  <blockquote>
  <h2>v2.0.0</h2>
  <ul>
  <li><strong>BREAKING</strong>: replaces the <code>installation_id</code> and <code>repository</code> inputs with <code>installation_retrieval_mode</code> and <code>installation_retrieval_payload</code> to also support organization and user installation.</li>
  <li>switches to <code>node20</code>.</li>
  <li>adds a <code>repositories</code> input to scope the created token to a subset of repositories.</li>
  <li>revokes the created token at the end of the job with a <a href="https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runspost"><code>post</code> script</a>.</li>
  </ul>
  <h2>v1.9.0</h2>
  <p>No release notes provided.</p>
  <h2>v1.8.2</h2>
  <p>No release notes provided.</p>
  <h2>v1.8.1</h2>
  <p>No release notes provided.</p>
  <h2>v1.8.0</h2>
  <p>No release notes provided.</p>
  <h2>v1.7.0</h2>
  <p>No release notes provided.</p>
  <h2>v1.6.0</h2>
  <p>No release notes provided.</p>
  <h2>v1.5.2</h2>
  <p>No release notes provided.</p>
  <h2>v1.5.1</h2>
  <p>No release notes provided.</p>
  <h2>v1.5.0</h2>
  <p>No release notes provided.</p>
  <h2>v1.4.0</h2>
  <p>No release notes provided.</p>
  <h2>v1.3.0</h2>
  <p>No release notes provided.</p>
  <h2>v1.2.0</h2>
  <p>No release notes provided.</p>
  <h2>v1.1.1</h2>
  <p>No release notes provided.</p>
  <h2>v1.1.0</h2>
  <p>No releas... (continued)

11301 of 13680 relevant lines covered (82.61%)

14271.04 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

36.36
/crates/chain/src/descriptor_ext.rs
1
use crate::miniscript::{Descriptor, DescriptorPublicKey};
2
use bitcoin::hashes::{hash_newtype, sha256, Hash};
3

4
hash_newtype! {
5
    /// Represents the unique ID of a descriptor.
6
    ///
7
    /// This is useful for having a fixed-length unique representation of a descriptor,
8
    /// in particular, we use it to persist application state changes related to the
9
    /// descriptor without having to re-write the whole descriptor each time.
10
    ///
11
    pub struct DescriptorId(pub sha256::Hash);
12
}
13

14
/// A trait to extend the functionality of a miniscript descriptor.
15
pub trait DescriptorExt {
16
    /// Returns the minimum value (in satoshis) at which an output is broadcastable.
17
    /// Panics if the descriptor wildcard is hardened.
18
    fn dust_value(&self) -> u64;
19

20
    /// Returns the descriptor ID, calculated as the sha256 hash of the spk derived from the
21
    /// descriptor at index 0.
22
    fn descriptor_id(&self) -> DescriptorId;
23
}
24

25
impl DescriptorExt for Descriptor<DescriptorPublicKey> {
26
    fn dust_value(&self) -> u64 {
×
27
        self.at_derivation_index(0)
×
28
            .expect("descriptor can't have hardened derivation")
×
29
            .script_pubkey()
×
30
            .minimal_non_dust()
×
31
            .to_sat()
×
32
    }
×
33

34
    fn descriptor_id(&self) -> DescriptorId {
10,518✔
35
        let spk = self.at_derivation_index(0).unwrap().script_pubkey();
10,518✔
36
        DescriptorId(sha256::Hash::hash(spk.as_bytes()))
10,518✔
37
    }
10,518✔
38
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc