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 Feb 22, 2023
1 parent 1257889 commit 143cb72
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 @@ -361,6 +361,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 @@ -428,8 +429,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 @@ -1244,6 +1248,7 @@ def __init__(
self.trigger_spk = self.nums_tr.scriptPubKey

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

if self.revault_amount_sats:
self.amount -= self.revault_amount_sats
Expand Down

0 comments on commit 143cb72

Please sign in to comment.