Skip to content

Commit f6dbfbb

Browse files
Set population window equal to estimation window (#163)
1 parent 414b057 commit f6dbfbb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

consensus_decentralization/analyze.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def analyze(projects, aggregated_data_filename, output_dir):
6363
try:
6464
date_blocks_per_entity[entity] = block_values[date]
6565
except KeyError:
66-
date_blocks_per_entity[entity] = 0
66+
pass
6767
sorted_date_blocks = sorted(date_blocks_per_entity.values(), reverse=True)
6868

6969
for metric_name, metric, param in metric_params:

tests/test_analyze.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ def test_analyze(setup_and_cleanup):
8282
lines = f.readlines()
8383
assert lines[0] == 'timeframe,sample_bitcoin\n'
8484
if metric == 'gini':
85-
assert lines[1] == 'Feb-2018,0.375\n'
86-
assert lines[2] == 'Mar-2018,0.75\n'
85+
assert lines[1] == 'Feb-2018,0.16666666666666666\n'
86+
assert lines[2] == 'Mar-2018,0.0\n'
8787
elif metric == 'nakamoto_coefficient':
8888
assert lines[1] == 'Feb-2018,1\n'
8989
assert lines[2] == 'Mar-2018,1\n'

0 commit comments

Comments
 (0)