Came up during review with Opus 5:
In master we currently allow to call dumptxoutset with rollback=0, and the call will succeed as long as we are non pruned, and will produce an empty snapshot.
With this PR, we introduce another case where rollback=0 is allowed, although much more exotic: pruned nodes but with all the block+undo data available, which can happen if one sets prune=1 and then doesn't prune anything, or if a pruned node is in early IBD.
(In master this doesn't work, because GetFirstBlock excludes the genesis block as it has no undo data, and the rollback would fail with "Could not roll back to requested height since necessary block data is already pruned.", despite not having anything pruned. In this sense, this PR removes a confusing error that the user could get)
In both cases, the snapshot produced is not wrong, it's simply expensive to create and useless. Not sure if it's worth to fix, but wanted to mention :)
See: https://github.com/bitcoin/bitcoin/compare/master...danielabrozzoni:bitcoin:assumeutxo_rollback_0 - I pushed one commit to show the current behavior, the tree commits from this PR, and one test change to show the new behavior.