Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle bitcoin core 220 rpc output change #57

Merged
merged 2 commits into from
Dec 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion bitcoinetl/mappers/transaction_output_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion bitcoinetl/service/btc_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down