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

rust-bitcoin / rust-bitcoin / 10547286219
83%

Build:
DEFAULT BRANCH: master
Ran 25 Aug 2024 01:18PM UTC
Jobs 1
Files 98
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

25 Aug 2024 01:16PM UTC coverage: 82.708% (-0.06%) from 82.767%
10547286219

push

github

apoelstra
Merge rust-bitcoin/rust-bitcoin#3015: Add Arbitrary

<a class=hub.com/rust-bitcoin/rust-bitcoin/commit/<a class="double-link" href="https://git"><a class=hub.com/rust-bitcoin/rust-bitcoin/commit/<a class="double-link" href="https://git"><a class=hub.com/rust-bitcoin/rust-bitcoin/commit/3e034d5eded6242e00ba760f00b8933c35d16dea">3e034d5ed Add Arbitrary dependency (yancy)

Pull request description:

  Adds an example draft showing what is needed to use Arbitrary for coin selection.

  Shot out to how nice Arbitrary is for fuzzing a target by taking unstructured randomness and creating structured rust-bitcoin types for fuzzing.  Is there a way we could add this to rust-bitcoin for structuring the fuzz data needed?

  This is then the example to fuzz test a SRD algo (after applying this PR to rust-bitcoin) using rust-bitcoin types :)

  ```
  #![no_main]

  use arbitrary::Arbitrary;
  use bitcoin::{Amount, FeeRate};
  use bitcoin_coin_selection::{select_coins_srd, WeightedUtxo};
  use libfuzzer_sys::fuzz_target;
  use rand::thread_rng;

  #[derive(Arbitrary, Debug)]
  pub struct Params {
      target: Amount,
      fee_rate: FeeRate,
      weighted_utxos: Vec<WeightedUtxo>,
  }

  fuzz_target!(|params: Params| {
      let Params { target: t, fee_rate: f, weighted_utxos: wu } = params;
      select_coins_srd(t, f, &wu, &mut thread_rng());
  });
  ```

ACKs for top commit:
  tcharding:
    ACK 3e034d5eded6242e00ba760f00b8933c35d16dea
  Kixunil:
    ACK 3e034d5eded6242e00ba760f00b8933c35d16dea
  apoelstra:
    ACK 3e034d5eded6242e00ba760f00b8933c35d16dea successfully ran local tests

Tree-SHA512: accd5658157e5c940bbb5290ee43b64177f

0 of 17 new or added lines in 4 files covered. (0.0%)

19644 of 23751 relevant lines covered (82.71%)

15604.5 hits per line

Jobs
ID Job ID Ran Files Coverage
1 10547286219.1 25 Aug 2024 01:18PM UTC 0
82.71
GitHub Action Run
Source Files on build 10547286219
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #10547286219
  • 51af258e on github
  • Prev Build on master (#10540415274)
  • Next Build on master (#10547696371)
  • Delete
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

© 2026 Coveralls, Inc