Closed xanoni closed 3 years ago
@xanoni What version of Bitcoin Core are you running? The JSON output format being returned by your Bitcoin Core is different than the mainline releases that I use. Specifically, if you look at the JSON tab for this random transaction, you can see the json content around the addresses has a format like:
"vout": [
{
"value": 0.01,
"n": 0,
"scriptPubKey": {
"asm": "OP_HASH160 5141a84a72b24ad956cc0eb1a9e37b0b8ab0abbb OP_EQUAL",
"hex": "a9145141a84a72b24ad956cc0eb1a9e37b0b8ab0abbb87",
"reqSigs": 1,
"type": "scripthash",
"addresses": [
"396fK37JUoKYiYP3n7nQecB8f8PYTtRoW6"
]
}
},
If you notice, the JSON path to access the address here is: vout[0].scriptPubKey.addresses[0]
. On the other hand, the JSON output being returned from your Bitcoin Core (as shown above), would use a different JSON path: vout[0].scriptPubKey.address
. That difference is the reason the explorer isn't showing the addresses.
I am curious to know what version you're running so I can decide whether or not the explorer should gracefully handle the two different formats.
Thanks.
I am curious to know what version you're running so I can decide whether or not the explorer should gracefully handle the two different formats.
Ohh, I'm typically pretty close to HEAD (so I can use I2P alongside Tor). So not the stable release. Some change seems to be coming to core ;-)
Ah-ha! Right you are. Looks like the response will be changing soon:
https://github.com/bitcoin/bitcoin/blob/master/src/rpc/rawtransaction.cpp#L137
I'll work on a fix for you. Thanks for helping with this.
Thank you :)
@xanoni I just pushed a fix for this issue. If you can test, verify, and report back here it would be much appreciated!
Looking good to me now! Should have come here earlier, I tried all kinds of stuff but didn't realize that bitcoind output changed. Thank you!
TX: 209617fee1fdae33e87fa381f536737da8e0d68fd24a4cc2e7760a39c57925a1
... consolidating discussion from https://github.com/janoside/btc-rpc-explorer/issues/270 here ...
My transaction view doesn't link to the respective UTXOs. See screenshot below.
The JSON tab, however, has the output addresses:
Since the above, I pulled the latest master of
btcrpcexplorer
, installed an up-to-dateElectrs
andRedis
and linked them in the.env
config file. I don't think it helped. My browser is an up-to-date Tor Browser, which displays the hosted demo instance of the explorer fine.btcrpcexplorer
has its own, dedicated user.Another transaction: c01859308e8699df6369296f16c4dc0a1f06b11d18040ae98537dd6bd1170374
I saw on the demo instance what it's supposed to look like:
However, my screenshot:
Relevant settings (
.env
):Log file looks good to me:
I enabled more logging, this is the output that I'm getting when I open a different transaction (ec8f79f29c84b72582dd79c379da7cd071c98c2b6f7c82be5a990c661209548e):