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
ddc91dbd
Commit
ddc91dbd
authored
6 years ago
by
Ashot
Browse files
Options
Download
Email Patches
Plain Diff
Fixed warning messages
parent
cab97cbc
master
211-agent-voting
227-sync-fix
Current-dev
add_stakepointer_new_block
blockundo_with_coinstake
disallow_duplicate_sp
stake_modifier
sync-optimization
systemnode_staking
v0.12.5.1
v0.12.5.0
No related merge requests found
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
src/leveldb/db/memtable.cc
+1
-1
src/leveldb/db/memtable.cc
src/leveldb/util/bloom.cc
+1
-1
src/leveldb/util/bloom.cc
src/leveldb/util/logging.cc
+1
-1
src/leveldb/util/logging.cc
src/main.cpp
+1
-2
src/main.cpp
src/masternode-budget.cpp
+5
-4
src/masternode-budget.cpp
src/masternode-budget.h
+2
-0
src/masternode-budget.h
with
11 additions
and
9 deletions
+11
-9
src/leveldb/db/memtable.cc
View file @
ddc91dbd
...
...
@@ -101,7 +101,7 @@ void MemTable::Add(SequenceNumber s, ValueType type,
p
+=
8
;
p
=
EncodeVarint32
(
p
,
val_size
);
memcpy
(
p
,
value
.
data
(),
val_size
);
assert
(
(
p
+
val_size
)
-
buf
==
encoded_len
);
assert
(
p
+
val_size
==
buf
+
encoded_len
);
table_
.
Insert
(
buf
);
}
...
...
This diff is collapsed.
Click to expand it.
src/leveldb/util/bloom.cc
View file @
ddc91dbd
...
...
@@ -47,7 +47,7 @@ class BloomFilterPolicy : public FilterPolicy {
dst
->
resize
(
init_size
+
bytes
,
0
);
dst
->
push_back
(
static_cast
<
char
>
(
k_
));
// Remember # of probes in filter
char
*
array
=
&
(
*
dst
)[
init_size
];
for
(
size_
t
i
=
0
;
i
<
n
;
i
++
)
{
for
(
in
t
i
=
0
;
i
<
n
;
i
++
)
{
// Use double-hashing to generate a sequence of hash values.
// See analysis in [Kirsch,Mitzenmacher 2006].
uint32_t
h
=
BloomHash
(
keys
[
i
]);
...
...
This diff is collapsed.
Click to expand it.
src/leveldb/util/logging.cc
View file @
ddc91dbd
...
...
@@ -52,7 +52,7 @@ bool ConsumeDecimalNumber(Slice* in, uint64_t* val) {
char
c
=
(
*
in
)[
0
];
if
(
c
>=
'0'
&&
c
<=
'9'
)
{
++
digits
;
const
int
delta
=
(
c
-
'0'
);
const
unsigned
int
delta
=
(
c
-
'0'
);
static
const
uint64_t
kMaxUint64
=
~
static_cast
<
uint64_t
>
(
0
);
if
(
v
>
kMaxUint64
/
10
||
(
v
==
kMaxUint64
/
10
&&
delta
>
kMaxUint64
%
10
))
{
...
...
This diff is collapsed.
Click to expand it.
src/main.cpp
View file @
ddc91dbd
...
...
@@ -2251,7 +2251,7 @@ bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode) {
// The cache is large and we're within 10% and 100 MiB of the limit, but we have time now (not in the middle of a block processing).
bool fCacheLarge = mode == FLUSH_STATE_PERIODIC && cacheSize > std::max((9 * nTotalSpace) / 10, nTotalSpace - 100 * 1024 * 1024);
// The cache is over the limit, we have to write now.
bool fCacheCritical = mode == FLUSH_STATE_IF_NEEDED && cacheSize > nCoinCacheUsage;
bool fCacheCritical = mode == FLUSH_STATE_IF_NEEDED &&
static_cast<size_t>(
cacheSize
)
> nCoinCacheUsage;
// It's been a while since we wrote the block index to disk. Do this frequently, so we don't need to redownload after a crash.
bool fPeriodicWrite = mode == FLUSH_STATE_PERIODIC && nNow > nLastWrite + (int64_t)DATABASE_WRITE_INTERVAL * 1000000;
// It's been very long since we flushed the cache. Do this infrequently, to optimize cache usage.
...
...
@@ -4776,7 +4776,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
bool ignoreFees = false;
CTxIn vin;
vector<unsigned char> vchSig;
int64_t sigTime;
vRecv >> tx;
...
...
This diff is collapsed.
Click to expand it.
src/masternode-budget.cpp
View file @
ddc91dbd
...
...
@@ -1659,12 +1659,12 @@ CFinalizedBudget::CFinalizedBudget()
}
CFinalizedBudget
::
CFinalizedBudget
(
std
::
string
strBudgetName
,
int
nBlockStart
,
std
::
vector
<
CTxBudgetPayment
>
vecBudgetPayments
,
uint256
nFeeTXHash
)
:
strBudgetName
(
strBudgetName
)
,
nBlockStart
(
nBlockStart
)
:
fAutoChecked
(
false
)
,
vecBudgetPayments
(
vecBudgetPayments
)
,
strBudgetName
(
strBudgetName
)
,
nBlockStart
(
nBlockStart
)
,
nFeeTXHash
(
nFeeTXHash
)
,
fValid
(
true
)
,
fAutoChecked
(
false
)
,
nTime
(
0
)
{
boost
::
sort
(
this
->
vecBudgetPayments
,
ComparePayments
);
...
...
@@ -1689,7 +1689,6 @@ bool CFinalizedBudget::AddOrUpdateVote(const CFinalizedBudgetVote& vote, std::st
LOCK
(
cs
);
uint256
masternodeHash
=
vote
.
vin
.
prevout
.
GetHash
();
uint256
voteHash
=
vote
.
GetHash
();
map
<
uint256
,
CFinalizedBudgetVote
>::
iterator
found
=
mapVotes
.
find
(
masternodeHash
);
if
(
found
!=
mapVotes
.
end
()){
...
...
@@ -1732,6 +1731,8 @@ public:
return
a
->
GetHash
()
<
b
->
GetHash
();
else
if
(
a
->
GetPayee
()
!=
b
->
GetPayee
())
return
a
->
GetPayee
()
<
b
->
GetPayee
();
return
false
;
}
};
...
...
This diff is collapsed.
Click to expand it.
src/masternode-budget.h
View file @
ddc91dbd
...
...
@@ -247,6 +247,8 @@ protected:
return
a
.
nProposalHash
<
b
.
nProposalHash
;
else
if
(
a
.
payee
!=
b
.
payee
)
return
a
.
payee
<
b
.
payee
;
return
false
;
}
public:
...
...
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