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

Bitcash not creating valid transactions despite returning a TxID #134

Closed
revoxhere opened this issue Dec 25, 2023 · 4 comments
Closed

Bitcash not creating valid transactions despite returning a TxID #134

revoxhere opened this issue Dec 25, 2023 · 4 comments

Comments

@revoxhere
Copy link

Hello there. I'm having a problem with BitCash not sending funds properly, minimal example:

Python 3.9.17 (main, Nov 28 2023, 21:19:59)
[GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from bitcash import Key
>>> wallet = Key('XXX')
>>> wallet.get_balance()
'4018567'
>>> wallet.send([("xxx", 0.001, 'bch')])
'b08e56674d712249763ab38f4c6f02786eba6df85817e024de42a6ea536ac7de'
>>> wallet.get_balance()
'4018567'

The generated TxID, when explored in a blockchain explorer is not valid and the balance does not change, yet the transaction does not fail.

This is happening both on version 1.0.0 and 1.0.1 (used in the example). It happens with any amount and receiving wallet.

I really like this library and been using it for the past two years or so, but it seems to not work for the past few days or weeks. Maybe someone can help me troubleshoot this?

Thanks in advance.

@yashasvi-ranawat
Copy link
Contributor

I'm unable to reproduce the bug. I tried to send a tx, and it was sent (and seen in the blockexplorer).
Perhaps you can give further details here or in https://t.me/pybitcash

@merc1er
Copy link
Member

merc1er commented Dec 28, 2023

I am also able to send transactions without issues on my end:
Screenshot 2023-12-28 at 12 53 27

The transaction is found on Blockchair: https://blockchair.com/bitcoin-cash/transaction/3cb93f1ee2424d9cf409363cfa0732861d83eac44c57765f4a64a648324ce12b

Do you use a custom Node endpoint @revoxhere?

@revoxhere
Copy link
Author

No, I don't think I'm using any custom endpoints. Haven't changed anything in the source.
I'm not sure why, but changing to a different private key fixed this issue and valid transactions can be created with exactly the same prompt.

Is there any way I can prevent this from happening again? I thought I could somehow check if the generated TXID is valid...
But since the problem is solved I'll close this issue.

Thanks for your input and this awesome library!

@merc1er
Copy link
Member

merc1er commented Dec 29, 2023

Hmm that's strange.

Are you able to share a private key that results in this failure?

Make sure there is no money in it and that you will never use it again.

If you are unable to share that, maybe you can share how it was generated so I can try to reproduce?

I understand all this can be sensitive information so please only share if it does not compromise your security.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants