This PR makes BResult
error a generic type instead of only bilingual_str
and changes the class name to StructuredResult
as BResut
is not related to the purpose of the class.
The motivation is that some methods, like src/wallet/wallet.h:{RestoreWallet(...),CreateWallet(...),LoadWallet(...)}
have more output parameters than just bilingual_str& error
such as DatabaseStatus& status
and std::vector<bilingual_str>& warnings
.
With a generic template for error, it will be possible to create a struct that has bilingual_str& error
and DatabaseStatus& status
, for example, and use it in StructuredResult
.
Built on top of #25594