Skip to content

Clean up commented-out functions in utils.py #162

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions bitcoinutils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import struct


# clean whatever is not used!
class Secp256k1Params:
# ECDSA curve using secp256k1 is defined by: y**2 = x**3 + 7
# This is done modulo p which (secp256k1) is:
Expand Down Expand Up @@ -431,21 +430,6 @@ def negate_privkey(key: bytes) -> str:

return f"{negated_key:064x}"


# def negate_pubkey(key: bytes) -> str:
# '''Negate public key, if necessary'''
#
# # convert public key bytes to tuple Point
# x = h_to_i( key[:32].hex() )
# y = h_to_i( key[32:].hex() )
#
# # negate public key if necessary
# if y % 2 != 0:
# y = Secp256k1Params._field - y
#
# return f'{x:064x}{y:064x}'


def tweak_taproot_pubkey(internal_pubkey: bytes, tweak: int) -> Tuple[bytes, bool]:
"""
Tweaks the public key with the specified tweak. Required to create the
Expand Down Expand Up @@ -532,11 +516,6 @@ def i_to_h64(i: int) -> str:
return f"{i:064x}"


# def i_to_h(i: int) -> str:
# """Converts an int to a string hexadecimal (no padding)"""
# return f"{i:x}"


# to convert hashes to ints we need byteorder BIG...
def b_to_i(b: bytes) -> int:
"""Converts a bytes to a number"""
Expand Down