Commit cf82a9e
committed
Do not allow users to get keys from keypool without reserving them
fundrawtransaction allows users to add a change output and then
not have it removed from keypool. While it would be nice to have
users follow the normal CreateTransaction/CommitTransaction process
we use internally, there isnt much benefit in exposing this option,
especially with HD wallets, while there is ample room for users to
misunderstand or misuse this option.
This could be particularly nasty in some use-cases (especially
pre-HD-split) - eg a user might fundrawtransaction, then call
getnewaddress, hand out the address for someone to pay them, then
sendrawtransaction. This may result in the user thinking they have
received payment, even though it was really just their own change!
This could obviously result in needless key-reuse.1 parent 7b6e8bc commit cf82a9e
File tree
4 files changed
+13
-27
lines changed- src/wallet
- test/functional
4 files changed
+13
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2693 | 2693 | | |
2694 | 2694 | | |
2695 | 2695 | | |
2696 | | - | |
2697 | 2696 | | |
2698 | 2697 | | |
2699 | 2698 | | |
| |||
2732 | 2731 | | |
2733 | 2732 | | |
2734 | 2733 | | |
2735 | | - | |
2736 | 2734 | | |
2737 | 2735 | | |
2738 | 2736 | | |
| |||
2752 | 2750 | | |
2753 | 2751 | | |
2754 | 2752 | | |
2755 | | - | |
| 2753 | + | |
2756 | 2754 | | |
2757 | 2755 | | |
2758 | 2756 | | |
| |||
2779 | 2777 | | |
2780 | 2778 | | |
2781 | 2779 | | |
2782 | | - | |
2783 | | - | |
2784 | | - | |
2785 | 2780 | | |
2786 | 2781 | | |
2787 | 2782 | | |
| |||
2830 | 2825 | | |
2831 | 2826 | | |
2832 | 2827 | | |
2833 | | - | |
| 2828 | + | |
2834 | 2829 | | |
2835 | 2830 | | |
2836 | 2831 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2471 | 2471 | | |
2472 | 2472 | | |
2473 | 2473 | | |
2474 | | - | |
| 2474 | + | |
2475 | 2475 | | |
2476 | 2476 | | |
2477 | 2477 | | |
| |||
2493 | 2493 | | |
2494 | 2494 | | |
2495 | 2495 | | |
2496 | | - | |
| 2496 | + | |
| 2497 | + | |
2497 | 2498 | | |
| 2499 | + | |
| 2500 | + | |
| 2501 | + | |
| 2502 | + | |
2498 | 2503 | | |
2499 | 2504 | | |
2500 | 2505 | | |
| |||
2515 | 2520 | | |
2516 | 2521 | | |
2517 | 2522 | | |
2518 | | - | |
2519 | | - | |
2520 | | - | |
2521 | 2523 | | |
2522 | 2524 | | |
2523 | 2525 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
949 | 949 | | |
950 | 950 | | |
951 | 951 | | |
952 | | - | |
| 952 | + | |
953 | 953 | | |
954 | 954 | | |
955 | 955 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
636 | 636 | | |
637 | 637 | | |
638 | 638 | | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
652 | | - | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
653 | 642 | | |
654 | 643 | | |
655 | 644 | | |
| |||
0 commit comments