Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Benjamin Allred
crown-core
Commits
5706246c
Commit
5706246c
authored
6 years ago
by
Ashot
Browse files
Options
Download
Email Patches
Plain Diff
Removed GetCompact
parent
91091966
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/score_tests.cpp
+4
-4
src/test/score_tests.cpp
with
4 additions
and
4 deletions
+4
-4
src/test/score_tests.cpp
View file @
5706246c
...
...
@@ -94,13 +94,13 @@ BOOST_FIXTURE_TEST_SUITE(CalculateScore, CalculateScoreFixture)
BOOST_AUTO_TEST_CASE
(
ScoreChanges
)
{
CMasternode
mn
=
CreateMasternode
(
CTxIn
(
COutPoint
(
ArithToUint256
(
1
),
1
*
COIN
)));
int64_t
score
=
mn
.
CalculateScore
(
100
)
.
GetCompact
(
false
)
;
arith_uint256
score
=
mn
.
CalculateScore
(
100
);
// Change masternode vin
mn
.
vin
=
CTxIn
(
COutPoint
(
ArithToUint256
(
2
),
1
*
COIN
));
// Calculate new score
int64_t
newScore
=
mn
.
CalculateScore
(
100
)
.
GetCompact
(
false
)
;
arith_uint256
newScore
=
mn
.
CalculateScore
(
100
);
BOOST_CHECK
(
score
!=
newScore
);
}
...
...
@@ -120,11 +120,11 @@ BOOST_FIXTURE_TEST_SUITE(CalculateScore, CalculateScoreFixture)
std
::
map
<
int
,
int
>
winningCount
;
for
(
int
i
=
0
;
i
<=
chainActive
.
Height
();
++
i
)
{
int64_t
score
=
0
;
arith_uint256
score
=
0
;
int
index
=
0
;
for
(
size_t
j
=
0
;
j
<
masternodes
.
size
();
++
j
)
{
int
s
=
masternodes
[
j
].
CalculateScore
(
i
)
.
GetCompact
(
false
)
;
arith_uint256
s
=
masternodes
[
j
].
CalculateScore
(
i
);
if
(
s
>
score
)
{
score
=
s
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help