diff options
author | Samuel Dobson <dobsonsa68@gmail.com> | 2021-06-09 22:40:03 +1200 |
---|---|---|
committer | Samuel Dobson <dobsonsa68@gmail.com> | 2021-06-09 22:53:36 +1200 |
commit | 69577a27abef4993a5af51418626b151c8c082c0 (patch) | |
tree | 566812623edea4160cedcb2368f75e643806b906 /src/test/base32_tests.cpp | |
parent | 58f8b156ed7b50f60c7d575fbd9b759f9fe9494b (diff) | |
parent | d44a261acff40c1c8727d3cc0106bde65a6416d0 (diff) |
Merge bitcoin/bitcoin#21944: wallet: Fix issues when `walletdir` is root directory
d44a261acff40c1c8727d3cc0106bde65a6416d0 Fix issues when `walletdir` is root directory (unknown)
Pull request description:
+ Remove one character less from wallet path
+ After testing lot of random strings with special chars in `wallet_name`, I found that the issue was not related to special characters in the name. Reviewing PR https://github.com/bitcoin/bitcoin/pull/21907 helped me resolve the issue.
**Real issue**: If the path mentioned in `walletdir` is a root directory, first character of the wallet name or path is removed
**Solution**: `if` statement to check `walletdir` is a root directory
Fixes: https://github.com/bitcoin/bitcoin/issues/21510 https://github.com/bitcoin/bitcoin/issues/21501
Related PR: https://github.com/bitcoin/bitcoin/pull/20080
Consider the wallet directories `w1` and `w2` saved in `D:\`. Run `bitcoind.exe -walletdir=D:\`, Results for `bitcoin-cli.exe listwalletdir`:
Before this PR:
```
{
"wallets": [
{
"name": "1"
},
{
"name": "2"
}
]
}
```
After this PR:
```
"wallets": [
{
"name": "w1"
},
{
"name": "w2"
}
]
}
```
ACKs for top commit:
ryanofsky:
Code review ACK d44a261acff40c1c8727d3cc0106bde65a6416d0
meshcollider:
utACK d44a261acff40c1c8727d3cc0106bde65a6416d0
Tree-SHA512: b09b00f727407e3771c8694861dae1bfd29d97a0d51ddcb5d9c0111dc618b3fff2f75829cbb4361c54457ee564e94fcefd9e2928262a1c918a2b6bbad724eb55
Diffstat (limited to 'src/test/base32_tests.cpp')
0 files changed, 0 insertions, 0 deletions