Skip to content

Commit fa676db

Browse files
author
MarcoFalke
committed
test: pep-8 whitespace
1 parent faed284 commit fa676db

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/functional/feature_csv_activation.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
SEQ_TYPE_FLAG = 1 << 22
7070
SEQ_RANDOM_LOW_BIT = 1 << 18
7171

72+
7273
def relative_locktime(sdf, srhb, stf, srlb):
7374
"""Returns a locktime with certain bits set."""
7475

@@ -83,6 +84,7 @@ def relative_locktime(sdf, srhb, stf, srlb):
8384
locktime |= SEQ_RANDOM_LOW_BIT
8485
return locktime
8586

87+
8688
def all_rlt_txs(txs):
8789
return [tx['tx'] for tx in txs]
8890

@@ -144,13 +146,13 @@ def create_bip112txs(self, bip112inputs, varyOP_CSV, txversion, locktime_delta=0
144146
for i, (sdf, srhb, stf, srlb) in enumerate(product(*[[True, False]] * 4)):
145147
locktime = relative_locktime(sdf, srhb, stf, srlb)
146148
tx = self.create_self_transfer_from_utxo(bip112inputs[i])
147-
if (varyOP_CSV): # if varying OP_CSV, nSequence is fixed
149+
if varyOP_CSV: # if varying OP_CSV, nSequence is fixed
148150
tx.vin[0].nSequence = BASE_RELATIVE_LOCKTIME + locktime_delta
149151
else: # vary nSequence instead, OP_CSV is fixed
150152
tx.vin[0].nSequence = locktime + locktime_delta
151153
tx.nVersion = txversion
152154
self.miniwallet.sign_tx(tx)
153-
if (varyOP_CSV):
155+
if varyOP_CSV:
154156
tx.vin[0].scriptSig = CScript([locktime, OP_CHECKSEQUENCEVERIFY, OP_DROP] + list(CScript(tx.vin[0].scriptSig)))
155157
else:
156158
tx.vin[0].scriptSig = CScript([BASE_RELATIVE_LOCKTIME, OP_CHECKSEQUENCEVERIFY, OP_DROP] + list(CScript(tx.vin[0].scriptSig)))
@@ -198,7 +200,7 @@ def run_test(self):
198200

199201
# Activation height is hardcoded
200202
# We advance to block height five below BIP112 activation for the following tests
201-
test_blocks = self.generate_blocks(CSV_ACTIVATION_HEIGHT-5 - COINBASE_BLOCK_COUNT)
203+
test_blocks = self.generate_blocks(CSV_ACTIVATION_HEIGHT - 5 - COINBASE_BLOCK_COUNT)
202204
self.send_blocks(test_blocks)
203205
assert not softfork_active(self.nodes[0], 'csv')
204206

@@ -483,5 +485,6 @@ def run_test(self):
483485
self.send_blocks([self.create_test_block(time_txs)])
484486
self.nodes[0].invalidateblock(self.nodes[0].getbestblockhash())
485487

488+
486489
if __name__ == '__main__':
487490
BIP68_112_113Test().main()

0 commit comments

Comments
 (0)