chainside / btcpy

A Python3 SegWit-compliant library which provides tools to handle Bitcoin data structures in a simple fashion.
https://www.chainside.net
GNU Lesser General Public License v3.0
270 stars 73 forks source link

SegWit digest caching #30

Open SimoneBronzini opened 6 years ago

SimoneBronzini commented 6 years ago

SegWit digest computation (btcpy.structs.transaction.SegWitTransaction.get_segwit_digest() method) should cache past computed values and reuse them all around, hence avoiding quadratic hashing.