From 3a5d58c8596659fd5b1638403fe24ab9b90a4ea2 Mon Sep 17 00:00:00 2001 From: veronicavero <89105218+veronicavero@users.noreply.github.com> Date: Tue, 23 Nov 2021 14:04:36 -0500 Subject: [PATCH 1/2] Update transaction_output_mapper.py read "address" instead of "addresses" as core 22.0 changes the rpc output data structure. --- bitcoinetl/mappers/transaction_output_mapper.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bitcoinetl/mappers/transaction_output_mapper.py b/bitcoinetl/mappers/transaction_output_mapper.py index 6974006..3ce8011 100644 --- a/bitcoinetl/mappers/transaction_output_mapper.py +++ b/bitcoinetl/mappers/transaction_output_mapper.py @@ -46,7 +46,11 @@ def json_dict_to_output(self, json_dict): output.script_hex = script_pub_key.get('hex') output.required_signatures = script_pub_key.get('reqSigs') output.type = script_pub_key.get('type') - output.addresses = script_pub_key.get('addresses') + #output.addresses = script_pub_key.get('addresses') + if script_pub_key.get('address') is None: + output.addresses = [] + else: + output.addresses = [script_pub_key.get('address')] return output From 0cc4f756852980b8d8394a45b486df14beb64f7d Mon Sep 17 00:00:00 2001 From: veronicavero <89105218+veronicavero@users.noreply.github.com> Date: Tue, 23 Nov 2021 14:06:00 -0500 Subject: [PATCH 2/2] Update btc_service.py keep 'multisig' type and make the address as nonstandard address --- bitcoinetl/service/btc_service.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bitcoinetl/service/btc_service.py b/bitcoinetl/service/btc_service.py index d768618..d4e9408 100644 --- a/bitcoinetl/service/btc_service.py +++ b/bitcoinetl/service/btc_service.py @@ -156,7 +156,9 @@ def _remove_coinbase_input(self, block): def _add_non_standard_addresses(self, transaction): for output in transaction.outputs: if output.addresses is None or len(output.addresses) == 0: - output.type = 'nonstandard' + #output.type = 'nonstandard' + if output.type != 'multisig': + output.type = 'nonstandard' output.addresses = [script_hex_to_non_standard_address(output.script_hex)] def _add_shielded_inputs_and_outputs(self, transaction):