Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
alex v committed Nov 24, 2024
1 parent 104c38c commit 062aedb
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
22 changes: 11 additions & 11 deletions test/functional/blsct_nft.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,40 +20,40 @@ def set_test_params(self):

def run_test(self):
self.log.info("Creating wallet1 with BLSCT")

# Create a new wallet

#self.init_wallet(node=0, blsct=True)
self.nodes[0].createwallet(wallet_name="wallet1", blsct=True)
self.nodes[1].createwallet(wallet_name="wallet1", blsct=True)
wallet_info = self.nodes[0].get_wallet_rpc("wallet1")
wallet_info_2 = self.nodes[1].get_wallet_rpc("wallet1")

self.log.info("Loading wallet1")

# Ensure wallet is loaded
wallets = self.nodes[0].listwallets()
assert "wallet1" in wallets, "wallet1 was not loaded successfully"

self.log.info("Generating BLSCT address")

# Generate a BLSCT address
blsct_address = wallet_info.getnewaddress(label="", address_type="blsct")
blsct_address_2 = wallet_info_2.getnewaddress(label="", address_type="blsct")

self.log.info(f"BLSCT address NODE 1: {blsct_address}")
self.log.info(f"BLSCT address NODE 2: {blsct_address_2}")

# Generate blocks and fund the BLSCT address
self.log.info("Generating 101 blocks to the BLSCT address")
block_hashes = self.generatetoblsctaddress(self.nodes[0], 101, blsct_address)

self.log.info(f"Generated blocks: {len(block_hashes)}")

# Check the balance of the wallet
balance = wallet_info.getbalance()
self.log.info(f"Balance in wallet1: {balance}")

assert_equal(len(block_hashes), 101)
assert balance > 0, "Balance should be greater than zero after mining"

Expand Down Expand Up @@ -86,9 +86,9 @@ def run_test(self):
nft_balance = self.nodes[0].getnftbalance(token['tokenId'])
nft_balance_2 = self.nodes[1].getnftbalance(token['tokenId'])

self.log.info(f"Balance in NDOE 1: {nft_balance}")
self.log.info(f"Balance in NODE 1: {nft_balance}")
self.log.info(f"Balance in NODE 2: {nft_balance_2}")

assert nft_balance == {'1': {'id': 'null'}}, "incorrect nft balance in node 1"
assert nft_balance_2 == {}, "incorrect nft balance in node 2"

Expand All @@ -100,9 +100,9 @@ def run_test(self):
nft_balance = self.nodes[0].getnftbalance(token['tokenId'])
nft_balance_2 = self.nodes[1].getnftbalance(token['tokenId'])

self.log.info(f"Balance in NDOE 1: {nft_balance}")
self.log.info(f"Balance in NODE 1: {nft_balance}")
self.log.info(f"Balance in NODE 2: {nft_balance_2}")

assert nft_balance_2 == {'1': {'id': 'null'}}, "incorrect nft balance in node 2"
assert nft_balance == {}, "incorrect nft balance in node"

Expand Down
20 changes: 10 additions & 10 deletions test/functional/blsct_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,40 +20,40 @@ def set_test_params(self):

def run_test(self):
self.log.info("Creating wallet1 with BLSCT")

# Create a new wallet

#self.init_wallet(node=0, blsct=True)
self.nodes[0].createwallet(wallet_name="wallet1", blsct=True)
self.nodes[1].createwallet(wallet_name="wallet1", blsct=True)
wallet_info = self.nodes[0].get_wallet_rpc("wallet1")
wallet_info_2 = self.nodes[1].get_wallet_rpc("wallet1")

self.log.info("Loading wallet1")

# Ensure wallet is loaded
wallets = self.nodes[0].listwallets()
assert "wallet1" in wallets, "wallet1 was not loaded successfully"

self.log.info("Generating BLSCT address")

# Generate a BLSCT address
blsct_address = wallet_info.getnewaddress(label="", address_type="blsct")
blsct_address_2 = wallet_info_2.getnewaddress(label="", address_type="blsct")

self.log.info(f"BLSCT address NODE 1: {blsct_address}")
self.log.info(f"BLSCT address NODE 2: {blsct_address_2}")

# Generate blocks and fund the BLSCT address
self.log.info("Generating 101 blocks to the BLSCT address")
block_hashes = self.generatetoblsctaddress(self.nodes[0], 101, blsct_address)

self.log.info(f"Generated blocks: {len(block_hashes)}")

# Check the balance of the wallet
balance = wallet_info.getbalance()
self.log.info(f"Balance in wallet1: {balance}")

assert_equal(len(block_hashes), 101)
assert balance > 0, "Balance should be greater than zero after mining"

Expand Down Expand Up @@ -86,9 +86,9 @@ def run_test(self):
token_balance = self.nodes[0].gettokenbalance(token['tokenId'])
token_balance_2 = self.nodes[1].gettokenbalance(token['tokenId'])

self.log.info(f"Balance in NDOE 1: {token_balance}")
self.log.info(f"Balance in NODE 1: {token_balance}")
self.log.info(f"Balance in NODE 2: {token_balance_2}")

assert token_balance == 1, "incorrect token balance in node 1"
assert token_balance_2 == 0, "incorrect token balance in node 2"

Expand All @@ -103,7 +103,7 @@ def run_test(self):
assert token_balance == 0.5, "incorrect token balance in node 1"
assert token_balance_2 == 0.5, "incorrect token balance in node 2"

self.log.info(f"Balance in NDOE 1: {token_balance}")
self.log.info(f"Balance in NODE 1: {token_balance}")
self.log.info(f"Balance in NODE 2: {token_balance_2}")


Expand Down

0 comments on commit 062aedb

Please sign in to comment.