Commit d7beec4
+Sharon
Add
- Add `DecodeScriptSegwit` struct to model the `segwit` field returned by the `decodescript` RPC.
- Update `DecodeScript` to include an optional `segwit` field.
Add DecodeScriptSegwit struct, conversions, and model support
- Add `DecodeScriptSegwit` struct to both versioned and model representations.
- Implement `into_model()` for `DecodeScriptSegwit` and update `DecodeScript` accordingly.
- Use `ScriptBuf` instead of `String` for `hex` to strongly type the field.
- Replace `String` with `Address<NetworkUnchecked>` for `p2sh_segwit` and other fields.
- Normalize and correct field comments to match Core `decodescript` RPC output.
- Clean up formatting errors
Add DecodeScriptSegwit into_model to v17 and refactor error handling
- Add `into_model` implementation for `DecodeScriptSegwit` in v17.
- Return `segwit` in v17, as it is present in RPC output despite not being documented until v19.
- Add `DecodeScriptSegwitError` enum in v17, as `address` is sometimes `None` and error handling is needed.
- Remove duplicate `DecodeScriptSegwitError` from v23 and reuse the one from v22 via import.
- Move `descriptor` field in `DecodeScriptSegwit` model struct to match the field order in Bitcoin Core's `decodescript` RPC response.
Add model test for decode_script with P2WPKH SegWit output
Add model test for decode_script_segwitDecodeScriptSegwit struct and support in DecodeScript conversion1 parent 4c5e244 commit d7beec4
File tree
6 files changed
+56
-52
lines changed- integration_test/tests
- types/src
- model
- v17/raw_transactions
- v19
- v22
- v23
6 files changed
+56
-52
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| 203 | + | |
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
206 | 207 | | |
207 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
208 | 228 | | |
209 | 229 | | |
210 | 230 | | |
| |||
220 | 240 | | |
221 | 241 | | |
222 | 242 | | |
223 | | - | |
224 | | - | |
| 243 | + | |
225 | 244 | | |
226 | 245 | | |
227 | 246 | | |
228 | | - | |
229 | | - | |
230 | | - | |
| 247 | + | |
231 | 248 | | |
232 | 249 | | |
233 | 250 | | |
234 | 251 | | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
| 252 | + | |
239 | 253 | | |
240 | 254 | | |
241 | 255 | | |
| |||
249 | 263 | | |
250 | 264 | | |
251 | 265 | | |
252 | | - | |
| 266 | + | |
253 | 267 | | |
254 | 268 | | |
255 | 269 | | |
| |||
288 | 302 | | |
289 | 303 | | |
290 | 304 | | |
291 | | - | |
292 | 305 | | |
293 | | - | |
294 | 306 | | |
295 | 307 | | |
296 | 308 | | |
| |||
300 | 312 | | |
301 | 313 | | |
302 | 314 | | |
303 | | - | |
304 | 315 | | |
305 | 316 | | |
306 | | - | |
307 | 317 | | |
308 | | - | |
| 318 | + | |
309 | 319 | | |
310 | 320 | | |
311 | | - | |
312 | 321 | | |
313 | 322 | | |
314 | | - | |
315 | 323 | | |
316 | 324 | | |
317 | 325 | | |
318 | 326 | | |
319 | 327 | | |
320 | 328 | | |
321 | | - | |
322 | | - | |
| 329 | + | |
323 | 330 | | |
324 | 331 | | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
325 | 336 | | |
326 | 337 | | |
327 | 338 | | |
| |||
341 | 352 | | |
342 | 353 | | |
343 | 354 | | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
| 355 | + | |
348 | 356 | | |
349 | 357 | | |
350 | 358 | | |
| |||
356 | 364 | | |
357 | 365 | | |
358 | 366 | | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
| 367 | + | |
363 | 368 | | |
364 | 369 | | |
365 | 370 | | |
366 | 371 | | |
367 | 372 | | |
368 | 373 | | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
| 374 | + | |
374 | 375 | | |
375 | 376 | | |
376 | 377 | | |
| |||
386 | 387 | | |
387 | 388 | | |
388 | 389 | | |
389 | | - | |
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| 233 | + | |
| 234 | + | |
233 | 235 | | |
234 | 236 | | |
235 | 237 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
277 | 278 | | |
278 | 279 | | |
279 | 280 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
261 | | - | |
| 260 | + | |
| 261 | + | |
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
259 | | - | |
| 258 | + | |
| 259 | + | |
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| |||
0 commit comments