Merge branch 'develop' into ximinez/emptydirectoryinvariant

This commit is contained in:
Ed Hennis
2026-04-23 15:56:30 -04:00
committed by GitHub
44 changed files with 435 additions and 320 deletions

View File

@@ -234,9 +234,11 @@ message TMGetObjectByHash {
otTRANSACTIONS = 7;
}
// Previously used - don't reuse.
reserved 3;
required ObjectType type = 1;
required bool query = 2; // is this a query or a reply?
optional uint32 seq = 3; // used to match replies to queries
optional bytes ledgerHash = 4; // the hash of the ledger these queries are for
optional bool fat = 5; // return related nodes
repeated TMIndexedObject objects = 6; // the specific objects requested

View File

@@ -267,9 +267,10 @@ getOrThrow(Json::Value const& v, xrpl::SField const& field)
{
using namespace xrpl;
std::string const b58 = getOrThrow<std::string>(v, field);
if (auto pubKeyBlob = strUnHex(b58); publicKeyType(makeSlice(*pubKeyBlob)))
if (auto pubKeyBlob = strUnHex(b58); pubKeyBlob && publicKeyType(makeSlice(*pubKeyBlob)))
{
return PublicKey{makeSlice(*pubKeyBlob)};
return PublicKey{makeSlice(
*pubKeyBlob)}; // NOLINT(bugprone-unchecked-optional-access) checked in condition above
}
for (auto const tokenType : {TokenType::NodePublic, TokenType::AccountPublic})
{

View File

@@ -46,20 +46,20 @@ public:
ApplyView&
view()
{
return *view_;
return *view_; // NOLINT(bugprone-unchecked-optional-access) view_ emplaced in constructor
}
ApplyView const&
view() const
{
return *view_;
return *view_; // NOLINT(bugprone-unchecked-optional-access) view_ emplaced in constructor
}
// VFALCO Unfortunately this is necessary
RawView&
rawView()
{
return *view_;
return *view_; // NOLINT(bugprone-unchecked-optional-access) view_ emplaced in constructor
}
ApplyFlags const&
@@ -72,6 +72,7 @@ public:
void
deliver(STAmount const& amount)
{
// NOLINTNEXTLINE(bugprone-unchecked-optional-access) view_ emplaced in constructor
view_->deliver(amount);
}
@@ -98,6 +99,7 @@ public:
void
destroyXRP(XRPAmount const& fee)
{
// NOLINTNEXTLINE(bugprone-unchecked-optional-access) view_ emplaced in constructor
view_->rawDestroyXRP(fee);
}

View File

@@ -103,7 +103,8 @@ public:
TOut
ownerFunds() const
{
return *ownerFunds_;
return *ownerFunds_; // NOLINT(bugprone-unchecked-optional-access) always set after step()
// is called
}
};

View File

@@ -234,8 +234,11 @@ flow(
}
}
// NOLINTBEGIN(bugprone-unchecked-optional-access) cachedIn/Out set after strand is stepped
// above
auto const strandIn = *strand.front()->cachedIn();
auto const strandOut = *strand.back()->cachedOut();
// NOLINTEND(bugprone-unchecked-optional-access)
#ifndef NDEBUG
{