janoside / btc-rpc-explorer

Database-free, self-hosted Bitcoin explorer, via RPC to Bitcoin Core.
https://bitcoinexplorer.org
MIT License
1.5k stars 1.11k forks source link

api/tx v1.2 vin feature not working with Bitcoin Core 21.2 or older #469

Closed pointbiz closed 1 year ago

pointbiz commented 1 year ago

Describe the bug

The new vin feature in api/tx introduced in API version 1.2 doesn't work unless you have Bitcoin Core 22 or newer.

Environment (please complete the following information):

Configuration file content Not important

To Reproduce

Steps to reproduce the behavior:

  1. Use any recent tx id and call the api/tx endpoint

Additional context It's not clear to me where in the code the problem is. I have noticed that Bitcoin Core 22 has some changes to the rpc responses for relevant methods like getrawtransaction. So, the code is probably looking for the address in the wrong location in the json response from Core.

pointbiz commented 1 year ago

I'm not implying this needs to be fixed. It's more informational for others who might be wondering why the input addresses are not returned by the api/tx endpoint.