Add a new feature to Hub/Filesource/stream: "SourceThroughCursor"
This allows specifying a start block AND a cursor, the source will then:
1) start at startBlock
2) if the cursor is in the canonical chain, it will proceed as usual, ignoring the cursor.
3) if the cursor is on a forked block, it will bring you up to that block, THEN bring you back to the canonical chain with UNDOs and such.
There are 2 CAVEATS:
i. If the cursor block is forked and a block at the same height is already in the merged-blocks ("old forked cursor"), it will bail out saying that the this fork resolution is not implemented yet.
ii. If the cursor's LIB is NOT in the hub anymore, but the cursor's block is not in the merged blocks yet, the request will stall. To prevent this when using SourceThroughCursor, make sure that your hub has "keepFinalBlocks" value that is greater than the max distance from head to LIB, + 99.
Add a new feature to Hub/Filesource/stream: "SourceThroughCursor"
This allows specifying a start block AND a cursor, the source will then: 1) start at
startBlock
2) if the cursor is in the canonical chain, it will proceed as usual, ignoring the cursor. 3) if the cursor is on a forked block, it will bring you up to that block, THEN bring you back to the canonical chain with UNDOs and such.There are 2 CAVEATS:
i. If the cursor block is forked and a block at the same height is already in the merged-blocks ("old forked cursor"), it will bail out saying that the this fork resolution is not implemented yet.
ii. If the cursor's LIB is NOT in the hub anymore, but the cursor's block is not in the merged blocks yet, the request will stall. To prevent this when using SourceThroughCursor, make sure that your hub has "keepFinalBlocks" value that is greater than the max distance from head to LIB, + 99.