Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_block.py
Show All 40 Lines | from test_framework.script import ( | ||||
SignatureHashForkId, | SignatureHashForkId, | ||||
) | ) | ||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework | ||||
from test_framework.txtools import pad_tx | from test_framework.txtools import pad_tx | ||||
from test_framework.util import assert_equal | from test_framework.util import assert_equal | ||||
from data import invalid_txs | from data import invalid_txs | ||||
# Use this class for tests that require behavior other than normal "mininode" behavior. | # Use this class for tests that require behavior other than normal p2p behavior. | ||||
# For now, it is used to serialize a bloated varint (b64). | # For now, it is used to serialize a bloated varint (b64). | ||||
class CBrokenBlock(CBlock): | class CBrokenBlock(CBlock): | ||||
def initialize(self, base_block): | def initialize(self, base_block): | ||||
self.vtx = copy.deepcopy(base_block.vtx) | self.vtx = copy.deepcopy(base_block.vtx) | ||||
self.hashMerkleRoot = self.calc_merkle_root() | self.hashMerkleRoot = self.calc_merkle_root() | ||||
▲ Show 20 Lines • Show All 1,247 Lines • Show Last 20 Lines |