[backport#16244] Move wallet creation out of the createwallet rpc into its own function
Summary:
https://github.com/bitcoin/bitcoin/pull/16244/commits/1aecdf2063cbe28d4715ae5ae1a7e51b860c9f4d
Depends on D6423
Backport of Core PR16244
Test Plan:
ninja check-all
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Subscribers: deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D6425