Skip to content

Commit

Permalink
Add more tests for getfeeexchangerates
Browse files Browse the repository at this point in the history
  • Loading branch information
JBetz committed Apr 12, 2024
1 parent 6c5b8de commit 51d8b3c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/functional/feature_any_asset_fee.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def init(self):
self.sync_all()

assert self.nodes[0].dumpassetlabels() == {'gasset': 'b2e15d0d7a0c94e4e2ce0fe6e8691b9e451377f6e46e8045a86f7c4b5d4f0f23'}
assert self.nodes[0].getfeeexchangerates() == { 'b2e15d0d7a0c94e4e2ce0fe6e8691b9e451377f6e46e8045a86f7c4b5d4f0f23': 100000000 }
assert self.nodes[0].getfeeexchangerates() == { 'gasset': 100000000 }

self.issue_amount = Decimal('100')
self.issuance = self.nodes[0].issueasset(self.issue_amount, 1)
Expand All @@ -62,8 +62,11 @@ def init(self):
self.node1_address = self.nodes[1].getnewaddress()
self.node1_nonct_address = self.nodes[1].getaddressinfo(self.node1_address)["unconfidential"]

self.nodes[0].setfeeexchangerates({ "gasset": 100000000, self.asset: 100000000 })
self.nodes[1].setfeeexchangerates({ "gasset": 100000000, self.asset: 100000000 })
new_rates = { "gasset": 100000000, self.asset: 100000000 }
self.nodes[0].setfeeexchangerates(new_rates)
assert self.nodes[0].getfeeexchangerates() == new_rates
self.nodes[1].setfeeexchangerates(new_rates)
assert self.nodes[1].getfeeexchangerates() == new_rates

def transfer_asset_to_node1(self):
node0_balance = self.nodes[0].getbalances()["mine"]
Expand Down

0 comments on commit 51d8b3c

Please sign in to comment.