Skip to content

Commit

Permalink
test: make sure amounts aren't trimmed
Browse files Browse the repository at this point in the history
  • Loading branch information
UdjinM6 committed Oct 25, 2023
1 parent 7a3ce83 commit 5fe26cc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/functional/feature_governance.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,16 @@ def run_test(self):
trigger_data = list(valid_triggers.values())[0]
assert_equal(trigger_data['YesCount'], 1)

# Make sure amounts aren't trimmed
payment_amounts_expected = [str(satoshi_round(str(p0_amount))), str(satoshi_round(str(p1_amount))), str(satoshi_round(str(p2_amount)))]
data_string = list(self.nodes[0].gobject("list", "valid", "triggers").values())[0]["DataString"]
payment_amounts_trigger = json.loads(data_string)["payment_amounts"].split("|")
for amount_str in payment_amounts_trigger:
if amount_str in payment_amounts_expected:
pass
else:
assert False

# Move 1 block inside the Superblock maturity window
self.nodes[0].generate(1)
self.sync_blocks()
Expand Down

0 comments on commit 5fe26cc

Please sign in to comment.