Commit graph

16 commits

Author SHA1 Message Date
Jim Posen
ad0070fa44 gcs/builder: Deduplicate items before creating block filters. 2018-05-15 19:14:18 -07:00
Jim Posen
cbc2d0fee6 Allow construction of empty filters. 2018-05-15 19:14:18 -07:00
Jim Posen
884680ddbd Serialize filter with N as a VarInt instead of fixed-size. 2018-05-15 19:14:18 -07:00
Olaoluwa Osuntokun
9da482119c gcs/builder: revert recursion of push datas in p2sh/witness 2018-05-15 19:14:18 -07:00
Alex
5151e0586d gcs/builder: move tx hash from extended into basic filter 2018-05-15 19:14:18 -07:00
Alex
6cffb54a22 gcs/builder: recurse into P2SH/witness scripts 2018-05-15 19:14:18 -07:00
Olaoluwa Osuntokun
5a770ec85e gcs/builder: an empty filter has a zero-hash 2018-05-15 19:14:18 -07:00
Olaoluwa Osuntokun
65172ea539 gcs/builder: ignore scripts with no data pushes 2018-05-15 19:14:18 -07:00
Olaoluwa Osuntokun
b3d8578868 gcs: add witness stack items to filter, update tests 2018-05-15 19:14:18 -07:00
Olaoluwa Osuntokun
c01c00e8b4 gcs: check to see if sigScript exists before adding it 2018-05-15 19:14:18 -07:00
Olaoluwa Osuntokun
0f2eb80fdb gcs: add some line spacing, wrap comments to 80 characters 2018-05-15 19:14:18 -07:00
Alex
e3c79234e6 gcs/builder: Add pre-BIP block filter and header calculations. 2018-05-15 19:14:18 -07:00
Alex
ca65f28ca1 Ignore error from txscript.PushedData 2018-05-15 19:14:18 -07:00
Alex
856e3a320d Change OutPoint index encoding to little-endian to match Bitcoin 2018-05-15 19:14:18 -07:00
Alex
119a03a3ca Add comment to DefaultP to fix lint issue with exported constant. 2018-05-15 19:14:18 -07:00
Alex
6654eb61e4 Add filter builder and some tests 2018-05-15 19:14:18 -07:00