Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sakia
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
clients
python
sakia
Commits
ff79c560
Commit
ff79c560
authored
5 years ago
by
Vincent Texier
Browse files
Options
Downloads
Patches
Plain Diff
[mod] hide computed UD because not accurate
todo: display again when we get an accurate previous monetary mass
parent
f7cc1b9b
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!775
0.50.0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/sakia/gui/main_window/toolbar/view.py
+11
-10
11 additions, 10 deletions
src/sakia/gui/main_window/toolbar/view.py
src/sakia/services/blockchain.py
+6
-0
6 additions, 0 deletions
src/sakia/services/blockchain.py
with
17 additions
and
10 deletions
src/sakia/gui/main_window/toolbar/view.py
+
11
−
10
View file @
ff79c560
...
@@ -241,7 +241,6 @@ class ToolbarView(QFrame, Ui_SakiaToolbar):
...
@@ -241,7 +241,6 @@ class ToolbarView(QFrame, Ui_SakiaToolbar):
<table cellpadding=
"
5
"
>
<table cellpadding=
"
5
"
>
<tr><td align=
"
right
"
><b>{:}</b></td><td>{:}</td></tr>
<tr><td align=
"
right
"
><b>{:}</b></td><td>{:}</td></tr>
<tr><td align=
"
right
"
><b>{:}</b></td><td>{:}</td></tr>
<tr><td align=
"
right
"
><b>{:}</b></td><td>{:}</td></tr>
<tr><td align=
"
right
"
><b>{:}</b></td><td>{:}</td></tr>
</table>
</table>
"""
"""
).
format
(
).
format
(
...
@@ -249,16 +248,18 @@ class ToolbarView(QFrame, Ui_SakiaToolbar):
...
@@ -249,16 +248,18 @@ class ToolbarView(QFrame, Ui_SakiaToolbar):
localized_data
[
"
growth
"
],
localized_data
[
"
dt_reeval_in_days
"
]
localized_data
[
"
growth
"
],
localized_data
[
"
dt_reeval_in_days
"
]
),
),
self
.
tr
(
"
Fundamental growth (c) / Reevaluation delta time (dt_reeval)
"
),
self
.
tr
(
"
Fundamental growth (c) / Reevaluation delta time (dt_reeval)
"
),
self
.
tr
(
"
UDĞ(t) = UDĞ(t-1) + c²*M(t)/N(t)
"
),
self
.
tr
(
"
UDĞ(t) = UDĞ(t-1) + c²*M(t
-1
)/N(t)
"
),
self
.
tr
(
"
Universal Dividend (formula)
"
),
self
.
tr
(
"
Universal Dividend (formula)
"
),
self
.
tr
(
"
{:} = {:} + {:}² * {:} / {:}
"
).
format
(
# fixme: re-display when the computed dividend will be accurate (need accurate previous monetary mass,
localized_data
.
get
(
"
ud_plus_1
"
,
"
####
"
),
# last mass just before reevaluation)
localized_data
.
get
(
"
ud
"
,
"
####
"
),
# self.tr("{:} = {:} + {:}² * {:} / {:}").format(
localized_data
.
get
(
"
growth_per_dt
"
,
"
##########
"
),
# localized_data.get("ud_plus_1", "####"),
localized_data
.
get
(
"
mass
"
,
"
####
"
),
# localized_data.get("ud", "####"),
localized_data
.
get
(
"
members_count
"
,
"
####
"
),
# localized_data.get("growth_per_dt", "##########"),
),
# localized_data.get("mass", "####"),
self
.
tr
(
"
Universal Dividend (computed)
"
),
# localized_data.get("members_count", "####"),
# ),
# self.tr("Universal Dividend (computed)"),
)
)
def
text_referential
(
self
,
ref
):
def
text_referential
(
self
,
ref
):
...
...
This diff is collapsed.
Click to expand it.
src/sakia/services/blockchain.py
+
6
−
0
View file @
ff79c560
...
@@ -168,6 +168,12 @@ class BlockchainService(QObject):
...
@@ -168,6 +168,12 @@ class BlockchainService(QObject):
def
computed_dividend
(
self
):
def
computed_dividend
(
self
):
"""
"""
Computes next dividend value
Computes next dividend value
Duniter formula is:
HEAD.dividend = Math.ceil(HEAD_1.dividend + Math.pow(conf.c, 2) *
Math.ceil(HEAD_1.massReeval / Math.pow(10, previousUB)) / HEAD.membersCount / (conf.dtReeval / conf.dt));
:rtype: int
:rtype: int
"""
"""
parameters
=
self
.
parameters
()
parameters
=
self
.
parameters
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment