| 726 | } |
| 727 | |
| 728 | static CBlockUndo GetUndoChecked(BlockManager& blockman, const CBlockIndex& blockindex) |
| 729 | { |
| 730 | CBlockUndo blockUndo; |
| 731 | |
| 732 | // The Genesis block does not have undo data |
| 733 | if (blockindex.nHeight == 0) return blockUndo; |
| 734 | |
| 735 | { |
| 736 | LOCK(cs_main); |
| 737 | CheckBlockDataAvailability(blockman, blockindex, /*check_for_undo=*/true); |
| 738 | } |
| 739 | |
| 740 | if (!blockman.ReadBlockUndo(blockUndo, blockindex)) { |
| 741 | throw JSONRPCError(RPC_MISC_ERROR, "Can't read undo data from disk"); |
| 742 | } |
| 743 | |
| 744 | return blockUndo; |
| 745 | } |
| 746 | |
| 747 | static std::vector<RPCResult> GetBlockFields(RPCResult tx_result, std::optional<std::string> elision_msg = std::nullopt) |
| 748 | { |
no test coverage detected