Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_csv_activation.py
Show All 34 Lines | |||||
BIP 112: | BIP 112: | ||||
bip112txs_vary_nSequence - 16 txs with nSequence relative_locktimes of 10 evaluated against 10 OP_CSV OP_DROP | bip112txs_vary_nSequence - 16 txs with nSequence relative_locktimes of 10 evaluated against 10 OP_CSV OP_DROP | ||||
bip112txs_vary_nSequence_9 - 16 txs with nSequence relative_locktimes of 9 evaluated against 10 OP_CSV OP_DROP | bip112txs_vary_nSequence_9 - 16 txs with nSequence relative_locktimes of 9 evaluated against 10 OP_CSV OP_DROP | ||||
bip112txs_vary_OP_CSV - 16 txs with nSequence = 10 evaluated against varying {relative_locktimes of 10} OP_CSV OP_DROP | bip112txs_vary_OP_CSV - 16 txs with nSequence = 10 evaluated against varying {relative_locktimes of 10} OP_CSV OP_DROP | ||||
bip112txs_vary_OP_CSV_9 - 16 txs with nSequence = 9 evaluated against varying {relative_locktimes of 10} OP_CSV OP_DROP | bip112txs_vary_OP_CSV_9 - 16 txs with nSequence = 9 evaluated against varying {relative_locktimes of 10} OP_CSV OP_DROP | ||||
bip112tx_special - test negative argument to OP_CSV | bip112tx_special - test negative argument to OP_CSV | ||||
""" | """ | ||||
from test_framework.test_framework import ComparisonTestFramework | from decimal import Decimal | ||||
from test_framework.util import * | |||||
from test_framework.mininode import ToHex, FromHex, CTransaction, network_thread_start, COIN | |||||
from test_framework.blocktools import create_coinbase, create_block, make_conform_to_ctor | |||||
from test_framework.comptool import TestInstance, TestManager | |||||
from test_framework.script import * | |||||
import time | import time | ||||
from test_framework.blocktools import ( | |||||
create_block, | |||||
create_coinbase, | |||||
make_conform_to_ctor, | |||||
) | |||||
from test_framework.comptool import TestInstance, TestManager | |||||
from test_framework.messages import COIN, CTransaction, FromHex, ToHex | |||||
from test_framework.mininode import network_thread_start | |||||
from test_framework.script import ( | |||||
CScript, | |||||
OP_CHECKSEQUENCEVERIFY, | |||||
OP_DROP, | |||||
OP_TRUE, | |||||
) | |||||
from test_framework.test_framework import ComparisonTestFramework | |||||
from test_framework.util import assert_equal | |||||
base_relative_locktime = 10 | base_relative_locktime = 10 | ||||
seq_disable_flag = 1 << 31 | seq_disable_flag = 1 << 31 | ||||
seq_random_high_bit = 1 << 25 | seq_random_high_bit = 1 << 25 | ||||
seq_type_flag = 1 << 22 | seq_type_flag = 1 << 22 | ||||
seq_random_low_bit = 1 << 18 | seq_random_low_bit = 1 << 18 | ||||
# b31,b25,b22,b18 represent the 31st, 25th, 22nd and 18th bits respectively in the nSequence field | # b31,b25,b22,b18 represent the 31st, 25th, 22nd and 18th bits respectively in the nSequence field | ||||
# relative_locktimes[b31][b25][b22][b18] is a base_relative_locktime with the indicated bits set if their indices are 1 | # relative_locktimes[b31][b25][b22][b18] is a base_relative_locktime with the indicated bits set if their indices are 1 | ||||
▲ Show 20 Lines • Show All 634 Lines • Show Last 20 Lines |