Commit bf41f83
committed
WIP: Support explicit change outputs
Setting the `is_change` flag on an addressee when creating a transaction
routes all change to that output. The default behaviour is to generate a
change address for the wallet. Only one explicit change address per
asset is allowed. If an explicit change address is specified for a given
asset it follows that there will not be a generated change address for
that asset.
The tx output in the transaction json corresponding to the explicit
change output will be flagged with `is_change`, just like a generated
change address output, however the `change_index` will be set to -1.
IOW `change_index` should be interpreted as the index of the generated
(implied) change output, if there is one.1 parent 0aa28cb commit bf41f83
3 files changed
Lines changed: 75 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
607 | 607 | | |
608 | 608 | | |
609 | 609 | | |
| 610 | + | |
| 611 | + | |
610 | 612 | | |
| 613 | + | |
611 | 614 | | |
612 | 615 | | |
613 | 616 | | |
614 | 617 | | |
615 | | - | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
616 | 628 | | |
617 | 629 | | |
| 630 | + | |
618 | 631 | | |
619 | 632 | | |
620 | 633 | | |
| |||
749 | 762 | | |
750 | 763 | | |
751 | 764 | | |
752 | | - | |
753 | | - | |
754 | | - | |
755 | | - | |
756 | | - | |
| 765 | + | |
757 | 766 | | |
758 | 767 | | |
759 | 768 | | |
| |||
809 | 818 | | |
810 | 819 | | |
811 | 820 | | |
812 | | - | |
813 | | - | |
814 | | - | |
815 | | - | |
816 | | - | |
817 | | - | |
818 | | - | |
819 | | - | |
820 | | - | |
821 | | - | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
822 | 843 | | |
| 844 | + | |
823 | 845 | | |
824 | 846 | | |
825 | 847 | | |
| |||
841 | 863 | | |
842 | 864 | | |
843 | 865 | | |
844 | | - | |
845 | | - | |
846 | | - | |
847 | | - | |
848 | | - | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
849 | 873 | | |
850 | 874 | | |
851 | 875 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
358 | | - | |
359 | | - | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
360 | 362 | | |
361 | 363 | | |
362 | 364 | | |
| |||
367 | 369 | | |
368 | 370 | | |
369 | 371 | | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
370 | 383 | | |
371 | 384 | | |
372 | 385 | | |
| |||
436 | 449 | | |
437 | 450 | | |
438 | 451 | | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
439 | 456 | | |
440 | 457 | | |
441 | 458 | | |
| |||
457 | 474 | | |
458 | 475 | | |
459 | 476 | | |
| 477 | + | |
460 | 478 | | |
461 | 479 | | |
462 | | - | |
463 | | - | |
| 480 | + | |
| 481 | + | |
464 | 482 | | |
465 | 483 | | |
466 | 484 | | |
| |||
473 | 491 | | |
474 | 492 | | |
475 | 493 | | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
476 | 499 | | |
477 | 500 | | |
478 | 501 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
87 | 90 | | |
88 | 91 | | |
89 | 92 | | |
| |||
0 commit comments