Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_dersig.py
Show All 10 Lines | |||||
from test_framework.messages import msg_block | from test_framework.messages import msg_block | ||||
from test_framework.mininode import P2PInterface | from test_framework.mininode import P2PInterface | ||||
from test_framework.script import CScript | from test_framework.script import CScript | ||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework | ||||
from test_framework.util import assert_equal | from test_framework.util import assert_equal | ||||
DERSIG_HEIGHT = 1251 | DERSIG_HEIGHT = 1251 | ||||
# Reject codes that we might receive in this test | |||||
REJECT_OBSOLETE = 17 | |||||
# A canonical signature consists of: | # A canonical signature consists of: | ||||
# <30> <total len> <02> <len R> <R> <02> <len S> <S> <hashtype> | # <30> <total len> <02> <len R> <R> <02> <len S> <S> <hashtype> | ||||
def unDERify(tx): | def unDERify(tx): | ||||
""" | """ | ||||
Make the signature in vin 0 of a tx non-DER-compliant, | Make the signature in vin 0 of a tx non-DER-compliant, | ||||
by adding padding after the S-value. | by adding padding after the S-value. | ||||
▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines |