chore: Fix file formatting (#5718)

This commit is contained in:
Bart
2025-08-22 10:02:56 -04:00
committed by GitHub
parent 58dd07bbdf
commit 896b8c3b54
27 changed files with 170 additions and 173 deletions

View File

@@ -7,33 +7,33 @@ name: Build Conan dependencies
# https://docs.github.com/en/actions/reference/workflows-and-actions/metadata-syntax#inputs.
inputs:
build_dir:
description: 'The directory where to build.'
description: "The directory where to build."
required: true
build_type:
description: 'The build type to use ("Debug", "Release").'
required: true
conan_remote_name:
description: 'The name of the Conan remote to use.'
description: "The name of the Conan remote to use."
required: true
conan_remote_url:
description: 'The URL of the Conan endpoint to use.'
description: "The URL of the Conan endpoint to use."
required: true
conan_remote_username:
description: 'The username for logging into the Conan remote. If not provided, the dependencies will not be uploaded.'
description: "The username for logging into the Conan remote. If not provided, the dependencies will not be uploaded."
required: false
default: ''
default: ""
conan_remote_password:
description: 'The password for logging into the Conan remote. If not provided, the dependencies will not be uploaded.'
description: "The password for logging into the Conan remote. If not provided, the dependencies will not be uploaded."
required: false
default: ''
default: ""
force_build:
description: 'Force building of all dependencies ("true", "false").'
required: false
default: 'false'
default: "false"
force_upload:
description: 'Force uploading of all dependencies ("true", "false").'
required: false
default: 'false'
default: "false"
runs:
using: composite

View File

@@ -6,26 +6,26 @@ name: Build and Test
# https://docs.github.com/en/actions/reference/workflows-and-actions/metadata-syntax#inputs.
inputs:
build_dir:
description: 'The directory where to build.'
description: "The directory where to build."
required: true
build_only:
description: 'Whether to only build or to build and test the code ("true", "false").'
required: false
default: 'false'
default: "false"
build_type:
description: 'The build type to use ("Debug", "Release").'
required: true
cmake_args:
description: 'Additional arguments to pass to CMake.'
description: "Additional arguments to pass to CMake."
required: false
default: ''
default: ""
cmake_target:
description: 'The CMake target to build.'
description: "The CMake target to build."
required: true
codecov_token:
description: 'The Codecov token to use for uploading coverage reports.'
description: "The Codecov token to use for uploading coverage reports."
required: false
default: ''
default: ""
os:
description: 'The operating system to use for the build ("linux", "macos", "windows").'
required: true

View File

@@ -111,4 +111,4 @@ get those details locally.
1. Run `levelization.sh`
2. Grep the modules in `paths.txt`.
- For example, if a cycle is found `A ~= B`, simply `grep -w
A .github/scripts/levelization/results/paths.txt | grep -w B`
A .github/scripts/levelization/results/paths.txt | grep -w B`

View File

@@ -9,25 +9,25 @@ on:
workflow_call:
inputs:
build_dir:
description: 'The directory where to build.'
description: "The directory where to build."
required: false
type: string
default: '.build'
default: ".build"
conan_remote_name:
description: 'The name of the Conan remote to use.'
description: "The name of the Conan remote to use."
required: true
type: string
conan_remote_url:
description: 'The URL of the Conan endpoint to use.'
description: "The URL of the Conan endpoint to use."
required: true
type: string
dependencies_force_build:
description: 'Force building of all dependencies.'
description: "Force building of all dependencies."
required: false
type: boolean
default: false
dependencies_force_upload:
description: 'Force uploading of all dependencies.'
description: "Force uploading of all dependencies."
required: false
type: boolean
default: false
@@ -40,16 +40,16 @@ on:
description: 'The strategy matrix to use for generating the configurations ("minimal", "all").'
required: false
type: string
default: 'minimal'
default: "minimal"
secrets:
codecov_token:
description: 'The Codecov token to use for uploading coverage reports.'
description: "The Codecov token to use for uploading coverage reports."
required: false
conan_remote_username:
description: 'The username for logging into the Conan remote. If not provided, the dependencies will not be uploaded.'
description: "The username for logging into the Conan remote. If not provided, the dependencies will not be uploaded."
required: false
conan_remote_password:
description: 'The password for logging into the Conan remote. If not provided, the dependencies will not be uploaded.'
description: "The password for logging into the Conan remote. If not provided, the dependencies will not be uploaded."
required: false
concurrency:

View File

@@ -18,45 +18,45 @@ jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
with:
fetch-depth: 0
- name: Check for missing commits
env:
MESSAGE: |
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
with:
fetch-depth: 0
- name: Check for missing commits
env:
MESSAGE: |
If you are reading this, then the commits indicated above are missing
from the "develop" and/or "release" branch. Do a reverse-merge as soon
as possible. See CONTRIBUTING.md for instructions.
run: |
set -o pipefail
# Branches are ordered by how "canonical" they are. Every commit in one
# branch should be in all the branches behind it.
order=(master release develop)
branches=()
for branch in "${order[@]}"; do
# Check that the branches exist so that this job will work on forked
# repos, which don't necessarily have master and release branches.
echo "Checking if ${branch} exists."
if git ls-remote --exit-code --heads origin \
refs/heads/${branch} > /dev/null; then
branches+=(origin/${branch})
fi
done
If you are reading this, then the commits indicated above are missing
from the "develop" and/or "release" branch. Do a reverse-merge as soon
as possible. See CONTRIBUTING.md for instructions.
run: |
set -o pipefail
# Branches are ordered by how "canonical" they are. Every commit in one
# branch should be in all the branches behind it.
order=(master release develop)
branches=()
for branch in "${order[@]}"; do
# Check that the branches exist so that this job will work on forked
# repos, which don't necessarily have master and release branches.
echo "Checking if ${branch} exists."
if git ls-remote --exit-code --heads origin \
refs/heads/${branch} > /dev/null; then
branches+=(origin/${branch})
fi
done
prior=()
for branch in "${branches[@]}"; do
if [[ ${#prior[@]} -ne 0 ]]; then
echo "Checking ${prior[@]} for commits missing from ${branch}."
git log --oneline --no-merges "${prior[@]}" \
^$branch | tee -a "missing-commits.txt"
echo
prior=()
for branch in "${branches[@]}"; do
if [[ ${#prior[@]} -ne 0 ]]; then
echo "Checking ${prior[@]} for commits missing from ${branch}."
git log --oneline --no-merges "${prior[@]}" \
^$branch | tee -a "missing-commits.txt"
echo
fi
prior+=("${branch}")
done
if [[ $(cat missing-commits.txt | wc -l) -ne 0 ]]; then
echo "${MESSAGE}"
exit 1
fi
prior+=("${branch}")
done
if [[ $(cat missing-commits.txt | wc -l) -ne 0 ]]; then
echo "${MESSAGE}"
exit 1
fi

View File

@@ -8,22 +8,22 @@ on:
workflow_call:
inputs:
conan_remote_name:
description: 'The name of the Conan remote to use.'
description: "The name of the Conan remote to use."
required: true
type: string
conan_remote_url:
description: 'The URL of the Conan endpoint to use.'
description: "The URL of the Conan endpoint to use."
required: true
type: string
secrets:
clio_notify_token:
description: 'The GitHub token to notify Clio about new versions.'
description: "The GitHub token to notify Clio about new versions."
required: true
conan_remote_username:
description: 'The username for logging into the Conan remote.'
description: "The username for logging into the Conan remote."
required: true
conan_remote_password:
description: 'The password for logging into the Conan remote.'
description: "The password for logging into the Conan remote."
required: true
concurrency:

View File

@@ -7,28 +7,28 @@ name: PR
on:
pull_request:
paths:
- '.github/actions/build-deps/**'
- '.github/actions/build-test/**'
- '.github/scripts/levelization/**'
- '.github/scripts/strategy-matrix/**'
- '.github/workflows/build-test.yml'
- '.github/workflows/check-format.yml'
- '.github/workflows/check-levelization.yml'
- '.github/workflows/notify-clio.yml'
- '.github/workflows/on-pr.yml'
- ".github/actions/build-deps/**"
- ".github/actions/build-test/**"
- ".github/scripts/levelization/**"
- ".github/scripts/strategy-matrix/**"
- ".github/workflows/build-test.yml"
- ".github/workflows/check-format.yml"
- ".github/workflows/check-levelization.yml"
- ".github/workflows/notify-clio.yml"
- ".github/workflows/on-pr.yml"
# Keep the list of paths below in sync with those in the `on-trigger.yml`
# file.
- 'cmake/**'
- 'conan/**'
- 'external/**'
- 'include/**'
- 'src/**'
- 'tests/**'
- '.clang-format'
- '.codecov.yml'
- '.pre-commit-config.yaml'
- 'CMakeLists.txt'
- 'conanfile.py'
- "cmake/**"
- "conan/**"
- "external/**"
- "include/**"
- "src/**"
- "tests/**"
- ".clang-format"
- ".codecov.yml"
- ".pre-commit-config.yaml"
- "CMakeLists.txt"
- "conanfile.py"
types:
- opened
- synchronize

View File

@@ -13,31 +13,31 @@ on:
- release
- master
paths:
- '.github/actions/build-deps/**'
- '.github/actions/build-test/**'
- '.github/scripts/strategy-matrix/**'
- '.github/workflows/build-test.yml'
- '.github/workflows/check-missing-commits.yml'
- '.github/workflows/on-trigger.yml'
- '.github/workflows/publish-docs.yml'
- ".github/actions/build-deps/**"
- ".github/actions/build-test/**"
- ".github/scripts/strategy-matrix/**"
- ".github/workflows/build-test.yml"
- ".github/workflows/check-missing-commits.yml"
- ".github/workflows/on-trigger.yml"
- ".github/workflows/publish-docs.yml"
# Keep the list of paths below in sync with those in `on-pr.yml`.
- 'cmake/**'
- 'conan/**'
- 'external/**'
- 'include/**'
- 'src/**'
- 'tests/**'
- '.clang-format'
- '.codecov.yml'
- '.pre-commit-config.yaml'
- 'CMakeLists.txt'
- 'conanfile.py'
- "cmake/**"
- "conan/**"
- "external/**"
- "include/**"
- "src/**"
- "tests/**"
- ".clang-format"
- ".codecov.yml"
- ".pre-commit-config.yaml"
- "CMakeLists.txt"
- "conanfile.py"
# Run at 06:32 UTC on every day of the week from Monday through Friday. This
# will force all dependencies to be rebuilt, which is useful to verify that
# all dependencies can be built successfully. Only the dependencies that
# are actually missing from the remote will be uploaded.
schedule:
- cron: '32 6 * * 1-5'
- cron: "32 6 * * 1-5"
# Run when manually triggered via the GitHub UI or API. If `force_upload` is
# true, then the dependencies that were missing (`force_rebuild` is false) or
# rebuilt (`force_rebuild` is true) will be uploaded, overwriting existing
@@ -45,12 +45,12 @@ on:
workflow_dispatch:
inputs:
dependencies_force_build:
description: 'Force building of all dependencies.'
description: "Force building of all dependencies."
required: false
type: boolean
default: false
dependencies_force_upload:
description: 'Force uploading of all dependencies.'
description: "Force uploading of all dependencies."
required: false
type: boolean
default: false
@@ -109,7 +109,7 @@ jobs:
dependencies_force_build: ${{ needs.generate-outputs.outputs.dependencies_force_build == 'true' }}
dependencies_force_upload: ${{ needs.generate-outputs.outputs.dependencies_force_upload == 'true' }}
os: ${{ matrix.os }}
strategy_matrix: 'all'
strategy_matrix: "all"
secrets:
conan_remote_username: ${{ secrets.CONAN_REMOTE_USERNAME }}
conan_remote_password: ${{ secrets.CONAN_REMOTE_PASSWORD }}

View File

@@ -5,13 +5,13 @@ name: Build and publish documentation
on:
push:
paths:
- '.github/workflows/publish-docs.yml'
- '*.md'
- '**/*.md'
- 'docs/**'
- 'include/**'
- 'src/libxrpl/**'
- 'src/xrpld/**'
- ".github/workflows/publish-docs.yml"
- "*.md"
- "**/*.md"
- "docs/**"
- "include/**"
- "src/libxrpl/**"
- "src/xrpld/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@@ -22,7 +22,7 @@ defaults:
shell: bash
env:
BUILD_DIR: .build
BUILD_DIR: .build
jobs:
publish:

View File

@@ -5,7 +5,7 @@ then
name=$( basename $0 )
cat <<- USAGE
Usage: $name <username>
Where <username> is the Github username of the upstream repo. e.g. XRPLF
USAGE
exit 0
@@ -83,4 +83,3 @@ fi
_run git fetch --jobs=$(nproc) upstreams
exit 0

View File

@@ -5,7 +5,7 @@ then
name=$( basename $0 )
cat <<- USAGE
Usage: $name workbranch base/branch user/branch [user/branch [...]]
* workbranch will be created locally from base/branch
* base/branch and user/branch may be specified as user:branch to allow
easy copying from Github PRs
@@ -66,4 +66,3 @@ git push $push HEAD:$b
git fetch $repo
-------------------------------------------------------------------
PUSH

View File

@@ -396,8 +396,8 @@
# true - enables compression
# false - disables compression [default].
#
# The rippled server can save bandwidth by compressing its peer-to-peer communications,
# at a cost of greater CPU usage. If you enable link compression,
# The rippled server can save bandwidth by compressing its peer-to-peer communications,
# at a cost of greater CPU usage. If you enable link compression,
# the server automatically compresses communications with peer servers
# that also have link compression enabled.
# https://xrpl.org/enable-link-compression.html
@@ -1011,7 +1011,7 @@
# that rippled is still in sync with the network,
# and that the validated ledger is less than
# 'age_threshold_seconds' old. If not, then continue
# sleeping for this number of seconds and
# sleeping for this number of seconds and
# checking until healthy.
# Default is 5.
#
@@ -1113,7 +1113,7 @@
# page_size Valid values: integer (MUST be power of 2 between 512 and 65536)
# The default is 4096 bytes. This setting determines
# the size of a page in the transaction.db file.
# See https://www.sqlite.org/pragma.html#pragma_page_size
# See https://www.sqlite.org/pragma.html#pragma_page_size
# for more details about the available options.
#
# journal_size_limit Valid values: integer

View File

@@ -101,7 +101,7 @@ target_link_libraries(xrpl.libxrpl.resource PUBLIC xrpl.libxrpl.protocol)
# Level 06
add_module(xrpl net)
target_link_libraries(xrpl.libxrpl.net PUBLIC
target_link_libraries(xrpl.libxrpl.net PUBLIC
xrpl.libxrpl.basics
xrpl.libxrpl.json
xrpl.libxrpl.protocol

View File

@@ -5,8 +5,8 @@ skinparam roundcorner 20
skinparam maxmessagesize 160
actor "Rippled Start" as RS
participant "Timer" as T
participant "NetworkOPs" as NOP
participant "Timer" as T
participant "NetworkOPs" as NOP
participant "ValidatorList" as VL #lightgreen
participant "Consensus" as GC
participant "ConsensusAdaptor" as CA #lightgreen
@@ -20,7 +20,7 @@ VL -> NOP
NOP -> VL: update trusted validators
activate VL
VL -> VL: re-calculate quorum
hnote over VL#lightgreen: ignore negative listed validators\nwhen calculate quorum
hnote over VL#lightgreen: ignore negative listed validators\nwhen calculate quorum
VL -> NOP
deactivate VL
NOP -> GC: start round
@@ -36,14 +36,14 @@ activate GC
end
alt phase == OPEN
alt should close ledger
alt should close ledger
GC -> GC: phase = ESTABLISH
GC -> CA: onClose
activate CA
alt sqn%256==0
alt sqn%256==0
CA -[#green]> RM: <font color=green>getValidations
CA -[#green]> CA: <font color=green>create UNLModify Tx
hnote over CA#lightgreen: use validatations of the last 256 ledgers\nto figure out UNLModify Tx candidates.\nIf any, create UNLModify Tx, and add to TxSet.
CA -[#green]> CA: <font color=green>create UNLModify Tx
hnote over CA#lightgreen: use validatations of the last 256 ledgers\nto figure out UNLModify Tx candidates.\nIf any, create UNLModify Tx, and add to TxSet.
end
CA -> GC
GC -> CA: propose
@@ -61,14 +61,14 @@ else phase == ESTABLISH
CA -> CA : build LCL
hnote over CA #lightgreen: copy negative UNL from parent ledger
alt sqn%256==0
CA -[#green]> CA: <font color=green>Adjust negative UNL
CA -[#green]> CA: <font color=green>Adjust negative UNL
CA -[#green]> CA: <font color=green>apply UNLModify Tx
end
CA -> CA : validate and send validation message
activate NOP
CA -> NOP : end consensus and\n<b>begin next consensus round
deactivate NOP
deactivate CA
deactivate CA
hnote over RM: receive validations
end
else phase == ACCEPTED
@@ -76,4 +76,4 @@ else phase == ACCEPTED
end
deactivate GC
@enduml
@enduml

View File

@@ -4,7 +4,7 @@ class TimeoutCounter {
#app_ : Application&
}
TimeoutCounter o-- "1" Application
TimeoutCounter o-- "1" Application
': app_
Stoppable <.. Application
@@ -14,13 +14,13 @@ class Application {
-m_inboundLedgers : uptr<InboundLedgers>
}
Application *-- "1" LedgerReplayer
Application *-- "1" LedgerReplayer
': m_ledgerReplayer
Application *-- "1" InboundLedgers
Application *-- "1" InboundLedgers
': m_inboundLedgers
Stoppable <.. InboundLedgers
Application "1" --o InboundLedgers
Application "1" --o InboundLedgers
': app_
class InboundLedgers {
@@ -28,9 +28,9 @@ class InboundLedgers {
}
Stoppable <.. LedgerReplayer
InboundLedgers "1" --o LedgerReplayer
InboundLedgers "1" --o LedgerReplayer
': inboundLedgers_
Application "1" --o LedgerReplayer
Application "1" --o LedgerReplayer
': app_
class LedgerReplayer {
@@ -42,17 +42,17 @@ class LedgerReplayer {
-skipLists_ : hash_map<u256, wptr<SkipListAcquire>>
}
LedgerReplayer *-- LedgerReplayTask
LedgerReplayer *-- LedgerReplayTask
': tasks_
LedgerReplayer o-- LedgerDeltaAcquire
LedgerReplayer o-- LedgerDeltaAcquire
': deltas_
LedgerReplayer o-- SkipListAcquire
LedgerReplayer o-- SkipListAcquire
': skipLists_
TimeoutCounter <.. LedgerReplayTask
InboundLedgers "1" --o LedgerReplayTask
InboundLedgers "1" --o LedgerReplayTask
': inboundLedgers_
LedgerReplayer "1" --o LedgerReplayTask
LedgerReplayer "1" --o LedgerReplayTask
': replayer_
class LedgerReplayTask {
@@ -63,15 +63,15 @@ class LedgerReplayTask {
+addDelta(sptr<LedgerDeltaAcquire>)
}
LedgerReplayTask *-- "1" SkipListAcquire
LedgerReplayTask *-- "1" SkipListAcquire
': skipListAcquirer_
LedgerReplayTask *-- LedgerDeltaAcquire
LedgerReplayTask *-- LedgerDeltaAcquire
': deltas_
TimeoutCounter <.. SkipListAcquire
InboundLedgers "1" --o SkipListAcquire
InboundLedgers "1" --o SkipListAcquire
': inboundLedgers_
LedgerReplayer "1" --o SkipListAcquire
LedgerReplayer "1" --o SkipListAcquire
': replayer_
LedgerReplayTask --o SkipListAcquire : implicit via callback
@@ -83,9 +83,9 @@ class SkipListAcquire {
}
TimeoutCounter <.. LedgerDeltaAcquire
InboundLedgers "1" --o LedgerDeltaAcquire
InboundLedgers "1" --o LedgerDeltaAcquire
': inboundLedgers_
LedgerReplayer "1" --o LedgerDeltaAcquire
LedgerReplayer "1" --o LedgerDeltaAcquire
': replayer_
LedgerReplayTask --o LedgerDeltaAcquire : implicit via callback
@@ -95,4 +95,4 @@ class LedgerDeltaAcquire {
-replayer_ : LedgerReplayer&
-dataReadyCallbacks_ : vector<callback>
}
@enduml
@enduml

View File

@@ -38,7 +38,7 @@ deactivate lr
loop
lr -> lda : make_shared(ledgerId, ledgerSeq)
return delta
lr -> lrt : addDelta(delta)
lr -> lrt : addDelta(delta)
lrt -> lda : addDataCallback(callback)
return
return
@@ -62,7 +62,7 @@ deactivate peer
lr -> lda : processData(ledgerHeader, txns)
lda -> lda : notify()
note over lda: call the callbacks added by\naddDataCallback(callback).
lda -> lrt : callback(ledgerId)
lda -> lrt : callback(ledgerId)
lrt -> lrt : deltaReady(ledgerId)
lrt -> lrt : tryAdvance()
loop as long as child can be built
@@ -82,4 +82,4 @@ deactivate peer
deactivate peer
@enduml
@enduml

View File

@@ -34,4 +34,4 @@ serializeBatch(
msg.addBitString(txid);
}
} // namespace ripple
} // namespace ripple

View File

@@ -141,7 +141,7 @@ constexpr std::uint32_t const tfTransferable = 0x00000008;
constexpr std::uint32_t const tfMutable = 0x00000010;
// MPTokenIssuanceCreate flags:
// NOTE - there is intentionally no flag here for lsfMPTLocked, which this transaction cannot mutate.
// NOTE - there is intentionally no flag here for lsfMPTLocked, which this transaction cannot mutate.
constexpr std::uint32_t const tfMPTCanLock = lsfMPTCanLock;
constexpr std::uint32_t const tfMPTRequireAuth = lsfMPTRequireAuth;
constexpr std::uint32_t const tfMPTCanEscrow = lsfMPTCanEscrow;
@@ -243,7 +243,7 @@ constexpr std::uint32_t tfUntilFailure = 0x00040000;
constexpr std::uint32_t tfIndependent = 0x00080000;
/**
* @note If nested Batch transactions are supported in the future, the tfInnerBatchTxn flag
* will need to be removed from this mask to allow Batch transaction to be inside
* will need to be removed from this mask to allow Batch transaction to be inside
* the sfRawTransactions array.
*/
constexpr std::uint32_t const tfBatchMask =

View File

@@ -505,4 +505,3 @@ LEDGER_ENTRY(ltVAULT, 0x0084, Vault, vault, ({
#undef EXPAND
#undef LEDGER_ENTRY_DUPLICATE

View File

@@ -145,4 +145,4 @@ Permission::permissionToTxType(uint32_t const& value) const
return static_cast<TxType>(value - 1);
}
} // namespace ripple
} // namespace ripple

View File

@@ -1499,4 +1499,4 @@ class Delegate_test : public beast::unit_test::suite
};
BEAST_DEFINE_TESTSUITE(Delegate, app, ripple);
} // namespace test
} // namespace ripple
} // namespace ripple

View File

@@ -621,4 +621,4 @@ public:
BEAST_DEFINE_TESTSUITE_PRIO(NFTokenAuth, app, ripple, 2);
} // namespace ripple
} // namespace ripple

View File

@@ -720,4 +720,4 @@ struct JumpCollector
} // namespace test
} // namespace ripple
#endif
#endif

View File

@@ -59,4 +59,4 @@ public:
} // namespace delegate
} // namespace jtx
} // namespace test
} // namespace ripple
} // namespace ripple

View File

@@ -64,4 +64,4 @@ entry(jtx::Env& env, jtx::Account const& account, jtx::Account const& authorize)
} // namespace delegate
} // namespace jtx
} // namespace test
} // namespace ripple
} // namespace ripple

View File

@@ -159,4 +159,4 @@ DelegateSet::deleteDelegate(
return tesSUCCESS;
}
} // namespace ripple
} // namespace ripple

View File

@@ -53,4 +53,4 @@ public:
} // namespace ripple
#endif
#endif