|
Ran
|
Jobs
1
|
Files
98
|
Run time
1min
|
Badge
README BADGES
|
push
github
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
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 10547286219.1 | 0 |
82.71 |
GitHub Action Run |