From 87455c5e5dbe55af933c11ad1ea37a1415bf86d8 Mon Sep 17 00:00:00 2001 From: Matt Date: Mon, 4 Nov 2024 07:49:15 -0800 Subject: [PATCH] push=True --- chia/_tests/pools/test_pool_rpc.py | 1 + .../wallet/cat_wallet/test_cat_wallet.py | 3 ++- chia/_tests/wallet/rpc/test_wallet_rpc.py | 24 ++++++++++++------- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/chia/_tests/pools/test_pool_rpc.py b/chia/_tests/pools/test_pool_rpc.py index f25c3b40f775..d297ce6f6b28 100644 --- a/chia/_tests/pools/test_pool_rpc.py +++ b/chia/_tests/pools/test_pool_rpc.py @@ -473,6 +473,7 @@ async def test_absorb_self( wallet_id=uint32(1), amount=uint64(100), address=encode_puzzle_hash(status.p2_singleton_puzzle_hash, "txch"), + push=True, ), DEFAULT_TX_CONFIG, ) diff --git a/chia/_tests/wallet/cat_wallet/test_cat_wallet.py b/chia/_tests/wallet/cat_wallet/test_cat_wallet.py index fe3cad456c87..0e5661c05d82 100644 --- a/chia/_tests/wallet/cat_wallet/test_cat_wallet.py +++ b/chia/_tests/wallet/cat_wallet/test_cat_wallet.py @@ -1480,7 +1480,8 @@ async def test_cat_change_detection(wallet_environments: WalletTestFramework) -> tx = ( await env.rpc_client.send_transaction( - SendTransaction(wallet_id=uint32(1), amount=cat_amount_0, address=addr), wallet_environments.tx_config + SendTransaction(wallet_id=uint32(1), amount=cat_amount_0, address=addr, push=True), + wallet_environments.tx_config, ) ).transaction spend_bundle = tx.spend_bundle diff --git a/chia/_tests/wallet/rpc/test_wallet_rpc.py b/chia/_tests/wallet/rpc/test_wallet_rpc.py index 5e437a225fd6..88a93139c6d5 100644 --- a/chia/_tests/wallet/rpc/test_wallet_rpc.py +++ b/chia/_tests/wallet/rpc/test_wallet_rpc.py @@ -350,7 +350,8 @@ async def test_send_transaction(wallet_rpc_environment: WalletRpcTestEnvironment tx_amount = uint64(15600000) with pytest.raises(ValueError): await client.send_transaction( - SendTransaction(wallet_id=uint32(1), amount=uint64(100000000000000001), address=addr), DEFAULT_TX_CONFIG + SendTransaction(wallet_id=uint32(1), amount=uint64(100000000000000001), address=addr, push=True), + DEFAULT_TX_CONFIG, ) # Tests sending a basic transaction @@ -814,6 +815,7 @@ async def test_spend_clawback_coins(wallet_rpc_environment: WalletRpcTestEnviron address=encode_puzzle_hash(wallet_2_puzhash, "txch"), fee=uint64(0), puzzle_decorator=[PuzzleDecoratorData(PuzzleDecoratorType.CLAWBACK, {"clawback_timelock": 5})], + push=True, ), tx_config=DEFAULT_TX_CONFIG, ) @@ -830,6 +832,7 @@ async def test_spend_clawback_coins(wallet_rpc_environment: WalletRpcTestEnviron address=encode_puzzle_hash(wallet_1_puzhash, "txch"), fee=uint64(0), puzzle_decorator=[PuzzleDecoratorData(PuzzleDecoratorType.CLAWBACK, {"clawback_timelock": 5})], + push=True, ), tx_config=DEFAULT_TX_CONFIG, ) @@ -993,7 +996,7 @@ async def test_get_transactions(wallet_rpc_environment: WalletRpcTestEnvironment puzhash = await wallet.get_new_puzzlehash() await full_node_api.wait_for_wallet_synced(wallet_node=wallet_node, timeout=20) await client.send_transaction( - SendTransaction(wallet_id=uint32(1), amount=uint64(1), address=encode_puzzle_hash(puzhash, "txch")), + SendTransaction(wallet_id=uint32(1), amount=uint64(1), address=encode_puzzle_hash(puzhash, "txch"), push=True), DEFAULT_TX_CONFIG, ) # Create a pending tx @@ -1017,7 +1020,9 @@ async def test_get_transactions(wallet_rpc_environment: WalletRpcTestEnvironment ph_by_addr = await wallet.get_new_puzzlehash() await full_node_api.wait_for_wallet_synced(wallet_node=wallet_node, timeout=20) await client.send_transaction( - SendTransaction(wallet_id=uint32(1), amount=uint64(1), address=encode_puzzle_hash(ph_by_addr, "txch")), + SendTransaction( + wallet_id=uint32(1), amount=uint64(1), address=encode_puzzle_hash(ph_by_addr, "txch"), push=True + ), DEFAULT_TX_CONFIG, ) await full_node_api.wait_for_wallet_synced(wallet_node=wallet_node, timeout=20) @@ -1510,7 +1515,8 @@ async def test_get_coin_records_by_names(wallet_rpc_environment: WalletRpcTestEn # Spend half of it back to the same wallet get some spent coins in the wallet tx = ( await client.send_transaction( - SendTransaction(wallet_id=uint32(1), amount=uint64(generated_funds / 2), address=address), DEFAULT_TX_CONFIG + SendTransaction(wallet_id=uint32(1), amount=uint64(generated_funds / 2), address=address, push=True), + DEFAULT_TX_CONFIG, ) ).transaction assert tx.spend_bundle is not None @@ -1828,7 +1834,7 @@ async def test_key_and_address_endpoints(wallet_rpc_environment: WalletRpcTestEn await env.full_node.api.wait_for_wallet_synced(wallet_node=wallet_node, timeout=20) created_tx = ( await client.send_transaction( - SendTransaction(wallet_id=uint32(1), amount=tx_amount, address=addr), DEFAULT_TX_CONFIG + SendTransaction(wallet_id=uint32(1), amount=tx_amount, address=addr, push=True), DEFAULT_TX_CONFIG ) ).transaction @@ -1894,7 +1900,8 @@ async def test_key_and_address_endpoints(wallet_rpc_environment: WalletRpcTestEn with pytest.raises(ValueError): await client.send_transaction( - SendTransaction(wallet_id=uint32(wallets[0].id), amount=uint64(100), address=addr), DEFAULT_TX_CONFIG + SendTransaction(wallet_id=uint32(wallets[0].id), amount=uint64(100), address=addr, push=True), + DEFAULT_TX_CONFIG, ) # Delete all keys @@ -1922,7 +1929,7 @@ async def test_select_coins_rpc(wallet_rpc_environment: WalletRpcTestEnvironment # create coins for tests tx = ( await client.send_transaction( - SendTransaction(wallet_id=uint32(1), amount=tx_amount, address=addr), DEFAULT_TX_CONFIG + SendTransaction(wallet_id=uint32(1), amount=tx_amount, address=addr, push=True), DEFAULT_TX_CONFIG ) ).transaction spend_bundle = tx.spend_bundle @@ -2496,6 +2503,7 @@ async def test_set_wallet_resync_on_startup(wallet_rpc_environment: WalletRpcTes address=address, fee=uint64(0), puzzle_decorator=[PuzzleDecoratorData(PuzzleDecoratorType.CLAWBACK, {"clawback_timelock": 5})], + push=True, ), tx_config=DEFAULT_TX_CONFIG, ) @@ -2641,7 +2649,7 @@ async def test_cat_spend_run_tail(wallet_rpc_environment: WalletRpcTestEnvironme tx = ( await client.send_transaction( - SendTransaction(wallet_id=uint32(1), amount=tx_amount, address=addr), DEFAULT_TX_CONFIG + SendTransaction(wallet_id=uint32(1), amount=tx_amount, address=addr, push=True), DEFAULT_TX_CONFIG ) ).transaction transaction_id = tx.name