Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lbry
lbrycrd
Commits
d740e376
Commit
d740e376
authored
Dec 17, 2018
by
Brannon King
Browse files
reverted accidental use of c++11 const
don't skip build by dir alone
parent
1bf736a1
Changes
4
Hide whitespace changes
Inline
Side-by-side
reproducible_build.sh
View file @
d740e376
...
...
@@ -362,14 +362,11 @@ function build_dependency() {
PREFIX
=
$1
LOG
=
$2
BUILD
=
$3
if
[
!
-d
"
${
PREFIX
}
"
]
;
then
trap
'cleanup "${PREFIX}" "${LOG}"'
INT TERM EXIT
cd
"
${
LBRYCRD_DEPENDENCIES
}
"
rm
-rf
${
PREFIX
}
mkdir
-p
"
${
PREFIX
}
"
mkdir
-p
"
${
PREFIX
}
"
trap
'cleanup "${PREFIX}" "${LOG}"'
INT TERM EXIT
"
${
BUILD
}
"
"
${
LOG
}
"
trap
- INT TERM EXIT
fi
popd
}
...
...
src/claimtrie.h
View file @
d740e376
...
...
@@ -285,14 +285,16 @@ typedef std::vector<CClaimIndexElement> claimIndexElementListType;
struct
claimsForNameType
{
const
std
::
vector
<
CClaimValue
>
claims
;
const
std
::
vector
<
CSupportValue
>
supports
;
const
int
nLastTakeoverHeight
;
const
std
::
string
name
;
std
::
vector
<
CClaimValue
>
claims
;
std
::
vector
<
CSupportValue
>
supports
;
int
nLastTakeoverHeight
;
std
::
string
name
;
claimsForNameType
(
std
::
vector
<
CClaimValue
>
claims
,
std
::
vector
<
CSupportValue
>
supports
,
claimsForNameType
(
const
std
::
vector
<
CClaimValue
>
&
claims
,
const
std
::
vector
<
CSupportValue
>
&
supports
,
int
nLastTakeoverHeight
,
const
std
::
string
&
name
)
:
claims
(
claims
),
supports
(
supports
),
nLastTakeoverHeight
(
nLastTakeoverHeight
),
name
(
name
)
{}
virtual
~
claimsForNameType
()
{}
};
class
CClaimTrieCacheBase
;
...
...
@@ -528,7 +530,7 @@ public:
supportQueueRowType
&
expireSupportUndo
,
std
::
vector
<
std
::
pair
<
std
::
string
,
int
>
>&
takeoverHeightUndo
);
~
CClaimTrieCacheBase
()
{
clear
();
}
virtual
~
CClaimTrieCacheBase
()
{
clear
();
}
virtual
bool
getProofForName
(
const
std
::
string
&
name
,
CClaimTrieProof
&
proof
)
const
;
virtual
bool
getInfoForName
(
const
std
::
string
&
name
,
CClaimValue
&
claim
)
const
;
...
...
@@ -662,6 +664,8 @@ public:
CClaimTrieCacheExpirationFork
(
CClaimTrie
*
base
,
bool
fRequireTakeoverHeights
=
true
)
:
CClaimTrieCacheBase
(
base
,
fRequireTakeoverHeights
)
{}
virtual
~
CClaimTrieCacheExpirationFork
()
{}
bool
forkForExpirationChange
(
bool
increment
)
const
;
// TODO: move the expiration fork code from main.cpp to overrides of increment/decrement block
...
...
@@ -677,6 +681,8 @@ public:
:
CClaimTrieCacheExpirationFork
(
base
,
fRequireTakeoverHeights
),
overrideInsertNormalization
(
false
),
overrideRemoveNormalization
(
false
)
{}
virtual
~
CClaimTrieCacheNormalizationFork
()
{}
bool
shouldNormalize
()
const
;
// lower-case and normalize any input string name
...
...
src/claimtrieForks.cpp
View file @
d740e376
...
...
@@ -178,8 +178,8 @@ bool CClaimTrieCacheNormalizationFork::removeSupportFromMap(const std::string& n
}
struct
claimsForNormalization
:
public
claimsForNameType
{
const
std
::
string
normalized
;
claimsForNormalization
(
std
::
vector
<
CClaimValue
>
claims
,
std
::
vector
<
CSupportValue
>
supports
,
std
::
string
normalized
;
claimsForNormalization
(
const
std
::
vector
<
CClaimValue
>
&
claims
,
const
std
::
vector
<
CSupportValue
>
&
supports
,
int
nLastTakeoverHeight
,
const
std
::
string
&
name
,
const
std
::
string
&
normalized
)
:
claimsForNameType
(
claims
,
supports
,
nLastTakeoverHeight
,
name
),
normalized
(
normalized
)
{}
};
...
...
@@ -199,7 +199,8 @@ bool CClaimTrieCacheNormalizationFork::normalizeAllNamesInTrieIfNecessary(insert
supportMapEntryType
supports
;
owner
->
getSupportsForName
(
name
,
supports
);
hits
.
push_back
(
claimsForNormalization
(
node
->
claims
,
supports
,
node
->
nHeightOfLastTakeover
,
name
,
normalized
));
const
claimsForNormalization
cfn
(
node
->
claims
,
supports
,
node
->
nHeightOfLastTakeover
,
name
,
normalized
);
hits
.
push_back
(
cfn
);
}
};
...
...
src/pow.cpp
View file @
d740e376
...
...
@@ -23,7 +23,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
// Special difficulty rule for testnet:
// If the new block's timestamp is twice the target block time
// then allow mining of a min-difficulty block.
// This is to prevent the testnet from gettig stuck when a large amount
// This is to prevent the testnet from getti
n
g stuck when a large amount
// of hashrate drops off the network.
// This rule was not implemented properly until testnet block 277299.
if
(
pblock
->
GetBlockTime
()
>
pindexLast
->
GetBlockTime
()
+
params
.
nPowTargetSpacing
*
2
){
...
...
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