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

Stop node from using P2PKH outputs for staking #1002

Closed
wants to merge 4 commits into from
Closed

Stop node from using P2PKH outputs for staking #1002

wants to merge 4 commits into from

Conversation

Gnappuraz
Copy link
Member

At the moment GetStakeableCoins() still returns P2PKH coins, that we cannot use to sign a segwit coinbase. This leads to nodes creating blocks but then discarding them because they can't sign them.

Fixes #997

@Gnappuraz Gnappuraz added the bug A problem of existing functionality label Apr 17, 2019
@Gnappuraz Gnappuraz requested review from scravy, Nizametdinov and a team April 17, 2019 08:22
@Gnappuraz Gnappuraz self-assigned this Apr 17, 2019
Signed-off-by: Matteo Sumberaz <[email protected]>
Signed-off-by: Matteo Sumberaz <[email protected]>
Copy link
Member

@frolosofsky frolosofsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 6d79a31

Copy link
Member

@dsaveliev dsaveliev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 6d79a31

for i in range(0, len(nodes)):
if i+1 < len(nodes):
disconnect_nodes_bi(nodes, i, i + 1)

Copy link
Member

@kostyantyn kostyantyn Apr 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I understood the usage of this function but let's say if node 0 is connected to node 2, they won't be disconnected.
Shouldn't it be:

for (a, b) in itertools.combinations(nodes, 2):
  disconnect_nodes_bi(nodes, a, b)

Copy link
Member

@Nizametdinov Nizametdinov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 6d79a31

Signed-off-by: Matteo Sumberaz <[email protected]>
@Gnappuraz Gnappuraz closed this Apr 17, 2019
@Gnappuraz
Copy link
Member Author

This PR breaks a lot of tests still relying on P2PKH being a stakeable coin. This work is continued in another PR #1025.

@Gnappuraz Gnappuraz deleted the dont-stake-p2pkh branch May 3, 2019 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A problem of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

P2PKH output are stakeable
5 participants