Skip to content

Commit

Permalink
testing lint check
Browse files Browse the repository at this point in the history
  • Loading branch information
kevkevinpal committed Nov 20, 2023
1 parent fa01f88 commit 9513e77
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/hash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ unsigned int MurmurHash3(unsigned int nHashSeed, Span<const unsigned char> vData
void BIP32Hash(const ChainCode &chainCode, unsigned int nChild, unsigned char header, const unsigned char data[32], unsigned char output[64])
{
unsigned char num[4];
WriteBE32(num, nChild);
WriteBE32(num, nChild);
CHMAC_SHA512(chainCode.begin(), chainCode.size()).Write(&header, 1).Write(data, 32).Write(num, 4).Finalize(output);
}

Expand Down
3 changes: 2 additions & 1 deletion src/outputtype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ CTxDestination GetDestinationForKey(const CPubKey& key, OutputType type)
{
switch (type) {
case OutputType::LEGACY: return PKHash(key);
case OutputType::P2SH_SEGWIT:
case OutputType::P2SH_SEGWIT:
case OutputType::BECH32: {
if (!key.IsCompressed()) return PKHash(key);
CTxDestination witdest = WitnessV0KeyHash(key);
Expand Down Expand Up @@ -102,6 +102,7 @@ CTxDestination AddAndGetDestinationForScript(FillableSigningProvider& keystore,
}
}
case OutputType::BECH32M:

case OutputType::UNKNOWN: {} // This function should not be used for BECH32M or UNKNOWN, so let it assert
} // no default case, so the compiler can warn about missing cases
assert(false);
Expand Down
4 changes: 2 additions & 2 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ std::optional<std::vector<int>> CalculatePrevHeights(
} // namespace

std::optional<LockPoints> CalculateLockPointsAtTip(
CBlockIndex* tip,
CBlockIndex* tip,
const CCoinsView& coins_view,
const CTransaction& tx)
{
Expand All @@ -202,7 +202,7 @@ std::optional<LockPoints> CalculateLockPointsAtTip(
if (!prev_heights.has_value()) return std::nullopt;

CBlockIndex next_tip;
next_tip.pprev = tip;
next_tip.pprev = tip;
// When SequenceLocks() is called within ConnectBlock(), the height
// of the block *being* evaluated is what is used.
// Thus if we want to know if a transaction can be part of the
Expand Down

0 comments on commit 9513e77

Please sign in to comment.