Commit d039d43
Use async ChainMonitor persister via new_async_beta
Switch from the sync MonitorUpdatingPersister to MonitorUpdatingPersisterAsync
for ChainMonitor, enabling non-blocking channel monitor persistence at runtime.
Previously, two separate persisters were created during build: an async one
(used only to read monitors at startup, then discarded) and a sync one (passed
to ChainMonitor::new for runtime persistence). Now a single AsyncPersister is
used for both reading and ongoing persistence via ChainMonitor::new_async_beta.
A DynStoreRef newtype is introduced to wrap Arc<DynStore> with a direct KVStore
implementation, avoiding higher-ranked lifetime issues that arise when
Arc<dyn DynStoreTrait> is used as a type parameter in complex generic bounds.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 9443083 commit d039d43
2 files changed
+51
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
80 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
1289 | 1289 | | |
1290 | 1290 | | |
1291 | 1291 | | |
1292 | | - | |
1293 | | - | |
| 1292 | + | |
| 1293 | + | |
1294 | 1294 | | |
1295 | 1295 | | |
1296 | 1296 | | |
| |||
1303 | 1303 | | |
1304 | 1304 | | |
1305 | 1305 | | |
1306 | | - | |
| 1306 | + | |
1307 | 1307 | | |
1308 | | - | |
| 1308 | + | |
1309 | 1309 | | |
1310 | 1310 | | |
1311 | 1311 | | |
| |||
1323 | 1323 | | |
1324 | 1324 | | |
1325 | 1325 | | |
1326 | | - | |
1327 | | - | |
1328 | | - | |
1329 | | - | |
1330 | | - | |
1331 | | - | |
1332 | | - | |
1333 | | - | |
1334 | | - | |
| 1326 | + | |
| 1327 | + | |
1335 | 1328 | | |
1336 | 1329 | | |
1337 | | - | |
| 1330 | + | |
1338 | 1331 | | |
1339 | 1332 | | |
1340 | 1333 | | |
1341 | 1334 | | |
1342 | | - | |
| 1335 | + | |
1343 | 1336 | | |
1344 | 1337 | | |
1345 | 1338 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
| 26 | + | |
29 | 27 | | |
30 | 28 | | |
31 | 29 | | |
| |||
135 | 133 | | |
136 | 134 | | |
137 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
138 | 165 | | |
139 | 166 | | |
140 | 167 | | |
| |||
188 | 215 | | |
189 | 216 | | |
190 | 217 | | |
191 | | - | |
| 218 | + | |
192 | 219 | | |
193 | 220 | | |
194 | 221 | | |
| |||
197 | 224 | | |
198 | 225 | | |
199 | 226 | | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | 227 | | |
210 | 228 | | |
211 | 229 | | |
212 | 230 | | |
213 | 231 | | |
214 | 232 | | |
215 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
216 | 242 | | |
217 | 243 | | |
218 | 244 | | |
| |||
0 commit comments