Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Mixa84 committed Jun 27, 2024
1 parent 0997c4a commit 1a9d83d
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions test/functional/feature_any_asset_fee_scenarios.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from test_framework.test_framework import BitcoinTestFramework
from decimal import Decimal
from test_framework.util import (
assert_equal,
assert_raises_rpc_error,
)

Expand Down Expand Up @@ -57,7 +56,7 @@ def init(self):
self.nodes[1].setfeeexchangerates(new_rates)
assert self.nodes[1].getfeeexchangerates() == new_rates

self.nodes[0].sendtoaddress(address=self.node0_address, amount=100.0, assetlabel=self.asset1, subtractfeefromamount=True)
self.nodes[0].sendtoaddress(address=self.node0_address, amount=100.0, assetlabel=self.asset1, subtractfeefromamount=True)

self.nodes[0].generatetoaddress(1, self.node0_address, invalid_call=False) # confirm the tx

Expand All @@ -73,7 +72,7 @@ def init(self):
self.issue_amount2 = Decimal('10')
self.issuance2 = self.nodes[0].issueasset(
assetamount=self.issue_amount2,
tokenamount=1,
tokenamount=1,
blind=False,
contract_hash=self.asset1,
fee_asset = self.asset1)
Expand All @@ -88,10 +87,10 @@ def init(self):

assert self.nodes[0].getfeeexchangerates() == new_rates
assert self.nodes[1].getfeeexchangerates() != new_rates

asset1amount = self.nodes[0].getbalance()[self.asset1]
self.nodes[0].sendtoaddress(address=self.node0_address, amount=asset1amount, assetlabel=self.asset1, subtractfeefromamount=True)
self.nodes[0].sendtoaddress(address=self.node0_address, amount=10.0, assetlabel=self.asset2, subtractfeefromamount=True)
self.nodes[0].sendtoaddress(address=self.node0_address, amount=asset1amount, assetlabel=self.asset1, subtractfeefromamount=True)
self.nodes[0].sendtoaddress(address=self.node0_address, amount=10.0, assetlabel=self.asset2, subtractfeefromamount=True)

self.nodes[0].generatetoaddress(1, self.node0_address, invalid_call=False)

Expand All @@ -101,7 +100,7 @@ def scenario1(self):
amount=2.0,
assetlabel=self.asset1,
fee_asset_label=self.asset1)

self.sync_all()

self.nodes[1].generatetoaddress(1, self.node1_address, invalid_call=False)
Expand All @@ -118,7 +117,7 @@ def scenario2(self):
amount=1.0,
assetlabel=self.asset2,
fee_asset_label=self.asset2)

assert len(self.nodes[0].getrawmempool()) == 1

assert_raises_rpc_error(-26, "min relay fee not met,", self.nodes[1].sendrawtransaction, self.nodes[0].getrawtransaction(tx))
Expand All @@ -137,7 +136,7 @@ def scenario3(self):
amount=1.0,
assetlabel=self.asset2,
fee_asset_label=self.asset2)

assert len(self.nodes[0].getrawmempool()) == 1

assert_raises_rpc_error(-26, "min relay fee not met,", self.nodes[1].sendrawtransaction, self.nodes[0].getrawtransaction(tx))
Expand All @@ -156,9 +155,9 @@ def scenario4(self):
amount=1.0,
assetlabel=self.asset2,
fee_asset_label=self.asset2)

self.sync_all()

assert self.nodes[0].getrawmempool(True)[tx]['fees']['base'] == Decimal('0.00002570')
assert self.nodes[1].getrawmempool(True)[tx]['fees']['base'] == Decimal('0.00002570')

Expand All @@ -180,7 +179,7 @@ def scenario5(self):
amount=1.0,
assetlabel=self.asset2,
fee_asset_label=self.asset2)

assert self.nodes[0].getrawmempool(True)[tx]['fees']['base'] == Decimal('0.00002570')
assert_raises_rpc_error(-26, "min relay fee not met,", self.nodes[1].sendrawtransaction, self.nodes[0].getrawtransaction(tx))

Expand Down

0 comments on commit 1a9d83d

Please sign in to comment.