Commit 6f607e9
committed
refactor(sha256): use bitcoin::hashes::sha256 instead of sha2 crate
Per reviewer feedback on PR #208: bitcoin_hashes::sha256 is already
available via the bitcoin crate re-export and provides equivalent
SHA-NI hardware acceleration. Drops the direct sha2 dependency.
Bench (ubuntu-latest w/ SHA-NI, 1000 tx status hashes):
rust-crypto 273.8 µs
sha2 54.2 µs
bitcoin_hashes 53.9 µs1 parent 45e3daa commit 6f607e9
File tree
5 files changed
+15
-94
lines changed- src
- electrum
- new_index
5 files changed
+15
-94
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
75 | 74 | | |
76 | 75 | | |
77 | 76 | | |
78 | | - | |
| 77 | + | |
79 | 78 | | |
80 | 79 | | |
81 | 80 | | |
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
85 | 84 | | |
86 | | - | |
| 85 | + | |
87 | 86 | | |
88 | | - | |
| 87 | + | |
89 | 88 | | |
90 | 89 | | |
91 | 90 | | |
| |||
525 | 524 | | |
526 | 525 | | |
527 | 526 | | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
532 | 531 | | |
533 | 532 | | |
534 | 533 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
78 | | - | |
| 76 | + | |
79 | 77 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
1437 | 1436 | | |
1438 | 1437 | | |
1439 | 1438 | | |
1440 | | - | |
1441 | | - | |
1442 | | - | |
| 1439 | + | |
1443 | 1440 | | |
1444 | 1441 | | |
1445 | 1442 | | |
| |||
1988 | 1985 | | |
1989 | 1986 | | |
1990 | 1987 | | |
1991 | | - | |
1992 | | - | |
1993 | | - | |
| 1988 | + | |
1994 | 1989 | | |
1995 | 1990 | | |
1996 | 1991 | | |
| |||
2002 | 1997 | | |
2003 | 1998 | | |
2004 | 1999 | | |
2005 | | - | |
2006 | | - | |
2007 | | - | |
| 2000 | + | |
2008 | 2001 | | |
2009 | 2002 | | |
2010 | 2003 | | |
| |||
2018 | 2011 | | |
2019 | 2012 | | |
2020 | 2013 | | |
2021 | | - | |
2022 | | - | |
2023 | | - | |
| 2014 | + | |
2024 | 2015 | | |
2025 | 2016 | | |
2026 | 2017 | | |
0 commit comments