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

Fix Proof of work existence for node transaction #681

Merged
merged 1 commit into from
Nov 14, 2022
Merged
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
3 changes: 1 addition & 2 deletions lib/archethic/mining/validation_context.ex
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ defmodule Archethic.Mining.ValidationContext do
alias Archethic.P2P
alias Archethic.P2P.Node

alias Archethic.SharedSecrets
alias Archethic.Replication

alias Archethic.TransactionChain
Expand Down Expand Up @@ -1026,7 +1025,7 @@ defmodule Archethic.Mining.ValidationContext do

_ ->
Transaction.verify_origin_signature?(tx, pow) and
SharedSecrets.has_origin_public_key?(pow)
Copy link
Contributor

Choose a reason for hiding this comment

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

,,

pow in ProofOfWork.list_origin_public_keys_candidates(tx)
Copy link
Contributor

Choose a reason for hiding this comment

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

unit tests

Copy link
Member Author

Choose a reason for hiding this comment

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

There is already tests for this check:

test "should get inconsistency when the proof of work is not in authorized keys" do

end
end

Expand Down