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 27, 2023
1 parent 7a3ce83 commit 36155b0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/functional/feature_governance.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,13 @@ 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:
assert(amount_str in payment_amounts_expected)

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

0 comments on commit 36155b0

Please sign in to comment.