Skip to content

Commit 0d865a8

Browse files
committed
[Tests] fake_stake: use a copy for spendingPrevouts
1 parent 0f209b3 commit 0d865a8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/functional/fake_stake/base_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ def create_spam_block(self, hashPrevBlock, stakingPrevOuts, height, fStakeDouble
9494

9595
self.log.info("Creating Spam Block")
9696

97-
# If not given inputs to create spam txes, use the staking inputs
98-
if spendingPrevOuts == {}:
99-
spendingPrevOuts = stakingPrevOuts
97+
# If not given inputs to create spam txes, use a copy of the staking inputs
98+
if len(spendingPrevOuts) == 0:
99+
spendingPrevOuts = dict(stakingPrevOuts)
100100

101101
# Get current time
102102
current_time = int(time.time())

0 commit comments

Comments
 (0)