Skip to content

Commit

Permalink
inquisition: test: lint changes for vault
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesob committed Mar 21, 2023
1 parent 5a4929e commit 010f3aa
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/functional/feature_vaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ def test_batch_unvault(

# Construct the final unvault target.
unvault_total_sats = sum(v.total_amount_sats for v in vaults) # type: ignore
assert unvault_total_sats is not None
assert unvault_total_sats > 0
target_key = key.ECKey(secret=(1).to_bytes(32, "big"))

Expand Down Expand Up @@ -413,8 +414,11 @@ def test_revault(

revault_amount = COIN
# Construct the final unvault target; save a coin to peel off in the revault.
unvault_total_sats = sum(
v.total_amount_sats for v in vaults) - revault_amount # type: ignore
unvault_total_sats = 0
for v in vaults:
assert v.total_amount_sats is not None
unvault_total_sats += v.total_amount_sats
unvault_total_sats -= revault_amount
assert unvault_total_sats > 0
target_key = key.ECKey(secret=(1).to_bytes(32, "big"))

Expand Down Expand Up @@ -1167,6 +1171,7 @@ def __init__(
self.trigger_spk = self.trigger_tr.scriptPubKey

self.amount = sum(v.total_amount_sats for v in self.compat_vaults) # type: ignore
assert self.amount is not None

if BadTriggerAmountLow in self.bad_behavior:
self.amount -= 1
Expand Down

0 comments on commit 010f3aa

Please sign in to comment.