Skip to content
Snippets Groups Projects
Unverified Commit 1acf798e authored by Benjamin Loison's avatar Benjamin Loison
Browse files

Try to correct correctness of constant difficulty MLS

parent d56617aa
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ import bitcoin
import json
from argparser import get_parser
import config
import copy
# Bitcoin parameters
κ = 256
......@@ -35,11 +36,9 @@ def Compress(m, k, C, previous_score, previous_ℓ):
return π + χ, new_score,
def uparrow(C, μ):
chain = [block for block in C if block.level >= μ and block.level_min <= μ]
chain = copy.deepcopy([block for block in C if block.level >= μ and block.level_min <= μ])
for blockIndex, block in enumerate(chain):
print('a', block.level_min, μ)
block.level_min = μ
print('b', chain[blockIndex].level_min)
return chain
# Proceeding by dichotomy may not be worth it.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment