Commit a2724e3
committed
test: remove txid caching in CTransaction class
Rather than txids (represented by the fields `.sha256` and `.hash`)
being stateful, simply compute them on-the-fly. This ensures that
the correct values are always returned and takes the burden of
rehashing from test writers, making the code shorter overall.
In a first step, the fields are kept at the same name with @Property
functions as drop-in replacements, for a minimal diff. In later commits,
the names are changed to be more descriptive and indicating the return
type of the txid.1 parent f3bbc74 commit a2724e3
2 files changed
+15
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1053 | 1053 | | |
1054 | 1054 | | |
1055 | 1055 | | |
1056 | | - | |
1057 | | - | |
| 1056 | + | |
1058 | 1057 | | |
1059 | | - | |
| 1058 | + | |
1060 | 1059 | | |
1061 | 1060 | | |
1062 | 1061 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
585 | 585 | | |
586 | 586 | | |
587 | 587 | | |
588 | | - | |
589 | | - | |
| 588 | + | |
590 | 589 | | |
591 | 590 | | |
592 | 591 | | |
| |||
595 | 594 | | |
596 | 595 | | |
597 | 596 | | |
598 | | - | |
599 | | - | |
600 | 597 | | |
601 | 598 | | |
602 | 599 | | |
603 | 600 | | |
604 | 601 | | |
605 | | - | |
606 | | - | |
607 | 602 | | |
608 | 603 | | |
609 | 604 | | |
| |||
625 | 620 | | |
626 | 621 | | |
627 | 622 | | |
628 | | - | |
629 | | - | |
630 | 623 | | |
631 | 624 | | |
632 | 625 | | |
| |||
667 | 660 | | |
668 | 661 | | |
669 | 662 | | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
670 | 673 | | |
| 674 | + | |
671 | 675 | | |
672 | | - | |
673 | | - | |
674 | 676 | | |
675 | 677 | | |
676 | | - | |
677 | | - | |
| 678 | + | |
678 | 679 | | |
679 | 680 | | |
680 | 681 | | |
681 | 682 | | |
682 | 683 | | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | 684 | | |
688 | 685 | | |
689 | 686 | | |
| |||
0 commit comments