Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dunixir
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
teaching
dunixir
Merge requests
!5
Implements PoW validator
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Implements PoW validator
pow-validator
into
dev
Overview
7
Commits
1
Pipelines
3
Changes
2
All threads resolved!
Show all comments
Merged
MATEU Bruno
requested to merge
pow-validator
into
dev
4 years ago
Overview
7
Commits
1
Pipelines
3
Changes
2
All threads resolved!
Show all comments
Implements:
#35 (closed)
Edited
4 years ago
by
MATEU Bruno
0
0
Merge request reports
Compare
dev
version 1
4877b5a9
4 years ago
dev (base)
and
latest version
latest version
ce8a6acc
1 commit,
4 years ago
version 1
4877b5a9
1 commit,
4 years ago
2 files
+
121
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
lib/block/validation/local/proof_of_work.ex
0 → 100644
+
7
−
0
View file @ ce8a6acc
Edit in single-file editor
Open in Web IDE
Show comments on this file
defmodule
Block
.
Validation
.
Local
.
ProofOfWork
do
def
valid
(
block
)
do
required_zeros
=
div
(
block
[
"powMin"
],
16
)
+3
String
.
match?
(
block
[
"hash"
],
~r/^0{#{required_zeros}}/
)
end
end
Loading