Commit e5f25a8
committed
b24ae6d test(electrum): test sync with incorrect network (Wei Chen)
0fdbe9d fix(electrum): Return error on incorrect network (志宇)
2b56f1a refactor(electrum): remove `unwrap()`s and `expect()`s (Wei Chen)
Pull request description:
Partially resolves bitcoindevkit/bdk_wallet#30.
### Description
This PR eliminates all `unwrap()` and `expect()` calls from `bdk_electrum_client`, replacing them with proper error handling. Given that all public methods already return `Result`, we now propagate error messages instead of panicking.
### Changelog notice
* Removed all `unwrap()`s and `expect()`s from `bdk_electrum_client.rs`.
### Checklists
#### All Submissions:
* [x] I've signed all my commits
* [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
* [x] I ran `cargo +nightly fmt` and `cargo clippy` before committing
ACKs for top commit:
evanlinjin:
ACK b24ae6d
Tree-SHA512: 33c08031fda35ecc12100202fe7cba2f107bc4537e7519e2ed4df9c1ea70f4a644f0fce0d92175af9745d0bf352c61094eee2ff353636ba8342691d12e3b47cc
1 file changed
+55
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
579 | 579 | | |
580 | 580 | | |
581 | 581 | | |
582 | | - | |
583 | | - | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
584 | 593 | | |
585 | 594 | | |
586 | 595 | | |
| |||
638 | 647 | | |
639 | 648 | | |
640 | 649 | | |
| 650 | + | |
641 | 651 | | |
642 | 652 | | |
643 | | - | |
644 | | - | |
645 | | - | |
| 653 | + | |
646 | 654 | | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
652 | 658 | | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | | - | |
658 | | - | |
659 | | - | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
660 | 663 | | |
661 | 664 | | |
662 | 665 | | |
| |||
687 | 690 | | |
688 | 691 | | |
689 | 692 | | |
690 | | - | |
691 | | - | |
692 | | - | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
693 | 698 | | |
694 | 699 | | |
695 | 700 | | |
| |||
722 | 727 | | |
723 | 728 | | |
724 | 729 | | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
725 | 760 | | |
0 commit comments