Skip to content

Conversation

@jnewbery
Copy link
Contributor

Only one function is imported in script.py. Just move that function to script.py and remove the bignum.py module.

Remove unused functionality and fix some flake8 warnings along the way.

We just throw it away whenever we use the
result so don't add it.
All it does is reverse the bytes order.
It is one line and is called in one place.
It's only called in one place.
@fanquake fanquake added the Tests label Oct 30, 2019
@laanwj
Copy link
Member

laanwj commented Oct 30, 2019

I'm confused by the commit order here. First you add comments to bignum, then you remove the whole module.

@jnewbery
Copy link
Contributor Author

I'm confused by the commit order here. First you add comments to bignum, then you remove the whole module.

Comments are for the benefit of reviewers so they can see what functionality is being moved around.

It only contains one function and is only imported by one
other module (script.py). Just move the function to
script.py.
@laanwj
Copy link
Member

laanwj commented Oct 30, 2019

Comments are for the benefit of reviewers so they can see what functionality is being moved around.

I'd be ok with keeping the bignum module, just removing the functions that are no longer used.
Not sure script.py is a much better place for that function.

@practicalswift
Copy link
Contributor

Concept ACK on removing functions that are no longer used or tested

@fanquake
Copy link
Member

fanquake commented Jan 4, 2020

Concept ACK

@fanquake fanquake requested a review from maflcko January 4, 2020 10:52
@DrahtBot
Copy link
Contributor

DrahtBot commented Jan 22, 2020

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@sipa
Copy link
Member

sipa commented Mar 13, 2020

Concept ACK

@maflcko maflcko merged commit ad04f0d into bitcoin:master Mar 17, 2020
@jnewbery jnewbery deleted the 2019-10-bignum branch March 17, 2020 17:51
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Mar 18, 2020
3ed772d [tests] remove bignum.py (John Newbery)
f950ec2 [tests] remove bn2bin() (John Newbery)
3b9b385 [tests] remove bn_bytes() function (John Newbery)
a760aa1 [tests] remove mpi2vch() function (John Newbery)
9a60bef [tests] don't encode the integer size in bignum (John Newbery)
1dc68ae [tests] add function comments to bignum (John Newbery)
f31fc0e [tests] fix flake8 warnings in script.py and bignum.py (John Newbery)

Pull request description:

  Only one function is imported in script.py. Just move that function to script.py and remove the bignum.py module.

  Remove unused functionality and fix some flake8 warnings along the way.

Top commit has no ACKs.

Tree-SHA512: 015f543ab545b5d5451896e2751d9c19334d9155b03faacd2023781e89833a2440f7f28741e9a8ac49badd9cdc012cbb6e038cdcdebeefaf9cb9d461c0689157
sidhujag pushed a commit to syscoin-core/syscoin that referenced this pull request Nov 10, 2020
3ed772d [tests] remove bignum.py (John Newbery)
f950ec2 [tests] remove bn2bin() (John Newbery)
3b9b385 [tests] remove bn_bytes() function (John Newbery)
a760aa1 [tests] remove mpi2vch() function (John Newbery)
9a60bef [tests] don't encode the integer size in bignum (John Newbery)
1dc68ae [tests] add function comments to bignum (John Newbery)
f31fc0e [tests] fix flake8 warnings in script.py and bignum.py (John Newbery)

Pull request description:

  Only one function is imported in script.py. Just move that function to script.py and remove the bignum.py module.

  Remove unused functionality and fix some flake8 warnings along the way.

Top commit has no ACKs.

Tree-SHA512: 015f543ab545b5d5451896e2751d9c19334d9155b03faacd2023781e89833a2440f7f28741e9a8ac49badd9cdc012cbb6e038cdcdebeefaf9cb9d461c0689157
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jan 9, 2021
Summary:
The helper module bignum.py in the functional test framework provides only one function that is used outside the module (`bn2vch`) and it is used only in script.py, Remove  `bignum.py` and move the function to `script.py`

PR17319 introduced a bug, so I had to merge also a commit from PR18378 which rewrites entirely the function `bn2vch`

This is a backport of Core [[bitcoin/bitcoin#17319 | PR17319]]

Additional bugfix commit:
bitcoin/bitcoin@a3ad645

The rest of PR18378 will be in a separate diff.

Test Plan: `ninja check-functional-extended`

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D8852
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants