Problem: The authenticated scantxoutset, scanblocks, getdescriptoractivity, utxoupdatepsbt, and descriptorprocesspsbt RPCs share a descriptor expansion helper that iterates inclusive int64_t ranges with an int counter.
A ranged descriptor with an explicit [begin, end] range ending at 2^31 - 1 expands that valid position, then overflows when advancing the counter to exit the loop.
Trap-enabled builds terminate, while other builds invoke undefined behavior.
Fix: Use int64_t for loop control so the one-past-the-end value is representable and every position passed to Descriptor::Expand() remains within its existing int range.
Related: #26275 fixed the same endpoint overflow in deriveaddresses.