mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2026-09-28 01:56:38 -04:00
Ak.test nft mint from xch rpc (#14482)
* Mitigate flaky test * Use already existing wallet_is_synced
This commit is contained in:
@@ -508,7 +508,7 @@ class WalletStateManager:
|
||||
|
||||
self.pending_tx_callback()
|
||||
|
||||
async def synced(self):
|
||||
async def synced(self) -> bool:
|
||||
if len(self.server.get_connections(NodeType.FULL_NODE)) == 0:
|
||||
return False
|
||||
|
||||
@@ -516,7 +516,7 @@ class WalletStateManager:
|
||||
if latest is None:
|
||||
return False
|
||||
|
||||
if "simulator" in self.config.get("selected_network"):
|
||||
if "simulator" in self.config.get("selected_network", ""):
|
||||
return True # sim is always synced if we have a genesis block.
|
||||
|
||||
if latest.height - await self.blockchain.get_finished_sync_up_to() > 1:
|
||||
|
||||
@@ -25,6 +25,7 @@ from chia.wallet.did_wallet.did_wallet import DIDWallet
|
||||
from chia.wallet.nft_wallet.nft_wallet import NFTWallet
|
||||
from chia.wallet.nft_wallet.uncurry_nft import UncurriedNFT
|
||||
from chia.wallet.util.address_type import AddressType
|
||||
from tests.util.wallet_is_synced import wallet_is_synced
|
||||
|
||||
|
||||
async def nft_count(wallet: NFTWallet) -> int:
|
||||
@@ -887,6 +888,7 @@ async def test_nft_mint_from_xch_rpc(two_wallet_nodes: Any, trusted: Any, self_h
|
||||
spends = []
|
||||
|
||||
for i in range(0, n, chunk):
|
||||
await time_out_assert(20, wallet_is_synced, True, wallet_node_maker, full_node_api)
|
||||
resp: Dict[str, Any] = await client.nft_mint_bulk(
|
||||
wallet_id=nft_wallet_maker["wallet_id"],
|
||||
metadata_list=metadata_list[i : i + chunk],
|
||||
|
||||
Reference in New Issue
Block a user