programmingbitcoin icon indicating copy to clipboard operation
programmingbitcoin copied to clipboard

Repository for the book

Results 113 programmingbitcoin issues
Sort by recently updated
recently updated
newest added

element can be 520bytes. so, the length should be encoded to varint but it is encoded to 1byte int. and it decodes 1byte int to varint in the parse function...

When signing a segwit transaction with non-segwit inputs, [this line](https://github.com/jimmysong/programmingbitcoin/blob/2a6558263923214320bbdeb10826464fe24ef540/code-ch13/tx.py#L191) fails because `tx_in.witness` is not defined. A simple fix is to initialize `self.witness = b''` in the `TxIn` constructor. Then...

"HOP (13) is given, so the flag is 1 and its hash is the final hash in the hashes field." --> flag is 0 for given not 1 you have...

avoid error : ModuleNotFoundError: No module named 'distutils.util' resolve : sudo apt-get install python3-distutils source : https://github.com/pypa/get-pip/issues/43

Hi, there is a small typo in the image. Specifically, it should be lenth -> length.

according to img version has 5bytes 0100000001 should be 01000000

In case _k_ is equal to the order of the set we have this kind of list: `[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...

In chapter 6, we code the Script.raw_serialize() method, and we cover every valid length of an element except 75. Should the first elif be `Elif length >= 75` ? I...