You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
e89e226 plan: add some clarifying docs (Marko Bencun)
Pull request description:
"The size in bytes of the script sig that" is ambiguous and could refer to the actual scriptSig, exlcuding the varint prefix that indicates its size.
The code comment in witness_size is promoted to the docstring, as its helpful to anyone trying to compute the right size of a transaction.
ACKs for top commit:
apoelstra:
ACK e89e226; successfully ran local tests; nice, good call
Tree-SHA512: 3798d921ddc477965023e6275178c42ff8b37ab03f593dd65078a4d57e7c922659a74db57f5858cc69931781e1ceff3a45d6c7b263b8220d04b594db180229ec
/// The size in bytes of the witness that satisfies this plan
268
+
/// The size in bytes of the witness that satisfies this plan.
269
+
///
270
+
/// NOTE: Returns 0 if there is no witness. You need to manually take care to count it as 1 byte
271
+
/// if there's at least one segwit input in the tx. See ["Empty script witnesses are encoded as a zero byte"](https://github.com/bitcoin/bips/blob/d8a56c9f2b521bf4af5d588f217e7618cc44952c/bip-0144.mediawiki#serialization).
0 commit comments