mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03:00
[tests] remove mpi2vch() function
All it does is reverse the bytes order.
This commit is contained in:
parent
9a60bef50d
commit
a760aa14a9
1 changed files with 1 additions and 5 deletions
|
@ -44,10 +44,6 @@ def bn2mpi(v):
|
||||||
v_bin[0] |= 0x80
|
v_bin[0] |= 0x80
|
||||||
return ext + v_bin
|
return ext + v_bin
|
||||||
|
|
||||||
def mpi2vch(s):
|
|
||||||
"""Convert MPI format to bitcoin-specific little endian format."""
|
|
||||||
return s[::-1] # reverse string, converting BE->LE
|
|
||||||
|
|
||||||
def bn2vch(v):
|
def bn2vch(v):
|
||||||
"""Convert number to bitcoin-specific little endian format."""
|
"""Convert number to bitcoin-specific little endian format."""
|
||||||
return bytes(mpi2vch(bn2mpi(v)))
|
return bytes(reversed(bn2mpi(v)))
|
||||||
|
|
Loading…
Reference in a new issue