aboutsummaryrefslogtreecommitdiff
path: root/test/functional/p2p_segwit.py
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2017-02-13 13:41:02 -0500
committerRussell Yanofsky <russ@yanofsky.org>2018-03-15 18:57:55 -0500
commit499d95e278f34790660a2b9baf5525e0def1485a (patch)
treef95140f9f7ba7344345e96c5da618d48e5b5d44b /test/functional/p2p_segwit.py
parent7be9a9a570c1140048f8781ced1111e1d930e517 (diff)
Add static_assert to prevent VARINT(<signed value>)
Using VARINT with signed types is dangerous because negative values will appear to serialize correctly, but then deserialize as positive values mod 128. This commit changes the VARINT macro to trigger an error by default if called with an signed value, and updates broken uses of VARINT to pass a special flag that lets them keep working with no change in behavior.
Diffstat (limited to 'test/functional/p2p_segwit.py')
0 files changed, 0 insertions, 0 deletions