Commit 3f398d7
committed
Merge #13439: rpc: Avoid "duplicate" return value for invalid submitblock
f748944 Only set fNewBlock to true in AcceptBlock when we write to disk (Matt Corallo)
fa6e497 rpc: Avoid "duplicate" return value for invalid submitblock (MarcoFalke)
Pull request description:
This is #13395 with one more commit tacked on. MarcoFalke got tired of dealing with the stupidity of fixing a return code with too many rounds of review (not that I blame him). Honestly we should probably have no return whatsoever, but for now, this fixes it (as well as nLastBlockTime for eviction purposes).
Original description:
When `submitblock` of an invalid block, the return value should not be `"duplicate"`.
This is only seen when the header was previously found (denoted by the incorrectly named boolean `fBlockPresent`). Fix this bug by removing `fBlockPresent`.
Tree-SHA512: 0ce3092655d5d904b4c8c5ff7479f73ce387144a738f20472b8af132564005c6db5594ae366e589508f6258506ee7a28b1c7995a83a8328b334f99316006bf2d2 files changed
+7
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
725 | 725 | | |
726 | 726 | | |
727 | 727 | | |
728 | | - | |
729 | 728 | | |
730 | 729 | | |
731 | 730 | | |
| |||
736 | 735 | | |
737 | 736 | | |
738 | 737 | | |
739 | | - | |
740 | | - | |
741 | 738 | | |
742 | 739 | | |
743 | 740 | | |
| |||
749 | 746 | | |
750 | 747 | | |
751 | 748 | | |
| 749 | + | |
752 | 750 | | |
753 | 751 | | |
754 | | - | |
| 752 | + | |
755 | 753 | | |
756 | | - | |
757 | | - | |
758 | | - | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
759 | 758 | | |
760 | 759 | | |
761 | 760 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3508 | 3508 | | |
3509 | 3509 | | |
3510 | 3510 | | |
3511 | | - | |
3512 | 3511 | | |
3513 | 3512 | | |
3514 | 3513 | | |
| |||
3525 | 3524 | | |
3526 | 3525 | | |
3527 | 3526 | | |
| 3527 | + | |
3528 | 3528 | | |
3529 | 3529 | | |
3530 | 3530 | | |
| |||
0 commit comments