Skip to content

2311 lint all err #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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