pybitcash / bitcash

BitCash: Python Bitcoin Cash Library (fork of ofek's Bit)
https://bitcash.dev
MIT License
97 stars 39 forks source link

Errors with get_unspents() #101

Closed CryptoSecEd closed 3 years ago

CryptoSecEd commented 3 years ago

I'm getting an error with get_unspents() roughly half the time. The problem seems to be that sometimes the BitcoinDotComAPI is called (which isn't working) and sometimes it's BitcoreAPI (which is). Can the BitcoinDotComAPI.get_unspent() method be removed from NetworkAPI?

merc1er commented 3 years ago

What version of BitCash are you running?

merc1er commented 3 years ago

BitcoreAPI is actually not working and being removed from the codebase. As for the main API, it is customisable and you can replace it with your own node if you find the public on unreliable (even though it has been reliable for me so far).

CryptoSecEd commented 3 years ago

I'm using 0.6.3, the latest as far as I can tell. I was getting errors with get_unspent() for both mainnet and testnet yesterday. Testnet uses the trest.bitcoin.com API which is shutting down. I figured out how to call the BitcoreAPI.get_unspent() directly. Mainnet uses rest1.biggestfan.net which should be fine? I'm not getting any errors today, so I can close the issue.

What's wrong with BitcoreAPI? I'm not having any problems with it.

My own node would be nice. I don't think my university will pay for/manage it, unfortunately.

merc1er commented 3 years ago

Mainnet uses rest1.biggestfan.net which should be fine? I'm not getting any errors today, so I can close the issue.

Would you have timestamps or more data on the failing requests for rest1.biggestfan.net? This is something @nicolaiskye and @nexerino might be interested in.

What's wrong with BitcoreAPI? I'm not having any problems with it.

It has been very unreliable in the past. I haven't tried it recently, but we have a better solution now.

merc1er commented 3 years ago

102 makes it easier to customise API endpoints