We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When running tests on my project (Electrum ABC), a user is getting errors like this one:
====================================================================== ERROR: test_sweep (electrumabc.tests.test_wallet.TestSweep) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pierre/dev/bitcoin-abc/electrum/electrumabc/tests/test_wallet.py", line 222, in test_sweep inputs, keypairs = sweep_preparations([WIF1], network) File "/home/pierre/dev/bitcoin-abc/electrum/electrumabc/wallet.py", line 179, in sweep_preparations find_utxos_for_privkey(txin_type, privkey, compressed) File "/home/pierre/dev/bitcoin-abc/electrum/electrumabc/wallet.py", line 170, in find_utxos_for_privkey pubkey = bitcoin.public_key_from_private_key(privkey, compressed) File "/home/pierre/dev/bitcoin-abc/electrum/electrumabc/bitcoin.py", line 732, in public_key_from_private_key public_key = GetPubKey(pkey.pubkey, compressed) File "/home/pierre/dev/bitcoin-abc/electrum/electrumabc/bitcoin.py", line 721, in GetPubKey return i2o_ECPublicKey(pubkey, compressed) File "/home/pierre/dev/bitcoin-abc/electrum/electrumabc/bitcoin.py", line 490, in i2o_ECPublicKey key = b"\x03" + pubkey.point.x().to_bytes(32, "big") AttributeError: 'mpz' object has no attribute 'to_bytes'
I can reproduce if I install gmpy or gmpy2, but it works if none of them is installed. I guess ecdsa is using regular ints when gmpy is not available.
ecdsa
int
Is to_bytes() something you intend to support, so as to be a drop in replacement for python int?
to_bytes()
Otherwise I will add a special case in my code.
The text was updated successfully, but these errors were encountered:
It will be available in the next release. I should have an alpha version out in the next couple of days.
Sorry, something went wrong.
Great, thanks!
I have published gmpy2 2.2.0a1 with binary wheels for all supported platforms.
@casevh, I think this could be closed.
No branches or pull requests
When running tests on my project (Electrum ABC), a user is getting errors like this one:
I can reproduce if I install gmpy or gmpy2, but it works if none of them is installed. I guess
ecdsa
is using regularint
s when gmpy is not available.Is
to_bytes()
something you intend to support, so as to be a drop in replacement for pythonint
?Otherwise I will add a special case in my code.
The text was updated successfully, but these errors were encountered: