Merge bitcoin/bitcoin#22337: wallet: Use bilingual_str for errors

92993aa5cf Change SignTransaction's input_errors to use bilingual_str (Andrew Chow)
171366e89b Use bilingual_str for address fetching functions (Andrew Chow)
9571c69b51 Add bilingual_str::clear() (Andrew Chow)

Pull request description:

  In a couple of places in the wallet, errors are `std::string`. In order for these errors to be translated, change them to use `bilingual_str`.

ACKs for top commit:
  hebasto:
    re-ACK 92993aa5cf, only rebased since my [previous](https://github.com/bitcoin/bitcoin/pull/22337#pullrequestreview-694542729) review, verified with
  klementtan:
    Code review ACK 92993aa5cf
  meshcollider:
    Code review ACK 92993aa5cf

Tree-SHA512: 5400e419dd87db8c49b67ed0964de2d44b58010a566ca246f2f0760ed9ef6a9b6f6df7a6adcb211b315b74c727bfe8c7d07eb5690b5922fa5828ceef4c83461f
This commit is contained in:
Samuel Dobson
2021-08-09 14:21:56 +12:00
17 changed files with 74 additions and 60 deletions

View File

@@ -28,6 +28,12 @@ struct bilingual_str {
{
return original.empty();
}
void clear()
{
original.clear();
translated.clear();
}
};
inline bilingual_str operator+(bilingual_str lhs, const bilingual_str& rhs)