mirror of
https://github.com/XRPLF/rippled.git
synced 2026-03-19 11:12:29 +00:00
Compare commits
7 Commits
develop
...
mvadari/pa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a43de47f13 | ||
|
|
c78a68f218 | ||
|
|
1dcbc503d8 | ||
|
|
346fbbd3ac | ||
|
|
a2a66f68ad | ||
|
|
04c141cba5 | ||
|
|
4cdc8561cd |
4
.github/actions/generate-version/action.yml
vendored
4
.github/actions/generate-version/action.yml
vendored
@@ -11,7 +11,7 @@ runs:
|
||||
steps:
|
||||
# When a tag is pushed, the version is used as-is.
|
||||
- name: Generate version for tag event
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||
if: ${{ github.event_name == 'tag' }}
|
||||
shell: bash
|
||||
env:
|
||||
VERSION: ${{ github.ref_name }}
|
||||
@@ -22,7 +22,7 @@ runs:
|
||||
# We use a plus sign instead of a hyphen because Conan recipe versions do
|
||||
# not support two hyphens.
|
||||
- name: Generate version for non-tag event
|
||||
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
if: ${{ github.event_name != 'tag' }}
|
||||
shell: bash
|
||||
run: |
|
||||
echo 'Extracting version from BuildInfo.cpp.'
|
||||
|
||||
2
.github/workflows/on-tag.yml
vendored
2
.github/workflows/on-tag.yml
vendored
@@ -5,7 +5,7 @@ name: Tag
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "[0-9]+.[0-9]+.[0-9]*"
|
||||
- "v*"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
|
||||
4
.github/workflows/reusable-upload-recipe.yml
vendored
4
.github/workflows/reusable-upload-recipe.yml
vendored
@@ -89,10 +89,10 @@ jobs:
|
||||
conan export . --version=rc
|
||||
conan upload --confirm --check --remote="${REMOTE_NAME}" xrpl/rc
|
||||
|
||||
# When this workflow is triggered by a push event, it will always be when tagging a final
|
||||
# When this workflow is triggered by a tag event, it will always be when tagging a final
|
||||
# release, see on-tag.yml.
|
||||
- name: Upload Conan recipe (release)
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||
if: ${{ github.event_name == 'tag' }}
|
||||
env:
|
||||
REMOTE_NAME: ${{ inputs.remote_name }}
|
||||
run: |
|
||||
|
||||
@@ -58,8 +58,8 @@ private:
|
||||
{
|
||||
explicit Value() = default;
|
||||
|
||||
STAmount lowAcctCredits;
|
||||
STAmount highAcctCredits;
|
||||
STAmount lowAcctDebits;
|
||||
STAmount highAcctDebits;
|
||||
STAmount lowAcctOrigBalance;
|
||||
};
|
||||
|
||||
|
||||
@@ -501,14 +501,6 @@ public:
|
||||
{
|
||||
return cur_.size();
|
||||
}
|
||||
|
||||
void
|
||||
removeIndex(std::size_t i)
|
||||
{
|
||||
if (i >= next_.size())
|
||||
return;
|
||||
next_.erase(next_.begin() + i);
|
||||
}
|
||||
};
|
||||
/// @endcond
|
||||
|
||||
@@ -633,11 +625,6 @@ flow(
|
||||
std::optional<BestStrand> best;
|
||||
if (flowDebugInfo)
|
||||
flowDebugInfo->newLiquidityPass();
|
||||
// Index of strand to mark as inactive (remove from the active list) if
|
||||
// the liquidity is used. This is used for strands that consume too many
|
||||
// offers Constructed as `false,0` to workaround a gcc warning about
|
||||
// uninitialized variables
|
||||
std::optional<std::size_t> markInactiveOnUse;
|
||||
for (size_t strandIndex = 0, sie = activeStrands.size(); strandIndex != sie; ++strandIndex)
|
||||
{
|
||||
Strand const* strand = activeStrands.get(strandIndex);
|
||||
@@ -701,11 +688,6 @@ flow(
|
||||
|
||||
if (best)
|
||||
{
|
||||
if (markInactiveOnUse)
|
||||
{
|
||||
activeStrands.removeIndex(*markInactiveOnUse);
|
||||
markInactiveOnUse.reset();
|
||||
}
|
||||
savedIns.insert(best->in);
|
||||
savedOuts.insert(best->out);
|
||||
remainingOut = outReq - sum(savedOuts);
|
||||
|
||||
@@ -37,14 +37,14 @@ DeferredCredits::credit(
|
||||
|
||||
if (sender < receiver)
|
||||
{
|
||||
v.highAcctCredits = amount;
|
||||
v.lowAcctCredits = amount.zeroed();
|
||||
v.lowAcctDebits = amount;
|
||||
v.highAcctDebits = amount.zeroed();
|
||||
v.lowAcctOrigBalance = preCreditSenderBalance;
|
||||
}
|
||||
else
|
||||
{
|
||||
v.highAcctCredits = amount.zeroed();
|
||||
v.lowAcctCredits = amount;
|
||||
v.lowAcctDebits = amount.zeroed();
|
||||
v.highAcctDebits = amount;
|
||||
v.lowAcctOrigBalance = -preCreditSenderBalance;
|
||||
}
|
||||
|
||||
@@ -56,11 +56,11 @@ DeferredCredits::credit(
|
||||
auto& v = i->second;
|
||||
if (sender < receiver)
|
||||
{
|
||||
v.highAcctCredits += amount;
|
||||
v.lowAcctDebits += amount;
|
||||
}
|
||||
else
|
||||
{
|
||||
v.lowAcctCredits += amount;
|
||||
v.highAcctDebits += amount;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -104,11 +104,11 @@ DeferredCredits::adjustments(
|
||||
|
||||
if (main < other)
|
||||
{
|
||||
result.emplace(v.highAcctCredits, v.lowAcctCredits, v.lowAcctOrigBalance);
|
||||
result.emplace(v.lowAcctDebits, v.highAcctDebits, v.lowAcctOrigBalance);
|
||||
return result;
|
||||
}
|
||||
|
||||
result.emplace(v.lowAcctCredits, v.highAcctCredits, -v.lowAcctOrigBalance);
|
||||
result.emplace(v.highAcctDebits, v.lowAcctDebits, -v.lowAcctOrigBalance);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -122,8 +122,8 @@ DeferredCredits::apply(DeferredCredits& to)
|
||||
{
|
||||
auto& toVal = r.first->second;
|
||||
auto const& fromVal = i.second;
|
||||
toVal.lowAcctCredits += fromVal.lowAcctCredits;
|
||||
toVal.highAcctCredits += fromVal.highAcctCredits;
|
||||
toVal.lowAcctDebits += fromVal.lowAcctDebits;
|
||||
toVal.highAcctDebits += fromVal.highAcctDebits;
|
||||
// Do not update the orig balance, it's already correct
|
||||
}
|
||||
}
|
||||
@@ -349,14 +349,14 @@ PaymentSandbox::balanceChanges(ReadView const& view) const
|
||||
auto const cur = newBalance.getCurrency();
|
||||
result[std::make_tuple(lowID, highID, cur)] = delta;
|
||||
auto r = result.emplace(std::make_tuple(lowID, lowID, cur), delta);
|
||||
if (r.second)
|
||||
if (!r.second)
|
||||
{
|
||||
r.first->second += delta;
|
||||
}
|
||||
|
||||
delta.negate();
|
||||
r = result.emplace(std::make_tuple(highID, highID, cur), delta);
|
||||
if (r.second)
|
||||
if (!r.second)
|
||||
{
|
||||
r.first->second += delta;
|
||||
}
|
||||
|
||||
@@ -800,7 +800,11 @@ transferRate(ReadView const& view, MPTID const& issuanceID)
|
||||
// which represents 50% of 1,000,000,000
|
||||
if (auto const sle = view.read(keylet::mptIssuance(issuanceID));
|
||||
sle && sle->isFieldPresent(sfTransferFee))
|
||||
return Rate{1'000'000'000u + 10'000 * sle->getFieldU16(sfTransferFee)};
|
||||
{
|
||||
auto const fee = sle->getFieldU16(sfTransferFee);
|
||||
XRPL_ASSERT(fee <= maxTransferFee, "xrpl::transferRate : fee is too large");
|
||||
return Rate{1'000'000'000u + 10'000 * fee};
|
||||
}
|
||||
|
||||
return parityRate;
|
||||
}
|
||||
|
||||
@@ -562,7 +562,6 @@ OfferCreate::applyGuts(Sandbox& sb, Sandbox& sbCancel)
|
||||
return {tecEXPIRED, true};
|
||||
}
|
||||
|
||||
bool const bOpenLedger = sb.open();
|
||||
bool crossed = false;
|
||||
|
||||
if (isTesSuccess(result))
|
||||
@@ -648,7 +647,8 @@ OfferCreate::applyGuts(Sandbox& sb, Sandbox& sbCancel)
|
||||
stream << " out: " << format_amount(place_offer.out);
|
||||
}
|
||||
|
||||
if (result == tecFAILED_PROCESSING && bOpenLedger)
|
||||
bool const isLedgerOpen = sb.open();
|
||||
if (result == tecFAILED_PROCESSING && isLedgerOpen)
|
||||
result = telFAILED_PROCESSING;
|
||||
|
||||
if (!isTesSuccess(result))
|
||||
|
||||
@@ -89,7 +89,7 @@ TEST(parseStatmRSSkB, standard_format)
|
||||
|
||||
// Test empty string
|
||||
{
|
||||
std::string statm;
|
||||
std::string statm = "";
|
||||
long result = parseStatmRSSkB(statm);
|
||||
EXPECT_EQ(result, -1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user