From 5290fb51299ab241a23b00c16396ab9b35a1095d Mon Sep 17 00:00:00 2001 From: Ouziel Slama Date: Mon, 13 Jan 2025 21:14:28 +0000 Subject: [PATCH] Add test for utxo move in mempool --- .../regtest/scenarios/scenario_23_detach.py | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/counterparty-core/counterpartycore/test/regtest/scenarios/scenario_23_detach.py b/counterparty-core/counterpartycore/test/regtest/scenarios/scenario_23_detach.py index aa253b171..f44d1f1ea 100644 --- a/counterparty-core/counterpartycore/test/regtest/scenarios/scenario_23_detach.py +++ b/counterparty-core/counterpartycore/test/regtest/scenarios/scenario_23_detach.py @@ -173,4 +173,52 @@ } ], }, + { + "title": "Attach DETACHA asset to UTXO", + "transaction": "attach", + "source": "$ADDRESS_10", + "params": { + "asset": "DETACHA", + "quantity": 1 * 10**8, + }, + "set_variables": { + "ATTACH2_DETACHA_TX_HASH": "$TX_HASH", + }, + "controls": [], + }, + { + "title": "Move no confirmation", + "transaction": "movetoutxo", + "no_confirmation": True, + "source": "$ATTACH2_DETACHA_TX_HASH:0", + "params": { + "destination": "$ADDRESS_9", + "quantity": 1 * 10**8, + }, + "controls": [ + { + "url": "mempool/events?event_name=UTXO_MOVE", + "result": [ + { + "event": "UTXO_MOVE", + "params": { + "asset": "DETACHA", + "block_index": 9999999, + "destination": "$TX_HASH:0", + "destination_address": "$ADDRESS_9", + "msg_index": 0, + "quantity": 100000000, + "send_type": "move", + "source": "$ATTACH2_DETACHA_TX_HASH:0", + "source_address": "$ADDRESS_10", + "status": "valid", + "tx_hash": "$TX_HASH", + "tx_index": "$TX_INDEX", + }, + "tx_hash": "$TX_HASH", + } + ], + } + ], + }, ]