From 44a6c2bd5f0971718e75276de4c07733626e9a5b Mon Sep 17 00:00:00 2001 From: Ouziel Slama Date: Tue, 31 Dec 2024 15:22:05 +0000 Subject: [PATCH] fix pytest --- .../counterpartycore/lib/backend/bitcoind.py | 3 +- .../test/fixtures/api_v2_fixtures.json | 76 +++++++++---------- 2 files changed, 40 insertions(+), 39 deletions(-) diff --git a/counterparty-core/counterpartycore/lib/backend/bitcoind.py b/counterparty-core/counterpartycore/lib/backend/bitcoind.py index 64ea67b58e..72c98bee12 100644 --- a/counterparty-core/counterpartycore/lib/backend/bitcoind.py +++ b/counterparty-core/counterpartycore/lib/backend/bitcoind.py @@ -118,6 +118,7 @@ def rpc_call(payload, retry=0): def is_api_request(): + print("is_api_request", current_process().name) if current_process().name != "API": return False thread_name = current_thread().name @@ -456,7 +457,7 @@ def list_unspent(source, allow_unconfirmed_inputs): min_conf = 0 if allow_unconfirmed_inputs else 1 bitcoind_unspent_list = [] try: - bitcoind_unspent_list = rpc("listunspent", [min_conf, 9999999, [source]]) or [] + bitcoind_unspent_list = safe_rpc("listunspent", [min_conf, 9999999, [source]]) or [] except exceptions.BitcoindRPCError: pass diff --git a/counterparty-core/counterpartycore/test/fixtures/api_v2_fixtures.json b/counterparty-core/counterpartycore/test/fixtures/api_v2_fixtures.json index 0200592633..6949f0e9d3 100644 --- a/counterparty-core/counterpartycore/test/fixtures/api_v2_fixtures.json +++ b/counterparty-core/counterpartycore/test/fixtures/api_v2_fixtures.json @@ -12526,14 +12526,14 @@ { "name": "regular_dust_size", "type": "int", - "default": 546, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, { "name": "multisig_dust_size", "type": "int", - "default": 1000, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, @@ -12779,14 +12779,14 @@ { "name": "regular_dust_size", "type": "int", - "default": 546, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, { "name": "multisig_dust_size", "type": "int", - "default": 1000, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, @@ -13014,14 +13014,14 @@ { "name": "regular_dust_size", "type": "int", - "default": 546, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, { "name": "multisig_dust_size", "type": "int", - "default": 1000, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, @@ -13256,14 +13256,14 @@ { "name": "regular_dust_size", "type": "int", - "default": 546, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, { "name": "multisig_dust_size", "type": "int", - "default": 1000, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, @@ -13491,14 +13491,14 @@ { "name": "regular_dust_size", "type": "int", - "default": 546, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, { "name": "multisig_dust_size", "type": "int", - "default": 1000, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, @@ -13738,14 +13738,14 @@ { "name": "regular_dust_size", "type": "int", - "default": 546, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, { "name": "multisig_dust_size", "type": "int", - "default": 1000, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, @@ -14011,14 +14011,14 @@ { "name": "regular_dust_size", "type": "int", - "default": 546, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, { "name": "multisig_dust_size", "type": "int", - "default": 1000, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, @@ -14258,14 +14258,14 @@ { "name": "regular_dust_size", "type": "int", - "default": 546, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, { "name": "multisig_dust_size", "type": "int", - "default": 1000, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, @@ -14534,14 +14534,14 @@ { "name": "regular_dust_size", "type": "int", - "default": 546, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, { "name": "multisig_dust_size", "type": "int", - "default": 1000, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, @@ -14809,14 +14809,14 @@ { "name": "regular_dust_size", "type": "int", - "default": 546, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, { "name": "multisig_dust_size", "type": "int", - "default": 1000, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, @@ -15074,14 +15074,14 @@ { "name": "regular_dust_size", "type": "int", - "default": 546, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, { "name": "multisig_dust_size", "type": "int", - "default": 1000, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, @@ -15342,14 +15342,14 @@ { "name": "regular_dust_size", "type": "int", - "default": 546, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, { "name": "multisig_dust_size", "type": "int", - "default": 1000, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, @@ -15589,14 +15589,14 @@ { "name": "regular_dust_size", "type": "int", - "default": 546, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, { "name": "multisig_dust_size", "type": "int", - "default": 1000, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, @@ -15830,14 +15830,14 @@ { "name": "regular_dust_size", "type": "int", - "default": 546, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, { "name": "multisig_dust_size", "type": "int", - "default": 1000, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, @@ -16177,14 +16177,14 @@ { "name": "regular_dust_size", "type": "int", - "default": 546, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, { "name": "multisig_dust_size", "type": "int", - "default": 1000, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, @@ -16419,14 +16419,14 @@ { "name": "regular_dust_size", "type": "int", - "default": 546, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, { "name": "multisig_dust_size", "type": "int", - "default": 1000, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, @@ -16667,14 +16667,14 @@ { "name": "regular_dust_size", "type": "int", - "default": 546, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, { "name": "multisig_dust_size", "type": "int", - "default": 1000, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, @@ -16903,14 +16903,14 @@ { "name": "regular_dust_size", "type": "int", - "default": 546, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, { "name": "multisig_dust_size", "type": "int", - "default": 1000, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, @@ -17138,14 +17138,14 @@ { "name": "regular_dust_size", "type": "int", - "default": 546, + "default": null, "description": "Deprecated, automatically calculated", "required": false }, { "name": "multisig_dust_size", "type": "int", - "default": 1000, + "default": null, "description": "Deprecated, automatically calculated", "required": false },