Commit af1f259
committed
Merge rust-bitcoin/rust-bitcoin#989: Add method to push an ECDSA sig + sighash type byte on a witness
0ab5eea Add method to push an ECDSA sig + sighash type byte on a witness (Matt Corallo)
Pull request description:
We do this all over the place in rust-lightning, and its probably
the most common thing to do with a `Witness` so I figured I'd
upstream the util method to do this. It also avoids an allocation
compared to the naive approach of `SerializedSignature.to_vec()`
with two pushes, which is nice.
ACKs for top commit:
apoelstra:
ACK 0ab5eea
tcharding:
ACK 0ab5eea
dunxen:
ACK 0ab5eea
Tree-SHA512: d4042eb3f2bc7e6beecd2c17eaeef1fdb7d096b8889a3709924734739557031f338525b685d32ac0dc26404afefd4f2d48defd1753ea8935e54e3a82987feb8c1 file changed
+29
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
211 | 213 | | |
212 | 214 | | |
213 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
214 | 227 | | |
215 | 228 | | |
216 | 229 | | |
| |||
289 | 302 | | |
290 | 303 | | |
291 | 304 | | |
| 305 | + | |
292 | 306 | | |
293 | 307 | | |
294 | 308 | | |
295 | 309 | | |
| 310 | + | |
296 | 311 | | |
297 | 312 | | |
298 | 313 | | |
| |||
321 | 336 | | |
322 | 337 | | |
323 | 338 | | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
324 | 353 | | |
325 | 354 | | |
326 | 355 | | |
| |||
0 commit comments