SomberNight
e00c998df3
transaction: TxInput.witness_elements() to return [] if not segwit
Previously it would raise:
```
>>> import electrum
>>> tx = electrum.transaction.tx_from_any("0200000001d945b6b076ad7858f7a2227374a42ada71582b1d558fde9ece4bf6c9395c67ca000000006a473044022034867c61623a147dbe7e8541da1086ec8691d4f39181deeba4be70559e26734d02205c0288c96ae6950a0687c0d8c06f9cd343362e6a174cd4c66cfc2abd2278aed801210330fb51ac7b556a599a05c2b8670e79008406e4c0b7e46d4a522ad01804f25dbbfdffffff02389d0700000000001976a9146d687bece6d502519ce5317e25f48da60a52ca8f88ac20a1070000000000220020a948d7fa6abbb97e31779ae54383012b413d53821c7fd394900f6b443c61deeee82a1800")
>>> tx.inputs()[0].witness_elements()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/user/wspace/electrum/electrum/transaction.py", line 257, in witness_elements
vds.write(self.witness)
File "/home/user/wspace/electrum/electrum/transaction.py", line 279, in write
assert isinstance(_bytes, (bytes, bytearray))
AssertionError
```
2022-03-20 16:55:36 +01:00
..
2022-03-19 00:02:54 +01:00
2022-03-09 13:40:44 +01:00
2022-03-02 13:29:24 +00:00
2021-06-25 17:40:23 +02:00
2022-01-20 16:59:10 +01:00
2022-03-09 13:40:44 +01:00
2021-04-30 19:43:53 +02:00
2022-02-15 18:22:44 +01:00
2022-03-15 13:39:33 +01:00
2021-04-30 19:55:47 +02:00
2022-02-15 18:22:44 +01:00
2021-04-30 13:13:01 +00:00
2022-03-02 13:29:24 +00:00
2021-11-13 04:31:08 +01:00
2021-09-22 14:50:32 +02:00
2022-02-17 15:44:47 +01:00
2022-02-17 15:44:47 +01:00
2021-04-14 19:08:04 +02:00
2022-02-17 17:53:51 +01:00
2021-06-22 16:16:21 +02:00
2021-03-21 00:36:23 -04:00
2021-03-21 00:36:23 -04:00
2022-03-02 11:42:49 +00:00
2021-10-25 17:46:51 +02:00
2021-04-08 19:49:43 +02:00
2022-02-22 19:20:03 +01:00
2022-02-22 15:04:37 +01:00
2021-09-15 19:52:40 +02:00
2022-02-28 15:17:56 +01:00
2021-09-15 16:41:41 +02:00
2022-01-20 16:47:48 +01:00
2022-02-22 19:20:03 +01:00
2022-02-16 19:24:38 +01:00
2022-03-09 13:40:44 +01:00
2021-09-24 17:36:33 +02:00
2021-03-19 20:51:38 +01:00
2021-03-21 00:36:23 -04:00
2022-03-17 17:52:38 +01:00
2021-07-15 14:52:25 +00:00
2021-07-29 16:26:23 +02:00
2021-11-01 18:05:33 +01:00
2022-02-16 18:53:24 +01:00
2022-03-09 13:40:44 +01:00
2021-03-05 20:46:41 +01:00
2021-09-27 10:31:44 +02:00
2022-02-21 18:09:45 +01:00
2021-04-14 19:14:26 +02:00
2021-04-08 16:24:10 +02:00
2021-07-16 11:27:36 +02:00
2022-03-11 15:39:03 +01:00
2021-03-21 00:36:23 -04:00
2021-02-08 20:26:16 +02:00
2021-03-21 00:36:23 -04:00
2022-03-11 15:49:30 +01:00
2021-06-25 17:40:23 +02:00
2021-03-17 18:11:55 +01:00
2021-05-06 19:47:22 +09:00
2022-01-18 19:54:24 +01:00
2022-01-18 19:54:24 +01:00
2021-09-28 19:48:31 +02:00
2021-06-22 19:24:16 +02:00
2021-11-09 01:02:57 +01:00
2021-06-10 17:26:04 +02:00
2022-02-15 18:22:44 +01:00
2022-02-18 10:14:51 +01:00
2022-03-20 16:55:36 +01:00
2022-02-15 18:22:47 +01:00
2021-03-05 20:46:41 +01:00
2022-03-15 15:06:28 +01:00
2022-02-25 20:44:05 +01:00
2022-03-16 12:51:03 +01:00