and named the same as in generatetodescriptor just above.
This is a backport of [[https://github.com/bitcoin/bitcoin/pull/19133 | core#19133]] [2/10]
https://github.com/bitcoin/bitcoin/pull/19133/commits/9be7fd35c5d631c2cc34d3b4fa63ae0a9d5a68ef
Backport note: we use `get_int64` instead of `get_int` for `max_tries` because of D7138
Depends on D9941