Commit 756cade
Merge #13252: Wallet: Refactor ReserveKeyFromKeyPool for safety
Summary:
4b62bdf5136c174621509bf7866fbd89b61cc66a Wallet: Refactor ReserveKeyFromKeyPool for safety (Ben Woosley)
Pull request description:
ReserveKeyFromKeyPool's previous behaviour is to set nIndex to -1 if the keypool is
empty, OR throw an exception for technical failures. Instead, we now return false
if the keypool is empty, true if the operation succeeded.
This is to make failure more easily detectable by calling code.
Tree-SHA512: 753f057ad13bd4c28d121f426bf0967ed72b827d97fb24582f9326ec60072abc5482e3db69ccada7c5fc66de9957fc59098432dd223fc4116991cab44c6d7aef
Backport of Core PR13252
bitcoin/bitcoin#13252
Depends on D4207
Test Plan:
make check
test_runner.py
Reviewers: deadalnix, Fabien, jasonbcox, O1 Bitcoin ABC, #bitcoin_abc
Reviewed By: deadalnix, O1 Bitcoin ABC, #bitcoin_abc
Differential Revision: https://reviews.bitcoinabc.org/D41661 parent 04d1a4c commit 756cade
2 files changed
+33
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4150 | 4150 | | |
4151 | 4151 | | |
4152 | 4152 | | |
4153 | | - | |
| 4153 | + | |
4154 | 4154 | | |
4155 | 4155 | | |
4156 | 4156 | | |
| |||
4161 | 4161 | | |
4162 | 4162 | | |
4163 | 4163 | | |
4164 | | - | |
4165 | | - | |
| 4164 | + | |
4166 | 4165 | | |
4167 | 4166 | | |
4168 | 4167 | | |
4169 | | - | |
| 4168 | + | |
4170 | 4169 | | |
4171 | 4170 | | |
4172 | 4171 | | |
| |||
4193 | 4192 | | |
4194 | 4193 | | |
4195 | 4194 | | |
4196 | | - | |
4197 | | - | |
4198 | | - | |
| 4195 | + | |
| 4196 | + | |
| 4197 | + | |
4199 | 4198 | | |
4200 | 4199 | | |
4201 | 4200 | | |
| 4201 | + | |
| 4202 | + | |
| 4203 | + | |
| 4204 | + | |
| 4205 | + | |
| 4206 | + | |
4202 | 4207 | | |
| 4208 | + | |
| 4209 | + | |
4203 | 4210 | | |
4204 | 4211 | | |
4205 | 4212 | | |
| |||
4230 | 4237 | | |
4231 | 4238 | | |
4232 | 4239 | | |
4233 | | - | |
4234 | | - | |
4235 | | - | |
| 4240 | + | |
| 4241 | + | |
4236 | 4242 | | |
4237 | 4243 | | |
4238 | 4244 | | |
| |||
4475 | 4481 | | |
4476 | 4482 | | |
4477 | 4483 | | |
4478 | | - | |
4479 | | - | |
| 4484 | + | |
4480 | 4485 | | |
4481 | 4486 | | |
4482 | 4487 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1075 | 1075 | | |
1076 | 1076 | | |
1077 | 1077 | | |
1078 | | - | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
1079 | 1094 | | |
1080 | 1095 | | |
1081 | 1096 | | |
| |||
0 commit comments