mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
Merge branch 'develop' into ximinez/emptydirectoryinvariant
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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})
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,8 @@ public:
|
||||
TOut
|
||||
ownerFunds() const
|
||||
{
|
||||
return *ownerFunds_;
|
||||
return *ownerFunds_; // NOLINT(bugprone-unchecked-optional-access) always set after step()
|
||||
// is called
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user