From d2ba575593cdd6ba5e918976b798f186ab25e3f9 Mon Sep 17 00:00:00 2001 From: Bart Thomee <11445373+bthomee@users.noreply.github.com> Date: Sat, 1 Nov 2025 14:07:39 -0400 Subject: [PATCH] refactor: Rename `ripple` namespace to `xrpl` --- .github/scripts/rename/README.md | 3 + .github/scripts/rename/namespace.sh | 53 +++++++++ .github/workflows/reusable-check-rename.yml | 2 + CONTRIBUTING.md | 2 +- include/xrpl/basics/Archive.h | 4 +- include/xrpl/basics/BasicConfig.h | 4 +- include/xrpl/basics/Blob.h | 4 +- include/xrpl/basics/Buffer.h | 6 +- include/xrpl/basics/ByteUtilities.h | 4 +- include/xrpl/basics/CompressionAlgorithms.h | 4 +- include/xrpl/basics/CountedObject.h | 4 +- include/xrpl/basics/DecayingSample.h | 4 +- include/xrpl/basics/Expected.h | 4 +- include/xrpl/basics/FileUtilities.h | 4 +- include/xrpl/basics/IntrusivePointer.h | 4 +- include/xrpl/basics/IntrusivePointer.ipp | 8 +- include/xrpl/basics/IntrusiveRefCounts.h | 26 ++--- include/xrpl/basics/KeyCache.h | 4 +- include/xrpl/basics/LocalValue.h | 4 +- include/xrpl/basics/Log.h | 4 +- include/xrpl/basics/MathUtilities.h | 4 +- include/xrpl/basics/Number.h | 4 +- include/xrpl/basics/README.md | 8 +- include/xrpl/basics/RangeSet.h | 6 +- include/xrpl/basics/Resolver.h | 4 +- include/xrpl/basics/ResolverAsio.h | 4 +- include/xrpl/basics/SHAMapHash.h | 4 +- include/xrpl/basics/SharedWeakCachePointer.h | 4 +- .../xrpl/basics/SharedWeakCachePointer.ipp | 4 +- include/xrpl/basics/SlabAllocator.h | 10 +- include/xrpl/basics/Slice.h | 6 +- include/xrpl/basics/StringUtilities.h | 4 +- include/xrpl/basics/TaggedCache.h | 4 +- include/xrpl/basics/TaggedCache.ipp | 4 +- include/xrpl/basics/ToString.h | 4 +- include/xrpl/basics/UnorderedContainers.h | 4 +- include/xrpl/basics/UptimeClock.h | 4 +- include/xrpl/basics/algorithm.h | 4 +- include/xrpl/basics/base64.h | 4 +- include/xrpl/basics/base_uint.h | 10 +- include/xrpl/basics/chrono.h | 4 +- include/xrpl/basics/comparators.h | 4 +- include/xrpl/basics/contract.h | 4 +- include/xrpl/basics/hardened_hash.h | 4 +- include/xrpl/basics/join.h | 4 +- include/xrpl/basics/make_SSLContext.h | 4 +- include/xrpl/basics/mulDiv.h | 4 +- .../xrpl/basics/partitioned_unordered_map.h | 6 +- include/xrpl/basics/random.h | 6 +- include/xrpl/basics/safe_cast.h | 4 +- include/xrpl/basics/scope.h | 6 +- include/xrpl/basics/spinlock.h | 6 +- include/xrpl/basics/strHex.h | 4 +- include/xrpl/basics/tagged_integer.h | 6 +- include/xrpl/crypto/RFC1751.h | 4 +- include/xrpl/crypto/csprng.h | 4 +- include/xrpl/crypto/secure_erase.h | 4 +- include/xrpl/json/JsonPropertyStream.h | 4 +- include/xrpl/json/Writer.h | 2 +- include/xrpl/json/detail/json_assert.h | 2 +- include/xrpl/json/json_value.h | 4 +- include/xrpl/ledger/ApplyView.h | 6 +- include/xrpl/ledger/ApplyViewImpl.h | 4 +- include/xrpl/ledger/BookDirs.h | 4 +- include/xrpl/ledger/CachedSLEs.h | 2 +- include/xrpl/ledger/CachedView.h | 4 +- include/xrpl/ledger/CredentialHelpers.h | 4 +- include/xrpl/ledger/Dir.h | 4 +- include/xrpl/ledger/OpenView.h | 4 +- include/xrpl/ledger/PaymentSandbox.h | 4 +- include/xrpl/ledger/RawView.h | 4 +- include/xrpl/ledger/ReadView.h | 4 +- include/xrpl/ledger/Sandbox.h | 4 +- include/xrpl/ledger/View.h | 4 +- include/xrpl/ledger/detail/ApplyStateTable.h | 4 +- include/xrpl/ledger/detail/ApplyViewBase.h | 4 +- include/xrpl/ledger/detail/RawStateTable.h | 4 +- include/xrpl/ledger/detail/ReadViewFwdRange.h | 4 +- .../xrpl/ledger/detail/ReadViewFwdRange.ipp | 6 +- include/xrpl/net/AutoSocket.h | 2 +- include/xrpl/net/HTTPClient.h | 4 +- include/xrpl/net/HTTPClientSSLContext.h | 4 +- include/xrpl/net/RegisterSSLCerts.h | 4 +- include/xrpl/nodestore/Backend.h | 4 +- include/xrpl/nodestore/Database.h | 6 +- include/xrpl/nodestore/DatabaseRotating.h | 4 +- include/xrpl/nodestore/DummyScheduler.h | 4 +- include/xrpl/nodestore/Factory.h | 4 +- include/xrpl/nodestore/Manager.h | 4 +- include/xrpl/nodestore/NodeObject.h | 4 +- include/xrpl/nodestore/Scheduler.h | 4 +- include/xrpl/nodestore/Task.h | 4 +- include/xrpl/nodestore/Types.h | 4 +- include/xrpl/nodestore/detail/BatchWriter.h | 4 +- .../xrpl/nodestore/detail/DatabaseNodeImp.h | 6 +- .../nodestore/detail/DatabaseRotatingImp.h | 4 +- include/xrpl/nodestore/detail/DecodedBlob.h | 4 +- include/xrpl/nodestore/detail/EncodedBlob.h | 8 +- include/xrpl/nodestore/detail/ManagerImp.h | 4 +- include/xrpl/nodestore/detail/codec.h | 4 +- include/xrpl/nodestore/detail/varint.h | 4 +- include/xrpl/protocol/AMMCore.h | 4 +- include/xrpl/protocol/AccountID.h | 12 +- include/xrpl/protocol/AmountConversions.h | 15 ++- include/xrpl/protocol/ApiVersion.h | 4 +- include/xrpl/protocol/Asset.h | 4 +- include/xrpl/protocol/Batch.h | 4 +- include/xrpl/protocol/Book.h | 32 ++--- include/xrpl/protocol/BuildInfo.h | 4 +- include/xrpl/protocol/ErrorCodes.h | 4 +- include/xrpl/protocol/Feature.h | 10 +- include/xrpl/protocol/Fees.h | 4 +- include/xrpl/protocol/HashPrefix.h | 4 +- include/xrpl/protocol/IOUAmount.h | 4 +- include/xrpl/protocol/Indexes.h | 6 +- include/xrpl/protocol/InnerObjectFormats.h | 4 +- include/xrpl/protocol/Issue.h | 4 +- include/xrpl/protocol/KeyType.h | 4 +- include/xrpl/protocol/Keylet.h | 4 +- include/xrpl/protocol/KnownFormats.h | 4 +- include/xrpl/protocol/LedgerFormats.h | 4 +- include/xrpl/protocol/LedgerHeader.h | 4 +- include/xrpl/protocol/MPTAmount.h | 4 +- include/xrpl/protocol/MPTIssue.h | 4 +- include/xrpl/protocol/MultiApiJson.h | 8 +- .../xrpl/protocol/NFTSyntheticSerializer.h | 4 +- include/xrpl/protocol/NFTokenID.h | 4 +- include/xrpl/protocol/NFTokenOfferID.h | 4 +- include/xrpl/protocol/PayChan.h | 4 +- include/xrpl/protocol/Permissions.h | 4 +- include/xrpl/protocol/Protocol.h | 4 +- include/xrpl/protocol/PublicKey.h | 10 +- include/xrpl/protocol/Quality.h | 6 +- include/xrpl/protocol/QualityFunction.h | 4 +- include/xrpl/protocol/RPCErr.h | 4 +- include/xrpl/protocol/Rate.h | 4 +- include/xrpl/protocol/RippleLedgerHash.h | 2 +- include/xrpl/protocol/Rules.h | 4 +- include/xrpl/protocol/SField.h | 4 +- include/xrpl/protocol/SOTemplate.h | 4 +- include/xrpl/protocol/STAccount.h | 6 +- include/xrpl/protocol/STAmount.h | 12 +- include/xrpl/protocol/STArray.h | 4 +- include/xrpl/protocol/STBase.h | 4 +- include/xrpl/protocol/STBitString.h | 8 +- include/xrpl/protocol/STBlob.h | 4 +- include/xrpl/protocol/STCurrency.h | 4 +- include/xrpl/protocol/STExchange.h | 4 +- include/xrpl/protocol/STInteger.h | 10 +- include/xrpl/protocol/STIssue.h | 4 +- include/xrpl/protocol/STLedgerEntry.h | 4 +- include/xrpl/protocol/STNumber.h | 4 +- include/xrpl/protocol/STObject.h | 19 ++- include/xrpl/protocol/STParsedJSON.h | 4 +- include/xrpl/protocol/STPathSet.h | 8 +- include/xrpl/protocol/STTx.h | 4 +- include/xrpl/protocol/STValidation.h | 8 +- include/xrpl/protocol/STVector256.h | 4 +- include/xrpl/protocol/STXChainBridge.h | 4 +- include/xrpl/protocol/SecretKey.h | 4 +- include/xrpl/protocol/Seed.h | 4 +- include/xrpl/protocol/SeqProxy.h | 4 +- include/xrpl/protocol/Serializer.h | 9 +- include/xrpl/protocol/Sign.h | 4 +- include/xrpl/protocol/SystemParameters.h | 4 +- include/xrpl/protocol/TER.h | 4 +- include/xrpl/protocol/TxFlags.h | 4 +- include/xrpl/protocol/TxFormats.h | 4 +- include/xrpl/protocol/TxMeta.h | 4 +- include/xrpl/protocol/UintTypes.h | 12 +- include/xrpl/protocol/Units.h | 11 +- include/xrpl/protocol/XChainAttestations.h | 4 +- include/xrpl/protocol/XRPAmount.h | 4 +- include/xrpl/protocol/detail/STVar.h | 4 +- include/xrpl/protocol/detail/b58_utils.h | 12 +- include/xrpl/protocol/detail/secp256k1.h | 4 +- include/xrpl/protocol/detail/token_errors.h | 14 +-- include/xrpl/protocol/digest.h | 4 +- include/xrpl/protocol/json_get_or_throw.h | 22 ++-- include/xrpl/protocol/jss.h | 4 +- include/xrpl/protocol/nft.h | 4 +- include/xrpl/protocol/nftPageMask.h | 4 +- include/xrpl/protocol/serialize.h | 4 +- include/xrpl/protocol/tokens.h | 4 +- include/xrpl/resource/Charge.h | 4 +- include/xrpl/resource/Consumer.h | 4 +- include/xrpl/resource/Disposition.h | 4 +- include/xrpl/resource/Fees.h | 4 +- include/xrpl/resource/Gossip.h | 4 +- include/xrpl/resource/ResourceManager.h | 4 +- include/xrpl/resource/Types.h | 4 +- include/xrpl/resource/detail/Entry.h | 4 +- include/xrpl/resource/detail/Import.h | 4 +- include/xrpl/resource/detail/Key.h | 4 +- include/xrpl/resource/detail/Kind.h | 4 +- include/xrpl/resource/detail/Logic.h | 8 +- include/xrpl/resource/detail/Tuning.h | 4 +- include/xrpl/server/Handoff.h | 4 +- include/xrpl/server/Port.h | 4 +- include/xrpl/server/Server.h | 4 +- include/xrpl/server/Session.h | 4 +- include/xrpl/server/SimpleWriter.h | 4 +- include/xrpl/server/WSSession.h | 4 +- include/xrpl/server/Writer.h | 4 +- include/xrpl/server/detail/BaseHTTPPeer.h | 4 +- include/xrpl/server/detail/BasePeer.h | 6 +- include/xrpl/server/detail/BaseWSPeer.h | 8 +- include/xrpl/server/detail/Door.h | 4 +- include/xrpl/server/detail/JSONRPCUtil.h | 4 +- include/xrpl/server/detail/LowestLayer.h | 4 +- include/xrpl/server/detail/PlainHTTPPeer.h | 4 +- include/xrpl/server/detail/PlainWSPeer.h | 4 +- include/xrpl/server/detail/SSLHTTPPeer.h | 4 +- include/xrpl/server/detail/SSLWSPeer.h | 4 +- include/xrpl/server/detail/ServerImpl.h | 4 +- include/xrpl/server/detail/Spawn.h | 4 +- include/xrpl/server/detail/io_list.h | 4 +- include/xrpl/shamap/Family.h | 4 +- include/xrpl/shamap/FullBelowCache.h | 4 +- include/xrpl/shamap/SHAMap.h | 11 +- .../xrpl/shamap/SHAMapAccountStateLeafNode.h | 4 +- include/xrpl/shamap/SHAMapAddNode.h | 4 +- include/xrpl/shamap/SHAMapInnerNode.h | 4 +- include/xrpl/shamap/SHAMapItem.h | 6 +- include/xrpl/shamap/SHAMapLeafNode.h | 4 +- include/xrpl/shamap/SHAMapMissingNode.h | 4 +- include/xrpl/shamap/SHAMapNodeID.h | 4 +- include/xrpl/shamap/SHAMapSyncFilter.h | 4 +- include/xrpl/shamap/SHAMapTreeNode.h | 4 +- include/xrpl/shamap/SHAMapTxLeafNode.h | 4 +- .../xrpl/shamap/SHAMapTxPlusMetaLeafNode.h | 4 +- include/xrpl/shamap/TreeNodeCache.h | 4 +- include/xrpl/shamap/detail/TaggedPointer.h | 4 +- include/xrpl/shamap/detail/TaggedPointer.ipp | 18 +-- src/libxrpl/basics/Archive.cpp | 4 +- src/libxrpl/basics/BasicConfig.cpp | 4 +- src/libxrpl/basics/CountedObject.cpp | 4 +- src/libxrpl/basics/FileUtilities.cpp | 4 +- src/libxrpl/basics/Log.cpp | 12 +- src/libxrpl/basics/Number.cpp | 17 ++- src/libxrpl/basics/ResolverAsio.cpp | 22 ++-- src/libxrpl/basics/StringUtilities.cpp | 4 +- src/libxrpl/basics/UptimeClock.cpp | 4 +- src/libxrpl/basics/base64.cpp | 4 +- src/libxrpl/basics/contract.cpp | 4 +- src/libxrpl/basics/make_SSLContext.cpp | 4 +- src/libxrpl/basics/mulDiv.cpp | 6 +- src/libxrpl/crypto/RFC1751.cpp | 21 ++-- src/libxrpl/crypto/csprng.cpp | 4 +- src/libxrpl/crypto/secure_erase.cpp | 4 +- src/libxrpl/json/JsonPropertyStream.cpp | 4 +- src/libxrpl/json/Object.cpp | 4 +- src/libxrpl/json/Writer.cpp | 4 +- src/libxrpl/json/json_reader.cpp | 2 +- src/libxrpl/json/json_value.cpp | 2 +- src/libxrpl/ledger/ApplyStateTable.cpp | 22 ++-- src/libxrpl/ledger/ApplyView.cpp | 6 +- src/libxrpl/ledger/ApplyViewBase.cpp | 4 +- src/libxrpl/ledger/ApplyViewImpl.cpp | 4 +- src/libxrpl/ledger/BookDirs.cpp | 18 +-- src/libxrpl/ledger/CachedView.cpp | 7 +- src/libxrpl/ledger/CredentialHelpers.cpp | 4 +- src/libxrpl/ledger/Dir.cpp | 14 +-- src/libxrpl/ledger/OpenView.cpp | 4 +- src/libxrpl/ledger/PaymentSandbox.cpp | 14 +-- src/libxrpl/ledger/RawStateTable.cpp | 11 +- src/libxrpl/ledger/ReadView.cpp | 4 +- src/libxrpl/ledger/View.cpp | 110 +++++++++--------- src/libxrpl/net/HTTPClient.cpp | 4 +- src/libxrpl/net/RegisterSSLCerts.cpp | 4 +- src/libxrpl/nodestore/BatchWriter.cpp | 6 +- src/libxrpl/nodestore/Database.cpp | 14 +-- src/libxrpl/nodestore/DatabaseNodeImp.cpp | 4 +- src/libxrpl/nodestore/DatabaseRotatingImp.cpp | 4 +- src/libxrpl/nodestore/DecodedBlob.cpp | 6 +- src/libxrpl/nodestore/DummyScheduler.cpp | 4 +- src/libxrpl/nodestore/ManagerImp.cpp | 6 +- src/libxrpl/nodestore/NodeObject.cpp | 4 +- .../nodestore/backend/MemoryFactory.cpp | 10 +- src/libxrpl/nodestore/backend/NuDBFactory.cpp | 6 +- src/libxrpl/nodestore/backend/NullFactory.cpp | 4 +- .../nodestore/backend/RocksDBFactory.cpp | 13 +-- src/libxrpl/protocol/AMMCore.cpp | 6 +- src/libxrpl/protocol/AccountID.cpp | 6 +- src/libxrpl/protocol/Asset.cpp | 4 +- src/libxrpl/protocol/Book.cpp | 4 +- src/libxrpl/protocol/BuildInfo.cpp | 4 +- src/libxrpl/protocol/ErrorCodes.cpp | 6 +- src/libxrpl/protocol/Feature.cpp | 16 +-- src/libxrpl/protocol/IOUAmount.cpp | 4 +- src/libxrpl/protocol/Indexes.cpp | 17 ++- src/libxrpl/protocol/InnerObjectFormats.cpp | 4 +- src/libxrpl/protocol/Issue.cpp | 4 +- src/libxrpl/protocol/Keylet.cpp | 6 +- src/libxrpl/protocol/LedgerFormats.cpp | 4 +- src/libxrpl/protocol/LedgerHeader.cpp | 4 +- src/libxrpl/protocol/MPTAmount.cpp | 4 +- src/libxrpl/protocol/MPTIssue.cpp | 4 +- .../protocol/NFTSyntheticSerializer.cpp | 4 +- src/libxrpl/protocol/NFTokenID.cpp | 4 +- src/libxrpl/protocol/NFTokenOfferID.cpp | 4 +- src/libxrpl/protocol/Permissions.cpp | 10 +- src/libxrpl/protocol/PublicKey.cpp | 4 +- src/libxrpl/protocol/Quality.cpp | 25 ++-- src/libxrpl/protocol/QualityFunction.cpp | 4 +- src/libxrpl/protocol/RPCErr.cpp | 4 +- src/libxrpl/protocol/Rate2.cpp | 16 +-- src/libxrpl/protocol/Rules.cpp | 10 +- src/libxrpl/protocol/SField.cpp | 12 +- src/libxrpl/protocol/SOTemplate.cpp | 4 +- src/libxrpl/protocol/STAccount.cpp | 8 +- src/libxrpl/protocol/STAmount.cpp | 38 +++--- src/libxrpl/protocol/STArray.cpp | 4 +- src/libxrpl/protocol/STBase.cpp | 14 +-- src/libxrpl/protocol/STBlob.cpp | 8 +- src/libxrpl/protocol/STCurrency.cpp | 4 +- src/libxrpl/protocol/STInteger.cpp | 8 +- src/libxrpl/protocol/STIssue.cpp | 4 +- src/libxrpl/protocol/STLedgerEntry.cpp | 6 +- src/libxrpl/protocol/STNumber.cpp | 11 +- src/libxrpl/protocol/STObject.cpp | 6 +- src/libxrpl/protocol/STParsedJSON.cpp | 4 +- src/libxrpl/protocol/STPathSet.cpp | 8 +- src/libxrpl/protocol/STTx.cpp | 10 +- src/libxrpl/protocol/STValidation.cpp | 6 +- src/libxrpl/protocol/STVar.cpp | 6 +- src/libxrpl/protocol/STVector256.cpp | 8 +- src/libxrpl/protocol/STXChainBridge.cpp | 6 +- src/libxrpl/protocol/SecretKey.cpp | 4 +- src/libxrpl/protocol/Seed.cpp | 4 +- src/libxrpl/protocol/Serializer.cpp | 10 +- src/libxrpl/protocol/Sign.cpp | 4 +- src/libxrpl/protocol/TER.cpp | 4 +- src/libxrpl/protocol/TxFormats.cpp | 4 +- src/libxrpl/protocol/TxMeta.cpp | 23 ++-- src/libxrpl/protocol/UintTypes.cpp | 4 +- src/libxrpl/protocol/XChainAttestations.cpp | 6 +- src/libxrpl/protocol/digest.cpp | 4 +- src/libxrpl/protocol/tokens.cpp | 30 ++--- src/libxrpl/resource/Charge.cpp | 4 +- src/libxrpl/resource/Consumer.cpp | 13 +-- src/libxrpl/resource/Fees.cpp | 4 +- src/libxrpl/resource/ResourceManager.cpp | 4 +- src/libxrpl/server/JSONRPCUtil.cpp | 4 +- src/libxrpl/server/Port.cpp | 4 +- src/libxrpl/shamap/SHAMap.cpp | 91 +++++++-------- src/libxrpl/shamap/SHAMapDelta.cpp | 12 +- src/libxrpl/shamap/SHAMapInnerNode.cpp | 56 ++++----- src/libxrpl/shamap/SHAMapLeafNode.cpp | 14 +-- src/libxrpl/shamap/SHAMapNodeID.cpp | 16 +-- src/libxrpl/shamap/SHAMapSync.cpp | 20 ++-- src/libxrpl/shamap/SHAMapTreeNode.cpp | 4 +- src/test/app/AMMCalc_test.cpp | 4 +- src/test/app/AMMClawback_test.cpp | 4 +- src/test/app/AMMExtended_test.cpp | 4 +- src/test/app/AMM_test.cpp | 6 +- src/test/app/AccountDelete_test.cpp | 4 +- src/test/app/AccountTxPaging_test.cpp | 4 +- src/test/app/AmendmentTable_test.cpp | 6 +- src/test/app/Batch_test.cpp | 12 +- src/test/app/Check_test.cpp | 6 +- src/test/app/Clawback_test.cpp | 4 +- src/test/app/Credentials_test.cpp | 7 +- src/test/app/CrossingLimits_test.cpp | 4 +- src/test/app/DID_test.cpp | 4 +- src/test/app/DNS_test.cpp | 10 +- src/test/app/Delegate_test.cpp | 4 +- src/test/app/DeliverMin_test.cpp | 4 +- src/test/app/DepositAuth_test.cpp | 4 +- src/test/app/Discrepancy_test.cpp | 4 +- src/test/app/EscrowToken_test.cpp | 90 +++++++------- src/test/app/Escrow_test.cpp | 32 ++--- src/test/app/FeeVote_test.cpp | 4 +- src/test/app/FixNFTokenPageLinks_test.cpp | 4 +- src/test/app/Flow_test.cpp | 4 +- src/test/app/Freeze_test.cpp | 4 +- src/test/app/HashRouter_test.cpp | 4 +- src/test/app/Invariants_test.cpp | 6 +- src/test/app/LPTokenTransfer_test.cpp | 4 +- src/test/app/LedgerHistory_test.cpp | 4 +- src/test/app/LedgerLoad_test.cpp | 4 +- src/test/app/LedgerMaster_test.cpp | 4 +- src/test/app/LedgerReplay_test.cpp | 9 +- src/test/app/LoadFeeTrack_test.cpp | 4 +- src/test/app/MPToken_test.cpp | 12 +- src/test/app/Manifest_test.cpp | 4 +- src/test/app/MultiSign_test.cpp | 8 +- src/test/app/NFTokenAuth_test.cpp | 4 +- src/test/app/NFTokenBurn_test.cpp | 4 +- src/test/app/NFTokenDir_test.cpp | 4 +- src/test/app/NFToken_test.cpp | 4 +- src/test/app/NetworkID_test.cpp | 4 +- src/test/app/NetworkOPs_test.cpp | 4 +- src/test/app/OfferStream_test.cpp | 4 +- src/test/app/Offer_test.cpp | 4 +- src/test/app/Oracle_test.cpp | 4 +- src/test/app/OversizeMeta_test.cpp | 4 +- src/test/app/Path_test.cpp | 4 +- src/test/app/PayChan_test.cpp | 8 +- src/test/app/PayStrand_test.cpp | 28 ++--- src/test/app/PermissionedDEX_test.cpp | 4 +- src/test/app/PermissionedDomains_test.cpp | 4 +- src/test/app/PseudoTx_test.cpp | 6 +- src/test/app/RCLValidations_test.cpp | 6 +- src/test/app/ReducedOffer_test.cpp | 4 +- src/test/app/Regression_test.cpp | 8 +- src/test/app/SHAMapStore_test.cpp | 4 +- src/test/app/SetAuth_test.cpp | 4 +- src/test/app/SetRegularKey_test.cpp | 4 +- src/test/app/SetTrust_test.cpp | 4 +- src/test/app/TheoreticalQuality_test.cpp | 4 +- src/test/app/Ticket_test.cpp | 4 +- src/test/app/Transaction_ordering_test.cpp | 4 +- src/test/app/TrustAndBalance_test.cpp | 4 +- src/test/app/TxQ_test.cpp | 26 ++--- src/test/app/ValidatorKeys_test.cpp | 4 +- src/test/app/ValidatorList_test.cpp | 6 +- src/test/app/ValidatorSite_test.cpp | 4 +- src/test/app/Vault_test.cpp | 32 ++--- src/test/app/XChain_test.cpp | 4 +- src/test/app/tx/apply_test.cpp | 4 +- src/test/basics/Buffer_test.cpp | 4 +- src/test/basics/DetectCrash_test.cpp | 4 +- src/test/basics/Expected_test.cpp | 4 +- src/test/basics/FileUtilities_test.cpp | 6 +- src/test/basics/IOUAmount_test.cpp | 6 +- src/test/basics/IntrusiveShared_test.cpp | 4 +- src/test/basics/KeyCache_test.cpp | 4 +- src/test/basics/Number_test.cpp | 4 +- src/test/basics/PerfLog_test.cpp | 6 +- src/test/basics/StringUtilities_test.cpp | 4 +- src/test/basics/TaggedCache_test.cpp | 4 +- src/test/basics/Units_test.cpp | 4 +- src/test/basics/XRPAmount_test.cpp | 6 +- src/test/basics/base58_test.cpp | 36 +++--- src/test/basics/base_uint_test.cpp | 8 +- src/test/basics/hardened_hash_test.cpp | 12 +- src/test/basics/join_test.cpp | 4 +- src/test/beast/IPEndpointCommon.h | 2 +- src/test/beast/IPEndpoint_test.cpp | 2 +- .../beast/beast_CurrentThreadName_test.cpp | 4 +- src/test/conditions/PreimageSha256_test.cpp | 4 +- .../consensus/ByzantineFailureSim_test.cpp | 4 +- src/test/consensus/Consensus_test.cpp | 4 +- .../DistributedValidatorsSim_test.cpp | 4 +- src/test/consensus/LedgerTiming_test.cpp | 4 +- src/test/consensus/LedgerTrie_test.cpp | 4 +- src/test/consensus/NegativeUNL_test.cpp | 4 +- .../consensus/RCLCensorshipDetector_test.cpp | 4 +- src/test/consensus/ScaleFreeSim_test.cpp | 4 +- src/test/consensus/Validations_test.cpp | 4 +- src/test/core/ClosureCounter_test.cpp | 4 +- src/test/core/Config_test.cpp | 8 +- src/test/core/Coroutine_test.cpp | 4 +- src/test/core/JobQueue_test.cpp | 4 +- src/test/core/SociDB_test.cpp | 4 +- src/test/core/Workers_test.cpp | 4 +- src/test/csf/BasicNetwork.h | 4 +- src/test/csf/BasicNetwork_test.cpp | 4 +- src/test/csf/CollectorRef.h | 4 +- src/test/csf/Digraph.h | 4 +- src/test/csf/Digraph_test.cpp | 4 +- src/test/csf/Histogram.h | 4 +- src/test/csf/Histogram_test.cpp | 4 +- src/test/csf/Peer.h | 4 +- src/test/csf/PeerGroup.h | 4 +- src/test/csf/Proposal.h | 4 +- src/test/csf/Scheduler.h | 4 +- src/test/csf/Scheduler_test.cpp | 4 +- src/test/csf/Sim.h | 4 +- src/test/csf/SimTime.h | 4 +- src/test/csf/TrustGraph.h | 4 +- src/test/csf/Tx.h | 4 +- src/test/csf/Validation.h | 4 +- src/test/csf/collectors.h | 4 +- src/test/csf/events.h | 4 +- src/test/csf/impl/Sim.cpp | 4 +- src/test/csf/impl/ledgers.cpp | 4 +- src/test/csf/ledgers.h | 8 +- src/test/csf/random.h | 4 +- src/test/csf/submitters.h | 4 +- src/test/csf/timers.h | 4 +- src/test/json/Object_test.cpp | 2 +- src/test/json/TestOutputSuite.h | 4 +- src/test/jtx/AMM.h | 4 +- src/test/jtx/AMMTest.h | 4 +- src/test/jtx/AbstractClient.h | 4 +- src/test/jtx/Account.h | 4 +- src/test/jtx/CaptureLogs.h | 4 +- src/test/jtx/CheckMessageLogs.h | 4 +- src/test/jtx/Env.h | 4 +- src/test/jtx/Env_ss.h | 4 +- src/test/jtx/Env_test.cpp | 4 +- src/test/jtx/JSONRPCClient.h | 4 +- src/test/jtx/JTx.h | 4 +- src/test/jtx/ManualTimeKeeper.h | 4 +- src/test/jtx/Oracle.h | 4 +- src/test/jtx/PathSet.h | 4 +- src/test/jtx/SignerUtils.h | 4 +- src/test/jtx/TestHelpers.h | 4 +- src/test/jtx/TestSuite.h | 4 +- src/test/jtx/TrustedPublisherServer.h | 7 +- src/test/jtx/WSClient.h | 4 +- src/test/jtx/WSClient_test.cpp | 4 +- src/test/jtx/account_txn_id.h | 4 +- src/test/jtx/acctdelete.h | 4 +- src/test/jtx/amount.h | 22 ++-- src/test/jtx/attester.h | 4 +- src/test/jtx/balance.h | 4 +- src/test/jtx/basic_prop.h | 4 +- src/test/jtx/batch.h | 4 +- src/test/jtx/check.h | 4 +- src/test/jtx/credentials.h | 4 +- src/test/jtx/delegate.h | 4 +- src/test/jtx/delivermin.h | 4 +- src/test/jtx/deposit.h | 4 +- src/test/jtx/did.h | 4 +- src/test/jtx/directory.h | 4 +- src/test/jtx/domain.h | 4 +- src/test/jtx/envconfig.h | 6 +- src/test/jtx/escrow.h | 4 +- src/test/jtx/fee.h | 4 +- src/test/jtx/flags.h | 4 +- src/test/jtx/impl/AMM.cpp | 6 +- src/test/jtx/impl/AMMTest.cpp | 4 +- src/test/jtx/impl/Account.cpp | 4 +- src/test/jtx/impl/Env.cpp | 4 +- src/test/jtx/impl/JSONRPCClient.cpp | 4 +- src/test/jtx/impl/Oracle.cpp | 4 +- src/test/jtx/impl/TestHelpers.cpp | 4 +- src/test/jtx/impl/WSClient.cpp | 4 +- src/test/jtx/impl/account_txn_id.cpp | 4 +- src/test/jtx/impl/acctdelete.cpp | 4 +- src/test/jtx/impl/amount.cpp | 4 +- src/test/jtx/impl/attester.cpp | 4 +- src/test/jtx/impl/balance.cpp | 4 +- src/test/jtx/impl/batch.cpp | 8 +- src/test/jtx/impl/check.cpp | 4 +- src/test/jtx/impl/creds.cpp | 4 +- src/test/jtx/impl/delegate.cpp | 4 +- src/test/jtx/impl/delivermin.cpp | 4 +- src/test/jtx/impl/deposit.cpp | 4 +- src/test/jtx/impl/dids.cpp | 4 +- src/test/jtx/impl/directory.cpp | 4 +- src/test/jtx/impl/domain.cpp | 4 +- src/test/jtx/impl/envconfig.cpp | 4 +- src/test/jtx/impl/escrow.cpp | 6 +- src/test/jtx/impl/fee.cpp | 4 +- src/test/jtx/impl/flags.cpp | 4 +- src/test/jtx/impl/invoice_id.cpp | 4 +- src/test/jtx/impl/jtx_json.cpp | 4 +- src/test/jtx/impl/last_ledger_sequence.cpp | 4 +- src/test/jtx/impl/ledgerStateFixes.cpp | 4 +- src/test/jtx/impl/memo.cpp | 4 +- src/test/jtx/impl/mpt.cpp | 6 +- src/test/jtx/impl/multisign.cpp | 6 +- src/test/jtx/impl/offer.cpp | 4 +- src/test/jtx/impl/owners.cpp | 4 +- src/test/jtx/impl/paths.cpp | 4 +- src/test/jtx/impl/pay.cpp | 4 +- src/test/jtx/impl/permissioned_dex.cpp | 4 +- src/test/jtx/impl/permissioned_domains.cpp | 4 +- src/test/jtx/impl/quality2.cpp | 4 +- src/test/jtx/impl/rate.cpp | 4 +- src/test/jtx/impl/regkey.cpp | 4 +- src/test/jtx/impl/sendmax.cpp | 4 +- src/test/jtx/impl/seq.cpp | 4 +- src/test/jtx/impl/sig.cpp | 4 +- src/test/jtx/impl/tag.cpp | 4 +- src/test/jtx/impl/ticket.cpp | 4 +- src/test/jtx/impl/token.cpp | 6 +- src/test/jtx/impl/trust.cpp | 4 +- src/test/jtx/impl/txflags.cpp | 4 +- src/test/jtx/impl/utility.cpp | 6 +- src/test/jtx/impl/vault.cpp | 4 +- src/test/jtx/impl/xchain_bridge.cpp | 4 +- src/test/jtx/invoice_id.h | 4 +- src/test/jtx/jtx_json.h | 4 +- src/test/jtx/last_ledger_sequence.h | 4 +- src/test/jtx/ledgerStateFix.h | 4 +- src/test/jtx/memo.h | 4 +- src/test/jtx/mpt.h | 4 +- src/test/jtx/multisign.h | 4 +- src/test/jtx/noop.h | 4 +- src/test/jtx/offer.h | 4 +- src/test/jtx/owners.h | 4 +- src/test/jtx/paths.h | 4 +- src/test/jtx/pay.h | 4 +- src/test/jtx/permissioned_dex.h | 4 +- src/test/jtx/permissioned_domains.h | 6 +- src/test/jtx/prop.h | 4 +- src/test/jtx/quality.h | 4 +- src/test/jtx/rate.h | 4 +- src/test/jtx/regkey.h | 4 +- src/test/jtx/require.h | 4 +- src/test/jtx/requires.h | 4 +- src/test/jtx/rpc.h | 4 +- src/test/jtx/sendmax.h | 4 +- src/test/jtx/seq.h | 4 +- src/test/jtx/sig.h | 4 +- src/test/jtx/tag.h | 4 +- src/test/jtx/tags.h | 4 +- src/test/jtx/ter.h | 4 +- src/test/jtx/ticket.h | 4 +- src/test/jtx/token.h | 4 +- src/test/jtx/trust.h | 4 +- src/test/jtx/txflags.h | 4 +- src/test/jtx/utility.h | 4 +- src/test/jtx/vault.h | 4 +- src/test/jtx/xchain_bridge.h | 4 +- src/test/ledger/BookDirs_test.cpp | 4 +- src/test/ledger/Directory_test.cpp | 4 +- src/test/ledger/PaymentSandbox_test.cpp | 4 +- src/test/ledger/PendingSaves_test.cpp | 4 +- src/test/ledger/SkipList_test.cpp | 4 +- src/test/ledger/View_test.cpp | 4 +- src/test/nodestore/Backend_test.cpp | 4 +- src/test/nodestore/Basics_test.cpp | 4 +- src/test/nodestore/Database_test.cpp | 8 +- src/test/nodestore/NuDBFactory_test.cpp | 4 +- src/test/nodestore/TestBase.h | 4 +- src/test/nodestore/Timing_test.cpp | 4 +- src/test/nodestore/import_test.cpp | 4 +- src/test/nodestore/varint_test.cpp | 4 +- src/test/overlay/ProtocolVersion_test.cpp | 4 +- src/test/overlay/cluster_test.cpp | 6 +- src/test/overlay/compression_test.cpp | 46 ++++---- src/test/overlay/handshake_test.cpp | 4 +- src/test/overlay/reduce_relay_test.cpp | 8 +- src/test/overlay/short_read_test.cpp | 4 +- src/test/overlay/traffic_count_test.cpp | 4 +- src/test/overlay/tx_reduce_relay_test.cpp | 4 +- src/test/peerfinder/Livecache_test.cpp | 12 +- src/test/peerfinder/PeerFinder_test.cpp | 8 +- src/test/protocol/ApiVersion_test.cpp | 4 +- src/test/protocol/BuildInfo_test.cpp | 4 +- src/test/protocol/Hooks_test.cpp | 4 +- src/test/protocol/InnerObjectFormats_test.cpp | 4 +- src/test/protocol/Issue_test.cpp | 4 +- src/test/protocol/Memo_test.cpp | 4 +- src/test/protocol/MultiApiJson_test.cpp | 6 +- src/test/protocol/PublicKey_test.cpp | 4 +- src/test/protocol/Quality_test.cpp | 4 +- src/test/protocol/STAccount_test.cpp | 4 +- src/test/protocol/STAmount_test.cpp | 4 +- src/test/protocol/STInteger_test.cpp | 4 +- src/test/protocol/STIssue_test.cpp | 4 +- src/test/protocol/STNumber_test.cpp | 4 +- src/test/protocol/STObject_test.cpp | 6 +- src/test/protocol/STParsedJSON_test.cpp | 4 +- src/test/protocol/STTx_test.cpp | 32 ++--- src/test/protocol/STValidation_test.cpp | 12 +- src/test/protocol/SecretKey_test.cpp | 4 +- src/test/protocol/Seed_test.cpp | 4 +- src/test/protocol/SeqProxy_test.cpp | 4 +- src/test/protocol/Serializer_test.cpp | 4 +- src/test/protocol/TER_test.cpp | 4 +- src/test/resource/Logic_test.cpp | 4 +- src/test/rpc/AMMInfo_test.cpp | 4 +- src/test/rpc/AccountCurrencies_test.cpp | 4 +- src/test/rpc/AccountInfo_test.cpp | 7 +- src/test/rpc/AccountLines_test.cpp | 4 +- src/test/rpc/AccountObjects_test.cpp | 4 +- src/test/rpc/AccountOffers_test.cpp | 4 +- src/test/rpc/AccountSet_test.cpp | 7 +- src/test/rpc/AccountTx_test.cpp | 4 +- src/test/rpc/AmendmentBlocked_test.cpp | 4 +- src/test/rpc/BookChanges_test.cpp | 4 +- src/test/rpc/Book_test.cpp | 4 +- src/test/rpc/Connect_test.cpp | 4 +- src/test/rpc/DeliveredAmount_test.cpp | 4 +- src/test/rpc/DepositAuthorized_test.cpp | 4 +- src/test/rpc/Feature_test.cpp | 24 ++-- src/test/rpc/GRPCTestClientBase.h | 4 +- src/test/rpc/GatewayBalances_test.cpp | 4 +- src/test/rpc/GetAggregatePrice_test.cpp | 4 +- src/test/rpc/GetCounts_test.cpp | 4 +- src/test/rpc/Handler_test.cpp | 6 +- src/test/rpc/JSONRPC_test.cpp | 4 +- src/test/rpc/KeyGeneration_test.cpp | 6 +- src/test/rpc/LedgerClosed_test.cpp | 4 +- src/test/rpc/LedgerData_test.cpp | 4 +- src/test/rpc/LedgerEntry_test.cpp | 12 +- src/test/rpc/LedgerHeader_test.cpp | 4 +- src/test/rpc/LedgerRPC_test.cpp | 4 +- src/test/rpc/LedgerRequestRPC_test.cpp | 4 +- src/test/rpc/ManifestRPC_test.cpp | 4 +- src/test/rpc/NoRippleCheck_test.cpp | 8 +- src/test/rpc/NoRipple_test.cpp | 4 +- src/test/rpc/OwnerInfo_test.cpp | 4 +- src/test/rpc/Peers_test.cpp | 4 +- src/test/rpc/RPCCall_test.cpp | 4 +- src/test/rpc/RPCHelpers_test.cpp | 4 +- src/test/rpc/RPCOverload_test.cpp | 4 +- src/test/rpc/RobustTransaction_test.cpp | 4 +- src/test/rpc/Roles_test.cpp | 4 +- src/test/rpc/ServerDefinitions_test.cpp | 4 +- src/test/rpc/ServerInfo_test.cpp | 4 +- src/test/rpc/Simulate_test.cpp | 4 +- src/test/rpc/Status_test.cpp | 4 +- src/test/rpc/Subscribe_test.cpp | 4 +- src/test/rpc/TransactionEntry_test.cpp | 4 +- src/test/rpc/TransactionHistory_test.cpp | 4 +- src/test/rpc/Transaction_test.cpp | 4 +- src/test/rpc/ValidatorInfo_test.cpp | 4 +- src/test/rpc/ValidatorRPC_test.cpp | 4 +- src/test/rpc/Version_test.cpp | 4 +- src/test/server/ServerStatus_test.cpp | 4 +- src/test/server/Server_test.cpp | 4 +- src/test/shamap/FetchPack_test.cpp | 6 +- src/test/shamap/SHAMapSync_test.cpp | 4 +- src/test/shamap/SHAMap_test.cpp | 4 +- src/test/shamap/common.h | 4 +- src/test/unit_test/FileDirGuard.h | 4 +- src/test/unit_test/SuiteJournal.h | 4 +- src/test/unit_test/multi_runner.cpp | 4 +- src/test/unit_test/multi_runner.h | 4 +- src/tests/libxrpl/basics/RangeSet.cpp | 2 +- src/tests/libxrpl/basics/Slice.cpp | 2 +- src/tests/libxrpl/basics/base64.cpp | 2 +- src/tests/libxrpl/basics/contract.cpp | 2 +- src/tests/libxrpl/basics/mulDiv.cpp | 2 +- src/tests/libxrpl/basics/scope.cpp | 2 +- src/tests/libxrpl/basics/tagged_integer.cpp | 2 +- src/tests/libxrpl/crypto/csprng.cpp | 2 +- src/tests/libxrpl/json/Output.cpp | 2 +- src/tests/libxrpl/json/Value.cpp | 4 +- src/tests/libxrpl/json/Writer.cpp | 2 +- src/tests/libxrpl/net/HTTPClient.cpp | 2 +- .../app/consensus/RCLCensorshipDetector.h | 4 +- src/xrpld/app/consensus/RCLConsensus.cpp | 20 ++-- src/xrpld/app/consensus/RCLConsensus.h | 4 +- src/xrpld/app/consensus/RCLCxLedger.h | 8 +- src/xrpld/app/consensus/RCLCxPeerPos.cpp | 6 +- src/xrpld/app/consensus/RCLCxPeerPos.h | 4 +- src/xrpld/app/consensus/RCLCxTx.h | 8 +- src/xrpld/app/consensus/RCLValidations.cpp | 12 +- src/xrpld/app/consensus/RCLValidations.h | 8 +- .../app/ledger/AbstractFetchPackContainer.h | 4 +- src/xrpld/app/ledger/AcceptedLedger.cpp | 4 +- src/xrpld/app/ledger/AcceptedLedger.h | 4 +- src/xrpld/app/ledger/AcceptedLedgerTx.cpp | 8 +- src/xrpld/app/ledger/AcceptedLedgerTx.h | 4 +- src/xrpld/app/ledger/AccountStateSF.cpp | 4 +- src/xrpld/app/ledger/AccountStateSF.h | 4 +- src/xrpld/app/ledger/BookListeners.cpp | 4 +- src/xrpld/app/ledger/BookListeners.h | 4 +- src/xrpld/app/ledger/BuildLedger.h | 4 +- src/xrpld/app/ledger/ConsensusTransSetSF.cpp | 8 +- src/xrpld/app/ledger/ConsensusTransSetSF.h | 4 +- src/xrpld/app/ledger/InboundLedger.h | 4 +- src/xrpld/app/ledger/InboundLedgers.h | 4 +- src/xrpld/app/ledger/InboundTransactions.h | 4 +- src/xrpld/app/ledger/Ledger.cpp | 26 ++--- src/xrpld/app/ledger/Ledger.h | 4 +- src/xrpld/app/ledger/LedgerCleaner.h | 4 +- src/xrpld/app/ledger/LedgerHistory.cpp | 32 +++-- src/xrpld/app/ledger/LedgerHistory.h | 4 +- src/xrpld/app/ledger/LedgerHolder.h | 4 +- src/xrpld/app/ledger/LedgerMaster.h | 4 +- src/xrpld/app/ledger/LedgerReplay.h | 4 +- src/xrpld/app/ledger/LedgerReplayTask.h | 4 +- src/xrpld/app/ledger/LedgerReplayer.h | 4 +- src/xrpld/app/ledger/LedgerToJson.h | 4 +- src/xrpld/app/ledger/LocalTxs.h | 4 +- src/xrpld/app/ledger/OpenLedger.h | 6 +- src/xrpld/app/ledger/OrderBookDB.cpp | 6 +- src/xrpld/app/ledger/OrderBookDB.h | 4 +- src/xrpld/app/ledger/PendingSaves.h | 4 +- src/xrpld/app/ledger/TransactionMaster.h | 4 +- src/xrpld/app/ledger/TransactionStateSF.cpp | 6 +- src/xrpld/app/ledger/TransactionStateSF.h | 4 +- src/xrpld/app/ledger/detail/BuildLedger.cpp | 10 +- src/xrpld/app/ledger/detail/InboundLedger.cpp | 21 ++-- .../app/ledger/detail/InboundLedgers.cpp | 13 +-- .../app/ledger/detail/InboundTransactions.cpp | 4 +- src/xrpld/app/ledger/detail/LedgerCleaner.cpp | 9 +- .../app/ledger/detail/LedgerDeltaAcquire.cpp | 10 +- .../app/ledger/detail/LedgerDeltaAcquire.h | 4 +- src/xrpld/app/ledger/detail/LedgerMaster.cpp | 30 ++--- src/xrpld/app/ledger/detail/LedgerReplay.cpp | 4 +- .../ledger/detail/LedgerReplayMsgHandler.cpp | 4 +- .../ledger/detail/LedgerReplayMsgHandler.h | 4 +- .../app/ledger/detail/LedgerReplayTask.cpp | 12 +- .../app/ledger/detail/LedgerReplayer.cpp | 6 +- src/xrpld/app/ledger/detail/LedgerToJson.cpp | 4 +- src/xrpld/app/ledger/detail/LocalTxs.cpp | 4 +- src/xrpld/app/ledger/detail/OpenLedger.cpp | 6 +- .../app/ledger/detail/SkipListAcquire.cpp | 8 +- src/xrpld/app/ledger/detail/SkipListAcquire.h | 8 +- .../app/ledger/detail/TimeoutCounter.cpp | 6 +- src/xrpld/app/ledger/detail/TimeoutCounter.h | 6 +- .../app/ledger/detail/TransactionAcquire.cpp | 4 +- .../app/ledger/detail/TransactionAcquire.h | 4 +- .../app/ledger/detail/TransactionMaster.cpp | 4 +- src/xrpld/app/main/Application.cpp | 35 +++--- src/xrpld/app/main/Application.h | 4 +- src/xrpld/app/main/CollectorManager.cpp | 4 +- src/xrpld/app/main/CollectorManager.h | 4 +- src/xrpld/app/main/DBInit.h | 4 +- src/xrpld/app/main/GRPCServer.cpp | 8 +- src/xrpld/app/main/GRPCServer.h | 4 +- src/xrpld/app/main/LoadManager.cpp | 7 +- src/xrpld/app/main/LoadManager.h | 4 +- src/xrpld/app/main/Main.cpp | 10 +- src/xrpld/app/main/NodeIdentity.cpp | 4 +- src/xrpld/app/main/NodeIdentity.h | 4 +- src/xrpld/app/main/NodeStoreScheduler.cpp | 4 +- src/xrpld/app/main/NodeStoreScheduler.h | 4 +- src/xrpld/app/main/Tuning.h | 4 +- src/xrpld/app/misc/AMMHelpers.h | 4 +- src/xrpld/app/misc/AMMUtils.h | 4 +- src/xrpld/app/misc/AmendmentTable.h | 4 +- src/xrpld/app/misc/CanonicalTXSet.cpp | 4 +- src/xrpld/app/misc/CanonicalTXSet.h | 4 +- src/xrpld/app/misc/DelegateUtils.h | 4 +- src/xrpld/app/misc/DeliverMax.h | 4 +- src/xrpld/app/misc/FeeVote.h | 4 +- src/xrpld/app/misc/FeeVoteImpl.cpp | 6 +- src/xrpld/app/misc/HashRouter.cpp | 6 +- src/xrpld/app/misc/HashRouter.h | 4 +- src/xrpld/app/misc/LoadFeeTrack.h | 4 +- src/xrpld/app/misc/Manifest.h | 4 +- src/xrpld/app/misc/NegativeUNLVote.cpp | 11 +- src/xrpld/app/misc/NegativeUNLVote.h | 4 +- src/xrpld/app/misc/NetworkOPs.cpp | 53 +++++---- src/xrpld/app/misc/NetworkOPs.h | 4 +- src/xrpld/app/misc/PermissionedDEXHelpers.cpp | 4 +- src/xrpld/app/misc/PermissionedDEXHelpers.h | 4 +- src/xrpld/app/misc/SHAMapStore.h | 4 +- src/xrpld/app/misc/SHAMapStoreImp.cpp | 16 +-- src/xrpld/app/misc/SHAMapStoreImp.h | 4 +- src/xrpld/app/misc/Transaction.h | 4 +- src/xrpld/app/misc/TxQ.h | 4 +- src/xrpld/app/misc/ValidatorKeys.h | 4 +- src/xrpld/app/misc/ValidatorList.h | 9 +- src/xrpld/app/misc/ValidatorSite.h | 4 +- src/xrpld/app/misc/detail/AMMHelpers.cpp | 6 +- src/xrpld/app/misc/detail/AMMUtils.cpp | 6 +- src/xrpld/app/misc/detail/AccountTxPaging.cpp | 4 +- src/xrpld/app/misc/detail/AccountTxPaging.h | 4 +- src/xrpld/app/misc/detail/AmendmentTable.cpp | 12 +- src/xrpld/app/misc/detail/DelegateUtils.cpp | 4 +- src/xrpld/app/misc/detail/DeliverMax.cpp | 4 +- src/xrpld/app/misc/detail/LoadFeeTrack.cpp | 4 +- src/xrpld/app/misc/detail/Manifest.cpp | 13 +-- src/xrpld/app/misc/detail/Transaction.cpp | 6 +- src/xrpld/app/misc/detail/TxQ.cpp | 62 +++++----- src/xrpld/app/misc/detail/ValidatorKeys.cpp | 4 +- src/xrpld/app/misc/detail/ValidatorList.cpp | 65 +++++------ src/xrpld/app/misc/detail/ValidatorSite.cpp | 8 +- src/xrpld/app/misc/detail/Work.h | 4 +- src/xrpld/app/misc/detail/WorkBase.h | 6 +- src/xrpld/app/misc/detail/WorkFile.h | 6 +- src/xrpld/app/misc/detail/WorkPlain.h | 4 +- src/xrpld/app/misc/detail/WorkSSL.cpp | 4 +- src/xrpld/app/misc/detail/WorkSSL.h | 4 +- src/xrpld/app/paths/AMMContext.h | 4 +- src/xrpld/app/paths/AMMLiquidity.h | 4 +- src/xrpld/app/paths/AMMOffer.h | 4 +- src/xrpld/app/paths/AccountCurrencies.cpp | 4 +- src/xrpld/app/paths/AccountCurrencies.h | 4 +- src/xrpld/app/paths/Credit.cpp | 12 +- src/xrpld/app/paths/Credit.h | 4 +- src/xrpld/app/paths/Flow.cpp | 6 +- src/xrpld/app/paths/Flow.h | 4 +- src/xrpld/app/paths/PathRequest.cpp | 7 +- src/xrpld/app/paths/PathRequest.h | 4 +- src/xrpld/app/paths/PathRequests.cpp | 4 +- src/xrpld/app/paths/PathRequests.h | 4 +- src/xrpld/app/paths/Pathfinder.cpp | 16 +-- src/xrpld/app/paths/Pathfinder.h | 4 +- src/xrpld/app/paths/RippleCalc.cpp | 4 +- src/xrpld/app/paths/RippleCalc.h | 4 +- src/xrpld/app/paths/RippleLineCache.cpp | 10 +- src/xrpld/app/paths/RippleLineCache.h | 6 +- src/xrpld/app/paths/TrustLine.cpp | 4 +- src/xrpld/app/paths/TrustLine.h | 4 +- src/xrpld/app/paths/detail/AMMLiquidity.cpp | 6 +- src/xrpld/app/paths/detail/AMMOffer.cpp | 4 +- src/xrpld/app/paths/detail/AmountSpec.h | 17 ++- src/xrpld/app/paths/detail/BookStep.cpp | 21 ++-- src/xrpld/app/paths/detail/DirectStep.cpp | 14 +-- src/xrpld/app/paths/detail/FlatSets.h | 4 +- src/xrpld/app/paths/detail/FlowDebugInfo.h | 12 +- src/xrpld/app/paths/detail/PathfinderUtils.h | 4 +- src/xrpld/app/paths/detail/PaySteps.cpp | 14 +-- src/xrpld/app/paths/detail/StepChecks.h | 6 +- src/xrpld/app/paths/detail/Steps.h | 6 +- src/xrpld/app/paths/detail/StrandFlow.h | 20 ++-- .../app/paths/detail/XRPEndpointStep.cpp | 10 +- src/xrpld/app/rdb/PeerFinder.h | 4 +- src/xrpld/app/rdb/RelationalDatabase.h | 6 +- src/xrpld/app/rdb/State.h | 4 +- src/xrpld/app/rdb/Vacuum.h | 4 +- src/xrpld/app/rdb/Wallet.h | 4 +- src/xrpld/app/rdb/backend/SQLiteDatabase.h | 4 +- src/xrpld/app/rdb/backend/detail/Node.cpp | 12 +- src/xrpld/app/rdb/backend/detail/Node.h | 4 +- .../app/rdb/backend/detail/SQLiteDatabase.cpp | 10 +- src/xrpld/app/rdb/detail/PeerFinder.cpp | 4 +- .../app/rdb/detail/RelationalDatabase.cpp | 4 +- src/xrpld/app/rdb/detail/State.cpp | 4 +- src/xrpld/app/rdb/detail/Vacuum.cpp | 4 +- src/xrpld/app/rdb/detail/Wallet.cpp | 4 +- src/xrpld/app/tx/apply.h | 4 +- src/xrpld/app/tx/applySteps.h | 4 +- src/xrpld/app/tx/detail/AMMBid.cpp | 8 +- src/xrpld/app/tx/detail/AMMBid.h | 4 +- src/xrpld/app/tx/detail/AMMClawback.cpp | 4 +- src/xrpld/app/tx/detail/AMMClawback.h | 4 +- src/xrpld/app/tx/detail/AMMCreate.cpp | 4 +- src/xrpld/app/tx/detail/AMMCreate.h | 4 +- src/xrpld/app/tx/detail/AMMDelete.cpp | 4 +- src/xrpld/app/tx/detail/AMMDelete.h | 4 +- src/xrpld/app/tx/detail/AMMDeposit.cpp | 6 +- src/xrpld/app/tx/detail/AMMDeposit.h | 4 +- src/xrpld/app/tx/detail/AMMVote.cpp | 6 +- src/xrpld/app/tx/detail/AMMVote.h | 4 +- src/xrpld/app/tx/detail/AMMWithdraw.cpp | 6 +- src/xrpld/app/tx/detail/AMMWithdraw.h | 4 +- src/xrpld/app/tx/detail/ApplyContext.cpp | 6 +- src/xrpld/app/tx/detail/ApplyContext.h | 4 +- src/xrpld/app/tx/detail/Batch.cpp | 8 +- src/xrpld/app/tx/detail/Batch.h | 4 +- src/xrpld/app/tx/detail/BookTip.cpp | 4 +- src/xrpld/app/tx/detail/BookTip.h | 4 +- src/xrpld/app/tx/detail/CancelCheck.cpp | 4 +- src/xrpld/app/tx/detail/CancelCheck.h | 4 +- src/xrpld/app/tx/detail/CancelOffer.cpp | 4 +- src/xrpld/app/tx/detail/CancelOffer.h | 4 +- src/xrpld/app/tx/detail/CashCheck.cpp | 4 +- src/xrpld/app/tx/detail/CashCheck.h | 4 +- src/xrpld/app/tx/detail/Change.cpp | 8 +- src/xrpld/app/tx/detail/Change.h | 4 +- src/xrpld/app/tx/detail/Clawback.cpp | 4 +- src/xrpld/app/tx/detail/Clawback.h | 4 +- src/xrpld/app/tx/detail/CreateCheck.cpp | 4 +- src/xrpld/app/tx/detail/CreateCheck.h | 4 +- src/xrpld/app/tx/detail/CreateOffer.cpp | 16 +-- src/xrpld/app/tx/detail/CreateOffer.h | 4 +- src/xrpld/app/tx/detail/CreateTicket.cpp | 4 +- src/xrpld/app/tx/detail/CreateTicket.h | 4 +- src/xrpld/app/tx/detail/Credentials.cpp | 4 +- src/xrpld/app/tx/detail/Credentials.h | 4 +- src/xrpld/app/tx/detail/DID.cpp | 4 +- src/xrpld/app/tx/detail/DID.h | 4 +- src/xrpld/app/tx/detail/DelegateSet.cpp | 4 +- src/xrpld/app/tx/detail/DelegateSet.h | 4 +- src/xrpld/app/tx/detail/DeleteAccount.cpp | 16 ++- src/xrpld/app/tx/detail/DeleteAccount.h | 4 +- src/xrpld/app/tx/detail/DeleteOracle.cpp | 4 +- src/xrpld/app/tx/detail/DeleteOracle.h | 4 +- src/xrpld/app/tx/detail/DepositPreauth.cpp | 4 +- src/xrpld/app/tx/detail/DepositPreauth.h | 4 +- src/xrpld/app/tx/detail/Escrow.cpp | 10 +- src/xrpld/app/tx/detail/Escrow.h | 4 +- src/xrpld/app/tx/detail/InvariantCheck.cpp | 68 ++++++----- src/xrpld/app/tx/detail/InvariantCheck.h | 6 +- src/xrpld/app/tx/detail/LedgerStateFix.cpp | 4 +- src/xrpld/app/tx/detail/LedgerStateFix.h | 4 +- src/xrpld/app/tx/detail/MPTokenAuthorize.cpp | 4 +- src/xrpld/app/tx/detail/MPTokenAuthorize.h | 4 +- .../app/tx/detail/MPTokenIssuanceCreate.cpp | 4 +- .../app/tx/detail/MPTokenIssuanceCreate.h | 4 +- .../app/tx/detail/MPTokenIssuanceDestroy.cpp | 4 +- .../app/tx/detail/MPTokenIssuanceDestroy.h | 4 +- .../app/tx/detail/MPTokenIssuanceSet.cpp | 4 +- src/xrpld/app/tx/detail/MPTokenIssuanceSet.h | 4 +- .../app/tx/detail/NFTokenAcceptOffer.cpp | 4 +- src/xrpld/app/tx/detail/NFTokenAcceptOffer.h | 4 +- src/xrpld/app/tx/detail/NFTokenBurn.cpp | 4 +- src/xrpld/app/tx/detail/NFTokenBurn.h | 4 +- .../app/tx/detail/NFTokenCancelOffer.cpp | 4 +- src/xrpld/app/tx/detail/NFTokenCancelOffer.h | 4 +- .../app/tx/detail/NFTokenCreateOffer.cpp | 4 +- src/xrpld/app/tx/detail/NFTokenCreateOffer.h | 4 +- src/xrpld/app/tx/detail/NFTokenMint.cpp | 6 +- src/xrpld/app/tx/detail/NFTokenMint.h | 4 +- src/xrpld/app/tx/detail/NFTokenModify.cpp | 4 +- src/xrpld/app/tx/detail/NFTokenModify.h | 4 +- src/xrpld/app/tx/detail/NFTokenUtils.cpp | 22 ++-- src/xrpld/app/tx/detail/NFTokenUtils.h | 6 +- src/xrpld/app/tx/detail/Offer.h | 6 +- src/xrpld/app/tx/detail/OfferStream.cpp | 6 +- src/xrpld/app/tx/detail/OfferStream.h | 4 +- src/xrpld/app/tx/detail/PayChan.cpp | 8 +- src/xrpld/app/tx/detail/PayChan.h | 4 +- src/xrpld/app/tx/detail/Payment.cpp | 6 +- src/xrpld/app/tx/detail/Payment.h | 4 +- .../tx/detail/PermissionedDomainDelete.cpp | 10 +- .../app/tx/detail/PermissionedDomainDelete.h | 4 +- .../app/tx/detail/PermissionedDomainSet.cpp | 4 +- .../app/tx/detail/PermissionedDomainSet.h | 4 +- src/xrpld/app/tx/detail/SetAccount.cpp | 4 +- src/xrpld/app/tx/detail/SetAccount.h | 4 +- src/xrpld/app/tx/detail/SetOracle.cpp | 4 +- src/xrpld/app/tx/detail/SetOracle.h | 4 +- src/xrpld/app/tx/detail/SetRegularKey.cpp | 4 +- src/xrpld/app/tx/detail/SetRegularKey.h | 4 +- src/xrpld/app/tx/detail/SetSignerList.cpp | 16 +-- src/xrpld/app/tx/detail/SetSignerList.h | 4 +- src/xrpld/app/tx/detail/SetTrust.cpp | 14 +-- src/xrpld/app/tx/detail/SetTrust.h | 4 +- src/xrpld/app/tx/detail/SignerEntries.cpp | 4 +- src/xrpld/app/tx/detail/SignerEntries.h | 4 +- src/xrpld/app/tx/detail/Transactor.cpp | 30 ++--- src/xrpld/app/tx/detail/Transactor.h | 6 +- src/xrpld/app/tx/detail/VaultClawback.cpp | 8 +- src/xrpld/app/tx/detail/VaultClawback.h | 4 +- src/xrpld/app/tx/detail/VaultCreate.cpp | 4 +- src/xrpld/app/tx/detail/VaultCreate.h | 4 +- src/xrpld/app/tx/detail/VaultDelete.cpp | 4 +- src/xrpld/app/tx/detail/VaultDelete.h | 4 +- src/xrpld/app/tx/detail/VaultDeposit.cpp | 8 +- src/xrpld/app/tx/detail/VaultDeposit.h | 4 +- src/xrpld/app/tx/detail/VaultSet.cpp | 4 +- src/xrpld/app/tx/detail/VaultSet.h | 4 +- src/xrpld/app/tx/detail/VaultWithdraw.cpp | 6 +- src/xrpld/app/tx/detail/VaultWithdraw.h | 4 +- src/xrpld/app/tx/detail/XChainBridge.cpp | 10 +- src/xrpld/app/tx/detail/XChainBridge.h | 4 +- src/xrpld/app/tx/detail/apply.cpp | 4 +- src/xrpld/app/tx/detail/applySteps.cpp | 15 ++- src/xrpld/conditions/Condition.h | 4 +- src/xrpld/conditions/Fulfillment.h | 4 +- src/xrpld/conditions/detail/Condition.cpp | 4 +- src/xrpld/conditions/detail/Fulfillment.cpp | 4 +- src/xrpld/conditions/detail/PreimageSha256.h | 4 +- src/xrpld/conditions/detail/error.cpp | 4 +- src/xrpld/conditions/detail/error.h | 6 +- src/xrpld/conditions/detail/utils.h | 4 +- src/xrpld/consensus/Consensus.cpp | 4 +- src/xrpld/consensus/Consensus.h | 23 ++-- src/xrpld/consensus/ConsensusParms.h | 6 +- src/xrpld/consensus/ConsensusProposal.h | 4 +- src/xrpld/consensus/ConsensusTypes.h | 6 +- src/xrpld/consensus/DisputedTx.h | 4 +- src/xrpld/consensus/LedgerTiming.h | 4 +- src/xrpld/consensus/LedgerTrie.h | 22 ++-- src/xrpld/consensus/Validations.h | 8 +- src/xrpld/core/ClosureCounter.h | 4 +- src/xrpld/core/Config.h | 4 +- src/xrpld/core/ConfigSections.h | 4 +- src/xrpld/core/Coro.ipp | 9 +- src/xrpld/core/DatabaseCon.h | 6 +- src/xrpld/core/Job.h | 4 +- src/xrpld/core/JobQueue.h | 8 +- src/xrpld/core/JobTypeData.h | 4 +- src/xrpld/core/JobTypeInfo.h | 4 +- src/xrpld/core/JobTypes.h | 10 +- src/xrpld/core/LoadEvent.h | 4 +- src/xrpld/core/LoadMonitor.h | 4 +- src/xrpld/core/SociDB.h | 4 +- src/xrpld/core/TimeKeeper.h | 4 +- src/xrpld/core/detail/Config.cpp | 27 +++-- src/xrpld/core/detail/DatabaseCon.cpp | 6 +- src/xrpld/core/detail/Job.cpp | 4 +- src/xrpld/core/detail/JobQueue.cpp | 50 ++++---- src/xrpld/core/detail/LoadEvent.cpp | 6 +- src/xrpld/core/detail/LoadMonitor.cpp | 4 +- src/xrpld/core/detail/SociDB.cpp | 6 +- src/xrpld/core/detail/Workers.cpp | 6 +- src/xrpld/core/detail/Workers.h | 4 +- src/xrpld/core/detail/semaphore.h | 6 +- src/xrpld/overlay/Cluster.h | 4 +- src/xrpld/overlay/ClusterNode.h | 4 +- src/xrpld/overlay/Compression.h | 12 +- src/xrpld/overlay/Message.h | 4 +- src/xrpld/overlay/Overlay.h | 4 +- src/xrpld/overlay/Peer.h | 4 +- src/xrpld/overlay/PeerReservationTable.h | 4 +- src/xrpld/overlay/PeerSet.h | 4 +- src/xrpld/overlay/ReduceRelayCommon.h | 4 +- src/xrpld/overlay/Slot.h | 8 +- src/xrpld/overlay/Squelch.h | 4 +- src/xrpld/overlay/detail/Cluster.cpp | 4 +- src/xrpld/overlay/detail/ConnectAttempt.cpp | 10 +- src/xrpld/overlay/detail/ConnectAttempt.h | 4 +- src/xrpld/overlay/detail/Handshake.cpp | 8 +- src/xrpld/overlay/detail/Handshake.h | 4 +- src/xrpld/overlay/detail/Message.cpp | 14 +-- src/xrpld/overlay/detail/OverlayImpl.cpp | 22 ++-- src/xrpld/overlay/detail/OverlayImpl.h | 8 +- src/xrpld/overlay/detail/PeerImp.cpp | 46 ++++---- src/xrpld/overlay/detail/PeerImp.h | 6 +- .../overlay/detail/PeerReservationTable.cpp | 4 +- src/xrpld/overlay/detail/PeerSet.cpp | 6 +- src/xrpld/overlay/detail/ProtocolMessage.h | 12 +- src/xrpld/overlay/detail/ProtocolVersion.cpp | 4 +- src/xrpld/overlay/detail/ProtocolVersion.h | 4 +- src/xrpld/overlay/detail/TrafficCount.cpp | 4 +- src/xrpld/overlay/detail/TrafficCount.h | 6 +- src/xrpld/overlay/detail/Tuning.h | 4 +- src/xrpld/overlay/detail/TxMetrics.cpp | 4 +- src/xrpld/overlay/detail/TxMetrics.h | 4 +- src/xrpld/overlay/detail/ZeroCopyStream.h | 6 +- src/xrpld/overlay/make_Overlay.h | 4 +- src/xrpld/overlay/predicates.h | 4 +- src/xrpld/peerfinder/PeerfinderManager.h | 6 +- src/xrpld/peerfinder/Slot.h | 4 +- src/xrpld/peerfinder/detail/Bootcache.cpp | 4 +- src/xrpld/peerfinder/detail/Bootcache.h | 8 +- src/xrpld/peerfinder/detail/Checker.h | 4 +- src/xrpld/peerfinder/detail/Counts.h | 12 +- src/xrpld/peerfinder/detail/Endpoint.cpp | 4 +- src/xrpld/peerfinder/detail/Fixed.h | 4 +- src/xrpld/peerfinder/detail/Handouts.h | 6 +- src/xrpld/peerfinder/detail/Livecache.h | 10 +- src/xrpld/peerfinder/detail/Logic.h | 26 ++--- .../peerfinder/detail/PeerfinderConfig.cpp | 6 +- .../peerfinder/detail/PeerfinderManager.cpp | 4 +- src/xrpld/peerfinder/detail/SlotImp.cpp | 16 +-- src/xrpld/peerfinder/detail/SlotImp.h | 4 +- src/xrpld/peerfinder/detail/Source.h | 4 +- src/xrpld/peerfinder/detail/SourceStrings.cpp | 4 +- src/xrpld/peerfinder/detail/SourceStrings.h | 4 +- src/xrpld/peerfinder/detail/Store.h | 4 +- src/xrpld/peerfinder/detail/StoreSqdb.h | 4 +- src/xrpld/peerfinder/detail/Tuning.h | 4 +- src/xrpld/peerfinder/make_Manager.h | 4 +- src/xrpld/perflog/PerfLog.h | 4 +- src/xrpld/perflog/detail/PerfLogImp.cpp | 23 ++-- src/xrpld/perflog/detail/PerfLogImp.h | 6 +- src/xrpld/rpc/BookChanges.h | 4 +- src/xrpld/rpc/CTID.h | 4 +- src/xrpld/rpc/Context.h | 4 +- src/xrpld/rpc/DeliveredAmount.h | 4 +- src/xrpld/rpc/GRPCHandlers.h | 4 +- src/xrpld/rpc/InfoSub.h | 4 +- src/xrpld/rpc/MPTokenIssuanceID.h | 4 +- src/xrpld/rpc/Output.h | 4 +- src/xrpld/rpc/README.md | 2 +- src/xrpld/rpc/RPCCall.h | 4 +- src/xrpld/rpc/RPCHandler.h | 4 +- src/xrpld/rpc/RPCSub.h | 4 +- src/xrpld/rpc/Request.h | 4 +- src/xrpld/rpc/Role.h | 4 +- src/xrpld/rpc/ServerHandler.h | 4 +- src/xrpld/rpc/Status.h | 8 +- src/xrpld/rpc/detail/DeliveredAmount.cpp | 4 +- src/xrpld/rpc/detail/Handler.cpp | 12 +- src/xrpld/rpc/detail/Handler.h | 4 +- src/xrpld/rpc/detail/InfoSub.cpp | 6 +- src/xrpld/rpc/detail/LegacyPathFind.cpp | 4 +- src/xrpld/rpc/detail/LegacyPathFind.h | 4 +- src/xrpld/rpc/detail/MPTokenIssuanceID.cpp | 4 +- src/xrpld/rpc/detail/RPCCall.cpp | 12 +- src/xrpld/rpc/detail/RPCHandler.cpp | 4 +- src/xrpld/rpc/detail/RPCHelpers.cpp | 20 ++-- src/xrpld/rpc/detail/RPCHelpers.h | 6 +- src/xrpld/rpc/detail/RPCSub.cpp | 4 +- src/xrpld/rpc/detail/Role.cpp | 6 +- src/xrpld/rpc/detail/ServerHandler.cpp | 4 +- src/xrpld/rpc/detail/Status.cpp | 8 +- src/xrpld/rpc/detail/TransactionSign.cpp | 8 +- src/xrpld/rpc/detail/TransactionSign.h | 4 +- src/xrpld/rpc/detail/Tuning.h | 4 +- src/xrpld/rpc/detail/WSInfoSub.h | 4 +- src/xrpld/rpc/handlers/AMMInfo.cpp | 10 +- src/xrpld/rpc/handlers/AccountChannels.cpp | 6 +- .../rpc/handlers/AccountCurrenciesHandler.cpp | 4 +- src/xrpld/rpc/handlers/AccountInfo.cpp | 4 +- src/xrpld/rpc/handlers/AccountLines.cpp | 6 +- src/xrpld/rpc/handlers/AccountObjects.cpp | 4 +- src/xrpld/rpc/handlers/AccountOffers.cpp | 6 +- src/xrpld/rpc/handlers/AccountTx.cpp | 11 +- src/xrpld/rpc/handlers/BlackList.cpp | 4 +- src/xrpld/rpc/handlers/BookOffers.cpp | 4 +- src/xrpld/rpc/handlers/CanDelete.cpp | 4 +- src/xrpld/rpc/handlers/Connect.cpp | 4 +- src/xrpld/rpc/handlers/ConsensusInfo.cpp | 4 +- src/xrpld/rpc/handlers/DepositAuthorized.cpp | 4 +- src/xrpld/rpc/handlers/DoManifest.cpp | 4 +- src/xrpld/rpc/handlers/Feature1.cpp | 4 +- src/xrpld/rpc/handlers/Fee1.cpp | 6 +- src/xrpld/rpc/handlers/FetchInfo.cpp | 4 +- src/xrpld/rpc/handlers/GatewayBalances.cpp | 4 +- src/xrpld/rpc/handlers/GetAggregatePrice.cpp | 4 +- src/xrpld/rpc/handlers/GetCounts.cpp | 4 +- src/xrpld/rpc/handlers/GetCounts.h | 2 +- src/xrpld/rpc/handlers/Handlers.h | 4 +- src/xrpld/rpc/handlers/LedgerAccept.cpp | 4 +- .../rpc/handlers/LedgerCleanerHandler.cpp | 4 +- src/xrpld/rpc/handlers/LedgerClosed.cpp | 6 +- src/xrpld/rpc/handlers/LedgerCurrent.cpp | 4 +- src/xrpld/rpc/handlers/LedgerData.cpp | 4 +- src/xrpld/rpc/handlers/LedgerDiff.cpp | 6 +- src/xrpld/rpc/handlers/LedgerEntry.cpp | 4 +- src/xrpld/rpc/handlers/LedgerEntryHelpers.h | 4 +- src/xrpld/rpc/handlers/LedgerHandler.cpp | 8 +- src/xrpld/rpc/handlers/LedgerHandler.h | 4 +- src/xrpld/rpc/handlers/LedgerHeader.cpp | 4 +- src/xrpld/rpc/handlers/LedgerRequest.cpp | 4 +- src/xrpld/rpc/handlers/LogLevel.cpp | 4 +- src/xrpld/rpc/handlers/LogRotate.cpp | 4 +- src/xrpld/rpc/handlers/NFTOffers.cpp | 4 +- src/xrpld/rpc/handlers/NoRippleCheck.cpp | 4 +- src/xrpld/rpc/handlers/OwnerInfo.cpp | 4 +- src/xrpld/rpc/handlers/PathFind.cpp | 4 +- src/xrpld/rpc/handlers/PayChanClaim.cpp | 6 +- src/xrpld/rpc/handlers/Peers.cpp | 4 +- src/xrpld/rpc/handlers/Ping.cpp | 4 +- src/xrpld/rpc/handlers/Print.cpp | 4 +- src/xrpld/rpc/handlers/Random.cpp | 4 +- src/xrpld/rpc/handlers/Reservations.cpp | 4 +- src/xrpld/rpc/handlers/RipplePathFind.cpp | 4 +- src/xrpld/rpc/handlers/ServerDefinitions.cpp | 8 +- src/xrpld/rpc/handlers/ServerInfo.cpp | 4 +- src/xrpld/rpc/handlers/ServerState.cpp | 4 +- src/xrpld/rpc/handlers/SignFor.cpp | 4 +- src/xrpld/rpc/handlers/SignHandler.cpp | 4 +- src/xrpld/rpc/handlers/Simulate.cpp | 4 +- src/xrpld/rpc/handlers/Stop.cpp | 4 +- src/xrpld/rpc/handlers/Submit.cpp | 4 +- src/xrpld/rpc/handlers/SubmitMultiSigned.cpp | 4 +- src/xrpld/rpc/handlers/Subscribe.cpp | 4 +- src/xrpld/rpc/handlers/TransactionEntry.cpp | 4 +- src/xrpld/rpc/handlers/Tx.cpp | 6 +- src/xrpld/rpc/handlers/TxHistory.cpp | 4 +- src/xrpld/rpc/handlers/TxReduceRelay.cpp | 4 +- src/xrpld/rpc/handlers/UnlList.cpp | 4 +- src/xrpld/rpc/handlers/Unsubscribe.cpp | 4 +- src/xrpld/rpc/handlers/ValidationCreate.cpp | 4 +- src/xrpld/rpc/handlers/ValidatorInfo.cpp | 4 +- src/xrpld/rpc/handlers/ValidatorListSites.cpp | 4 +- src/xrpld/rpc/handlers/Validators.cpp | 4 +- src/xrpld/rpc/handlers/VaultInfo.cpp | 4 +- src/xrpld/rpc/handlers/Version.h | 4 +- src/xrpld/rpc/handlers/WalletPropose.cpp | 4 +- src/xrpld/rpc/handlers/WalletPropose.h | 4 +- src/xrpld/rpc/json_body.h | 4 +- src/xrpld/shamap/NodeFamily.cpp | 4 +- src/xrpld/shamap/NodeFamily.h | 4 +- tests/conan/src/example.cpp | 2 +- 1235 files changed, 3809 insertions(+), 3823 deletions(-) create mode 100755 .github/scripts/rename/namespace.sh diff --git a/.github/scripts/rename/README.md b/.github/scripts/rename/README.md index 7df661609b..526fc249a2 100644 --- a/.github/scripts/rename/README.md +++ b/.github/scripts/rename/README.md @@ -26,6 +26,8 @@ run from the repository root. references to `ripple` and `rippled` (with or without capital letters) to `xrpl` and `xrpld`, respectively. The name of the binary will remain as-is, and will only be renamed to `xrpld` by a later script. +4. `.github/scripts/rename/namespace.sh`: This script will rename the C++ + namespaces from `ripple` to `xrpl`. You can run all these scripts from the repository root as follows: @@ -33,4 +35,5 @@ You can run all these scripts from the repository root as follows: ./.github/scripts/rename/definitions.sh . ./.github/scripts/rename/copyright.sh . ./.github/scripts/rename/cmake.sh . +./.github/scripts/rename/namespace.sh . ``` diff --git a/.github/scripts/rename/namespace.sh b/.github/scripts/rename/namespace.sh new file mode 100755 index 0000000000..6dda6973a4 --- /dev/null +++ b/.github/scripts/rename/namespace.sh @@ -0,0 +1,53 @@ +#!/bin/bash + +# Exit the script as soon as an error occurs. +set -e + +# On MacOS, ensure that GNU sed is installed and available as `gsed`. +SED_COMMAND=sed +if [[ "$OSTYPE" == "darwin"* ]]; then + if ! command -v gsed &> /dev/null; then + echo "Error: gsed is not installed. Please install it using 'brew install gnu-sed'." + exit 1 + fi + SED_COMMAND=gsed +fi + +# This script renames the `ripple` namespace to `xrpl` in this project. +# Specifically, it renames all occurrences of `namespace ripple` and `ripple::` +# to `namespace xrpl` and `xrpl::`, respectively, by scanning all header and +# source files in the specified directory and its subdirectories, as well as any +# occurrences in the documentation. +# Usage: .github/scripts/rename/namespace.sh + +if [ "$#" -ne 1 ]; then + echo "Usage: $0 " + exit 1 +fi + +DIRECTORIES=("include" "src" "tests") +for DIRECTORY in "${DIRECTORIES[@]}"; do + DIRECTORY=$1/${DIRECTORY} + echo "Processing directory: ${DIRECTORY}" + if [ ! -d "${DIRECTORY}" ]; then + echo "Error: Directory '${DIRECTORY}' does not exist." + exit 1 + fi + + find "${DIRECTORY}" -type f \( -name "*.h" -o -name "*.hpp" -o -name "*.ipp" -o -name "*.cpp" \) | while read -r FILE; do + echo "Processing file: ${FILE}" + ${SED_COMMAND} -i 's/namespace ripple/namespace xrpl/g' "${FILE}" + ${SED_COMMAND} -i 's/ripple::/xrpl::/g' "${FILE}" + done +done + +DIRECTORY=$1 +find "${DIRECTORY}" -type f -name "*.md" | while read -r FILE; do + echo "Processing file: ${FILE}" + ${SED_COMMAND} -i 's/ripple::/xrpl::/g' "${FILE}" +done + +# Reformat the files. +pre-commit run + +echo "Renaming complete." diff --git a/.github/workflows/reusable-check-rename.yml b/.github/workflows/reusable-check-rename.yml index 0e42dc55ab..5e2ab7f3e4 100644 --- a/.github/workflows/reusable-check-rename.yml +++ b/.github/workflows/reusable-check-rename.yml @@ -25,6 +25,8 @@ jobs: run: .github/scripts/rename/copyright.sh . - name: Check CMake configs run: .github/scripts/rename/cmake.sh . + - name: Check namespaces + run: .github/scripts/rename/namespace.sh . - name: Check for differences env: MESSAGE: | diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a5e0933d00..a9a4429063 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -299,7 +299,7 @@ For this reason: - Example **bad** name `"RFC1751::insert(char* s, int x, int start, int length) : length is greater than or equal zero"` (missing namespace, unnecessary full function signature, description too verbose). - Good name: `"ripple::RFC1751::insert : minimum length"`. + Good name: `"xrpl::RFC1751::insert : minimum length"`. - In **few** well-justified cases a non-standard name can be used, in which case a comment should be placed to explain the rationale (example in `contract.cpp`) - Do **not** rename a contract without a good reason (e.g. the name no longer diff --git a/include/xrpl/basics/Archive.h b/include/xrpl/basics/Archive.h index 6dbb31f426..5f7c624084 100644 --- a/include/xrpl/basics/Archive.h +++ b/include/xrpl/basics/Archive.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { /** Extract a tar archive compressed with lz4 @@ -17,6 +17,6 @@ extractTarLz4( boost::filesystem::path const& src, boost::filesystem::path const& dst); -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/BasicConfig.h b/include/xrpl/basics/BasicConfig.h index 153936430a..573b26ae75 100644 --- a/include/xrpl/basics/BasicConfig.h +++ b/include/xrpl/basics/BasicConfig.h @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { using IniFileSections = std::unordered_map>; @@ -380,6 +380,6 @@ get_if_exists(Section const& section, std::string const& name, bool& v) return stat; } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/Blob.h b/include/xrpl/basics/Blob.h index c87a834fd4..986f829371 100644 --- a/include/xrpl/basics/Blob.h +++ b/include/xrpl/basics/Blob.h @@ -3,13 +3,13 @@ #include -namespace ripple { +namespace xrpl { /** Storage for linear binary data. Blocks of binary data appear often in various idioms and structures. */ using Blob = std::vector; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/Buffer.h b/include/xrpl/basics/Buffer.h index c72ebba174..8ae745f6d1 100644 --- a/include/xrpl/basics/Buffer.h +++ b/include/xrpl/basics/Buffer.h @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Like std::vector but better. Meets the requirements of BufferFactory. @@ -96,7 +96,7 @@ public: XRPL_ASSERT( s.size() == 0 || size_ == 0 || s.data() < p_.get() || s.data() >= p_.get() + size_, - "ripple::Buffer::operator=(Slice) : input not a subset"); + "xrpl::Buffer::operator=(Slice) : input not a subset"); if (auto p = alloc(s.size())) std::memcpy(p, s.data(), s.size()); @@ -215,6 +215,6 @@ operator!=(Buffer const& lhs, Buffer const& rhs) noexcept return !(lhs == rhs); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/ByteUtilities.h b/include/xrpl/basics/ByteUtilities.h index 45df242720..88bb297346 100644 --- a/include/xrpl/basics/ByteUtilities.h +++ b/include/xrpl/basics/ByteUtilities.h @@ -1,7 +1,7 @@ #ifndef XRPL_BASICS_BYTEUTILITIES_H_INCLUDED #define XRPL_BASICS_BYTEUTILITIES_H_INCLUDED -namespace ripple { +namespace xrpl { template constexpr auto @@ -19,6 +19,6 @@ megabytes(T value) noexcept static_assert(kilobytes(2) == 2048, "kilobytes(2) == 2048"); static_assert(megabytes(3) == 3145728, "megabytes(3) == 3145728"); -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/CompressionAlgorithms.h b/include/xrpl/basics/CompressionAlgorithms.h index 77747e1684..b373ac4605 100644 --- a/include/xrpl/basics/CompressionAlgorithms.h +++ b/include/xrpl/basics/CompressionAlgorithms.h @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace compression_algorithms { @@ -144,6 +144,6 @@ lz4Decompress( } // namespace compression_algorithms -} // namespace ripple +} // namespace xrpl #endif // XRPL_COMPRESSIONALGORITHMS_H_INCLUDED diff --git a/include/xrpl/basics/CountedObject.h b/include/xrpl/basics/CountedObject.h index d3a4f53caa..e464e470af 100644 --- a/include/xrpl/basics/CountedObject.h +++ b/include/xrpl/basics/CountedObject.h @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Manages all counted object types. */ class CountedObjects @@ -133,6 +133,6 @@ public: } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/DecayingSample.h b/include/xrpl/basics/DecayingSample.h index 78a50e9df2..c5e38d2e9a 100644 --- a/include/xrpl/basics/DecayingSample.h +++ b/include/xrpl/basics/DecayingSample.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Sampling function using exponential decay to provide a continuous value. @tparam The number of seconds in the decay window. @@ -131,6 +131,6 @@ private: time_point when_; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/Expected.h b/include/xrpl/basics/Expected.h index 8f3d026d9c..8cf479c1b6 100644 --- a/include/xrpl/basics/Expected.h +++ b/include/xrpl/basics/Expected.h @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { /** Expected is an approximation of std::expected (hoped for in C++23) @@ -232,6 +232,6 @@ public: } }; -} // namespace ripple +} // namespace xrpl #endif // XRPL_BASICS_EXPECTED_H_INCLUDED diff --git a/include/xrpl/basics/FileUtilities.h b/include/xrpl/basics/FileUtilities.h index 8fb1368bfd..c4bc2cbe68 100644 --- a/include/xrpl/basics/FileUtilities.h +++ b/include/xrpl/basics/FileUtilities.h @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { std::string getFileContents( @@ -20,6 +20,6 @@ writeFileContents( boost::filesystem::path const& destPath, std::string const& contents); -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/IntrusivePointer.h b/include/xrpl/basics/IntrusivePointer.h index 9e34c901f3..24521b95a7 100644 --- a/include/xrpl/basics/IntrusivePointer.h +++ b/include/xrpl/basics/IntrusivePointer.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { //------------------------------------------------------------------------------ @@ -492,5 +492,5 @@ dynamic_pointer_cast(TT const& v) return SharedPtr(DynamicCastTagSharedIntrusive{}, v); } } // namespace intr_ptr -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/IntrusivePointer.ipp b/include/xrpl/basics/IntrusivePointer.ipp index 7b0787634c..cfebb559fd 100644 --- a/include/xrpl/basics/IntrusivePointer.ipp +++ b/include/xrpl/basics/IntrusivePointer.ipp @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { template template @@ -608,7 +608,7 @@ SharedWeakUnion::convertToStrong() [[maybe_unused]] auto action = p->releaseWeakRef(); XRPL_ASSERT( (action == ReleaseWeakRefAction::noop), - "ripple::SharedWeakUnion::convertToStrong : " + "xrpl::SharedWeakUnion::convertToStrong : " "action is noop"); unsafeSetRawPtr(p, RefStrength::strong); return true; @@ -637,7 +637,7 @@ SharedWeakUnion::convertToWeak() // We just added a weak ref. How could we destroy? // LCOV_EXCL_START UNREACHABLE( - "ripple::SharedWeakUnion::convertToWeak : destroying freshly " + "xrpl::SharedWeakUnion::convertToWeak : destroying freshly " "added ref"); delete p; unsafeSetRawPtr(nullptr); @@ -719,5 +719,5 @@ SharedWeakUnion::unsafeReleaseNoStore() } } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/IntrusiveRefCounts.h b/include/xrpl/basics/IntrusiveRefCounts.h index 653d149843..630c08395d 100644 --- a/include/xrpl/basics/IntrusiveRefCounts.h +++ b/include/xrpl/basics/IntrusiveRefCounts.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Action to perform when releasing a strong pointer. @@ -34,7 +34,7 @@ enum class ReleaseWeakRefAction { noop, destroy }; /** Implement the strong count, weak count, and bit flags for an intrusive pointer. - A class can satisfy the requirements of a ripple::IntrusivePointer by + A class can satisfy the requirements of a xrpl::IntrusivePointer by inheriting from this class. */ struct IntrusiveRefCounts @@ -257,7 +257,7 @@ IntrusiveRefCounts::releaseStrongRef() const RefCountPair const prevVal{prevIntVal}; XRPL_ASSERT( (prevVal.strong >= strongDelta), - "ripple::IntrusiveRefCounts::releaseStrongRef : previous ref " + "xrpl::IntrusiveRefCounts::releaseStrongRef : previous ref " "higher than new"); auto nextIntVal = prevIntVal - strongDelta; ReleaseStrongRefAction action = noop; @@ -282,7 +282,7 @@ IntrusiveRefCounts::releaseStrongRef() const // twice. XRPL_ASSERT( (action == noop) || !(prevIntVal & partialDestroyStartedMask), - "ripple::IntrusiveRefCounts::releaseStrongRef : not in partial " + "xrpl::IntrusiveRefCounts::releaseStrongRef : not in partial " "destroy"); return action; } @@ -314,7 +314,7 @@ IntrusiveRefCounts::addWeakReleaseStrongRef() const // can't happen twice. XRPL_ASSERT( (!prevVal.partialDestroyStartedBit), - "ripple::IntrusiveRefCounts::addWeakReleaseStrongRef : not in " + "xrpl::IntrusiveRefCounts::addWeakReleaseStrongRef : not in " "partial destroy"); auto nextIntVal = prevIntVal + delta; @@ -336,7 +336,7 @@ IntrusiveRefCounts::addWeakReleaseStrongRef() const { XRPL_ASSERT( (!(prevIntVal & partialDestroyStartedMask)), - "ripple::IntrusiveRefCounts::addWeakReleaseStrongRef : not " + "xrpl::IntrusiveRefCounts::addWeakReleaseStrongRef : not " "started partial destroy"); return action; } @@ -408,11 +408,11 @@ inline IntrusiveRefCounts::~IntrusiveRefCounts() noexcept auto v = refCounts.load(std::memory_order_acquire); XRPL_ASSERT( (!(v & valueMask)), - "ripple::IntrusiveRefCounts::~IntrusiveRefCounts : count must be zero"); + "xrpl::IntrusiveRefCounts::~IntrusiveRefCounts : count must be zero"); auto t = v & tagMask; XRPL_ASSERT( (!t || t == tagMask), - "ripple::IntrusiveRefCounts::~IntrusiveRefCounts : valid tag"); + "xrpl::IntrusiveRefCounts::~IntrusiveRefCounts : valid tag"); #endif } @@ -427,7 +427,7 @@ inline IntrusiveRefCounts::RefCountPair::RefCountPair( { XRPL_ASSERT( (strong < checkStrongMaxValue && weak < checkWeakMaxValue), - "ripple::IntrusiveRefCounts::RefCountPair(FieldType) : inputs inside " + "xrpl::IntrusiveRefCounts::RefCountPair(FieldType) : inputs inside " "range"); } @@ -438,7 +438,7 @@ inline IntrusiveRefCounts::RefCountPair::RefCountPair( { XRPL_ASSERT( (strong < checkStrongMaxValue && weak < checkWeakMaxValue), - "ripple::IntrusiveRefCounts::RefCountPair(CountType, CountType) : " + "xrpl::IntrusiveRefCounts::RefCountPair(CountType, CountType) : " "inputs inside range"); } @@ -447,7 +447,7 @@ IntrusiveRefCounts::RefCountPair::combinedValue() const noexcept { XRPL_ASSERT( (strong < checkStrongMaxValue && weak < checkWeakMaxValue), - "ripple::IntrusiveRefCounts::RefCountPair::combinedValue : inputs " + "xrpl::IntrusiveRefCounts::RefCountPair::combinedValue : inputs " "inside range"); return (static_cast(weak) << IntrusiveRefCounts::StrongCountNumBits) | @@ -465,7 +465,7 @@ partialDestructorFinished(T** o) XRPL_ASSERT( (!p.partialDestroyFinishedBit && p.partialDestroyStartedBit && !p.strong), - "ripple::partialDestructorFinished : not a weak ref"); + "xrpl::partialDestructorFinished : not a weak ref"); if (!p.weak) { // There was a weak count before the partial destructor ran (or we would @@ -479,5 +479,5 @@ partialDestructorFinished(T** o) } //------------------------------------------------------------------------------ -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/KeyCache.h b/include/xrpl/basics/KeyCache.h index 1ab908256f..038bf7b9b7 100644 --- a/include/xrpl/basics/KeyCache.h +++ b/include/xrpl/basics/KeyCache.h @@ -4,10 +4,10 @@ #include #include -namespace ripple { +namespace xrpl { using KeyCache = TaggedCache; -} // namespace ripple +} // namespace xrpl #endif // XRPL_BASICS_KEYCACHE_H diff --git a/include/xrpl/basics/LocalValue.h b/include/xrpl/basics/LocalValue.h index 56026231ac..cc7c646fb0 100644 --- a/include/xrpl/basics/LocalValue.h +++ b/include/xrpl/basics/LocalValue.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { @@ -109,6 +109,6 @@ LocalValue::operator*() .emplace(this, std::make_unique>(t_)) .first->second->get()); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/Log.h b/include/xrpl/basics/Log.h index 134f1695d3..9443e8afdf 100644 --- a/include/xrpl/basics/Log.h +++ b/include/xrpl/basics/Log.h @@ -13,7 +13,7 @@ #include #include -namespace ripple { +namespace xrpl { // DEPRECATED use beast::severities::Severity instead enum LogSeverity { @@ -271,6 +271,6 @@ setDebugLogSink(std::unique_ptr sink); beast::Journal debugLog(); -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/MathUtilities.h b/include/xrpl/basics/MathUtilities.h index 99d99a15cd..bd8ea883fb 100644 --- a/include/xrpl/basics/MathUtilities.h +++ b/include/xrpl/basics/MathUtilities.h @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Calculate one number divided by another number in percentage. * The result is rounded up to the next integer, and capped in the range [0,100] @@ -44,6 +44,6 @@ static_assert(calculatePercent(50'000'000, 100'000'000) == 50); static_assert(calculatePercent(50'000'001, 100'000'000) == 51); static_assert(calculatePercent(99'999'999, 100'000'000) == 100); -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/Number.h b/include/xrpl/basics/Number.h index e34cc61b5b..38aae5f508 100644 --- a/include/xrpl/basics/Number.h +++ b/include/xrpl/basics/Number.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { class Number; @@ -404,6 +404,6 @@ public: operator=(NumberRoundModeGuard const&) = delete; }; -} // namespace ripple +} // namespace xrpl #endif // XRPL_BASICS_NUMBER_H_INCLUDED diff --git a/include/xrpl/basics/README.md b/include/xrpl/basics/README.md index 290bb7ad0c..f8b19522cd 100644 --- a/include/xrpl/basics/README.md +++ b/include/xrpl/basics/README.md @@ -21,11 +21,11 @@ ripple/basic should contain no dependencies on other modules. - `std::set` - For sorted containers. -- `ripple::hash_set` +- `xrpl::hash_set` - Where inserts and contains need to be O(1). - For "small" sets, `std::set` might be faster and smaller. -- `ripple::hardened_hash_set` +- `xrpl::hardened_hash_set` - For data sets where the key could be manipulated by an attacker in an attempt to mount an algorithmic complexity attack: see http://en.wikipedia.org/wiki/Algorithmic_complexity_attack @@ -33,5 +33,5 @@ ripple/basic should contain no dependencies on other modules. The following container is deprecated - `std::unordered_set` -- Use `ripple::hash_set` instead, which uses a better hashing algorithm. -- Or use `ripple::hardened_hash_set` to prevent algorithmic complexity attacks. +- Use `xrpl::hash_set` instead, which uses a better hashing algorithm. +- Or use `xrpl::hardened_hash_set` to prevent algorithmic complexity attacks. diff --git a/include/xrpl/basics/RangeSet.h b/include/xrpl/basics/RangeSet.h index a77c5b403e..ee95577271 100644 --- a/include/xrpl/basics/RangeSet.h +++ b/include/xrpl/basics/RangeSet.h @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { /** A closed interval over the domain T. @@ -85,7 +85,7 @@ to_string(RangeSet const& rs) std::string s; for (auto const& interval : rs) - s += ripple::to_string(interval) + ","; + s += xrpl::to_string(interval) + ","; s.pop_back(); return s; @@ -172,6 +172,6 @@ prevMissing(RangeSet const& rs, T t, T minVal = 0) return boost::icl::last(tgt); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/Resolver.h b/include/xrpl/basics/Resolver.h index fc529887b0..088b2e1d5b 100644 --- a/include/xrpl/basics/Resolver.h +++ b/include/xrpl/basics/Resolver.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { class Resolver { @@ -47,6 +47,6 @@ public: /** @} */ }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/ResolverAsio.h b/include/xrpl/basics/ResolverAsio.h index b609c11b1b..f2a3da0d58 100644 --- a/include/xrpl/basics/ResolverAsio.h +++ b/include/xrpl/basics/ResolverAsio.h @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { class ResolverAsio : public Resolver { @@ -17,6 +17,6 @@ public: New(boost::asio::io_context&, beast::Journal); }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/SHAMapHash.h b/include/xrpl/basics/SHAMapHash.h index 12aef37dd0..eb635b516c 100644 --- a/include/xrpl/basics/SHAMapHash.h +++ b/include/xrpl/basics/SHAMapHash.h @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { // A SHAMapHash is the hash of a node in a SHAMap, and also the // type of the hash of the entire SHAMap. @@ -97,6 +97,6 @@ extract(SHAMapHash const& key) return *reinterpret_cast(key.as_uint256().data()); } -} // namespace ripple +} // namespace xrpl #endif // XRPL_BASICS_SHAMAP_HASH_H_INCLUDED diff --git a/include/xrpl/basics/SharedWeakCachePointer.h b/include/xrpl/basics/SharedWeakCachePointer.h index dbac85a2a9..49369265eb 100644 --- a/include/xrpl/basics/SharedWeakCachePointer.h +++ b/include/xrpl/basics/SharedWeakCachePointer.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { /** A combination of a std::shared_ptr and a std::weak_pointer. @@ -112,5 +112,5 @@ public: private: std::variant, std::weak_ptr> combo_; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/SharedWeakCachePointer.ipp b/include/xrpl/basics/SharedWeakCachePointer.ipp index 59f5882637..376bf73251 100644 --- a/include/xrpl/basics/SharedWeakCachePointer.ipp +++ b/include/xrpl/basics/SharedWeakCachePointer.ipp @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { template SharedWeakCachePointer::SharedWeakCachePointer( SharedWeakCachePointer const& rhs) = default; @@ -169,5 +169,5 @@ SharedWeakCachePointer::convertToWeak() return false; } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/SlabAllocator.h b/include/xrpl/basics/SlabAllocator.h index b85b2149ca..8813d2ac36 100644 --- a/include/xrpl/basics/SlabAllocator.h +++ b/include/xrpl/basics/SlabAllocator.h @@ -22,7 +22,7 @@ #include #endif -namespace ripple { +namespace xrpl { template class SlabAllocator @@ -128,7 +128,7 @@ class SlabAllocator { XRPL_ASSERT( own(ptr), - "ripple::SlabAllocator::SlabBlock::deallocate : own input"); + "xrpl::SlabAllocator::SlabBlock::deallocate : own input"); std::lock_guard l(m_); @@ -173,7 +173,7 @@ public: { XRPL_ASSERT( (itemAlignment_ & (itemAlignment_ - 1)) == 0, - "ripple::SlabAllocator::SlabAllocator : valid alignment"); + "xrpl::SlabAllocator::SlabAllocator : valid alignment"); } SlabAllocator(SlabAllocator const& other) = delete; @@ -285,7 +285,7 @@ public: { XRPL_ASSERT( ptr, - "ripple::SlabAllocator::SlabAllocator::deallocate : non-null " + "xrpl::SlabAllocator::SlabAllocator::deallocate : non-null " "input"); for (auto slab = slabs_.load(); slab != nullptr; slab = slab->next_) @@ -419,6 +419,6 @@ public: } }; -} // namespace ripple +} // namespace xrpl #endif // XRPL_BASICS_SLABALLOCATOR_H_INCLUDED diff --git a/include/xrpl/basics/Slice.h b/include/xrpl/basics/Slice.h index 7733acab8e..aa98b0a358 100644 --- a/include/xrpl/basics/Slice.h +++ b/include/xrpl/basics/Slice.h @@ -15,7 +15,7 @@ #include #include -namespace ripple { +namespace xrpl { /** An immutable linear range of bytes. @@ -87,7 +87,7 @@ public: { XRPL_ASSERT( i < size_, - "ripple::Slice::operator[](std::size_t) const : valid input"); + "xrpl::Slice::operator[](std::size_t) const : valid input"); return data_[i]; } @@ -243,6 +243,6 @@ makeSlice(std::basic_string const& s) return Slice(s.data(), s.size()); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/StringUtilities.h b/include/xrpl/basics/StringUtilities.h index a38107909a..ebe07e43bc 100644 --- a/include/xrpl/basics/StringUtilities.h +++ b/include/xrpl/basics/StringUtilities.h @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Format arbitrary binary data as an SQLite "blob literal". @@ -132,6 +132,6 @@ to_uint64(std::string const& s); bool isProperlyFormedTomlDomain(std::string_view domain); -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/TaggedCache.h b/include/xrpl/basics/TaggedCache.h index 77b8b3c6d4..c1d4d26800 100644 --- a/include/xrpl/basics/TaggedCache.h +++ b/include/xrpl/basics/TaggedCache.h @@ -16,7 +16,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Map/cache combination. This class implements a cache and a map. The cache keeps objects alive @@ -315,6 +315,6 @@ private: std::uint64_t m_misses; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/TaggedCache.ipp b/include/xrpl/basics/TaggedCache.ipp index 558198883c..5114479921 100644 --- a/include/xrpl/basics/TaggedCache.ipp +++ b/include/xrpl/basics/TaggedCache.ipp @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { template < class Key, @@ -1005,6 +1005,6 @@ TaggedCache< }); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/ToString.h b/include/xrpl/basics/ToString.h index dc6903aa8a..fe3a6a0893 100644 --- a/include/xrpl/basics/ToString.h +++ b/include/xrpl/basics/ToString.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { /** to_string() generalizes std::to_string to handle bools, chars, and strings. @@ -43,6 +43,6 @@ to_string(char const* s) return s; } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/UnorderedContainers.h b/include/xrpl/basics/UnorderedContainers.h index 3b847e4fbb..fdd2518b1e 100644 --- a/include/xrpl/basics/UnorderedContainers.h +++ b/include/xrpl/basics/UnorderedContainers.h @@ -22,7 +22,7 @@ * what container it is. */ -namespace ripple { +namespace xrpl { // hash containers @@ -102,6 +102,6 @@ template < using hardened_hash_multiset = std::unordered_multiset; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/UptimeClock.h b/include/xrpl/basics/UptimeClock.h index 36f4897663..9e1ef10d19 100644 --- a/include/xrpl/basics/UptimeClock.h +++ b/include/xrpl/basics/UptimeClock.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Tracks program uptime to seconds precision. @@ -45,6 +45,6 @@ private: start_clock(); }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/algorithm.h b/include/xrpl/basics/algorithm.h index ad59e9c282..d62ff17a75 100644 --- a/include/xrpl/basics/algorithm.h +++ b/include/xrpl/basics/algorithm.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { // Requires: [first1, last1) and [first2, last2) are ordered ranges according to // comp. @@ -95,6 +95,6 @@ remove_if_intersect_or_match( return first1; } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/base64.h b/include/xrpl/basics/base64.h index 0aa19e9e61..340e282f87 100644 --- a/include/xrpl/basics/base64.h +++ b/include/xrpl/basics/base64.h @@ -38,7 +38,7 @@ #include #include -namespace ripple { +namespace xrpl { std::string base64_encode(std::uint8_t const* data, std::size_t len); @@ -53,6 +53,6 @@ base64_encode(std::string const& s) std::string base64_decode(std::string_view data); -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/base_uint.h b/include/xrpl/basics/base_uint.h index 48c8030f57..f92e9ec611 100644 --- a/include/xrpl/basics/base_uint.h +++ b/include/xrpl/basics/base_uint.h @@ -23,7 +23,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { @@ -275,7 +275,7 @@ public: { XRPL_ASSERT( c.size() * sizeof(typename Container::value_type) == size(), - "ripple::base_uint::base_uint(Container auto) : input size match"); + "xrpl::base_uint::base_uint(Container auto) : input size match"); std::memcpy(data_.data(), c.data(), size()); } @@ -288,7 +288,7 @@ public: { XRPL_ASSERT( c.size() * sizeof(typename Container::value_type) == size(), - "ripple::base_uint::operator=(Container auto) : input size match"); + "xrpl::base_uint::operator=(Container auto) : input size match"); std::memcpy(data_.data(), c.data(), size()); return *this; } @@ -648,12 +648,12 @@ static_assert(sizeof(uint192) == 192 / 8, "There should be no padding bytes"); static_assert(sizeof(uint256) == 256 / 8, "There should be no padding bytes"); #endif -} // namespace ripple +} // namespace xrpl namespace beast { template -struct is_uniquely_represented> +struct is_uniquely_represented> : public std::true_type { explicit is_uniquely_represented() = default; diff --git a/include/xrpl/basics/chrono.h b/include/xrpl/basics/chrono.h index 46b36ffb57..e343e8b49f 100644 --- a/include/xrpl/basics/chrono.h +++ b/include/xrpl/basics/chrono.h @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { // A few handy aliases @@ -104,6 +104,6 @@ stopwatch() return beast::get_abstract_clock(); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/comparators.h b/include/xrpl/basics/comparators.h index 6b1d693e65..ecc762d6fa 100644 --- a/include/xrpl/basics/comparators.h +++ b/include/xrpl/basics/comparators.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { #ifdef _MSC_VER @@ -52,6 +52,6 @@ using equal_to = std::equal_to; #endif -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/contract.h b/include/xrpl/basics/contract.h index a0409ee6d7..63d1bb5a84 100644 --- a/include/xrpl/basics/contract.h +++ b/include/xrpl/basics/contract.h @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { /* Programming By Contract @@ -52,6 +52,6 @@ Throw(Args&&... args) [[noreturn]] void LogicError(std::string const& how) noexcept; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/hardened_hash.h b/include/xrpl/basics/hardened_hash.h index c21cd48053..a25dcb3c34 100644 --- a/include/xrpl/basics/hardened_hash.h +++ b/include/xrpl/basics/hardened_hash.h @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { @@ -92,6 +92,6 @@ public: } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/join.h b/include/xrpl/basics/join.h index a4a537d6d0..79f716ec43 100644 --- a/include/xrpl/basics/join.h +++ b/include/xrpl/basics/join.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { template Stream& @@ -85,6 +85,6 @@ public: } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/make_SSLContext.h b/include/xrpl/basics/make_SSLContext.h index 6e25cfcac1..fb91dd40a9 100644 --- a/include/xrpl/basics/make_SSLContext.h +++ b/include/xrpl/basics/make_SSLContext.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { /** Create a self-signed SSL context that allows anonymous Diffie Hellman. */ std::shared_ptr @@ -19,6 +19,6 @@ make_SSLContextAuthed( std::string const& chainFile, std::string const& cipherList); -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/mulDiv.h b/include/xrpl/basics/mulDiv.h index 0ac9bb5ebc..fb38d0cd63 100644 --- a/include/xrpl/basics/mulDiv.h +++ b/include/xrpl/basics/mulDiv.h @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { auto constexpr muldiv_max = std::numeric_limits::max(); /** Return value*mul/div accurately. @@ -21,6 +21,6 @@ auto constexpr muldiv_max = std::numeric_limits::max(); std::optional mulDiv(std::uint64_t value, std::uint64_t mul, std::uint64_t div); -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/partitioned_unordered_map.h b/include/xrpl/basics/partitioned_unordered_map.h index 01872963fd..518686c533 100644 --- a/include/xrpl/basics/partitioned_unordered_map.h +++ b/include/xrpl/basics/partitioned_unordered_map.h @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { template static std::size_t @@ -242,7 +242,7 @@ public: map_.resize(partitions_); XRPL_ASSERT( partitions_, - "ripple::partitioned_unordered_map::partitioned_unordered_map : " + "xrpl::partitioned_unordered_map::partitioned_unordered_map : " "nonzero partitions"); } @@ -401,6 +401,6 @@ private: mutable partition_map_type map_{}; }; -} // namespace ripple +} // namespace xrpl #endif // XRPL_BASICS_PARTITIONED_UNORDERED_MAP_H diff --git a/include/xrpl/basics/random.h b/include/xrpl/basics/random.h index 19f8b57285..737b8fef59 100644 --- a/include/xrpl/basics/random.h +++ b/include/xrpl/basics/random.h @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { #ifndef __INTELLISENSE__ static_assert( @@ -95,7 +95,7 @@ std::enable_if_t< Integral> rand_int(Engine& engine, Integral min, Integral max) { - XRPL_ASSERT(max > min, "ripple::rand_int : max over min inputs"); + XRPL_ASSERT(max > min, "xrpl::rand_int : max over min inputs"); // This should have no state and constructing it should // be very cheap. If that turns out not to be the case @@ -186,6 +186,6 @@ rand_bool() } /** @} */ -} // namespace ripple +} // namespace xrpl #endif // XRPL_BASICS_RANDOM_H_INCLUDED diff --git a/include/xrpl/basics/safe_cast.h b/include/xrpl/basics/safe_cast.h index 1da44920ac..89de0eda6a 100644 --- a/include/xrpl/basics/safe_cast.h +++ b/include/xrpl/basics/safe_cast.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { // safe_cast adds compile-time checks to a static_cast to ensure that // the destination can hold all values of the source. This is particularly @@ -80,6 +80,6 @@ inline constexpr std:: return unsafe_cast(static_cast>(s)); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/scope.h b/include/xrpl/basics/scope.h index 710b31ec80..b7299a28fc 100644 --- a/include/xrpl/basics/scope.h +++ b/include/xrpl/basics/scope.h @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { // RAII scope helpers. As specified in Library Fundamental, Version 3 // Basic design of idea: https://www.youtube.com/watch?v=WjTrfoiB0MQ @@ -218,7 +218,7 @@ public: { XRPL_ASSERT( plock->owns_lock(), - "ripple::scope_unlock::scope_unlock : mutex must be locked"); + "xrpl::scope_unlock::scope_unlock : mutex must be locked"); plock->unlock(); } @@ -236,6 +236,6 @@ public: template scope_unlock(std::unique_lock&) -> scope_unlock; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/spinlock.h b/include/xrpl/basics/spinlock.h index 9ae7b0bb70..71ab29f381 100644 --- a/include/xrpl/basics/spinlock.h +++ b/include/xrpl/basics/spinlock.h @@ -13,7 +13,7 @@ #include #endif -namespace ripple { +namespace xrpl { namespace detail { /** Inform the processor that we are in a tight spin-wait loop. @@ -105,7 +105,7 @@ public: { XRPL_ASSERT( index >= 0 && (mask_ != 0), - "ripple::packed_spinlock::packed_spinlock : valid index and mask"); + "xrpl::packed_spinlock::packed_spinlock : valid index and mask"); } [[nodiscard]] bool @@ -206,6 +206,6 @@ public: }; /** @} */ -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/strHex.h b/include/xrpl/basics/strHex.h index bfba76003e..1c1d94bf32 100644 --- a/include/xrpl/basics/strHex.h +++ b/include/xrpl/basics/strHex.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { template std::string @@ -28,6 +28,6 @@ strHex(T const& from) return strHex(from.begin(), from.end()); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/basics/tagged_integer.h b/include/xrpl/basics/tagged_integer.h index 1ad5279469..1d40b31cce 100644 --- a/include/xrpl/basics/tagged_integer.h +++ b/include/xrpl/basics/tagged_integer.h @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { /** A type-safe wrap around standard integral types @@ -197,11 +197,11 @@ public: } }; -} // namespace ripple +} // namespace xrpl namespace beast { template -struct is_contiguously_hashable, HashAlgorithm> +struct is_contiguously_hashable, HashAlgorithm> : public is_contiguously_hashable { explicit is_contiguously_hashable() = default; diff --git a/include/xrpl/crypto/RFC1751.h b/include/xrpl/crypto/RFC1751.h index 14c49d7fa9..a413c2ac8a 100644 --- a/include/xrpl/crypto/RFC1751.h +++ b/include/xrpl/crypto/RFC1751.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { class RFC1751 { @@ -42,6 +42,6 @@ private: static char const* s_dictionary[]; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/crypto/csprng.h b/include/xrpl/crypto/csprng.h index cc5545750d..dc89da4f61 100644 --- a/include/xrpl/crypto/csprng.h +++ b/include/xrpl/crypto/csprng.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { /** A cryptographically secure random number engine @@ -70,6 +70,6 @@ public: csprng_engine& crypto_prng(); -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/crypto/secure_erase.h b/include/xrpl/crypto/secure_erase.h index 586a8e50e6..3ecde0c7fa 100644 --- a/include/xrpl/crypto/secure_erase.h +++ b/include/xrpl/crypto/secure_erase.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { /** Attempts to clear the given blob of memory. @@ -22,6 +22,6 @@ namespace ripple { void secure_erase(void* dest, std::size_t bytes); -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/json/JsonPropertyStream.h b/include/xrpl/json/JsonPropertyStream.h index a7fe52dfb8..54cfcbfa04 100644 --- a/include/xrpl/json/JsonPropertyStream.h +++ b/include/xrpl/json/JsonPropertyStream.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { /** A PropertyStream::Sink which produces a Json::Value of type objectValue. */ class JsonPropertyStream : public beast::PropertyStream @@ -66,6 +66,6 @@ protected: add(std::string const& v) override; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/json/Writer.h b/include/xrpl/json/Writer.h index 12599a14d3..ab52427a5b 100644 --- a/include/xrpl/json/Writer.h +++ b/include/xrpl/json/Writer.h @@ -234,7 +234,7 @@ inline void check(bool condition, std::string const& message) { if (!condition) - ripple::Throw(message); + xrpl::Throw(message); } } // namespace Json diff --git a/include/xrpl/json/detail/json_assert.h b/include/xrpl/json/detail/json_assert.h index bd111ad90f..3092b65452 100644 --- a/include/xrpl/json/detail/json_assert.h +++ b/include/xrpl/json/detail/json_assert.h @@ -6,6 +6,6 @@ #define JSON_ASSERT_MESSAGE(condition, message) \ if (!(condition)) \ - ripple::Throw(message); + xrpl::Throw(message); #endif diff --git a/include/xrpl/json/json_value.h b/include/xrpl/json/json_value.h index 878122c461..51f5e8a57a 100644 --- a/include/xrpl/json/json_value.h +++ b/include/xrpl/json/json_value.h @@ -198,7 +198,7 @@ public: Value(UInt value); Value(double value); Value(char const* value); - Value(ripple::Number const& value); + Value(xrpl::Number const& value); /** \brief Constructs a value from a static string. * Like other value string constructor but do not duplicate the string for @@ -422,7 +422,7 @@ private: }; inline Value -to_json(ripple::Number const& number) +to_json(xrpl::Number const& number) { return to_string(number); } diff --git a/include/xrpl/ledger/ApplyView.h b/include/xrpl/ledger/ApplyView.h index fc82e94b5c..1d29b27341 100644 --- a/include/xrpl/ledger/ApplyView.h +++ b/include/xrpl/ledger/ApplyView.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { enum ApplyFlags : std::uint32_t { tapNONE = 0x00, @@ -267,7 +267,7 @@ public: { // LCOV_EXCL_START UNREACHABLE( - "ripple::ApplyView::dirAppend : only Offers are appended to " + "xrpl::ApplyView::dirAppend : only Offers are appended to " "book directories"); // Only Offers are appended to book directories. Call dirInsert() // instead @@ -368,6 +368,6 @@ public: emptyDirDelete(Keylet const& directory); }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/ledger/ApplyViewImpl.h b/include/xrpl/ledger/ApplyViewImpl.h index c1e9ccd359..0c11726135 100644 --- a/include/xrpl/ledger/ApplyViewImpl.h +++ b/include/xrpl/ledger/ApplyViewImpl.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Editable, discardable view that can build metadata for one tx. @@ -75,6 +75,6 @@ private: std::optional deliver_; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/ledger/BookDirs.h b/include/xrpl/ledger/BookDirs.h index 1019d02f52..daa1ef172a 100644 --- a/include/xrpl/ledger/BookDirs.h +++ b/include/xrpl/ledger/BookDirs.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { class BookDirs { @@ -89,6 +89,6 @@ private: static beast::Journal j_; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/ledger/CachedSLEs.h b/include/xrpl/ledger/CachedSLEs.h index 0bec37f233..b478b78b7d 100644 --- a/include/xrpl/ledger/CachedSLEs.h +++ b/include/xrpl/ledger/CachedSLEs.h @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { using CachedSLEs = TaggedCache; } diff --git a/include/xrpl/ledger/CachedView.h b/include/xrpl/ledger/CachedView.h index 5e924d8bca..e3f652f776 100644 --- a/include/xrpl/ledger/CachedView.h +++ b/include/xrpl/ledger/CachedView.h @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { @@ -164,6 +164,6 @@ public: } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/ledger/CredentialHelpers.h b/include/xrpl/ledger/CredentialHelpers.h index 42376846ae..52ddfe33aa 100644 --- a/include/xrpl/ledger/CredentialHelpers.h +++ b/include/xrpl/ledger/CredentialHelpers.h @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace credentials { // These function will be used by the code that use DepositPreauth / Credentials @@ -93,6 +93,6 @@ verifyDepositPreauth( std::shared_ptr const& sleDst, beast::Journal j); -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/ledger/Dir.h b/include/xrpl/ledger/Dir.h index b421ac85e6..4b7327a015 100644 --- a/include/xrpl/ledger/Dir.h +++ b/include/xrpl/ledger/Dir.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { /** A class that simplifies iterating ledger directory pages @@ -108,6 +108,6 @@ private: std::vector::const_iterator it_; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/ledger/OpenView.h b/include/xrpl/ledger/OpenView.h index a1e9c201e8..399699c543 100644 --- a/include/xrpl/ledger/OpenView.h +++ b/include/xrpl/ledger/OpenView.h @@ -13,7 +13,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Open ledger construction tag. @@ -252,6 +252,6 @@ public: std::shared_ptr const& metaData) override; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/ledger/PaymentSandbox.h b/include/xrpl/ledger/PaymentSandbox.h index 03f1ec2d00..e1d197380d 100644 --- a/include/xrpl/ledger/PaymentSandbox.h +++ b/include/xrpl/ledger/PaymentSandbox.h @@ -8,7 +8,7 @@ #include -namespace ripple { +namespace xrpl { namespace detail { @@ -188,6 +188,6 @@ private: PaymentSandbox const* ps_ = nullptr; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/ledger/RawView.h b/include/xrpl/ledger/RawView.h index 94668b42a1..c0e81fb833 100644 --- a/include/xrpl/ledger/RawView.h +++ b/include/xrpl/ledger/RawView.h @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Interface for ledger entry changes. @@ -87,6 +87,6 @@ public: std::shared_ptr const& metaData) = 0; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/ledger/ReadView.h b/include/xrpl/ledger/ReadView.h index e8344ac4e2..9bd81b338a 100644 --- a/include/xrpl/ledger/ReadView.h +++ b/include/xrpl/ledger/ReadView.h @@ -18,7 +18,7 @@ #include #include -namespace ripple { +namespace xrpl { //------------------------------------------------------------------------------ @@ -258,7 +258,7 @@ makeRulesGivenLedger( DigestAwareReadView const& ledger, std::unordered_set> const& presets); -} // namespace ripple +} // namespace xrpl #include diff --git a/include/xrpl/ledger/Sandbox.h b/include/xrpl/ledger/Sandbox.h index 9c341c15c4..1e4a816529 100644 --- a/include/xrpl/ledger/Sandbox.h +++ b/include/xrpl/ledger/Sandbox.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Discardable, editable view to a ledger. @@ -39,6 +39,6 @@ public: } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/ledger/View.h b/include/xrpl/ledger/View.h index 9635115f0c..e55af10e9e 100644 --- a/include/xrpl/ledger/View.h +++ b/include/xrpl/ledger/View.h @@ -19,7 +19,7 @@ #include #include -namespace ripple { +namespace xrpl { enum class WaiveTransferFee : bool { No = false, Yes }; enum class SkipEntry : bool { No = false, Yes }; @@ -958,6 +958,6 @@ sharesToAssetsWithdraw( bool after(NetClock::time_point now, std::uint32_t mark); -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/ledger/detail/ApplyStateTable.h b/include/xrpl/ledger/detail/ApplyStateTable.h index 887e2e7770..f5ec0c9f51 100644 --- a/include/xrpl/ledger/detail/ApplyStateTable.h +++ b/include/xrpl/ledger/detail/ApplyStateTable.h @@ -11,7 +11,7 @@ #include -namespace ripple { +namespace xrpl { namespace detail { // Helper class that buffers modifications @@ -139,6 +139,6 @@ private: }; } // namespace detail -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/ledger/detail/ApplyViewBase.h b/include/xrpl/ledger/detail/ApplyViewBase.h index e5564d1e33..b133f1b353 100644 --- a/include/xrpl/ledger/detail/ApplyViewBase.h +++ b/include/xrpl/ledger/detail/ApplyViewBase.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { class ApplyViewBase : public ApplyView, public RawView @@ -106,6 +106,6 @@ protected: }; } // namespace detail -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/ledger/detail/RawStateTable.h b/include/xrpl/ledger/detail/RawStateTable.h index b89e6e58a9..19d2882a63 100644 --- a/include/xrpl/ledger/detail/RawStateTable.h +++ b/include/xrpl/ledger/detail/RawStateTable.h @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { // Helper class that buffers raw modifications @@ -118,6 +118,6 @@ private: }; } // namespace detail -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/ledger/detail/ReadViewFwdRange.h b/include/xrpl/ledger/detail/ReadViewFwdRange.h index 66984c8665..557bba4987 100644 --- a/include/xrpl/ledger/detail/ReadViewFwdRange.h +++ b/include/xrpl/ledger/detail/ReadViewFwdRange.h @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { class ReadView; @@ -130,6 +130,6 @@ protected: }; } // namespace detail -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/ledger/detail/ReadViewFwdRange.ipp b/include/xrpl/ledger/detail/ReadViewFwdRange.ipp index 451d612486..e86246133a 100644 --- a/include/xrpl/ledger/detail/ReadViewFwdRange.ipp +++ b/include/xrpl/ledger/detail/ReadViewFwdRange.ipp @@ -1,7 +1,7 @@ #ifndef XRPL_LEDGER_READVIEWFWDRANGEINL_H_INCLUDED #define XRPL_LEDGER_READVIEWFWDRANGEINL_H_INCLUDED -namespace ripple { +namespace xrpl { namespace detail { template @@ -63,7 +63,7 @@ ReadViewFwdRange::iterator::operator==(iterator const& other) const { XRPL_ASSERT( view_ == other.view_, - "ripple::detail::ReadViewFwdRange::iterator::operator==(iterator) " + "xrpl::detail::ReadViewFwdRange::iterator::operator==(iterator) " "const : input view match"); if (impl_ != nullptr && other.impl_ != nullptr) @@ -115,6 +115,6 @@ ReadViewFwdRange::iterator::operator++(int) -> iterator } } // namespace detail -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/net/AutoSocket.h b/include/xrpl/net/AutoSocket.h index 7cdef5ddd1..2fcba5780c 100644 --- a/include/xrpl/net/AutoSocket.h +++ b/include/xrpl/net/AutoSocket.h @@ -269,7 +269,7 @@ protected: error_code const& ec, size_t bytesTransferred) { - using namespace ripple; + using namespace xrpl; if (ec) { diff --git a/include/xrpl/net/HTTPClient.h b/include/xrpl/net/HTTPClient.h index fc0d416f02..6e4d4ce685 100644 --- a/include/xrpl/net/HTTPClient.h +++ b/include/xrpl/net/HTTPClient.h @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Provides an asynchronous HTTP client implementation with optional SSL. */ @@ -75,6 +75,6 @@ public: beast::Journal& j); }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/net/HTTPClientSSLContext.h b/include/xrpl/net/HTTPClientSSLContext.h index a22ee839b8..b8dfbd3e09 100644 --- a/include/xrpl/net/HTTPClientSSLContext.h +++ b/include/xrpl/net/HTTPClientSSLContext.h @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { class HTTPClientSSLContext { @@ -176,6 +176,6 @@ private: bool const verify_; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/net/RegisterSSLCerts.h b/include/xrpl/net/RegisterSSLCerts.h index 5b0879fe4d..f9b865c3aa 100644 --- a/include/xrpl/net/RegisterSSLCerts.h +++ b/include/xrpl/net/RegisterSSLCerts.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { /** Register default SSL certificates. Register the system default SSL root certificates. On linux/mac, @@ -19,6 +19,6 @@ registerSSLCerts( boost::system::error_code&, beast::Journal j); -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/nodestore/Backend.h b/include/xrpl/nodestore/Backend.h index 741145c9c9..0ea8835f61 100644 --- a/include/xrpl/nodestore/Backend.h +++ b/include/xrpl/nodestore/Backend.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace NodeStore { /** A backend used for the NodeStore. @@ -143,6 +143,6 @@ public: }; } // namespace NodeStore -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/nodestore/Database.h b/include/xrpl/nodestore/Database.h index b27bccf0f1..474f873876 100644 --- a/include/xrpl/nodestore/Database.h +++ b/include/xrpl/nodestore/Database.h @@ -11,7 +11,7 @@ #include -namespace ripple { +namespace xrpl { namespace NodeStore { @@ -230,7 +230,7 @@ protected: { XRPL_ASSERT( count <= sz, - "ripple::NodeStore::Database::storeStats : valid inputs"); + "xrpl::NodeStore::Database::storeStats : valid inputs"); storeCount_ += count; storeSz_ += sz; } @@ -291,6 +291,6 @@ private: }; } // namespace NodeStore -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/nodestore/DatabaseRotating.h b/include/xrpl/nodestore/DatabaseRotating.h index ea4a966dde..85202e7a84 100644 --- a/include/xrpl/nodestore/DatabaseRotating.h +++ b/include/xrpl/nodestore/DatabaseRotating.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace NodeStore { /* This class has two key-value store Backend objects for persisting SHAMap @@ -39,6 +39,6 @@ public: }; } // namespace NodeStore -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/nodestore/DummyScheduler.h b/include/xrpl/nodestore/DummyScheduler.h index a8d6fcec18..9ffe5ad80d 100644 --- a/include/xrpl/nodestore/DummyScheduler.h +++ b/include/xrpl/nodestore/DummyScheduler.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace NodeStore { /** Simple NodeStore Scheduler that just peforms the tasks synchronously. */ @@ -21,6 +21,6 @@ public: }; } // namespace NodeStore -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/nodestore/Factory.h b/include/xrpl/nodestore/Factory.h index 2309a0bf90..d6d33c4b64 100644 --- a/include/xrpl/nodestore/Factory.h +++ b/include/xrpl/nodestore/Factory.h @@ -8,7 +8,7 @@ #include -namespace ripple { +namespace xrpl { namespace NodeStore { @@ -61,6 +61,6 @@ public: }; } // namespace NodeStore -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/nodestore/Manager.h b/include/xrpl/nodestore/Manager.h index 6764967353..fe4b1c614e 100644 --- a/include/xrpl/nodestore/Manager.h +++ b/include/xrpl/nodestore/Manager.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace NodeStore { @@ -83,6 +83,6 @@ public: }; } // namespace NodeStore -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/nodestore/NodeObject.h b/include/xrpl/nodestore/NodeObject.h index 6e4eae2c81..6a69245fd2 100644 --- a/include/xrpl/nodestore/NodeObject.h +++ b/include/xrpl/nodestore/NodeObject.h @@ -7,7 +7,7 @@ // VFALCO NOTE Intentionally not in the NodeStore namespace -namespace ripple { +namespace xrpl { /** The types of node objects. */ enum NodeObjectType : std::uint32_t { @@ -81,6 +81,6 @@ private: Blob const mData; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/nodestore/Scheduler.h b/include/xrpl/nodestore/Scheduler.h index b9a9f8b5f4..0835e08fa2 100644 --- a/include/xrpl/nodestore/Scheduler.h +++ b/include/xrpl/nodestore/Scheduler.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace NodeStore { enum class FetchType { synchronous, async }; @@ -66,6 +66,6 @@ public: }; } // namespace NodeStore -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/nodestore/Task.h b/include/xrpl/nodestore/Task.h index 44b28ec9c6..bd21e61975 100644 --- a/include/xrpl/nodestore/Task.h +++ b/include/xrpl/nodestore/Task.h @@ -1,7 +1,7 @@ #ifndef XRPL_NODESTORE_TASK_H_INCLUDED #define XRPL_NODESTORE_TASK_H_INCLUDED -namespace ripple { +namespace xrpl { namespace NodeStore { /** Derived classes perform scheduled tasks. */ @@ -17,6 +17,6 @@ struct Task }; } // namespace NodeStore -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/nodestore/Types.h b/include/xrpl/nodestore/Types.h index 38481c14e8..6763196860 100644 --- a/include/xrpl/nodestore/Types.h +++ b/include/xrpl/nodestore/Types.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace NodeStore { enum { @@ -37,6 +37,6 @@ using Batch = std::vector>; } // namespace NodeStore -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/nodestore/detail/BatchWriter.h b/include/xrpl/nodestore/detail/BatchWriter.h index 3776029c25..f1faf0a612 100644 --- a/include/xrpl/nodestore/detail/BatchWriter.h +++ b/include/xrpl/nodestore/detail/BatchWriter.h @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace NodeStore { /** Batch-writing assist logic. @@ -78,6 +78,6 @@ private: }; } // namespace NodeStore -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/nodestore/detail/DatabaseNodeImp.h b/include/xrpl/nodestore/detail/DatabaseNodeImp.h index b70fbf640b..bf222129cc 100644 --- a/include/xrpl/nodestore/detail/DatabaseNodeImp.h +++ b/include/xrpl/nodestore/detail/DatabaseNodeImp.h @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace NodeStore { class DatabaseNodeImp : public Database @@ -59,7 +59,7 @@ public: XRPL_ASSERT( backend_, - "ripple::NodeStore::DatabaseNodeImp::DatabaseNodeImp : non-null " + "xrpl::NodeStore::DatabaseNodeImp::DatabaseNodeImp : non-null " "backend"); } @@ -138,6 +138,6 @@ private: }; } // namespace NodeStore -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/nodestore/detail/DatabaseRotatingImp.h b/include/xrpl/nodestore/detail/DatabaseRotatingImp.h index 847bc08dbc..63d628a30a 100644 --- a/include/xrpl/nodestore/detail/DatabaseRotatingImp.h +++ b/include/xrpl/nodestore/detail/DatabaseRotatingImp.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace NodeStore { class DatabaseRotatingImp : public DatabaseRotating @@ -79,6 +79,6 @@ private: }; } // namespace NodeStore -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/nodestore/detail/DecodedBlob.h b/include/xrpl/nodestore/detail/DecodedBlob.h index ed39bab39c..0eaa169269 100644 --- a/include/xrpl/nodestore/detail/DecodedBlob.h +++ b/include/xrpl/nodestore/detail/DecodedBlob.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace NodeStore { /** Parsed key/value blob into NodeObject components. @@ -43,6 +43,6 @@ private: }; } // namespace NodeStore -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/nodestore/detail/EncodedBlob.h b/include/xrpl/nodestore/detail/EncodedBlob.h index 64442bf8c6..2cd35a7b6f 100644 --- a/include/xrpl/nodestore/detail/EncodedBlob.h +++ b/include/xrpl/nodestore/detail/EncodedBlob.h @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace NodeStore { /** Convert a NodeObject from in-memory to database format. @@ -64,7 +64,7 @@ public: : size_([&obj]() { XRPL_ASSERT( obj, - "ripple::NodeStore::EncodedBlob::EncodedBlob : non-null input"); + "xrpl::NodeStore::EncodedBlob::EncodedBlob : non-null input"); if (!obj) throw std::runtime_error( @@ -87,7 +87,7 @@ public: XRPL_ASSERT( ((ptr_ == payload_.data()) && (size_ <= payload_.size())) || ((ptr_ != payload_.data()) && (size_ > payload_.size())), - "ripple::NodeStore::EncodedBlob::~EncodedBlob : valid payload " + "xrpl::NodeStore::EncodedBlob::~EncodedBlob : valid payload " "pointer"); if (ptr_ != payload_.data()) @@ -114,6 +114,6 @@ public: }; } // namespace NodeStore -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/nodestore/detail/ManagerImp.h b/include/xrpl/nodestore/detail/ManagerImp.h index 139ca903c2..fd3de8a7ca 100644 --- a/include/xrpl/nodestore/detail/ManagerImp.h +++ b/include/xrpl/nodestore/detail/ManagerImp.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace NodeStore { @@ -50,6 +50,6 @@ public: }; } // namespace NodeStore -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/nodestore/detail/codec.h b/include/xrpl/nodestore/detail/codec.h index f3e80c5a6a..e02d3963bd 100644 --- a/include/xrpl/nodestore/detail/codec.h +++ b/include/xrpl/nodestore/detail/codec.h @@ -18,7 +18,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace NodeStore { template @@ -322,6 +322,6 @@ filter_inner(void* in, std::size_t in_size) } } // namespace NodeStore -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/nodestore/detail/varint.h b/include/xrpl/nodestore/detail/varint.h index a8f19d0871..7cf9fbaf4b 100644 --- a/include/xrpl/nodestore/detail/varint.h +++ b/include/xrpl/nodestore/detail/varint.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace NodeStore { // This is a variant of the base128 varint format from @@ -118,6 +118,6 @@ write(nudb::detail::ostream& os, std::size_t t) } } // namespace NodeStore -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/AMMCore.h b/include/xrpl/protocol/AMMCore.h index a55ae5490d..e259089367 100644 --- a/include/xrpl/protocol/AMMCore.h +++ b/include/xrpl/protocol/AMMCore.h @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { std::uint16_t constexpr TRADING_FEE_THRESHOLD = 1000; // 1% @@ -102,6 +102,6 @@ feeMultHalf(std::uint16_t tfee) return 1 - getFee(tfee) / 2; } -} // namespace ripple +} // namespace xrpl #endif // XRPL_PROTOCOL_AMMCORE_H_INCLUDED diff --git a/include/xrpl/protocol/AccountID.h b/include/xrpl/protocol/AccountID.h index ddf044e2aa..d61938e2a7 100644 --- a/include/xrpl/protocol/AccountID.h +++ b/include/xrpl/protocol/AccountID.h @@ -13,7 +13,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { @@ -103,15 +103,15 @@ operator<<(std::ostream& os, AccountID const& x) void initAccountIdCache(std::size_t count); -} // namespace ripple +} // namespace xrpl //------------------------------------------------------------------------------ namespace Json { template <> -inline ripple::AccountID -getOrThrow(Json::Value const& v, ripple::SField const& field) +inline xrpl::AccountID +getOrThrow(Json::Value const& v, xrpl::SField const& field) { - using namespace ripple; + using namespace xrpl; std::string const b58 = getOrThrow(v, field); if (auto const r = parseBase58(b58)) @@ -127,7 +127,7 @@ namespace std { // DEPRECATED // VFALCO Use beast::uhash or a hardened container template <> -struct hash : ripple::AccountID::hasher +struct hash : xrpl::AccountID::hasher { hash() = default; }; diff --git a/include/xrpl/protocol/AmountConversions.h b/include/xrpl/protocol/AmountConversions.h index 3c870ed4b1..195e373fa0 100644 --- a/include/xrpl/protocol/AmountConversions.h +++ b/include/xrpl/protocol/AmountConversions.h @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { inline STAmount toSTAmount(IOUAmount const& iou, Issue const& iss) @@ -35,8 +35,7 @@ inline STAmount toSTAmount(XRPAmount const& xrp, Issue const& iss) { XRPL_ASSERT( - isXRP(iss.account) && isXRP(iss.currency), - "ripple::toSTAmount : is XRP"); + isXRP(iss.account) && isXRP(iss.currency), "xrpl::toSTAmount : is XRP"); return toSTAmount(xrp); } @@ -57,12 +56,12 @@ toAmount(STAmount const& amt) { XRPL_ASSERT( amt.mantissa() < std::numeric_limits::max(), - "ripple::toAmount : maximum mantissa"); + "xrpl::toAmount : maximum mantissa"); bool const isNeg = amt.negative(); std::int64_t const sMant = isNeg ? -std::int64_t(amt.mantissa()) : amt.mantissa(); - XRPL_ASSERT(!isXRP(amt), "ripple::toAmount : is not XRP"); + XRPL_ASSERT(!isXRP(amt), "xrpl::toAmount : is not XRP"); return IOUAmount(sMant, amt.exponent()); } @@ -72,12 +71,12 @@ toAmount(STAmount const& amt) { XRPL_ASSERT( amt.mantissa() < std::numeric_limits::max(), - "ripple::toAmount : maximum mantissa"); + "xrpl::toAmount : maximum mantissa"); bool const isNeg = amt.negative(); std::int64_t const sMant = isNeg ? -std::int64_t(amt.mantissa()) : amt.mantissa(); - XRPL_ASSERT(isXRP(amt), "ripple::toAmount : is XRP"); + XRPL_ASSERT(isXRP(amt), "xrpl::toAmount : is XRP"); return XRPAmount(sMant); } @@ -196,6 +195,6 @@ get(STAmount const& a) } } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/ApiVersion.h b/include/xrpl/protocol/ApiVersion.h index 971d48ca93..f644a16ea2 100644 --- a/include/xrpl/protocol/ApiVersion.h +++ b/include/xrpl/protocol/ApiVersion.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { /** * API version numbers used in later API versions @@ -91,6 +91,6 @@ forAllApiVersions(Fn const& fn, Args&&... args) RPC::apiMaximumValidVersion>(fn, std::forward(args)...); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/Asset.h b/include/xrpl/protocol/Asset.h index d0efe814a9..2b617e3aec 100644 --- a/include/xrpl/protocol/Asset.h +++ b/include/xrpl/protocol/Asset.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { class Asset; class STAmount; @@ -213,6 +213,6 @@ validJSONAsset(Json::Value const& jv); Asset assetFromJson(Json::Value const& jv); -} // namespace ripple +} // namespace xrpl #endif // XRPL_PROTOCOL_ASSET_H_INCLUDED diff --git a/include/xrpl/protocol/Batch.h b/include/xrpl/protocol/Batch.h index 73dd15e6e2..1404c8069f 100644 --- a/include/xrpl/protocol/Batch.h +++ b/include/xrpl/protocol/Batch.h @@ -2,7 +2,7 @@ #include #include -namespace ripple { +namespace xrpl { inline void serializeBatch( @@ -17,4 +17,4 @@ serializeBatch( msg.addBitString(txid); } -} // namespace ripple +} // namespace xrpl diff --git a/include/xrpl/protocol/Book.h b/include/xrpl/protocol/Book.h index cbc6e862b8..ddd315de30 100644 --- a/include/xrpl/protocol/Book.h +++ b/include/xrpl/protocol/Book.h @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { /** Specifies an order book. The order book is a pair of Issues called in and out. @@ -87,28 +87,28 @@ operator<=>(Book const& lhs, Book const& rhs) } /** @} */ -} // namespace ripple +} // namespace xrpl //------------------------------------------------------------------------------ namespace std { template <> -struct hash - : private boost::base_from_member, 0>, - private boost::base_from_member, 1> +struct hash + : private boost::base_from_member, 0>, + private boost::base_from_member, 1> { private: using currency_hash_type = - boost::base_from_member, 0>; + boost::base_from_member, 0>; using issuer_hash_type = - boost::base_from_member, 1>; + boost::base_from_member, 1>; public: hash() = default; using value_type = std::size_t; - using argument_type = ripple::Issue; + using argument_type = xrpl::Issue; value_type operator()(argument_type const& value) const @@ -124,11 +124,11 @@ public: //------------------------------------------------------------------------------ template <> -struct hash +struct hash { private: - using issue_hasher = std::hash; - using uint256_hasher = ripple::uint256::hasher; + using issue_hasher = std::hash; + using uint256_hasher = xrpl::uint256::hasher; issue_hasher m_issue_hasher; uint256_hasher m_uint256_hasher; @@ -137,7 +137,7 @@ public: hash() = default; using value_type = std::size_t; - using argument_type = ripple::Book; + using argument_type = xrpl::Book; value_type operator()(argument_type const& value) const @@ -159,21 +159,21 @@ public: namespace boost { template <> -struct hash : std::hash +struct hash : std::hash { hash() = default; - using Base = std::hash; + using Base = std::hash; // VFALCO NOTE broken in vs2012 // using Base::Base; // inherit ctors }; template <> -struct hash : std::hash +struct hash : std::hash { hash() = default; - using Base = std::hash; + using Base = std::hash; // VFALCO NOTE broken in vs2012 // using Base::Base; // inherit ctors }; diff --git a/include/xrpl/protocol/BuildInfo.h b/include/xrpl/protocol/BuildInfo.h index 8e692f7ca4..0b75f8b0a1 100644 --- a/include/xrpl/protocol/BuildInfo.h +++ b/include/xrpl/protocol/BuildInfo.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Versioning information for this build. */ // VFALCO The namespace is deprecated @@ -79,6 +79,6 @@ isNewerVersion(std::uint64_t version); } // namespace BuildInfo -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/ErrorCodes.h b/include/xrpl/protocol/ErrorCodes.h index 709a26093d..8d5d871aa1 100644 --- a/include/xrpl/protocol/ErrorCodes.h +++ b/include/xrpl/protocol/ErrorCodes.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { // VFALCO NOTE These are outside the RPC namespace @@ -360,6 +360,6 @@ error_code_http_status(error_code_i code); std::string rpcErrorString(Json::Value const& jv); -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/Feature.h b/include/xrpl/protocol/Feature.h index 42f2db41f2..188261e3ee 100644 --- a/include/xrpl/protocol/Feature.h +++ b/include/xrpl/protocol/Feature.h @@ -63,7 +63,7 @@ * */ -namespace ripple { +namespace xrpl { enum class VoteBehavior : int { Obsolete = -1, DefaultNo = 0, DefaultYes }; enum class AmendmentSupport : int { Retired = -1, Supported = 0, Unsupported }; @@ -172,7 +172,7 @@ public: { XRPL_ASSERT( b.count() == count(), - "ripple::FeatureBitset::FeatureBitset(base) : count match"); + "xrpl::FeatureBitset::FeatureBitset(base) : count match"); } template @@ -181,7 +181,7 @@ public: initFromFeatures(f, std::forward(fs)...); XRPL_ASSERT( count() == (sizeof...(fs) + 1), - "ripple::FeatureBitset::FeatureBitset(uint256) : count and " + "xrpl::FeatureBitset::FeatureBitset(uint256) : count and " "sizeof... do match"); } @@ -192,7 +192,7 @@ public: set(featureToBitsetIndex(f)); XRPL_ASSERT( fs.size() == count(), - "ripple::FeatureBitset::FeatureBitset(Container auto) : count and " + "xrpl::FeatureBitset::FeatureBitset(Container auto) : count and " "size do match"); } @@ -355,6 +355,6 @@ foreachFeature(FeatureBitset bs, F&& f) #undef XRPL_FEATURE #pragma pop_macro("XRPL_FEATURE") -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/Fees.h b/include/xrpl/protocol/Fees.h index 43ba6c9552..8c7cb51777 100644 --- a/include/xrpl/protocol/Fees.h +++ b/include/xrpl/protocol/Fees.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { /** Reflects the fee settings for a particular ledger. @@ -33,6 +33,6 @@ struct Fees } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/HashPrefix.h b/include/xrpl/protocol/HashPrefix.h index 8c0cb53b5d..77529e9212 100644 --- a/include/xrpl/protocol/HashPrefix.h +++ b/include/xrpl/protocol/HashPrefix.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace detail { @@ -82,6 +82,6 @@ hash_append(Hasher& h, HashPrefix const& hp) noexcept hash_append(h, static_cast(hp)); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/IOUAmount.h b/include/xrpl/protocol/IOUAmount.h index da2dbb3fa7..60a61a5825 100644 --- a/include/xrpl/protocol/IOUAmount.h +++ b/include/xrpl/protocol/IOUAmount.h @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Floating point representation of amounts with high dynamic range @@ -208,6 +208,6 @@ public: } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/Indexes.h b/include/xrpl/protocol/Indexes.h index b48ed64d71..d279268fad 100644 --- a/include/xrpl/protocol/Indexes.h +++ b/include/xrpl/protocol/Indexes.h @@ -15,7 +15,7 @@ #include #include -namespace ripple { +namespace xrpl { class SeqProxy; /** Keylet computation funclets. @@ -203,7 +203,7 @@ inline Keylet page(Keylet const& root, std::uint64_t index = 0) noexcept { XRPL_ASSERT( - root.type == ltDIR_NODE, "ripple::keylet::page : valid root type"); + root.type == ltDIR_NODE, "xrpl::keylet::page : valid root type"); return page(root.key, index); } /** @} */ @@ -375,6 +375,6 @@ std::array, 6> const directAccountKeylets{ MPTID makeMptID(std::uint32_t sequence, AccountID const& account); -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/InnerObjectFormats.h b/include/xrpl/protocol/InnerObjectFormats.h index 36ed515147..6d656d0065 100644 --- a/include/xrpl/protocol/InnerObjectFormats.h +++ b/include/xrpl/protocol/InnerObjectFormats.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { /** Manages the list of known inner object formats. */ @@ -23,6 +23,6 @@ public: findSOTemplateBySField(SField const& sField) const; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/Issue.h b/include/xrpl/protocol/Issue.h index c079f6d121..519d7a96f3 100644 --- a/include/xrpl/protocol/Issue.h +++ b/include/xrpl/protocol/Issue.h @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { /** A currency issued by an account. @see Currency, AccountID, Issue, Book @@ -113,6 +113,6 @@ isXRP(Issue const& issue) return issue.native(); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/KeyType.h b/include/xrpl/protocol/KeyType.h index 055c2c1efa..454c88780d 100644 --- a/include/xrpl/protocol/KeyType.h +++ b/include/xrpl/protocol/KeyType.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { enum class KeyType { secp256k1 = 0, @@ -42,6 +42,6 @@ operator<<(Stream& s, KeyType type) return s << to_string(type); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/Keylet.h b/include/xrpl/protocol/Keylet.h index 0508287574..4380fdfdac 100644 --- a/include/xrpl/protocol/Keylet.h +++ b/include/xrpl/protocol/Keylet.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { class STLedgerEntry; @@ -30,6 +30,6 @@ struct Keylet check(STLedgerEntry const&) const; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/KnownFormats.h b/include/xrpl/protocol/KnownFormats.h index ebb159163f..a928ed52be 100644 --- a/include/xrpl/protocol/KnownFormats.h +++ b/include/xrpl/protocol/KnownFormats.h @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Manages a list of known formats. @@ -183,6 +183,6 @@ private: boost::container::flat_map types_; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/LedgerFormats.h b/include/xrpl/protocol/LedgerFormats.h index 9e76f3bde7..4a31ec918b 100644 --- a/include/xrpl/protocol/LedgerFormats.h +++ b/include/xrpl/protocol/LedgerFormats.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { /** Identifiers for on-ledger objects. @@ -205,6 +205,6 @@ public: getInstance(); }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/LedgerHeader.h b/include/xrpl/protocol/LedgerHeader.h index 69368f9e5e..f023674efe 100644 --- a/include/xrpl/protocol/LedgerHeader.h +++ b/include/xrpl/protocol/LedgerHeader.h @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Information about the notional ledger backing the view. */ struct LedgerHeader @@ -79,6 +79,6 @@ deserializeHeader(Slice data, bool hasHash = false); LedgerHeader deserializePrefixedHeader(Slice data, bool hasHash = false); -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/MPTAmount.h b/include/xrpl/protocol/MPTAmount.h index af14786501..cc9528a923 100644 --- a/include/xrpl/protocol/MPTAmount.h +++ b/include/xrpl/protocol/MPTAmount.h @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { class MPTAmount : private boost::totally_ordered, private boost::additive, @@ -150,6 +150,6 @@ mulRatio( return MPTAmount(r.convert_to()); } -} // namespace ripple +} // namespace xrpl #endif // XRPL_BASICS_MPTAMOUNT_H_INCLUDED diff --git a/include/xrpl/protocol/MPTIssue.h b/include/xrpl/protocol/MPTIssue.h index b8e184d3cd..b89b59ee0d 100644 --- a/include/xrpl/protocol/MPTIssue.h +++ b/include/xrpl/protocol/MPTIssue.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { /* Adapt MPTID to provide the same interface as Issue. Enables using static * polymorphism by Asset and other classes. MPTID is a 192-bit concatenation @@ -77,6 +77,6 @@ to_string(MPTIssue const& mptIssue); MPTIssue mptIssueFromJson(Json::Value const& jv); -} // namespace ripple +} // namespace xrpl #endif // XRPL_PROTOCOL_MPTISSUE_H_INCLUDED diff --git a/include/xrpl/protocol/MultiApiJson.h b/include/xrpl/protocol/MultiApiJson.h index e8738e2f9e..edf19b6f37 100644 --- a/include/xrpl/protocol/MultiApiJson.h +++ b/include/xrpl/protocol/MultiApiJson.h @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { template @@ -141,7 +141,7 @@ struct MultiApiJson { XRPL_ASSERT( valid(version) && index(version) >= 0 && index(version) < size, - "ripple::detail::MultiApiJson::operator() : valid " + "xrpl::detail::MultiApiJson::operator() : valid " "version"); return std::invoke( fn, @@ -161,7 +161,7 @@ struct MultiApiJson { XRPL_ASSERT( valid(version) && index(version) >= 0 && index(version) < size, - "ripple::detail::MultiApiJson::operator() : valid version"); + "xrpl::detail::MultiApiJson::operator() : valid version"); return std::invoke(fn, json.val[index(version)]); } } visitor = {}; @@ -217,6 +217,6 @@ struct MultiApiJson using MultiApiJson = detail:: MultiApiJson; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/NFTSyntheticSerializer.h b/include/xrpl/protocol/NFTSyntheticSerializer.h index 390d386410..7068ae34cd 100644 --- a/include/xrpl/protocol/NFTSyntheticSerializer.h +++ b/include/xrpl/protocol/NFTSyntheticSerializer.h @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { namespace RPC { @@ -24,6 +24,6 @@ insertNFTSyntheticInJson( /** @} */ } // namespace RPC -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/NFTokenID.h b/include/xrpl/protocol/NFTokenID.h index 762af14d2f..03e30794d0 100644 --- a/include/xrpl/protocol/NFTokenID.h +++ b/include/xrpl/protocol/NFTokenID.h @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Add a `nftoken_ids` field to the `meta` output parameter. @@ -38,6 +38,6 @@ insertNFTokenID( TxMeta const& transactionMeta); /** @} */ -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/NFTokenOfferID.h b/include/xrpl/protocol/NFTokenOfferID.h index cf6427d201..5663653690 100644 --- a/include/xrpl/protocol/NFTokenOfferID.h +++ b/include/xrpl/protocol/NFTokenOfferID.h @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Add an `offer_id` field to the `meta` output parameter. @@ -33,6 +33,6 @@ insertNFTokenOfferID( TxMeta const& transactionMeta); /** @} */ -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/PayChan.h b/include/xrpl/protocol/PayChan.h index 5dcaa676a8..ad70913c45 100644 --- a/include/xrpl/protocol/PayChan.h +++ b/include/xrpl/protocol/PayChan.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { inline void serializePayChanAuthorization( @@ -19,6 +19,6 @@ serializePayChanAuthorization( msg.add64(amt.drops()); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/Permissions.h b/include/xrpl/protocol/Permissions.h index 16ee729fe4..252605e641 100644 --- a/include/xrpl/protocol/Permissions.h +++ b/include/xrpl/protocol/Permissions.h @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { /** * We have both transaction type permissions and granular type permissions. * Since we will reuse the TransactionFormats to parse the Transaction @@ -83,6 +83,6 @@ public: permissionToTxType(uint32_t const& value) const; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/Protocol.h b/include/xrpl/protocol/Protocol.h index 20b73e90c9..85fe481a20 100644 --- a/include/xrpl/protocol/Protocol.h +++ b/include/xrpl/protocol/Protocol.h @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { /** Protocol specific constants. @@ -162,6 +162,6 @@ std::size_t constexpr permissionMaxSize = 10; /** The maximum number of transactions that can be in a batch. */ std::size_t constexpr maxBatchTxCount = 8; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/PublicKey.h b/include/xrpl/protocol/PublicKey.h index 445e0e3b97..32c5bf8657 100644 --- a/include/xrpl/protocol/PublicKey.h +++ b/include/xrpl/protocol/PublicKey.h @@ -15,7 +15,7 @@ #include #include -namespace ripple { +namespace xrpl { /** A public key. @@ -264,16 +264,16 @@ getFingerprint( } return ss.str(); } -} // namespace ripple +} // namespace xrpl //------------------------------------------------------------------------------ namespace Json { template <> -inline ripple::PublicKey -getOrThrow(Json::Value const& v, ripple::SField const& field) +inline xrpl::PublicKey +getOrThrow(Json::Value const& v, xrpl::SField const& field) { - using namespace ripple; + using namespace xrpl; std::string const b58 = getOrThrow(v, field); if (auto pubKeyBlob = strUnHex(b58); publicKeyType(makeSlice(*pubKeyBlob))) { diff --git a/include/xrpl/protocol/Quality.h b/include/xrpl/protocol/Quality.h index 0e748e9b26..1fafa5e321 100644 --- a/include/xrpl/protocol/Quality.h +++ b/include/xrpl/protocol/Quality.h @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Represents a pair of input and output currencies. @@ -281,7 +281,7 @@ public: { XRPL_ASSERT( q1.m_value > 0 && q2.m_value > 0, - "ripple::Quality::relativeDistance : minimum inputs"); + "xrpl::Quality::relativeDistance : minimum inputs"); if (q1.m_value == q2.m_value) // make expected common case fast return 0; @@ -395,6 +395,6 @@ Quality::ceil_out_strict( Quality composed_quality(Quality const& lhs, Quality const& rhs); -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/QualityFunction.h b/include/xrpl/protocol/QualityFunction.h index 8013f0bf7b..b7ec11fa69 100644 --- a/include/xrpl/protocol/QualityFunction.h +++ b/include/xrpl/protocol/QualityFunction.h @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Average quality of a path as a function of `out`: q(out) = m * out + b, * where m = -1 / poolGets, b = poolPays / poolGets. If CLOB offer then @@ -83,6 +83,6 @@ QualityFunction::QualityFunction( b_ = amounts.out * cfee / amounts.in; } -} // namespace ripple +} // namespace xrpl #endif // XRPL_PROTOCOL_QUALITYFUNCTION_H_INCLUDED diff --git a/include/xrpl/protocol/RPCErr.h b/include/xrpl/protocol/RPCErr.h index 3436384d01..90df1562e7 100644 --- a/include/xrpl/protocol/RPCErr.h +++ b/include/xrpl/protocol/RPCErr.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { // VFALCO NOTE these are deprecated bool @@ -11,6 +11,6 @@ isRpcError(Json::Value jvResult); Json::Value rpcError(int iError); -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/Rate.h b/include/xrpl/protocol/Rate.h index b0c641c499..b8173a9392 100644 --- a/include/xrpl/protocol/Rate.h +++ b/include/xrpl/protocol/Rate.h @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Represents a transfer rate @@ -83,6 +83,6 @@ transferFeeAsRate(std::uint16_t fee); /** A transfer rate signifying a 1:1 exchange */ extern Rate const parityRate; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/RippleLedgerHash.h b/include/xrpl/protocol/RippleLedgerHash.h index 4653e1a558..516ab49029 100644 --- a/include/xrpl/protocol/RippleLedgerHash.h +++ b/include/xrpl/protocol/RippleLedgerHash.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { using LedgerHash = uint256; diff --git a/include/xrpl/protocol/Rules.h b/include/xrpl/protocol/Rules.h index 40b84d1d3f..0ae6680d07 100644 --- a/include/xrpl/protocol/Rules.h +++ b/include/xrpl/protocol/Rules.h @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { bool isFeatureEnabled(uint256 const& feature); @@ -111,5 +111,5 @@ private: std::optional saved_; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/SField.h b/include/xrpl/protocol/SField.h index ea6b51dbab..fb3bc6cde8 100644 --- a/include/xrpl/protocol/SField.h +++ b/include/xrpl/protocol/SField.h @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { /* @@ -374,6 +374,6 @@ extern SField const sfGeneric; #undef UNTYPED_SFIELD #pragma pop_macro("UNTYPED_SFIELD") -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/SOTemplate.h b/include/xrpl/protocol/SOTemplate.h index 35e3b356be..559117c274 100644 --- a/include/xrpl/protocol/SOTemplate.h +++ b/include/xrpl/protocol/SOTemplate.h @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Kind of element in each entry of an SOTemplate. */ enum SOEStyle { @@ -154,6 +154,6 @@ private: std::vector indices_; // field num -> index }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/STAccount.h b/include/xrpl/protocol/STAccount.h index b981ef91c2..7c193d3425 100644 --- a/include/xrpl/protocol/STAccount.h +++ b/include/xrpl/protocol/STAccount.h @@ -7,14 +7,14 @@ #include -namespace ripple { +namespace xrpl { class STAccount final : public STBase, public CountedObject { private: // The original implementation of STAccount kept the value in an STBlob. // But an STAccount is always 160 bits, so we can store it with less - // overhead in a ripple::uint160. However, so the serialized format of the + // overhead in a xrpl::uint160. However, so the serialized format of the // STAccount stays unchanged, we serialize and deserialize like an STBlob. AccountID value_; bool default_; @@ -112,6 +112,6 @@ operator<(AccountID const& lhs, STAccount const& rhs) return lhs < rhs.value(); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/STAmount.h b/include/xrpl/protocol/STAmount.h index 83493efcdd..d8bec45a5a 100644 --- a/include/xrpl/protocol/STAmount.h +++ b/include/xrpl/protocol/STAmount.h @@ -15,7 +15,7 @@ #include #include -namespace ripple { +namespace xrpl { // Internal form: // 1: If amount is zero, then value is zero and offset is -100 @@ -342,7 +342,7 @@ STAmount::STAmount( // mValue is uint64, but needs to fit in the range of int64 XRPL_ASSERT( mValue <= std::numeric_limits::max(), - "ripple::STAmount::STAmount(SField, A, std::uint64_t, int, bool) : " + "xrpl::STAmount::STAmount(SField, A, std::uint64_t, int, bool) : " "maximum mantissa input"); canonicalize(); } @@ -690,15 +690,15 @@ canAdd(STAmount const& amt1, STAmount const& amt2); bool canSubtract(STAmount const& amt1, STAmount const& amt2); -} // namespace ripple +} // namespace xrpl //------------------------------------------------------------------------------ namespace Json { template <> -inline ripple::STAmount -getOrThrow(Json::Value const& v, ripple::SField const& field) +inline xrpl::STAmount +getOrThrow(Json::Value const& v, xrpl::SField const& field) { - using namespace ripple; + using namespace xrpl; Json::StaticString const& key = field.getJsonName(); if (!v.isMember(key)) Throw(key); diff --git a/include/xrpl/protocol/STArray.h b/include/xrpl/protocol/STArray.h index 88d2b04511..fb37e07226 100644 --- a/include/xrpl/protocol/STArray.h +++ b/include/xrpl/protocol/STArray.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { class STArray final : public STBase, public CountedObject { @@ -291,6 +291,6 @@ STArray::erase(const_iterator first, const_iterator last) return v_.erase(first, last); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/STBase.h b/include/xrpl/protocol/STBase.h index 64bd4f7ab8..f100b52426 100644 --- a/include/xrpl/protocol/STBase.h +++ b/include/xrpl/protocol/STBase.h @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { /// Note, should be treated as flags that can be | and & struct JsonOptions @@ -219,6 +219,6 @@ STBase::emplace(std::size_t n, void* buf, T&& val) return new (buf) U(std::forward(val)); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/STBitString.h b/include/xrpl/protocol/STBitString.h index 10c6fd95a0..2d26fe4bd7 100644 --- a/include/xrpl/protocol/STBitString.h +++ b/include/xrpl/protocol/STBitString.h @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { // The template parameter could be an unsigned type, however there's a bug in // gdb (last checked in gdb 12.1) that prevents gdb from finding the RTTI @@ -152,10 +152,10 @@ void STBitString::add(Serializer& s) const { XRPL_ASSERT( - getFName().isBinary(), "ripple::STBitString::add : field is binary"); + getFName().isBinary(), "xrpl::STBitString::add : field is binary"); XRPL_ASSERT( getFName().fieldType == getSType(), - "ripple::STBitString::add : field type match"); + "xrpl::STBitString::add : field type match"); s.addBitString(value_); } @@ -187,6 +187,6 @@ STBitString::isDefault() const return value_ == beast::zero; } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/STBlob.h b/include/xrpl/protocol/STBlob.h index 46b91d6ebb..dc3f95e218 100644 --- a/include/xrpl/protocol/STBlob.h +++ b/include/xrpl/protocol/STBlob.h @@ -9,7 +9,7 @@ #include -namespace ripple { +namespace xrpl { // variable length byte string class STBlob : public STBase, public CountedObject @@ -126,6 +126,6 @@ STBlob::setValue(Buffer&& b) value_ = std::move(b); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/STCurrency.h b/include/xrpl/protocol/STCurrency.h index acb0e40019..1c59d48beb 100644 --- a/include/xrpl/protocol/STCurrency.h +++ b/include/xrpl/protocol/STCurrency.h @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { class STCurrency final : public STBase { @@ -114,6 +114,6 @@ operator<(STCurrency const& lhs, Currency const& rhs) return lhs.currency() < rhs; } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/STExchange.h b/include/xrpl/protocol/STExchange.h index 771f6bd109..5f7e405599 100644 --- a/include/xrpl/protocol/STExchange.h +++ b/include/xrpl/protocol/STExchange.h @@ -16,7 +16,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Convert between serialized type U and C++ type T. */ template @@ -155,6 +155,6 @@ erase(STObject& st, TypedField const& f) st.makeFieldAbsent(f); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/STInteger.h b/include/xrpl/protocol/STInteger.h index 7513733e47..9c8af4c08c 100644 --- a/include/xrpl/protocol/STInteger.h +++ b/include/xrpl/protocol/STInteger.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { template class STInteger : public STBase, public CountedObject> @@ -54,7 +54,7 @@ private: STBase* move(std::size_t n, void* buf) override; - friend class ripple::detail::STVar; + friend class xrpl::detail::STVar; }; using STUInt8 = STInteger; @@ -94,10 +94,10 @@ inline void STInteger::add(Serializer& s) const { XRPL_ASSERT( - getFName().isBinary(), "ripple::STInteger::add : field is binary"); + getFName().isBinary(), "xrpl::STInteger::add : field is binary"); XRPL_ASSERT( getFName().fieldType == getSType(), - "ripple::STInteger::add : field type match"); + "xrpl::STInteger::add : field type match"); s.addInteger(value_); } @@ -144,6 +144,6 @@ inline STInteger::operator Integer() const return value_; } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/STIssue.h b/include/xrpl/protocol/STIssue.h index 4f8509710c..6480482d08 100644 --- a/include/xrpl/protocol/STIssue.h +++ b/include/xrpl/protocol/STIssue.h @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { class STIssue final : public STBase, CountedObject { @@ -150,6 +150,6 @@ operator<=>(STIssue const& lhs, Asset const& rhs) return lhs.asset_ <=> rhs; } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/STLedgerEntry.h b/include/xrpl/protocol/STLedgerEntry.h index 20a5ceda54..83e0f2cd27 100644 --- a/include/xrpl/protocol/STLedgerEntry.h +++ b/include/xrpl/protocol/STLedgerEntry.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { class Rules; namespace test { @@ -108,6 +108,6 @@ STLedgerEntry::getType() const return type_; } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/STNumber.h b/include/xrpl/protocol/STNumber.h index 2ec3d66fd1..dfdb16af93 100644 --- a/include/xrpl/protocol/STNumber.h +++ b/include/xrpl/protocol/STNumber.h @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { /** * A serializable number. @@ -84,6 +84,6 @@ partsFromString(std::string const& number); STNumber numberFromJson(SField const& field, Json::Value const& value); -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/STObject.h b/include/xrpl/protocol/STObject.h index 9b325f06fe..799946979d 100644 --- a/include/xrpl/protocol/STObject.h +++ b/include/xrpl/protocol/STObject.h @@ -24,7 +24,7 @@ #include #include -namespace ripple { +namespace xrpl { class STArray; @@ -747,7 +747,7 @@ STObject::Proxy::assign(U&& u) t = dynamic_cast(st_->getPField(*f_, true)); else t = dynamic_cast(st_->makeFieldPresent(*f_)); - XRPL_ASSERT(t, "ripple::STObject::Proxy::assign : type cast succeeded"); + XRPL_ASSERT(t, "xrpl::STObject::Proxy::assign : type cast succeeded"); *t = std::forward(u); } @@ -1037,18 +1037,17 @@ STObject::at(TypedField const& f) const return u->value(); XRPL_ASSERT( - mType, - "ripple::STObject::at(TypedField auto) : field template non-null"); + mType, "xrpl::STObject::at(TypedField auto) : field template non-null"); XRPL_ASSERT( b->getSType() == STI_NOTPRESENT, - "ripple::STObject::at(TypedField auto) : type not present"); + "xrpl::STObject::at(TypedField auto) : type not present"); if (mType->style(f) == soeOPTIONAL) Throw("Missing optional field: " + f.getName()); XRPL_ASSERT( mType->style(f) == soeDEFAULT, - "ripple::STObject::at(TypedField auto) : template style is default"); + "xrpl::STObject::at(TypedField auto) : template style is default"); // Used to help handle the case where value_type is a const reference, // otherwise we would return the address of a temporary. @@ -1068,16 +1067,16 @@ STObject::at(OptionaledField const& of) const { XRPL_ASSERT( mType, - "ripple::STObject::at(OptionaledField auto) : field template " + "xrpl::STObject::at(OptionaledField auto) : field template " "non-null"); XRPL_ASSERT( b->getSType() == STI_NOTPRESENT, - "ripple::STObject::at(OptionaledField auto) : type not present"); + "xrpl::STObject::at(OptionaledField auto) : type not present"); if (mType->style(*of.f) == soeOPTIONAL) return std::nullopt; XRPL_ASSERT( mType->style(*of.f) == soeDEFAULT, - "ripple::STObject::at(OptionaledField auto) : template style is " + "xrpl::STObject::at(OptionaledField auto) : template style is " "default"); return typename T::value_type{}; } @@ -1237,6 +1236,6 @@ STObject::peekField(SField const& field) return *cf; } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/STParsedJSON.h b/include/xrpl/protocol/STParsedJSON.h index 9bc8524f11..4be10840bd 100644 --- a/include/xrpl/protocol/STParsedJSON.h +++ b/include/xrpl/protocol/STParsedJSON.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { /** Holds the serialized result of parsing an input JSON object. This does validation and checking on the provided JSON. @@ -35,6 +35,6 @@ public: Json::Value error; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/STPathSet.h b/include/xrpl/protocol/STPathSet.h index 4b16e9cb1f..cb7db2edf0 100644 --- a/include/xrpl/protocol/STPathSet.h +++ b/include/xrpl/protocol/STPathSet.h @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { class STPathElement final : public CountedObject { @@ -241,7 +241,7 @@ inline STPathElement::STPathElement( mType |= typeAccount; XRPL_ASSERT( mAccountID != noAccount(), - "ripple::STPathElement::STPathElement : account is set"); + "xrpl::STPathElement::STPathElement : account is set"); } if (currency) @@ -256,7 +256,7 @@ inline STPathElement::STPathElement( mType |= typeIssuer; XRPL_ASSERT( mIssuerID != noAccount(), - "ripple::STPathElement::STPathElement : issuer is set"); + "xrpl::STPathElement::STPathElement : issuer is set"); } hash_value_ = get_hash(*this); @@ -504,6 +504,6 @@ STPathSet::emplace_back(Args&&... args) value.emplace_back(std::forward(args)...); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/STTx.h b/include/xrpl/protocol/STTx.h index 6544d72cd0..743586abb2 100644 --- a/include/xrpl/protocol/STTx.h +++ b/include/xrpl/protocol/STTx.h @@ -14,7 +14,7 @@ #include -namespace ripple { +namespace xrpl { enum TxnSql : char { txnSqlNew = 'N', @@ -232,6 +232,6 @@ STTx::getTransactionID() const return tid_; } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/STValidation.h b/include/xrpl/protocol/STValidation.h index 07aef8316c..4d09397eaa 100644 --- a/include/xrpl/protocol/STValidation.h +++ b/include/xrpl/protocol/STValidation.h @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { // Validation flags @@ -175,7 +175,7 @@ STValidation::STValidation( XRPL_ASSERT( nodeID_.isNonZero(), - "ripple::STValidation::STValidation(SerialIter) : nonzero node"); + "xrpl::STValidation::STValidation(SerialIter) : nonzero node"); } /** Construct, sign and trust a new STValidation issued by this node. @@ -200,7 +200,7 @@ STValidation::STValidation( { XRPL_ASSERT( nodeID_.isNonZero(), - "ripple::STValidation::STValidation(PublicKey, SecretKey) : nonzero " + "xrpl::STValidation::STValidation(PublicKey, SecretKey) : nonzero " "node"); // First, set our own public key: @@ -267,6 +267,6 @@ STValidation::setSeen(NetClock::time_point s) seenTime_ = s; } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/STVector256.h b/include/xrpl/protocol/STVector256.h index dc2276a250..94b16db90b 100644 --- a/include/xrpl/protocol/STVector256.h +++ b/include/xrpl/protocol/STVector256.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { class STVector256 : public STBase, public CountedObject { @@ -237,6 +237,6 @@ STVector256::clear() noexcept return mValue.clear(); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/STXChainBridge.h b/include/xrpl/protocol/STXChainBridge.h index e7e687c2c9..89c6d60c13 100644 --- a/include/xrpl/protocol/STXChainBridge.h +++ b/include/xrpl/protocol/STXChainBridge.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { class Serializer; class STObject; @@ -212,6 +212,6 @@ STXChainBridge::dstChain(bool wasLockingChainSend) return ChainType::locking; } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/SecretKey.h b/include/xrpl/protocol/SecretKey.h index fd36ce1a5b..d5f1ce303f 100644 --- a/include/xrpl/protocol/SecretKey.h +++ b/include/xrpl/protocol/SecretKey.h @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { /** A secret key. */ class SecretKey @@ -162,6 +162,6 @@ sign(KeyType type, SecretKey const& sk, Slice const& message) } /** @} */ -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/Seed.h b/include/xrpl/protocol/Seed.h index cda1a8e018..36b2bbfee3 100644 --- a/include/xrpl/protocol/Seed.h +++ b/include/xrpl/protocol/Seed.h @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Seeds are used to generate deterministic secret keys. */ class Seed @@ -117,6 +117,6 @@ toBase58(Seed const& seed) return encodeBase58Token(TokenType::FamilySeed, seed.data(), seed.size()); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/SeqProxy.h b/include/xrpl/protocol/SeqProxy.h index 8ed2c45289..8dde232e75 100644 --- a/include/xrpl/protocol/SeqProxy.h +++ b/include/xrpl/protocol/SeqProxy.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { /** A type that represents either a sequence value or a ticket value. @@ -146,6 +146,6 @@ public: return os; } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/Serializer.h b/include/xrpl/protocol/Serializer.h index 44c4498cb7..f46073a977 100644 --- a/include/xrpl/protocol/Serializer.h +++ b/include/xrpl/protocol/Serializer.h @@ -16,7 +16,7 @@ #include #include -namespace ripple { +namespace xrpl { class Serializer { @@ -38,7 +38,7 @@ public: { XRPL_ASSERT( data, - "ripple::Serializer::Serializer(void const*) : non-null input"); + "xrpl::Serializer::Serializer(void const*) : non-null input"); std::memcpy(mData.data(), data, size); } } @@ -314,8 +314,7 @@ Serializer::addVL(Iter begin, Iter end, int len) len -= begin->size(); #endif } - XRPL_ASSERT( - len == 0, "ripple::Serializer::addVL : length matches distance"); + XRPL_ASSERT(len == 0, "xrpl::Serializer::addVL : length matches distance"); return ret; } @@ -453,6 +452,6 @@ SerialIter::getBitString() return base_uint::fromVoid(x); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/Sign.h b/include/xrpl/protocol/Sign.h index 9a27290924..6df4c55b65 100644 --- a/include/xrpl/protocol/Sign.h +++ b/include/xrpl/protocol/Sign.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Sign an STObject @@ -67,6 +67,6 @@ finishMultiSigningData(AccountID const& signingID, Serializer& s) s.addBitString(signingID); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/SystemParameters.h b/include/xrpl/protocol/SystemParameters.h index de78b65265..c0732bc9fe 100644 --- a/include/xrpl/protocol/SystemParameters.h +++ b/include/xrpl/protocol/SystemParameters.h @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { // Various protocol and system specific constant globals. @@ -60,7 +60,7 @@ constexpr std::ratio<80, 100> amendmentMajorityCalcThreshold; /** The minimum amount of time an amendment must hold a majority */ constexpr std::chrono::seconds const defaultAmendmentMajorityTime = weeks{2}; -} // namespace ripple +} // namespace xrpl /** Default peer port (IANA registered) */ inline std::uint16_t constexpr DEFAULT_PEER_PORT{2459}; diff --git a/include/xrpl/protocol/TER.h b/include/xrpl/protocol/TER.h index ad0719dbb1..de2f596127 100644 --- a/include/xrpl/protocol/TER.h +++ b/include/xrpl/protocol/TER.h @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { // See https://xrpl.org/transaction-results.html // @@ -685,6 +685,6 @@ transHuman(TER code); std::optional transCode(std::string const& token); -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/TxFlags.h b/include/xrpl/protocol/TxFlags.h index b067e8487b..42ad7f2e2a 100644 --- a/include/xrpl/protocol/TxFlags.h +++ b/include/xrpl/protocol/TxFlags.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { /** Transaction flags. @@ -268,6 +268,6 @@ constexpr std::uint32_t const tfBatchMask = // clang-format on -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/TxFormats.h b/include/xrpl/protocol/TxFormats.h index cf60b5081d..05f03c5cdc 100644 --- a/include/xrpl/protocol/TxFormats.h +++ b/include/xrpl/protocol/TxFormats.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { /** Transaction type identifiers. @@ -76,6 +76,6 @@ public: getInstance(); }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/TxMeta.h b/include/xrpl/protocol/TxMeta.h index 3ab58c9d0a..5b6716e380 100644 --- a/include/xrpl/protocol/TxMeta.h +++ b/include/xrpl/protocol/TxMeta.h @@ -10,7 +10,7 @@ #include -namespace ripple { +namespace xrpl { class TxMeta { @@ -117,6 +117,6 @@ private: STArray nodes_; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/UintTypes.h b/include/xrpl/protocol/UintTypes.h index 480d8640ca..daa66e8286 100644 --- a/include/xrpl/protocol/UintTypes.h +++ b/include/xrpl/protocol/UintTypes.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { class CurrencyTag @@ -96,30 +96,30 @@ operator<<(std::ostream& os, Currency const& x) return os; } -} // namespace ripple +} // namespace xrpl namespace std { template <> -struct hash : ripple::Currency::hasher +struct hash : xrpl::Currency::hasher { hash() = default; }; template <> -struct hash : ripple::NodeID::hasher +struct hash : xrpl::NodeID::hasher { hash() = default; }; template <> -struct hash : ripple::Directory::hasher +struct hash : xrpl::Directory::hasher { hash() = default; }; template <> -struct hash : ripple::uint256::hasher +struct hash : xrpl::uint256::hasher { hash() = default; }; diff --git a/include/xrpl/protocol/Units.h b/include/xrpl/protocol/Units.h index e41f93b5b0..72114ad8fe 100644 --- a/include/xrpl/protocol/Units.h +++ b/include/xrpl/protocol/Units.h @@ -13,7 +13,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace unit { @@ -388,11 +388,10 @@ mulDivU(Source1 value, Dest mul, Source2 div) // split the asserts so if one hits, the user can tell which // without a debugger. XRPL_ASSERT( - value.value() >= 0, "ripple::unit::mulDivU : minimum value input"); + value.value() >= 0, "xrpl::unit::mulDivU : minimum value input"); XRPL_ASSERT( - mul.value() >= 0, "ripple::unit::mulDivU : minimum mul input"); - XRPL_ASSERT( - div.value() > 0, "ripple::unit::mulDivU : minimum div input"); + mul.value() >= 0, "xrpl::unit::mulDivU : minimum mul input"); + XRPL_ASSERT(div.value() > 0, "xrpl::unit::mulDivU : minimum div input"); return std::nullopt; } @@ -532,6 +531,6 @@ unsafe_cast(Src s) noexcept return Dest{unsafe_cast(s)}; } -} // namespace ripple +} // namespace xrpl #endif // PROTOCOL_UNITS_H_INCLUDED diff --git a/include/xrpl/protocol/XChainAttestations.h b/include/xrpl/protocol/XChainAttestations.h index 0b368aaa58..4dc9cfcf6a 100644 --- a/include/xrpl/protocol/XChainAttestations.h +++ b/include/xrpl/protocol/XChainAttestations.h @@ -18,7 +18,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace Attestations { @@ -478,6 +478,6 @@ class XChainCreateAccountAttestations final using TBase::TBase; }; -} // namespace ripple +} // namespace xrpl #endif // STXCHAINATTESTATIONS_H_ diff --git a/include/xrpl/protocol/XRPAmount.h b/include/xrpl/protocol/XRPAmount.h index e102a3707f..ef283f4154 100644 --- a/include/xrpl/protocol/XRPAmount.h +++ b/include/xrpl/protocol/XRPAmount.h @@ -15,7 +15,7 @@ #include #include -namespace ripple { +namespace xrpl { class XRPAmount : private boost::totally_ordered, private boost::additive, @@ -287,6 +287,6 @@ mulRatio( return XRPAmount(r.convert_to()); } -} // namespace ripple +} // namespace xrpl #endif // XRPL_BASICS_XRPAMOUNT_H_INCLUDED diff --git a/include/xrpl/protocol/detail/STVar.h b/include/xrpl/protocol/detail/STVar.h index 9a8d85717f..540ba2bf77 100644 --- a/include/xrpl/protocol/detail/STVar.h +++ b/include/xrpl/protocol/detail/STVar.h @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { struct defaultObject_t @@ -162,6 +162,6 @@ operator!=(STVar const& lhs, STVar const& rhs) } } // namespace detail -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/detail/b58_utils.h b/include/xrpl/protocol/detail/b58_utils.h index b96e34ebc5..4ea00e6d5e 100644 --- a/include/xrpl/protocol/detail/b58_utils.h +++ b/include/xrpl/protocol/detail/b58_utils.h @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { template using Result = boost::outcome_v2::result; @@ -112,7 +112,7 @@ inplace_bigint_div_rem(std::span numerator, std::uint64_t divisor) // the a null set of numbers to be zero, so the remainder is also zero. // LCOV_EXCL_START UNREACHABLE( - "ripple::b58_fast::detail::inplace_bigint_div_rem : empty " + "xrpl::b58_fast::detail::inplace_bigint_div_rem : empty " "numerator"); return 0; // LCOV_EXCL_STOP @@ -132,11 +132,11 @@ inplace_bigint_div_rem(std::span numerator, std::uint64_t divisor) unsigned __int128 const r = num - (denom128 * d); XRPL_ASSERT( d >> 64 == 0, - "ripple::b58_fast::detail::inplace_bigint_div_rem::div_rem_64 : " + "xrpl::b58_fast::detail::inplace_bigint_div_rem::div_rem_64 : " "valid division result"); XRPL_ASSERT( r >> 64 == 0, - "ripple::b58_fast::detail::inplace_bigint_div_rem::div_rem_64 : " + "xrpl::b58_fast::detail::inplace_bigint_div_rem::div_rem_64 : " "valid remainder"); return {static_cast(d), static_cast(r)}; }; @@ -163,7 +163,7 @@ b58_10_to_b58_be(std::uint64_t input) 430804206899405824; // 58^10; XRPL_ASSERT( input < B_58_10, - "ripple::b58_fast::detail::b58_10_to_b58_be : valid input"); + "xrpl::b58_fast::detail::b58_10_to_b58_be : valid input"); constexpr std::size_t resultSize = 10; std::array result{}; int i = 0; @@ -181,5 +181,5 @@ b58_10_to_b58_be(std::uint64_t input) } // namespace b58_fast #endif -} // namespace ripple +} // namespace xrpl #endif // XRPL_PROTOCOL_B58_UTILS_H_INCLUDED diff --git a/include/xrpl/protocol/detail/secp256k1.h b/include/xrpl/protocol/detail/secp256k1.h index c93734a539..c3ac76d7ed 100644 --- a/include/xrpl/protocol/detail/secp256k1.h +++ b/include/xrpl/protocol/detail/secp256k1.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { template secp256k1_context const* @@ -27,6 +27,6 @@ secp256k1Context() return h.impl; } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/detail/token_errors.h b/include/xrpl/protocol/detail/token_errors.h index a40e992aec..1d5276e78b 100644 --- a/include/xrpl/protocol/detail/token_errors.h +++ b/include/xrpl/protocol/detail/token_errors.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { enum class TokenCodecErrc { success = 0, inputTooLarge, @@ -20,12 +20,12 @@ enum class TokenCodecErrc { namespace std { template <> -struct is_error_code_enum : true_type +struct is_error_code_enum : true_type { }; } // namespace std -namespace ripple { +namespace xrpl { namespace detail { class TokenCodecErrcCategory : public std::error_category { @@ -67,17 +67,17 @@ public: }; } // namespace detail -inline ripple::detail::TokenCodecErrcCategory const& +inline xrpl::detail::TokenCodecErrcCategory const& TokenCodecErrcCategory() { - static ripple::detail::TokenCodecErrcCategory c; + static xrpl::detail::TokenCodecErrcCategory c; return c; } inline std::error_code -make_error_code(ripple::TokenCodecErrc e) +make_error_code(xrpl::TokenCodecErrc e) { return {static_cast(e), TokenCodecErrcCategory()}; } -} // namespace ripple +} // namespace xrpl #endif // TOKEN_ERRORS_H_ diff --git a/include/xrpl/protocol/digest.h b/include/xrpl/protocol/digest.h index c42fe479da..bafac699f5 100644 --- a/include/xrpl/protocol/digest.h +++ b/include/xrpl/protocol/digest.h @@ -8,7 +8,7 @@ #include -namespace ripple { +namespace xrpl { /** Message digest functions used in the codebase @@ -226,6 +226,6 @@ sha512Half_s(Args const&... args) return static_cast(h); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/json_get_or_throw.h b/include/xrpl/protocol/json_get_or_throw.h index 74d1779339..bdf572bed6 100644 --- a/include/xrpl/protocol/json_get_or_throw.h +++ b/include/xrpl/protocol/json_get_or_throw.h @@ -53,16 +53,16 @@ struct JsonTypeMismatchError : std::exception template T -getOrThrow(Json::Value const& v, ripple::SField const& field) +getOrThrow(Json::Value const& v, xrpl::SField const& field) { static_assert(sizeof(T) == -1, "This function must be specialized"); } template <> inline std::string -getOrThrow(Json::Value const& v, ripple::SField const& field) +getOrThrow(Json::Value const& v, xrpl::SField const& field) { - using namespace ripple; + using namespace xrpl; Json::StaticString const& key = field.getJsonName(); if (!v.isMember(key)) Throw(key); @@ -76,9 +76,9 @@ getOrThrow(Json::Value const& v, ripple::SField const& field) // Note, this allows integer numeric fields to act as bools template <> inline bool -getOrThrow(Json::Value const& v, ripple::SField const& field) +getOrThrow(Json::Value const& v, xrpl::SField const& field) { - using namespace ripple; + using namespace xrpl; Json::StaticString const& key = field.getJsonName(); if (!v.isMember(key)) Throw(key); @@ -93,9 +93,9 @@ getOrThrow(Json::Value const& v, ripple::SField const& field) template <> inline std::uint64_t -getOrThrow(Json::Value const& v, ripple::SField const& field) +getOrThrow(Json::Value const& v, xrpl::SField const& field) { - using namespace ripple; + using namespace xrpl; Json::StaticString const& key = field.getJsonName(); if (!v.isMember(key)) Throw(key); @@ -125,10 +125,10 @@ getOrThrow(Json::Value const& v, ripple::SField const& field) } template <> -inline ripple::Buffer -getOrThrow(Json::Value const& v, ripple::SField const& field) +inline xrpl::Buffer +getOrThrow(Json::Value const& v, xrpl::SField const& field) { - using namespace ripple; + using namespace xrpl; std::string const hex = getOrThrow(v, field); if (auto const r = strUnHex(hex)) { @@ -141,7 +141,7 @@ getOrThrow(Json::Value const& v, ripple::SField const& field) // This function may be used by external projects (like the witness server). template std::optional -getOptional(Json::Value const& v, ripple::SField const& field) +getOptional(Json::Value const& v, xrpl::SField const& field) { try { diff --git a/include/xrpl/protocol/jss.h b/include/xrpl/protocol/jss.h index 890e979ad4..6d0d99bf00 100644 --- a/include/xrpl/protocol/jss.h +++ b/include/xrpl/protocol/jss.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace jss { // JSON static strings @@ -720,6 +720,6 @@ JSS(write_load); // out: GetCounts #undef JSS } // namespace jss -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/nft.h b/include/xrpl/protocol/nft.h index 2681be4aad..3a8cdcd6e2 100644 --- a/include/xrpl/protocol/nft.h +++ b/include/xrpl/protocol/nft.h @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace nft { // Separate taxons from regular integers. @@ -104,6 +104,6 @@ getIssuer(uint256 const& id) } } // namespace nft -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/nftPageMask.h b/include/xrpl/protocol/nftPageMask.h index 800899f7a7..4d23e45f53 100644 --- a/include/xrpl/protocol/nftPageMask.h +++ b/include/xrpl/protocol/nftPageMask.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace nft { // NFT directory pages order their contents based only on the low 96 bits of @@ -14,6 +14,6 @@ uint256 constexpr pageMask(std::string_view( "0000000000000000000000000000000000000000ffffffffffffffffffffffff")); } // namespace nft -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/serialize.h b/include/xrpl/protocol/serialize.h index ea93505736..eedf041baa 100644 --- a/include/xrpl/protocol/serialize.h +++ b/include/xrpl/protocol/serialize.h @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Serialize an object to a blob. */ template @@ -24,6 +24,6 @@ serializeHex(STObject const& o) return strHex(serializeBlob(o)); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/protocol/tokens.h b/include/xrpl/protocol/tokens.h index 5e3fc222e8..ac13a10e06 100644 --- a/include/xrpl/protocol/tokens.h +++ b/include/xrpl/protocol/tokens.h @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { template using B58Result = Expected; @@ -111,6 +111,6 @@ b58_to_b256_be(std::string_view input, std::span out); } // namespace b58_fast #endif // _MSC_VER -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/resource/Charge.h b/include/xrpl/resource/Charge.h index 2236a60cd4..1edaca28b4 100644 --- a/include/xrpl/resource/Charge.h +++ b/include/xrpl/resource/Charge.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace Resource { /** A consumption charge. */ @@ -49,6 +49,6 @@ std::ostream& operator<<(std::ostream& os, Charge const& v); } // namespace Resource -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/resource/Consumer.h b/include/xrpl/resource/Consumer.h index 903e0e97a5..6e973d824c 100644 --- a/include/xrpl/resource/Consumer.h +++ b/include/xrpl/resource/Consumer.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace Resource { struct Entry; @@ -81,6 +81,6 @@ std::ostream& operator<<(std::ostream& os, Consumer const& v); } // namespace Resource -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/resource/Disposition.h b/include/xrpl/resource/Disposition.h index 5915b0059d..81675e8376 100644 --- a/include/xrpl/resource/Disposition.h +++ b/include/xrpl/resource/Disposition.h @@ -1,7 +1,7 @@ #ifndef XRPL_RESOURCE_DISPOSITION_H_INCLUDED #define XRPL_RESOURCE_DISPOSITION_H_INCLUDED -namespace ripple { +namespace xrpl { namespace Resource { /** The disposition of a consumer after applying a load charge. */ @@ -19,6 +19,6 @@ enum Disposition { }; } // namespace Resource -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/resource/Fees.h b/include/xrpl/resource/Fees.h index 4a099b9019..643a8e624c 100644 --- a/include/xrpl/resource/Fees.h +++ b/include/xrpl/resource/Fees.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace Resource { // clang-format off @@ -40,6 +40,6 @@ extern Charge const feeDrop; // The cost of being dropped for // clang-format on } // namespace Resource -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/resource/Gossip.h b/include/xrpl/resource/Gossip.h index 214e0e8c4d..dfd04288fc 100644 --- a/include/xrpl/resource/Gossip.h +++ b/include/xrpl/resource/Gossip.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace Resource { /** Data format for exchanging consumption information across peers. */ @@ -26,6 +26,6 @@ struct Gossip }; } // namespace Resource -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/resource/ResourceManager.h b/include/xrpl/resource/ResourceManager.h index 7d29059292..19690d6bc4 100644 --- a/include/xrpl/resource/ResourceManager.h +++ b/include/xrpl/resource/ResourceManager.h @@ -11,7 +11,7 @@ #include -namespace ripple { +namespace xrpl { namespace Resource { /** Tracks load and resource consumption. */ @@ -66,6 +66,6 @@ make_Manager( beast::Journal journal); } // namespace Resource -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/resource/Types.h b/include/xrpl/resource/Types.h index 64628cf54a..8923933f0f 100644 --- a/include/xrpl/resource/Types.h +++ b/include/xrpl/resource/Types.h @@ -1,13 +1,13 @@ #ifndef XRPL_RESOURCE_TYPES_H_INCLUDED #define XRPL_RESOURCE_TYPES_H_INCLUDED -namespace ripple { +namespace xrpl { namespace Resource { struct Key; struct Entry; } // namespace Resource -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/resource/detail/Entry.h b/include/xrpl/resource/detail/Entry.h index b89d85d1f3..ce55c46064 100644 --- a/include/xrpl/resource/detail/Entry.h +++ b/include/xrpl/resource/detail/Entry.h @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace Resource { using clock_type = beast::abstract_clock; @@ -93,6 +93,6 @@ operator<<(std::ostream& os, Entry const& v) } } // namespace Resource -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/resource/detail/Import.h b/include/xrpl/resource/detail/Import.h index a9711be3fc..d33bd5f156 100644 --- a/include/xrpl/resource/detail/Import.h +++ b/include/xrpl/resource/detail/Import.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace Resource { /** A set of imported consumer data from a gossip origin. */ @@ -31,6 +31,6 @@ struct Import }; } // namespace Resource -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/resource/detail/Key.h b/include/xrpl/resource/detail/Key.h index 3df47d5afb..e63d2827ea 100644 --- a/include/xrpl/resource/detail/Key.h +++ b/include/xrpl/resource/detail/Key.h @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace Resource { // The consumer key @@ -47,6 +47,6 @@ struct Key }; } // namespace Resource -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/resource/detail/Kind.h b/include/xrpl/resource/detail/Kind.h index 0a04b8e627..0e55b65780 100644 --- a/include/xrpl/resource/detail/Kind.h +++ b/include/xrpl/resource/detail/Kind.h @@ -1,7 +1,7 @@ #ifndef XRPL_RESOURCE_KIND_H_INCLUDED #define XRPL_RESOURCE_KIND_H_INCLUDED -namespace ripple { +namespace xrpl { namespace Resource { /** @@ -15,6 +15,6 @@ namespace Resource { enum Kind { kindInbound, kindOutbound, kindUnlimited }; } // namespace Resource -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/resource/detail/Logic.h b/include/xrpl/resource/detail/Logic.h index a0c541b300..b1f90e0282 100644 --- a/include/xrpl/resource/detail/Logic.h +++ b/include/xrpl/resource/detail/Logic.h @@ -16,7 +16,7 @@ #include -namespace ripple { +namespace xrpl { namespace Resource { class Logic @@ -385,7 +385,7 @@ public: Entry& entry(iter->second); XRPL_ASSERT( entry.refcount == 0, - "ripple::Resource::Logic::erase : entry not used"); + "xrpl::Resource::Logic::erase : entry not used"); inactive_.erase(inactive_.iterator_to(entry)); table_.erase(iter); } @@ -419,7 +419,7 @@ public: default: // LCOV_EXCL_START UNREACHABLE( - "ripple::Resource::Logic::release : invalid entry " + "xrpl::Resource::Logic::release : invalid entry " "kind"); break; // LCOV_EXCL_STOP @@ -568,6 +568,6 @@ public: }; } // namespace Resource -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/resource/detail/Tuning.h b/include/xrpl/resource/detail/Tuning.h index 3013bb0e45..9d7ba31303 100644 --- a/include/xrpl/resource/detail/Tuning.h +++ b/include/xrpl/resource/detail/Tuning.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace Resource { /** Tunable constants. */ @@ -32,6 +32,6 @@ std::chrono::seconds constexpr secondsUntilExpiration{300}; std::chrono::seconds constexpr gossipExpirationSeconds{30}; } // namespace Resource -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/server/Handoff.h b/include/xrpl/server/Handoff.h index 993d61aec8..49a5851251 100644 --- a/include/xrpl/server/Handoff.h +++ b/include/xrpl/server/Handoff.h @@ -8,7 +8,7 @@ #include -namespace ripple { +namespace xrpl { using http_request_type = boost::beast::http::request; @@ -36,6 +36,6 @@ struct Handoff } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/server/Port.h b/include/xrpl/server/Port.h index 37b130ae04..995401f8fd 100644 --- a/include/xrpl/server/Port.h +++ b/include/xrpl/server/Port.h @@ -24,7 +24,7 @@ class context; } // namespace asio } // namespace boost -namespace ripple { +namespace xrpl { /** Configuration information for a Server listening port. */ struct Port @@ -104,6 +104,6 @@ struct ParsedPort void parse_Port(ParsedPort& port, Section const& section, std::ostream& log); -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/server/Server.h b/include/xrpl/server/Server.h index 5dc6face66..b553b9e72a 100644 --- a/include/xrpl/server/Server.h +++ b/include/xrpl/server/Server.h @@ -8,7 +8,7 @@ #include -namespace ripple { +namespace xrpl { /** Create the HTTP server using the specified handler. */ template @@ -21,6 +21,6 @@ make_Server( return std::make_unique>(handler, io_context, journal); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/server/Session.h b/include/xrpl/server/Session.h index 52aa37572a..4570e90f7e 100644 --- a/include/xrpl/server/Session.h +++ b/include/xrpl/server/Session.h @@ -13,7 +13,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Persistent state information for a connection session. These values are preserved between calls for efficiency. @@ -111,6 +111,6 @@ public: websocketUpgrade() = 0; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/server/SimpleWriter.h b/include/xrpl/server/SimpleWriter.h index 96e834df6a..cf41f1c82a 100644 --- a/include/xrpl/server/SimpleWriter.h +++ b/include/xrpl/server/SimpleWriter.h @@ -10,7 +10,7 @@ #include -namespace ripple { +namespace xrpl { /// Deprecated: Writer that serializes a HTTP/1 message class SimpleWriter : public Writer @@ -55,6 +55,6 @@ public: } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/server/WSSession.h b/include/xrpl/server/WSSession.h index 05558f1774..fb8af7118c 100644 --- a/include/xrpl/server/WSSession.h +++ b/include/xrpl/server/WSSession.h @@ -17,7 +17,7 @@ #include #include -namespace ripple { +namespace xrpl { class WSMsg { @@ -125,6 +125,6 @@ struct WSSession complete() = 0; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/server/Writer.h b/include/xrpl/server/Writer.h index 7948547279..7e0c304ea9 100644 --- a/include/xrpl/server/Writer.h +++ b/include/xrpl/server/Writer.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { class Writer { @@ -37,6 +37,6 @@ public: data() = 0; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/server/detail/BaseHTTPPeer.h b/include/xrpl/server/detail/BaseHTTPPeer.h index c68b7d91ec..5b7327c6b9 100644 --- a/include/xrpl/server/detail/BaseHTTPPeer.h +++ b/include/xrpl/server/detail/BaseHTTPPeer.h @@ -26,7 +26,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Represents an active connection. */ template @@ -511,6 +511,6 @@ BaseHTTPPeer::close(bool graceful) boost::beast::get_lowest_layer(impl().stream_).close(); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/server/detail/BasePeer.h b/include/xrpl/server/detail/BasePeer.h index 3b524cbdd5..fa82a1bb37 100644 --- a/include/xrpl/server/detail/BasePeer.h +++ b/include/xrpl/server/detail/BasePeer.h @@ -13,7 +13,7 @@ #include #include -namespace ripple { +namespace xrpl { // Common part of all peers template @@ -85,9 +85,9 @@ BasePeer::close() return post( strand_, std::bind(&BasePeer::close, impl().shared_from_this())); error_code ec; - ripple::get_lowest_layer(impl().ws_).socket().close(ec); + xrpl::get_lowest_layer(impl().ws_).socket().close(ec); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/server/detail/BaseWSPeer.h b/include/xrpl/server/detail/BaseWSPeer.h index dbf8d95cba..f0649b221c 100644 --- a/include/xrpl/server/detail/BaseWSPeer.h +++ b/include/xrpl/server/detail/BaseWSPeer.h @@ -19,7 +19,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Represents an active WebSocket connection. */ template @@ -508,17 +508,17 @@ BaseWSPeer::fail(error_code ec, String const& what) { XRPL_ASSERT( strand_.running_in_this_thread(), - "ripple::BaseWSPeer::fail : strand in this thread"); + "xrpl::BaseWSPeer::fail : strand in this thread"); cancel_timer(); if (!ec_ && ec != boost::asio::error::operation_aborted) { ec_ = ec; JLOG(this->j_.trace()) << what << ": " << ec.message(); - ripple::get_lowest_layer(impl().ws_).socket().close(ec); + xrpl::get_lowest_layer(impl().ws_).socket().close(ec); } } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/server/detail/Door.h b/include/xrpl/server/detail/Door.h index aef4b4d9d2..140afb1808 100644 --- a/include/xrpl/server/detail/Door.h +++ b/include/xrpl/server/detail/Door.h @@ -35,7 +35,7 @@ #include #include -namespace ripple { +namespace xrpl { /** A listening socket. */ template @@ -500,6 +500,6 @@ Door::should_throttle_for_fds() #endif } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/server/detail/JSONRPCUtil.h b/include/xrpl/server/detail/JSONRPCUtil.h index 8b2bfa4ac7..d75825a1ea 100644 --- a/include/xrpl/server/detail/JSONRPCUtil.h +++ b/include/xrpl/server/detail/JSONRPCUtil.h @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { void HTTPReply( @@ -14,6 +14,6 @@ HTTPReply( Json::Output const&, beast::Journal j); -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/server/detail/LowestLayer.h b/include/xrpl/server/detail/LowestLayer.h index c7430b5d9f..57647867e3 100644 --- a/include/xrpl/server/detail/LowestLayer.h +++ b/include/xrpl/server/detail/LowestLayer.h @@ -7,7 +7,7 @@ #include #endif -namespace ripple { +namespace xrpl { // Before boost 1.70, get_lowest_layer required an explicit templat parameter template @@ -21,6 +21,6 @@ get_lowest_layer(T& t) noexcept #endif } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/server/detail/PlainHTTPPeer.h b/include/xrpl/server/detail/PlainHTTPPeer.h index cf2c871635..8f7d86f8e5 100644 --- a/include/xrpl/server/detail/PlainHTTPPeer.h +++ b/include/xrpl/server/detail/PlainHTTPPeer.h @@ -9,7 +9,7 @@ #include -namespace ripple { +namespace xrpl { template class PlainHTTPPeer @@ -154,6 +154,6 @@ PlainHTTPPeer::do_close() socket_.shutdown(socket_type::shutdown_send, ec); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/server/detail/PlainWSPeer.h b/include/xrpl/server/detail/PlainWSPeer.h index 60223c896d..4d5c57533b 100644 --- a/include/xrpl/server/detail/PlainWSPeer.h +++ b/include/xrpl/server/detail/PlainWSPeer.h @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { template class PlainWSPeer : public BaseWSPeer>, @@ -58,6 +58,6 @@ PlainWSPeer::PlainWSPeer( { } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/server/detail/SSLHTTPPeer.h b/include/xrpl/server/detail/SSLHTTPPeer.h index f60f7e82d9..56b2d1c52f 100644 --- a/include/xrpl/server/detail/SSLHTTPPeer.h +++ b/include/xrpl/server/detail/SSLHTTPPeer.h @@ -12,7 +12,7 @@ #include -namespace ripple { +namespace xrpl { template class SSLHTTPPeer : public BaseHTTPPeer>, @@ -204,6 +204,6 @@ SSLHTTPPeer::on_shutdown(error_code ec) stream_.next_layer().close(); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/server/detail/SSLWSPeer.h b/include/xrpl/server/detail/SSLWSPeer.h index c2076ed6a5..bb5da1c6e7 100644 --- a/include/xrpl/server/detail/SSLWSPeer.h +++ b/include/xrpl/server/detail/SSLWSPeer.h @@ -13,7 +13,7 @@ #include -namespace ripple { +namespace xrpl { template class SSLWSPeer : public BaseWSPeer>, @@ -67,6 +67,6 @@ SSLWSPeer::SSLWSPeer( { } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/server/detail/ServerImpl.h b/include/xrpl/server/detail/ServerImpl.h index a42966edd6..6ff93e83cb 100644 --- a/include/xrpl/server/detail/ServerImpl.h +++ b/include/xrpl/server/detail/ServerImpl.h @@ -16,7 +16,7 @@ #include #include -namespace ripple { +namespace xrpl { using Endpoints = std::unordered_map; @@ -189,6 +189,6 @@ ServerImpl::closed() { return ios_.closed(); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/server/detail/Spawn.h b/include/xrpl/server/detail/Spawn.h index 2e80393af6..4c424a1956 100644 --- a/include/xrpl/server/detail/Spawn.h +++ b/include/xrpl/server/detail/Spawn.h @@ -9,7 +9,7 @@ #include #include -namespace ripple::util { +namespace xrpl::util { namespace impl { template @@ -84,6 +84,6 @@ spawn(Ctx&& ctx, F&& func) } } -} // namespace ripple::util +} // namespace xrpl::util #endif diff --git a/include/xrpl/server/detail/io_list.h b/include/xrpl/server/detail/io_list.h index 6b8e440d40..0e67595dbe 100644 --- a/include/xrpl/server/detail/io_list.h +++ b/include/xrpl/server/detail/io_list.h @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Manages a set of objects performing asynchronous I/O. */ class io_list final @@ -243,6 +243,6 @@ io_list::join() cv_.wait(lock, [&] { return closed_ && n_ == 0; }); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/shamap/Family.h b/include/xrpl/shamap/Family.h index e566145bec..6638d67df8 100644 --- a/include/xrpl/shamap/Family.h +++ b/include/xrpl/shamap/Family.h @@ -8,7 +8,7 @@ #include -namespace ripple { +namespace xrpl { class Family { @@ -65,6 +65,6 @@ public: reset() = 0; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/shamap/FullBelowCache.h b/include/xrpl/shamap/FullBelowCache.h index 81061cef59..9434b40011 100644 --- a/include/xrpl/shamap/FullBelowCache.h +++ b/include/xrpl/shamap/FullBelowCache.h @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { @@ -129,6 +129,6 @@ private: using FullBelowCache = detail::BasicFullBelowCache; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/shamap/SHAMap.h b/include/xrpl/shamap/SHAMap.h index 07db489a8f..94fd926718 100644 --- a/include/xrpl/shamap/SHAMap.h +++ b/include/xrpl/shamap/SHAMap.h @@ -19,7 +19,7 @@ #include #include -namespace ripple { +namespace xrpl { class SHAMapNodeID; class SHAMapSyncFilter; @@ -584,7 +584,7 @@ SHAMap::setImmutable() { XRPL_ASSERT( state_ != SHAMapState::Invalid, - "ripple::SHAMap::setImmutable : state is valid"); + "xrpl::SHAMap::setImmutable : state is valid"); state_ = SHAMapState::Immutable; } @@ -666,8 +666,7 @@ private: inline SHAMap::const_iterator::const_iterator(SHAMap const* map) : map_(map) { XRPL_ASSERT( - map_, - "ripple::SHAMap::const_iterator::const_iterator : non-null input"); + map_, "xrpl::SHAMap::const_iterator::const_iterator : non-null input"); if (auto temp = map_->peekFirstItem(stack_)) item_ = temp->peekItem().get(); @@ -721,7 +720,7 @@ operator==(SHAMap::const_iterator const& x, SHAMap::const_iterator const& y) { XRPL_ASSERT( x.map_ == y.map_, - "ripple::operator==(SHAMap::const_iterator, SHAMap::const_iterator) : " + "xrpl::operator==(SHAMap::const_iterator, SHAMap::const_iterator) : " "inputs map do match"); return x.item_ == y.item_; } @@ -744,6 +743,6 @@ SHAMap::end() const return const_iterator(this, nullptr); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/shamap/SHAMapAccountStateLeafNode.h b/include/xrpl/shamap/SHAMapAccountStateLeafNode.h index 2486432453..288fc416b5 100644 --- a/include/xrpl/shamap/SHAMapAccountStateLeafNode.h +++ b/include/xrpl/shamap/SHAMapAccountStateLeafNode.h @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { /** A leaf node for a state object. */ class SHAMapAccountStateLeafNode final @@ -68,6 +68,6 @@ public: } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/shamap/SHAMapAddNode.h b/include/xrpl/shamap/SHAMapAddNode.h index 73e7a2efac..0385f64f52 100644 --- a/include/xrpl/shamap/SHAMapAddNode.h +++ b/include/xrpl/shamap/SHAMapAddNode.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { // results of adding nodes class SHAMapAddNode @@ -161,6 +161,6 @@ SHAMapAddNode::get() const return ret; } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/shamap/SHAMapInnerNode.h b/include/xrpl/shamap/SHAMapInnerNode.h index 9488a12e6d..72a7fe52d4 100644 --- a/include/xrpl/shamap/SHAMapInnerNode.h +++ b/include/xrpl/shamap/SHAMapInnerNode.h @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { class SHAMapInnerNode final : public SHAMapTreeNode, public CountedObject @@ -202,5 +202,5 @@ SHAMapInnerNode::setFullBelowGen(std::uint32_t gen) fullBelowGen_ = gen; } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/shamap/SHAMapItem.h b/include/xrpl/shamap/SHAMapItem.h index f76a37e733..a69f40113d 100644 --- a/include/xrpl/shamap/SHAMapItem.h +++ b/include/xrpl/shamap/SHAMapItem.h @@ -10,7 +10,7 @@ #include -namespace ripple { +namespace xrpl { // an item stored in a SHAMap class SHAMapItem : public CountedObject @@ -143,7 +143,7 @@ make_shamapitem(uint256 const& tag, Slice data) { XRPL_ASSERT( data.size() <= megabytes(16), - "ripple::make_shamapitem : maximum input size"); + "xrpl::make_shamapitem : maximum input size"); std::uint8_t* raw = detail::slabber.allocate(data.size()); @@ -168,6 +168,6 @@ make_shamapitem(SHAMapItem const& other) return make_shamapitem(other.key(), other.slice()); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/shamap/SHAMapLeafNode.h b/include/xrpl/shamap/SHAMapLeafNode.h index 127e8c3680..d87ede16ad 100644 --- a/include/xrpl/shamap/SHAMapLeafNode.h +++ b/include/xrpl/shamap/SHAMapLeafNode.h @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { class SHAMapLeafNode : public SHAMapTreeNode { @@ -59,6 +59,6 @@ public: getString(SHAMapNodeID const&) const final override; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/shamap/SHAMapMissingNode.h b/include/xrpl/shamap/SHAMapMissingNode.h index 18c2636654..0cb18238af 100644 --- a/include/xrpl/shamap/SHAMapMissingNode.h +++ b/include/xrpl/shamap/SHAMapMissingNode.h @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { enum class SHAMapType { TRANSACTION = 1, // A tree of transactions @@ -50,6 +50,6 @@ public: } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/shamap/SHAMapNodeID.h b/include/xrpl/shamap/SHAMapNodeID.h index dfac4fceb6..2a9e4446f4 100644 --- a/include/xrpl/shamap/SHAMapNodeID.h +++ b/include/xrpl/shamap/SHAMapNodeID.h @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Identifies a node inside a SHAMap */ class SHAMapNodeID : public CountedObject @@ -139,6 +139,6 @@ deserializeSHAMapNodeID(std::string const& s) [[nodiscard]] unsigned int selectBranch(SHAMapNodeID const& id, uint256 const& hash); -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/shamap/SHAMapSyncFilter.h b/include/xrpl/shamap/SHAMapSyncFilter.h index 88c7eeec99..16b2389745 100644 --- a/include/xrpl/shamap/SHAMapSyncFilter.h +++ b/include/xrpl/shamap/SHAMapSyncFilter.h @@ -6,7 +6,7 @@ #include /** Callback for filtering SHAMap during sync. */ -namespace ripple { +namespace xrpl { class SHAMapSyncFilter { @@ -30,6 +30,6 @@ public: getNode(SHAMapHash const& nodeHash) const = 0; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/shamap/SHAMapTreeNode.h b/include/xrpl/shamap/SHAMapTreeNode.h index 245f8c8a7a..75992a9bce 100644 --- a/include/xrpl/shamap/SHAMapTreeNode.h +++ b/include/xrpl/shamap/SHAMapTreeNode.h @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { // These are wire-protocol identifiers used during serialization to encode the // type of a node. They should not be arbitrarily be changed. @@ -170,6 +170,6 @@ private: makeTransactionWithMeta(Slice data, SHAMapHash const& hash, bool hashValid); }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/shamap/SHAMapTxLeafNode.h b/include/xrpl/shamap/SHAMapTxLeafNode.h index e7dbd10fd6..e7b73ecde9 100644 --- a/include/xrpl/shamap/SHAMapTxLeafNode.h +++ b/include/xrpl/shamap/SHAMapTxLeafNode.h @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { /** A leaf node for a transaction. No metadata is included. */ class SHAMapTxLeafNode final : public SHAMapLeafNode, @@ -64,6 +64,6 @@ public: } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/shamap/SHAMapTxPlusMetaLeafNode.h b/include/xrpl/shamap/SHAMapTxPlusMetaLeafNode.h index 915c02e7f6..c38277ef73 100644 --- a/include/xrpl/shamap/SHAMapTxPlusMetaLeafNode.h +++ b/include/xrpl/shamap/SHAMapTxPlusMetaLeafNode.h @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { /** A leaf node for a transaction and its associated metadata. */ class SHAMapTxPlusMetaLeafNode final @@ -68,6 +68,6 @@ public: } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/shamap/TreeNodeCache.h b/include/xrpl/shamap/TreeNodeCache.h index bb6120e4a6..bf9797c745 100644 --- a/include/xrpl/shamap/TreeNodeCache.h +++ b/include/xrpl/shamap/TreeNodeCache.h @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { using TreeNodeCache = TaggedCache< uint256, @@ -13,6 +13,6 @@ using TreeNodeCache = TaggedCache< /*IsKeyCache*/ false, intr_ptr::SharedWeakUnionPtr, intr_ptr::SharedPtr>; -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/shamap/detail/TaggedPointer.h b/include/xrpl/shamap/detail/TaggedPointer.h index f3a616c052..53a53960d4 100644 --- a/include/xrpl/shamap/detail/TaggedPointer.h +++ b/include/xrpl/shamap/detail/TaggedPointer.h @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { /** TaggedPointer is a combination of a pointer and a mask stored in the lowest two bits. @@ -226,6 +226,6 @@ popcnt16(std::uint16_t a) #endif } -} // namespace ripple +} // namespace xrpl #endif diff --git a/include/xrpl/shamap/detail/TaggedPointer.ipp b/include/xrpl/shamap/detail/TaggedPointer.ipp index f3bd561e06..e88b4b11c4 100644 --- a/include/xrpl/shamap/detail/TaggedPointer.ipp +++ b/include/xrpl/shamap/detail/TaggedPointer.ipp @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { namespace { // Sparse array size boundaries. @@ -61,7 +61,7 @@ numAllocatedChildren(std::uint8_t n) { XRPL_ASSERT( n <= SHAMapInnerNode::branchFactor, - "ripple::numAllocatedChildren : valid input"); + "xrpl::numAllocatedChildren : valid input"); return *std::lower_bound(boundaries.begin(), boundaries.end(), n); } @@ -70,7 +70,7 @@ boundariesIndex(std::uint8_t numChildren) { XRPL_ASSERT( numChildren <= SHAMapInnerNode::branchFactor, - "ripple::boundariesIndex : valid input"); + "xrpl::boundariesIndex : valid input"); return std::distance( boundaries.begin(), std::lower_bound(boundaries.begin(), boundaries.end(), numChildren)); @@ -142,7 +142,7 @@ deallocateArrays(std::uint8_t boundaryIndex, void* p) { XRPL_ASSERT( isFromArrayFuns[boundaryIndex](p), - "ripple::deallocateArrays : valid inputs"); + "xrpl::deallocateArrays : valid inputs"); freeArrayFuns[boundaryIndex](p); } @@ -258,12 +258,12 @@ inline TaggedPointer::TaggedPointer(RawAllocateTag, std::uint8_t numChildren) auto [tag, p] = allocateArrays(numChildren); XRPL_ASSERT( tag < boundaries.size(), - "ripple::TaggedPointer::TaggedPointer(RawAllocateTag, std::uint8_t) : " + "xrpl::TaggedPointer::TaggedPointer(RawAllocateTag, std::uint8_t) : " "maximum tag"); XRPL_ASSERT( (reinterpret_cast(p) & ptrMask) == reinterpret_cast(p), - "ripple::TaggedPointer::TaggedPointer(RawAllocateTag, std::uint8_t) : " + "xrpl::TaggedPointer::TaggedPointer(RawAllocateTag, std::uint8_t) : " "valid pointer"); tp_ = reinterpret_cast(p) + tag; } @@ -276,7 +276,7 @@ inline TaggedPointer::TaggedPointer( { XRPL_ASSERT( toAllocate >= popcnt16(dstBranches), - "ripple::TaggedPointer::TaggedPointer(TaggedPointer&& ...) : minimum " + "xrpl::TaggedPointer::TaggedPointer(TaggedPointer&& ...) : minimum " "toAllocate input"); if (other.capacity() == numAllocatedChildren(toAllocate)) @@ -427,7 +427,7 @@ inline TaggedPointer::TaggedPointer( // If sparse, may need to run additional constructors XRPL_ASSERT( !dstIsDense || dstIndex == dstNumAllocated, - "ripple::TaggedPointer::TaggedPointer(TaggedPointer&& ...) : " + "xrpl::TaggedPointer::TaggedPointer(TaggedPointer&& ...) : " "non-sparse or valid sparse"); for (int i = dstIndex; i < dstNumAllocated; ++i) { @@ -575,4 +575,4 @@ inline TaggedPointer::~TaggedPointer() destroyHashesAndChildren(); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/basics/Archive.cpp b/src/libxrpl/basics/Archive.cpp index 14a043aff8..8ee23afda0 100644 --- a/src/libxrpl/basics/Archive.cpp +++ b/src/libxrpl/basics/Archive.cpp @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { void extractTarLz4( @@ -99,4 +99,4 @@ extractTarLz4( } } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/basics/BasicConfig.cpp b/src/libxrpl/basics/BasicConfig.cpp index 280c660794..ca6797c5ea 100644 --- a/src/libxrpl/basics/BasicConfig.cpp +++ b/src/libxrpl/basics/BasicConfig.cpp @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { Section::Section(std::string const& name) : name_(name) { @@ -183,4 +183,4 @@ operator<<(std::ostream& ss, BasicConfig const& c) return ss; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/basics/CountedObject.cpp b/src/libxrpl/basics/CountedObject.cpp index 05ee345a54..bcdca9dfa4 100644 --- a/src/libxrpl/basics/CountedObject.cpp +++ b/src/libxrpl/basics/CountedObject.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { CountedObjects& CountedObjects::getInstance() noexcept @@ -36,4 +36,4 @@ CountedObjects::getCounts(int minimumThreshold) const return counts; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/basics/FileUtilities.cpp b/src/libxrpl/basics/FileUtilities.cpp index 239a760999..981fdd5360 100644 --- a/src/libxrpl/basics/FileUtilities.cpp +++ b/src/libxrpl/basics/FileUtilities.cpp @@ -15,7 +15,7 @@ #include #include -namespace ripple { +namespace xrpl { std::string getFileContents( @@ -85,4 +85,4 @@ writeFileContents( } } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/basics/Log.cpp b/src/libxrpl/basics/Log.cpp index 0a0bb20135..33d6f6559e 100644 --- a/src/libxrpl/basics/Log.cpp +++ b/src/libxrpl/basics/Log.cpp @@ -17,7 +17,7 @@ #include #include -namespace ripple { +namespace xrpl { Logs::Sink::Sink( std::string const& partition, @@ -222,7 +222,7 @@ Logs::fromSeverity(beast::severities::Severity level) // LCOV_EXCL_START default: - UNREACHABLE("ripple::Logs::fromSeverity : invalid severity"); + UNREACHABLE("xrpl::Logs::fromSeverity : invalid severity"); [[fallthrough]]; // LCOV_EXCL_STOP case kFatal: @@ -250,7 +250,7 @@ Logs::toSeverity(LogSeverity level) return kError; // LCOV_EXCL_START default: - UNREACHABLE("ripple::Logs::toSeverity : invalid severity"); + UNREACHABLE("xrpl::Logs::toSeverity : invalid severity"); [[fallthrough]]; // LCOV_EXCL_STOP case lsFATAL: @@ -279,7 +279,7 @@ Logs::toString(LogSeverity s) return "Fatal"; // LCOV_EXCL_START default: - UNREACHABLE("ripple::Logs::toString : invalid severity"); + UNREACHABLE("xrpl::Logs::toString : invalid severity"); return "Unknown"; // LCOV_EXCL_STOP } @@ -345,7 +345,7 @@ Logs::format( break; // LCOV_EXCL_START default: - UNREACHABLE("ripple::Logs::format : invalid severity"); + UNREACHABLE("xrpl::Logs::format : invalid severity"); [[fallthrough]]; // LCOV_EXCL_STOP case kFatal: @@ -459,4 +459,4 @@ debugLog() return beast::Journal(debugSink().get()); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/basics/Number.cpp b/src/libxrpl/basics/Number.cpp index 89f7937e06..8a314e5321 100644 --- a/src/libxrpl/basics/Number.cpp +++ b/src/libxrpl/basics/Number.cpp @@ -20,7 +20,7 @@ using uint128_t = boost::multiprecision::uint128_t; using uint128_t = __uint128_t; #endif // !defined(_MSC_VER) -namespace ripple { +namespace xrpl { thread_local Number::rounding_mode Number::mode_ = Number::to_nearest; @@ -224,7 +224,7 @@ Number::operator+=(Number const& y) } XRPL_ASSERT( isnormal() && y.isnormal(), - "ripple::Number::operator+=(Number) : is normal"); + "xrpl::Number::operator+=(Number) : is normal"); auto xm = mantissa(); auto xe = exponent(); int xn = 1; @@ -365,7 +365,7 @@ Number::operator*=(Number const& y) } XRPL_ASSERT( isnormal() && y.isnormal(), - "ripple::Number::operator*=(Number) : is normal"); + "xrpl::Number::operator*=(Number) : is normal"); auto xm = mantissa(); auto xe = exponent(); int xn = 1; @@ -421,7 +421,7 @@ Number::operator*=(Number const& y) exponent_ = xe; XRPL_ASSERT( isnormal() || *this == Number{}, - "ripple::Number::operator*=(Number) : result is normal"); + "xrpl::Number::operator*=(Number) : result is normal"); return *this; } @@ -520,7 +520,7 @@ to_string(Number const& amount) } XRPL_ASSERT( - exponent + 43 > 0, "ripple::to_string(Number) : minimum exponent"); + exponent + 43 > 0, "xrpl::to_string(Number) : minimum exponent"); ptrdiff_t const pad_prefix = 27; ptrdiff_t const pad_suffix = 23; @@ -547,8 +547,7 @@ to_string(Number const& amount) pre_from += pad_prefix; XRPL_ASSERT( - post_to >= post_from, - "ripple::to_string(Number) : first distance check"); + post_to >= post_from, "xrpl::to_string(Number) : first distance check"); pre_from = std::find_if(pre_from, pre_to, [](char c) { return c != '0'; }); @@ -559,7 +558,7 @@ to_string(Number const& amount) XRPL_ASSERT( post_to >= post_from, - "ripple::to_string(Number) : second distance check"); + "xrpl::to_string(Number) : second distance check"); post_to = std::find_if( std::make_reverse_iterator(post_to), @@ -744,4 +743,4 @@ power(Number const& f, unsigned n, unsigned d) return root(power(f, n), d); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/basics/ResolverAsio.cpp b/src/libxrpl/basics/ResolverAsio.cpp index d8275e0893..8b9b2a9c4c 100644 --- a/src/libxrpl/basics/ResolverAsio.cpp +++ b/src/libxrpl/basics/ResolverAsio.cpp @@ -26,7 +26,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Mix-in to track when all pending I/O is complete. Derived classes must be callable with this signature: @@ -46,7 +46,7 @@ public: // Destroying the object with I/O pending? Not a clean exit! XRPL_ASSERT( m_pending.load() == 0, - "ripple::AsyncObject::~AsyncObject : nothing pending"); + "xrpl::AsyncObject::~AsyncObject : nothing pending"); } /** RAII container that maintains the count of pending I/O. @@ -153,9 +153,9 @@ public: { XRPL_ASSERT( m_work.empty(), - "ripple::ResolverAsioImpl::~ResolverAsioImpl : no pending work"); + "xrpl::ResolverAsioImpl::~ResolverAsioImpl : no pending work"); XRPL_ASSERT( - m_stopped, "ripple::ResolverAsioImpl::~ResolverAsioImpl : stopped"); + m_stopped, "xrpl::ResolverAsioImpl::~ResolverAsioImpl : stopped"); } //------------------------------------------------------------------------- @@ -178,10 +178,10 @@ public: start() override { XRPL_ASSERT( - m_stopped == true, "ripple::ResolverAsioImpl::start : stopped"); + m_stopped == true, "xrpl::ResolverAsioImpl::start : stopped"); XRPL_ASSERT( m_stop_called == false, - "ripple::ResolverAsioImpl::start : not stopping"); + "xrpl::ResolverAsioImpl::start : not stopping"); if (m_stopped.exchange(false) == true) { @@ -229,10 +229,10 @@ public: { XRPL_ASSERT( m_stop_called == false, - "ripple::ResolverAsioImpl::resolve : not stopping"); + "xrpl::ResolverAsioImpl::resolve : not stopping"); XRPL_ASSERT( !names.empty(), - "ripple::ResolverAsioImpl::resolve : names non-empty"); + "xrpl::ResolverAsioImpl::resolve : names non-empty"); // TODO NIKB use rvalue references to construct and move // reducing cost. @@ -255,7 +255,7 @@ public: { XRPL_ASSERT( m_stop_called == true, - "ripple::ResolverAsioImpl::do_stop : stopping"); + "xrpl::ResolverAsioImpl::do_stop : stopping"); if (m_stopped.exchange(true) == false) { @@ -415,7 +415,7 @@ public: { XRPL_ASSERT( !names.empty(), - "ripple::ResolverAsioImpl::do_resolve : names non-empty"); + "xrpl::ResolverAsioImpl::do_resolve : names non-empty"); if (m_stop_called == false) { @@ -450,4 +450,4 @@ ResolverAsio::New(boost::asio::io_context& io_context, beast::Journal journal) //----------------------------------------------------------------------------- Resolver::~Resolver() = default; -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/basics/StringUtilities.cpp b/src/libxrpl/basics/StringUtilities.cpp index 6d7ab326af..96b5cfdb9b 100644 --- a/src/libxrpl/basics/StringUtilities.cpp +++ b/src/libxrpl/basics/StringUtilities.cpp @@ -17,7 +17,7 @@ #include #include -namespace ripple { +namespace xrpl { std::string sqlBlobLiteral(Blob const& blob) @@ -136,4 +136,4 @@ isProperlyFormedTomlDomain(std::string_view domain) return boost::regex_match(domain.begin(), domain.end(), re); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/basics/UptimeClock.cpp b/src/libxrpl/basics/UptimeClock.cpp index dbfc0046a2..521a6a1313 100644 --- a/src/libxrpl/basics/UptimeClock.cpp +++ b/src/libxrpl/basics/UptimeClock.cpp @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { std::atomic UptimeClock::now_{0}; // seconds since start std::atomic UptimeClock::stop_{false}; // stop update thread @@ -54,4 +54,4 @@ UptimeClock::now() return time_point{duration{now_}}; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/basics/base64.cpp b/src/libxrpl/basics/base64.cpp index d0d11c85bb..4a5cbacaef 100644 --- a/src/libxrpl/basics/base64.cpp +++ b/src/libxrpl/basics/base64.cpp @@ -40,7 +40,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace base64 { @@ -232,4 +232,4 @@ base64_decode(std::string_view data) return dest; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/basics/contract.cpp b/src/libxrpl/basics/contract.cpp index 81674de3c8..562d3a0944 100644 --- a/src/libxrpl/basics/contract.cpp +++ b/src/libxrpl/basics/contract.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { void LogThrow(std::string const& title) @@ -30,4 +30,4 @@ LogicError(std::string const& s) noexcept // LCOV_EXCL_STOP } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/basics/make_SSLContext.cpp b/src/libxrpl/basics/make_SSLContext.cpp index 000f4375ab..579edb0f71 100644 --- a/src/libxrpl/basics/make_SSLContext.cpp +++ b/src/libxrpl/basics/make_SSLContext.cpp @@ -24,7 +24,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace openssl { namespace detail { @@ -385,4 +385,4 @@ make_SSLContextAuthed( return context; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/basics/mulDiv.cpp b/src/libxrpl/basics/mulDiv.cpp index 993cff7eb6..d8988b474e 100644 --- a/src/libxrpl/basics/mulDiv.cpp +++ b/src/libxrpl/basics/mulDiv.cpp @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { std::optional mulDiv(std::uint64_t value, std::uint64_t mul, std::uint64_t div) @@ -17,10 +17,10 @@ mulDiv(std::uint64_t value, std::uint64_t mul, std::uint64_t div) result /= div; - if (result > ripple::muldiv_max) + if (result > xrpl::muldiv_max) return std::nullopt; return static_cast(result); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/crypto/RFC1751.cpp b/src/libxrpl/crypto/RFC1751.cpp index 2b41e2ef38..86ee8ad382 100644 --- a/src/libxrpl/crypto/RFC1751.cpp +++ b/src/libxrpl/crypto/RFC1751.cpp @@ -14,7 +14,7 @@ #include #include -namespace ripple { +namespace xrpl { // // RFC 1751 code converted to C++/Boost. @@ -260,12 +260,12 @@ RFC1751::extract(char const* s, int start, int length) unsigned char cr; unsigned long x; - XRPL_ASSERT(length <= 11, "ripple::RFC1751::extract : maximum length"); - XRPL_ASSERT(start >= 0, "ripple::RFC1751::extract : minimum start"); - XRPL_ASSERT(length >= 0, "ripple::RFC1751::extract : minimum length"); + XRPL_ASSERT(length <= 11, "xrpl::RFC1751::extract : maximum length"); + XRPL_ASSERT(start >= 0, "xrpl::RFC1751::extract : minimum start"); + XRPL_ASSERT(length >= 0, "xrpl::RFC1751::extract : minimum length"); XRPL_ASSERT( start + length <= 66, - "ripple::RFC1751::extract : maximum start + length"); + "xrpl::RFC1751::extract : maximum start + length"); int const shiftR = 24 - (length + (start % 8)); cl = s[start / 8]; // get components @@ -312,12 +312,11 @@ RFC1751::insert(char* s, int x, int start, int length) unsigned long y; int shift; - XRPL_ASSERT(length <= 11, "ripple::RFC1751::insert : maximum length"); - XRPL_ASSERT(start >= 0, "ripple::RFC1751::insert : minimum start"); - XRPL_ASSERT(length >= 0, "ripple::RFC1751::insert : minimum length"); + XRPL_ASSERT(length <= 11, "xrpl::RFC1751::insert : maximum length"); + XRPL_ASSERT(start >= 0, "xrpl::RFC1751::insert : minimum start"); + XRPL_ASSERT(length >= 0, "xrpl::RFC1751::insert : minimum length"); XRPL_ASSERT( - start + length <= 66, - "ripple::RFC1751::insert : maximum start + length"); + start + length <= 66, "xrpl::RFC1751::insert : maximum start + length"); shift = ((8 - ((start + length) % 8)) % 8); y = (long)x << shift; @@ -508,4 +507,4 @@ RFC1751::getWordFromBlob(void const* blob, size_t bytes) [hash % (sizeof(s_dictionary) / sizeof(s_dictionary[0]))]; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/crypto/csprng.cpp b/src/libxrpl/crypto/csprng.cpp index e89129bfb0..5ee1700d7f 100644 --- a/src/libxrpl/crypto/csprng.cpp +++ b/src/libxrpl/crypto/csprng.cpp @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { csprng_engine::csprng_engine() { @@ -87,4 +87,4 @@ crypto_prng() return engine; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/crypto/secure_erase.cpp b/src/libxrpl/crypto/secure_erase.cpp index 6e27de59d0..5b65b342ec 100644 --- a/src/libxrpl/crypto/secure_erase.cpp +++ b/src/libxrpl/crypto/secure_erase.cpp @@ -4,7 +4,7 @@ #include -namespace ripple { +namespace xrpl { void secure_erase(void* dest, std::size_t bytes) @@ -12,4 +12,4 @@ secure_erase(void* dest, std::size_t bytes) OPENSSL_cleanse(dest, bytes); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/json/JsonPropertyStream.cpp b/src/libxrpl/json/JsonPropertyStream.cpp index fd4c0d575d..fb5a7b32a4 100644 --- a/src/libxrpl/json/JsonPropertyStream.cpp +++ b/src/libxrpl/json/JsonPropertyStream.cpp @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { JsonPropertyStream::JsonPropertyStream() : m_top(Json::objectValue) { @@ -161,4 +161,4 @@ JsonPropertyStream::add(std::string const& v) m_stack.back()->append(v); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/json/Object.cpp b/src/libxrpl/json/Object.cpp index ee63acc327..ea5e5a32d8 100644 --- a/src/libxrpl/json/Object.cpp +++ b/src/libxrpl/json/Object.cpp @@ -52,9 +52,9 @@ void Collection::checkWritable(std::string const& label) { if (!enabled_) - ripple::Throw(label + ": not enabled"); + xrpl::Throw(label + ": not enabled"); if (!writer_) - ripple::Throw(label + ": not writable"); + xrpl::Throw(label + ": not writable"); } //------------------------------------------------------------------------------ diff --git a/src/libxrpl/json/Writer.cpp b/src/libxrpl/json/Writer.cpp index e1ca1900f0..fcdceb7253 100644 --- a/src/libxrpl/json/Writer.cpp +++ b/src/libxrpl/json/Writer.cpp @@ -263,14 +263,14 @@ Writer::output(Json::Value const& value) void Writer::output(float f) { - auto s = ripple::to_string(f); + auto s = xrpl::to_string(f); impl_->output({s.data(), lengthWithoutTrailingZeros(s)}); } void Writer::output(double f) { - auto s = ripple::to_string(f); + auto s = xrpl::to_string(f); impl_->output({s.data(), lengthWithoutTrailingZeros(s)}); } diff --git a/src/libxrpl/json/json_reader.cpp b/src/libxrpl/json/json_reader.cpp index 4af0ed6ef0..c0843ca929 100644 --- a/src/libxrpl/json/json_reader.cpp +++ b/src/libxrpl/json/json_reader.cpp @@ -941,7 +941,7 @@ operator>>(std::istream& sin, Value& root) // XRPL_ASSERT(ok, "Json::operator>>() : parse succeeded"); if (!ok) - ripple::Throw(reader.getFormatedErrorMessages()); + xrpl::Throw(reader.getFormatedErrorMessages()); return sin; } diff --git a/src/libxrpl/json/json_value.cpp b/src/libxrpl/json/json_value.cpp index f283ba3f25..661c383a8e 100644 --- a/src/libxrpl/json/json_value.cpp +++ b/src/libxrpl/json/json_value.cpp @@ -221,7 +221,7 @@ Value::Value(char const* value) : type_(stringValue), allocated_(true) value_.string_ = valueAllocator()->duplicateStringValue(value); } -Value::Value(ripple::Number const& value) : type_(stringValue), allocated_(true) +Value::Value(xrpl::Number const& value) : type_(stringValue), allocated_(true) { auto const tmp = to_string(value); value_.string_ = diff --git a/src/libxrpl/ledger/ApplyStateTable.cpp b/src/libxrpl/ledger/ApplyStateTable.cpp index c236f0d1b5..94fd9d7273 100644 --- a/src/libxrpl/ledger/ApplyStateTable.cpp +++ b/src/libxrpl/ledger/ApplyStateTable.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { void @@ -143,7 +143,7 @@ ApplyStateTable::apply( { XRPL_ASSERT( origNode && curNode, - "ripple::detail::ApplyStateTable::apply : valid nodes for " + "xrpl::detail::ApplyStateTable::apply : valid nodes for " "deletion"); threadOwners(to, meta, origNode, newMod, j); @@ -178,7 +178,7 @@ ApplyStateTable::apply( { XRPL_ASSERT( curNode && origNode, - "ripple::detail::ApplyStateTable::apply : valid nodes for " + "xrpl::detail::ApplyStateTable::apply : valid nodes for " "modification"); if (curNode->isThreadedType( @@ -216,7 +216,7 @@ ApplyStateTable::apply( { XRPL_ASSERT( curNode && !origNode, - "ripple::detail::ApplyStateTable::apply : valid nodes for " + "xrpl::detail::ApplyStateTable::apply : valid nodes for " "creation"); threadOwners(to, meta, curNode, newMod, j); @@ -242,7 +242,7 @@ ApplyStateTable::apply( { // LCOV_EXCL_START UNREACHABLE( - "ripple::detail::ApplyStateTable::apply : unsupported " + "xrpl::detail::ApplyStateTable::apply : unsupported " "operation type"); // LCOV_EXCL_STOP } @@ -547,7 +547,7 @@ ApplyStateTable::threadItem(TxMeta& meta, std::shared_ptr const& sle) { XRPL_ASSERT( node.getFieldIndex(sfPreviousTxnLgrSeq) == -1, - "ripple::ApplyStateTable::threadItem : previous ledger is not " + "xrpl::ApplyStateTable::threadItem : previous ledger is not " "set"); node.setFieldH256(sfPreviousTxnID, prevTxID); node.setFieldU32(sfPreviousTxnLgrSeq, prevLgrID); @@ -555,11 +555,11 @@ ApplyStateTable::threadItem(TxMeta& meta, std::shared_ptr const& sle) XRPL_ASSERT( node.getFieldH256(sfPreviousTxnID) == prevTxID, - "ripple::ApplyStateTable::threadItem : previous transaction is a " + "xrpl::ApplyStateTable::threadItem : previous transaction is a " "match"); XRPL_ASSERT( node.getFieldU32(sfPreviousTxnLgrSeq) == prevLgrID, - "ripple::ApplyStateTable::threadItem : previous ledger is a match"); + "xrpl::ApplyStateTable::threadItem : previous ledger is a match"); } } @@ -576,7 +576,7 @@ ApplyStateTable::getForMod( { XRPL_ASSERT( miter->second, - "ripple::ApplyStateTable::getForMod : non-null result"); + "xrpl::ApplyStateTable::getForMod : non-null result"); return miter->second; } } @@ -634,7 +634,7 @@ ApplyStateTable::threadTx( // threadItem only applied to AccountRoot XRPL_ASSERT( sle->isThreadedType(base.rules()), - "ripple::ApplyStateTable::threadTx : SLE is threaded"); + "xrpl::ApplyStateTable::threadTx : SLE is threaded"); threadItem(meta, sle); } @@ -671,4 +671,4 @@ ApplyStateTable::threadOwners( } } // namespace detail -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/ledger/ApplyView.cpp b/src/libxrpl/ledger/ApplyView.cpp index 19dfd199f9..30280668fd 100644 --- a/src/libxrpl/ledger/ApplyView.cpp +++ b/src/libxrpl/ledger/ApplyView.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { std::optional ApplyView::dirAdd( @@ -131,7 +131,7 @@ ApplyView::emptyDirDelete(Keylet const& directory) node->getFieldH256(sfRootIndex) != directory.key) { // LCOV_EXCL_START - UNREACHABLE("ripple::ApplyView::emptyDirDelete : invalid node type"); + UNREACHABLE("xrpl::ApplyView::emptyDirDelete : invalid node type"); return false; // LCOV_EXCL_STOP } @@ -358,4 +358,4 @@ ApplyView::dirDelete( return true; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/ledger/ApplyViewBase.cpp b/src/libxrpl/ledger/ApplyViewBase.cpp index bb5e316669..72735081de 100644 --- a/src/libxrpl/ledger/ApplyViewBase.cpp +++ b/src/libxrpl/ledger/ApplyViewBase.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { namespace detail { ApplyViewBase::ApplyViewBase(ReadView const* base, ApplyFlags flags) @@ -155,4 +155,4 @@ ApplyViewBase::rawDestroyXRP(XRPAmount const& fee) } } // namespace detail -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/ledger/ApplyViewImpl.cpp b/src/libxrpl/ledger/ApplyViewImpl.cpp index 90652dd45b..b0aeb70228 100644 --- a/src/libxrpl/ledger/ApplyViewImpl.cpp +++ b/src/libxrpl/ledger/ApplyViewImpl.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { ApplyViewImpl::ApplyViewImpl(ReadView const* base, ApplyFlags flags) : ApplyViewBase(base, flags) @@ -37,4 +37,4 @@ ApplyViewImpl::visit( items_.visit(to, func); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/ledger/BookDirs.cpp b/src/libxrpl/ledger/BookDirs.cpp index 72387650ec..6dda4ffe51 100644 --- a/src/libxrpl/ledger/BookDirs.cpp +++ b/src/libxrpl/ledger/BookDirs.cpp @@ -2,7 +2,7 @@ #include #include -namespace ripple { +namespace xrpl { BookDirs::BookDirs(ReadView const& view, Book const& book) : view_(&view) @@ -11,13 +11,13 @@ BookDirs::BookDirs(ReadView const& view, Book const& book) , key_(view_->succ(root_, next_quality_).value_or(beast::zero)) { XRPL_ASSERT( - root_ != beast::zero, "ripple::BookDirs::BookDirs : nonzero root"); + root_ != beast::zero, "xrpl::BookDirs::BookDirs : nonzero root"); if (key_ != beast::zero) { if (!cdirFirst(*view_, key_, sle_, entry_, index_)) { // LCOV_EXCL_START - UNREACHABLE("ripple::BookDirs::BookDirs : directory is empty"); + UNREACHABLE("xrpl::BookDirs::BookDirs : directory is empty"); // LCOV_EXCL_STOP } } @@ -55,7 +55,7 @@ BookDirs::const_iterator::operator==( XRPL_ASSERT( view_ == other.view_ && root_ == other.root_, - "ripple::BookDirs::const_iterator::operator== : views and roots are " + "xrpl::BookDirs::const_iterator::operator== : views and roots are " "matching"); return entry_ == other.entry_ && cur_key_ == other.cur_key_ && index_ == other.index_; @@ -66,7 +66,7 @@ BookDirs::const_iterator::operator*() const { XRPL_ASSERT( index_ != beast::zero, - "ripple::BookDirs::const_iterator::operator* : nonzero index"); + "xrpl::BookDirs::const_iterator::operator* : nonzero index"); if (!cache_) cache_ = view_->read(keylet::offer(index_)); return *cache_; @@ -79,7 +79,7 @@ BookDirs::const_iterator::operator++() XRPL_ASSERT( index_ != zero, - "ripple::BookDirs::const_iterator::operator++ : nonzero index"); + "xrpl::BookDirs::const_iterator::operator++ : nonzero index"); if (!cdirNext(*view_, cur_key_, sle_, entry_, index_)) { if (index_ != 0 || @@ -94,7 +94,7 @@ BookDirs::const_iterator::operator++() { // LCOV_EXCL_START UNREACHABLE( - "ripple::BookDirs::const_iterator::operator++ : directory is " + "xrpl::BookDirs::const_iterator::operator++ : directory is " "empty"); // LCOV_EXCL_STOP } @@ -109,10 +109,10 @@ BookDirs::const_iterator::operator++(int) { XRPL_ASSERT( index_ != beast::zero, - "ripple::BookDirs::const_iterator::operator++(int) : nonzero index"); + "xrpl::BookDirs::const_iterator::operator++(int) : nonzero index"); const_iterator tmp(*this); ++(*this); return tmp; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/ledger/CachedView.cpp b/src/libxrpl/ledger/CachedView.cpp index 6463779845..19d4baa861 100644 --- a/src/libxrpl/ledger/CachedView.cpp +++ b/src/libxrpl/ledger/CachedView.cpp @@ -1,7 +1,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { bool @@ -39,8 +39,7 @@ CachedViewImpl::read(Keylet const& k) const }); // If the sle is null, then a failure must have occurred in base_.read() XRPL_ASSERT( - sle || baseRead, - "ripple::CachedView::read : null SLE result from base"); + sle || baseRead, "xrpl::CachedView::read : null SLE result from base"); if (cacheHit && baseRead) hitsexpired.increment(); else if (cacheHit) @@ -62,4 +61,4 @@ CachedViewImpl::read(Keylet const& k) const } } // namespace detail -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/ledger/CredentialHelpers.cpp b/src/libxrpl/ledger/CredentialHelpers.cpp index cbca7eb192..e983096681 100644 --- a/src/libxrpl/ledger/CredentialHelpers.cpp +++ b/src/libxrpl/ledger/CredentialHelpers.cpp @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace credentials { bool @@ -374,4 +374,4 @@ verifyDepositPreauth( return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/ledger/Dir.cpp b/src/libxrpl/ledger/Dir.cpp index ef128b7c3d..d834216d24 100644 --- a/src/libxrpl/ledger/Dir.cpp +++ b/src/libxrpl/ledger/Dir.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { using const_iterator = Dir::const_iterator; @@ -43,7 +43,7 @@ const_iterator::operator==(const_iterator const& other) const XRPL_ASSERT( view_ == other.view_ && root_.key == other.root_.key, - "ripple::const_iterator::operator== : views and roots are matching"); + "xrpl::const_iterator::operator== : views and roots are matching"); return page_.key == other.page_.key && index_ == other.index_; } @@ -52,7 +52,7 @@ const_iterator::operator*() const { XRPL_ASSERT( index_ != beast::zero, - "ripple::const_iterator::operator* : nonzero index"); + "xrpl::const_iterator::operator* : nonzero index"); if (!cache_) cache_ = view_->read(keylet::child(index_)); return *cache_; @@ -63,7 +63,7 @@ const_iterator::operator++() { XRPL_ASSERT( index_ != beast::zero, - "ripple::const_iterator::operator++ : nonzero index"); + "xrpl::const_iterator::operator++ : nonzero index"); if (++it_ != std::end(*indexes_)) { index_ = *it_; @@ -79,7 +79,7 @@ const_iterator::operator++(int) { XRPL_ASSERT( index_ != beast::zero, - "ripple::const_iterator::operator++(int) : nonzero index"); + "xrpl::const_iterator::operator++(int) : nonzero index"); const_iterator tmp(*this); ++(*this); return tmp; @@ -98,7 +98,7 @@ const_iterator::next_page() { page_ = keylet::page(root_, next); sle_ = view_->read(page_); - XRPL_ASSERT(sle_, "ripple::const_iterator::next_page : non-null SLE"); + XRPL_ASSERT(sle_, "xrpl::const_iterator::next_page : non-null SLE"); indexes_ = &sle_->getFieldV256(sfIndexes); if (indexes_->empty()) { @@ -120,4 +120,4 @@ const_iterator::page_size() return indexes_->size(); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/ledger/OpenView.cpp b/src/libxrpl/ledger/OpenView.cpp index 36cde12f82..3fb3b90341 100644 --- a/src/libxrpl/ledger/OpenView.cpp +++ b/src/libxrpl/ledger/OpenView.cpp @@ -1,7 +1,7 @@ #include #include -namespace ripple { +namespace xrpl { class OpenView::txs_iter_impl : public txs_type::iter_base { @@ -250,4 +250,4 @@ OpenView::rawTxInsert( LogicError("rawTxInsert: duplicate TX id: " + to_string(key)); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/ledger/PaymentSandbox.cpp b/src/libxrpl/ledger/PaymentSandbox.cpp index 94d30529bf..09600ae623 100644 --- a/src/libxrpl/ledger/PaymentSandbox.cpp +++ b/src/libxrpl/ledger/PaymentSandbox.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { @@ -28,10 +28,10 @@ DeferredCredits::credit( { XRPL_ASSERT( sender != receiver, - "ripple::detail::DeferredCredits::credit : sender is not receiver"); + "xrpl::detail::DeferredCredits::credit : sender is not receiver"); XRPL_ASSERT( !amount.negative(), - "ripple::detail::DeferredCredits::credit : positive amount"); + "xrpl::detail::DeferredCredits::credit : positive amount"); auto const k = makeKey(sender, receiver, amount.getCurrency()); auto i = credits_.find(k); @@ -234,14 +234,14 @@ PaymentSandbox::adjustOwnerCountHook( void PaymentSandbox::apply(RawView& to) { - XRPL_ASSERT(!ps_, "ripple::PaymentSandbox::apply : non-null sandbox"); + XRPL_ASSERT(!ps_, "xrpl::PaymentSandbox::apply : non-null sandbox"); items_.apply(to); } void PaymentSandbox::apply(PaymentSandbox& to) { - XRPL_ASSERT(ps_ == &to, "ripple::PaymentSandbox::apply : matching sandbox"); + XRPL_ASSERT(ps_ == &to, "xrpl::PaymentSandbox::apply : matching sandbox"); items_.apply(to); tab_.apply(to.tab_); } @@ -327,7 +327,7 @@ PaymentSandbox::balanceChanges(ReadView const& view) const auto const at = after->getType(); XRPL_ASSERT( at == before->getType(), - "ripple::PaymentSandbox::balanceChanges : after and before " + "xrpl::PaymentSandbox::balanceChanges : after and before " "types matching"); switch (at) { @@ -377,4 +377,4 @@ PaymentSandbox::xrpDestroyed() const return items_.dropsDestroyed(); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/ledger/RawStateTable.cpp b/src/libxrpl/ledger/RawStateTable.cpp index 8ba97b76c2..b958e94c54 100644 --- a/src/libxrpl/ledger/RawStateTable.cpp +++ b/src/libxrpl/ledger/RawStateTable.cpp @@ -1,7 +1,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { class RawStateTable::sles_iter_impl : public ReadView::sles_type::iter_base @@ -46,7 +46,7 @@ public: { XRPL_ASSERT( end1_ == p->end1_ && end0_ == p->end0_, - "ripple::detail::RawStateTable::equal : matching end " + "xrpl::detail::RawStateTable::equal : matching end " "iterators"); return iter1_ == p->iter1_ && iter0_ == p->iter0_; } @@ -59,7 +59,7 @@ public: { XRPL_ASSERT( sle1_ || sle0_, - "ripple::detail::RawStateTable::increment : either SLE is " + "xrpl::detail::RawStateTable::increment : either SLE is " "non-null"); if (sle1_ && !sle0_) @@ -167,8 +167,7 @@ bool RawStateTable::exists(ReadView const& base, Keylet const& k) const { XRPL_ASSERT( - k.key.isNonZero(), - "ripple::detail::RawStateTable::exists : nonzero key"); + k.key.isNonZero(), "xrpl::detail::RawStateTable::exists : nonzero key"); auto const iter = items_.find(k.key); if (iter == items_.end()) return base.exists(k); @@ -339,4 +338,4 @@ RawStateTable::slesUpperBound(ReadView const& base, uint256 const& key) const } } // namespace detail -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/ledger/ReadView.cpp b/src/libxrpl/ledger/ReadView.cpp index 0d72a80b3c..e0764d6c81 100644 --- a/src/libxrpl/ledger/ReadView.cpp +++ b/src/libxrpl/ledger/ReadView.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { ReadView::sles_type::sles_type(ReadView const& view) : ReadViewFwdRange(view) { @@ -68,4 +68,4 @@ makeRulesGivenLedger( return Rules(presets); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/ledger/View.cpp b/src/libxrpl/ledger/View.cpp index 0175b099ea..d725b15c93 100644 --- a/src/libxrpl/ledger/View.cpp +++ b/src/libxrpl/ledger/View.cpp @@ -19,7 +19,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { @@ -40,7 +40,7 @@ internalDirNext( auto const& svIndexes = page->getFieldV256(sfIndexes); XRPL_ASSERT( index <= svIndexes.size(), - "ripple::detail::internalDirNext : index inside range"); + "xrpl::detail::internalDirNext : index inside range"); if (index >= svIndexes.size()) { @@ -57,7 +57,7 @@ internalDirNext( else page = view.peek(keylet::page(root, next)); - XRPL_ASSERT(page, "ripple::detail::internalDirNext : non-null root"); + XRPL_ASSERT(page, "xrpl::detail::internalDirNext : non-null root"); if (!page) return false; @@ -307,7 +307,7 @@ isVaultPseudoAccountFrozen( if (mptIssuer == nullptr) { // LCOV_EXCL_START - UNREACHABLE("ripple::isVaultPseudoAccountFrozen : null MPToken issuer"); + UNREACHABLE("xrpl::isVaultPseudoAccountFrozen : null MPToken issuer"); return false; // LCOV_EXCL_STOP } @@ -319,7 +319,7 @@ isVaultPseudoAccountFrozen( view.read(keylet::vault(mptIssuer->getFieldH256(sfVaultID))); if (vault == nullptr) { // LCOV_EXCL_START - UNREACHABLE("ripple::isVaultPseudoAccountFrozen : null vault"); + UNREACHABLE("xrpl::isVaultPseudoAccountFrozen : null vault"); return false; // LCOV_EXCL_STOP } @@ -589,7 +589,7 @@ confineOwnerCount( << "Account " << *id << " owner count set below 0!"; } adjusted = 0; - XRPL_ASSERT(!id, "ripple::confineOwnerCount : id is not set"); + XRPL_ASSERT(!id, "xrpl::confineOwnerCount : id is not set"); } } return adjusted; @@ -639,8 +639,7 @@ forEachItem( Keylet const& root, std::function const&)> const& f) { - XRPL_ASSERT( - root.type == ltDIR_NODE, "ripple::forEachItem : valid root type"); + XRPL_ASSERT(root.type == ltDIR_NODE, "xrpl::forEachItem : valid root type"); if (root.type != ltDIR_NODE) return; @@ -671,7 +670,7 @@ forEachItemAfter( std::function const&)> const& f) { XRPL_ASSERT( - root.type == ltDIR_NODE, "ripple::forEachItemAfter : valid root type"); + root.type == ltDIR_NODE, "xrpl::forEachItemAfter : valid root type"); if (root.type != ltDIR_NODE) return false; @@ -962,7 +961,7 @@ hashOfSeq(ReadView const& ledger, LedgerIndex seq, beast::Journal journal) XRPL_ASSERT( hashIndex->getFieldU32(sfLastLedgerSequence) == (ledger.seq() - 1), - "ripple::hashOfSeq : matching ledger sequence"); + "xrpl::hashOfSeq : matching ledger sequence"); STVector256 vec = hashIndex->getFieldV256(sfHashes); if (vec.size() >= diff) return vec[vec.size() - diff]; @@ -990,9 +989,9 @@ hashOfSeq(ReadView const& ledger, LedgerIndex seq, beast::Journal journal) if (hashIndex) { auto const lastSeq = hashIndex->getFieldU32(sfLastLedgerSequence); - XRPL_ASSERT(lastSeq >= seq, "ripple::hashOfSeq : minimum last ledger"); + XRPL_ASSERT(lastSeq >= seq, "xrpl::hashOfSeq : minimum last ledger"); XRPL_ASSERT( - (lastSeq & 0xff) == 0, "ripple::hashOfSeq : valid last ledger"); + (lastSeq & 0xff) == 0, "xrpl::hashOfSeq : valid last ledger"); auto const diff = (lastSeq - seq) >> 8; STVector256 vec = hashIndex->getFieldV256(sfHashes); if (vec.size() > diff) @@ -1018,7 +1017,7 @@ adjustOwnerCount( { if (!sle) return; - XRPL_ASSERT(amount, "ripple::adjustOwnerCount : nonzero amount input"); + XRPL_ASSERT(amount, "xrpl::adjustOwnerCount : nonzero amount input"); std::uint32_t const current{sle->getFieldU32(sfOwnerCount)}; AccountID const id = (*sle)[sfAccount]; std::uint32_t const adjusted = confineOwnerCount(current, amount, id, j); @@ -1078,7 +1077,7 @@ getPseudoAccountFields() { // LCOV_EXCL_START LogicError( - "ripple::isPseudoAccount : unable to find account root ledger " + "xrpl::isPseudoAccount : unable to find account root ledger " "format"); // LCOV_EXCL_STOP } @@ -1123,7 +1122,7 @@ createPseudoAccount( [&ownerField](SField const* sf) -> bool { return *sf == ownerField; }) == 1, - "ripple::createPseudoAccount : valid owner field"); + "xrpl::createPseudoAccount : valid owner field"); auto const accountId = pseudoAccountAddress(view, pseudoOwnerKey); if (accountId == beast::zero) @@ -1424,14 +1423,14 @@ trustCreate( bool const bSetDst = saLimit.getIssuer() == uDstAccountID; bool const bSetHigh = bSrcHigh ^ bSetDst; - XRPL_ASSERT(sleAccount, "ripple::trustCreate : non-null SLE"); + XRPL_ASSERT(sleAccount, "xrpl::trustCreate : non-null SLE"); if (!sleAccount) return tefINTERNAL; // LCOV_EXCL_LINE XRPL_ASSERT( sleAccount->getAccountID(sfAccount) == (bSetHigh ? uHighAccountID : uLowAccountID), - "ripple::trustCreate : matching account ID"); + "xrpl::trustCreate : matching account ID"); auto const slePeer = view.peek(keylet::account(bSetHigh ? uLowAccountID : uHighAccountID)); if (!slePeer) @@ -1657,7 +1656,7 @@ offerDelete(ApplyView& view, std::shared_ptr const& sle, beast::Journal j) { XRPL_ASSERT( sle->isFlag(lsfHybrid) && sle->isFieldPresent(sfDomainID), - "ripple::offerDelete : should be a hybrid domain offer"); + "xrpl::offerDelete : should be a hybrid domain offer"); auto const& additionalBookDirs = sle->getFieldArray(sfAdditionalBooks); @@ -1700,23 +1699,23 @@ rippleCreditIOU( // Make sure issuer is involved. XRPL_ASSERT( !bCheckIssuer || uSenderID == issuer || uReceiverID == issuer, - "ripple::rippleCreditIOU : matching issuer or don't care"); + "xrpl::rippleCreditIOU : matching issuer or don't care"); (void)issuer; // Disallow sending to self. XRPL_ASSERT( uSenderID != uReceiverID, - "ripple::rippleCreditIOU : sender is not receiver"); + "xrpl::rippleCreditIOU : sender is not receiver"); bool const bSenderHigh = uSenderID > uReceiverID; auto const index = keylet::line(uSenderID, uReceiverID, currency); XRPL_ASSERT( !isXRP(uSenderID) && uSenderID != noAccount(), - "ripple::rippleCreditIOU : sender is not XRP"); + "xrpl::rippleCreditIOU : sender is not XRP"); XRPL_ASSERT( !isXRP(uReceiverID) && uReceiverID != noAccount(), - "ripple::rippleCreditIOU : receiver is not XRP"); + "xrpl::rippleCreditIOU : receiver is not XRP"); // If the line exists, modify it accordingly. if (auto const sleRippleState = view.peek(index)) @@ -1853,10 +1852,10 @@ rippleSendIOU( XRPL_ASSERT( !isXRP(uSenderID) && !isXRP(uReceiverID), - "ripple::rippleSendIOU : neither sender nor receiver is XRP"); + "xrpl::rippleSendIOU : neither sender nor receiver is XRP"); XRPL_ASSERT( uSenderID != uReceiverID, - "ripple::rippleSendIOU : sender is not receiver"); + "xrpl::rippleSendIOU : sender is not receiver"); if (uSenderID == issuer || uReceiverID == issuer || issuer == noAccount()) { @@ -1912,7 +1911,7 @@ accountSendIOU( // LCOV_EXCL_START XRPL_ASSERT( saAmount >= beast::zero && !saAmount.holds(), - "ripple::accountSendIOU : minimum amount and not MPT"); + "xrpl::accountSendIOU : minimum amount and not MPT"); // LCOV_EXCL_STOP } @@ -2089,7 +2088,7 @@ rippleSendMPT( { XRPL_ASSERT( uSenderID != uReceiverID, - "ripple::rippleSendMPT : sender is not receiver"); + "xrpl::rippleSendMPT : sender is not receiver"); // Safe to get MPT since rippleSendMPT is only called by accountSendMPT auto const issuer = saAmount.getIssuer(); @@ -2154,7 +2153,7 @@ accountSendMPT( { XRPL_ASSERT( saAmount >= beast::zero && saAmount.holds(), - "ripple::accountSendMPT : minimum amount and MPT"); + "xrpl::accountSendMPT : minimum amount and MPT"); /* If we aren't sending anything or if the sender is the same as the * receiver then we don't need to do anything. @@ -2252,14 +2251,14 @@ issueIOU( { XRPL_ASSERT( !isXRP(account) && !isXRP(issue.account), - "ripple::issueIOU : neither account nor issuer is XRP"); + "xrpl::issueIOU : neither account nor issuer is XRP"); // Consistency check - XRPL_ASSERT(issue == amount.issue(), "ripple::issueIOU : matching issue"); + XRPL_ASSERT(issue == amount.issue(), "xrpl::issueIOU : matching issue"); // Can't send to self! XRPL_ASSERT( - issue.account != account, "ripple::issueIOU : not issuer account"); + issue.account != account, "xrpl::issueIOU : not issuer account"); JLOG(j.trace()) << "issueIOU: " << to_string(account) << ": " << amount.getFullText(); @@ -2352,14 +2351,14 @@ redeemIOU( { XRPL_ASSERT( !isXRP(account) && !isXRP(issue.account), - "ripple::redeemIOU : neither account nor issuer is XRP"); + "xrpl::redeemIOU : neither account nor issuer is XRP"); // Consistency check - XRPL_ASSERT(issue == amount.issue(), "ripple::redeemIOU : matching issue"); + XRPL_ASSERT(issue == amount.issue(), "xrpl::redeemIOU : matching issue"); // Can't send to self! XRPL_ASSERT( - issue.account != account, "ripple::redeemIOU : not issuer account"); + issue.account != account, "xrpl::redeemIOU : not issuer account"); JLOG(j.trace()) << "redeemIOU: " << to_string(account) << ": " << amount.getFullText(); @@ -2426,10 +2425,10 @@ transferXRP( beast::Journal j) { XRPL_ASSERT( - from != beast::zero, "ripple::transferXRP : nonzero from account"); - XRPL_ASSERT(to != beast::zero, "ripple::transferXRP : nonzero to account"); - XRPL_ASSERT(from != to, "ripple::transferXRP : sender is not receiver"); - XRPL_ASSERT(amount.native(), "ripple::transferXRP : amount is XRP"); + from != beast::zero, "xrpl::transferXRP : nonzero from account"); + XRPL_ASSERT(to != beast::zero, "xrpl::transferXRP : nonzero to account"); + XRPL_ASSERT(from != to, "xrpl::transferXRP : sender is not receiver"); + XRPL_ASSERT(amount.native(), "xrpl::transferXRP : amount is XRP"); SLE::pointer const sender = view.peek(keylet::account(from)); SLE::pointer const receiver = view.peek(keylet::account(to)); @@ -2560,7 +2559,7 @@ requireAuth( { XRPL_ASSERT( sleIssuance->getFieldU32(sfFlags) & lsfMPTRequireAuth, - "ripple::requireAuth : issuance requires authorization"); + "xrpl::requireAuth : issuance requires authorization"); // ter = tefINTERNAL | tecOBJECT_NOT_FOUND | tecNO_AUTH | tecEXPIRED if (auto const ter = credentials::validDomain(view, *maybeDomainID, account); @@ -2594,7 +2593,7 @@ enforceMPTokenAuthorization( XRPL_ASSERT( sleIssuance->isFlag(lsfMPTRequireAuth), - "ripple::enforceMPTokenAuthorization : authorization required"); + "xrpl::enforceMPTokenAuthorization : authorization required"); if (account == sleIssuance->at(sfIssuer)) return tefINTERNAL; // LCOV_EXCL_LINE @@ -2640,7 +2639,7 @@ enforceMPTokenAuthorization( // MPToken which requires authorization by the token issuer. XRPL_ASSERT( sleToken != nullptr && !maybeDomainID.has_value(), - "ripple::enforceMPTokenAuthorization : found MPToken"); + "xrpl::enforceMPTokenAuthorization : found MPToken"); if (sleToken->isFlag(lsfMPTAuthorized)) return tesSUCCESS; @@ -2652,7 +2651,7 @@ enforceMPTokenAuthorization( // lsfMPTAuthorized because it is meaningless. Return tesSUCCESS XRPL_ASSERT( maybeDomainID.has_value(), - "ripple::enforceMPTokenAuthorization : found MPToken for domain"); + "xrpl::enforceMPTokenAuthorization : found MPToken for domain"); return tesSUCCESS; } else if (authorizedByDomain) @@ -2661,7 +2660,7 @@ enforceMPTokenAuthorization( // authorized by domain. Proceed to create it, then return tesSUCCESS XRPL_ASSERT( maybeDomainID.has_value() && sleToken == nullptr, - "ripple::enforceMPTokenAuthorization : new MPToken for domain"); + "xrpl::enforceMPTokenAuthorization : new MPToken for domain"); if (auto const err = authorizeMPToken( view, priorBalance, // priorBalance @@ -2676,7 +2675,7 @@ enforceMPTokenAuthorization( // LCOV_EXCL_START UNREACHABLE( - "ripple::enforceMPTokenAuthorization : condition list is incomplete"); + "xrpl::enforceMPTokenAuthorization : condition list is incomplete"); return tefINTERNAL; // LCOV_EXCL_STOP } @@ -2764,7 +2763,7 @@ cleanupOnAccountDelete( // back to 'it' to "un-invalidate" the iterator. XRPL_ASSERT( uDirEntry >= 1, - "ripple::cleanupOnAccountDelete : minimum dir entries"); + "xrpl::cleanupOnAccountDelete : minimum dir entries"); if (uDirEntry == 0) { // LCOV_EXCL_START @@ -2852,8 +2851,7 @@ rippleCredit( else { XRPL_ASSERT( - !bCheckIssuer, - "ripple::rippleCredit : not checking issuer"); + !bCheckIssuer, "xrpl::rippleCredit : not checking issuer"); return rippleCreditMPT( view, uSenderID, uReceiverID, saAmount, j); } @@ -2869,10 +2867,10 @@ assetsToSharesDeposit( { XRPL_ASSERT( !assets.negative(), - "ripple::assetsToSharesDeposit : non-negative assets"); + "xrpl::assetsToSharesDeposit : non-negative assets"); XRPL_ASSERT( assets.asset() == vault->at(sfAsset), - "ripple::assetsToSharesDeposit : assets and vault match"); + "xrpl::assetsToSharesDeposit : assets and vault match"); if (assets.negative() || assets.asset() != vault->at(sfAsset)) return std::nullopt; // LCOV_EXCL_LINE @@ -2897,10 +2895,10 @@ sharesToAssetsDeposit( { XRPL_ASSERT( !shares.negative(), - "ripple::sharesToAssetsDeposit : non-negative shares"); + "xrpl::sharesToAssetsDeposit : non-negative shares"); XRPL_ASSERT( shares.asset() == vault->at(sfShareMPTID), - "ripple::sharesToAssetsDeposit : shares and vault match"); + "xrpl::sharesToAssetsDeposit : shares and vault match"); if (shares.negative() || shares.asset() != vault->at(sfShareMPTID)) return std::nullopt; // LCOV_EXCL_LINE @@ -2927,10 +2925,10 @@ assetsToSharesWithdraw( { XRPL_ASSERT( !assets.negative(), - "ripple::assetsToSharesDeposit : non-negative assets"); + "xrpl::assetsToSharesDeposit : non-negative assets"); XRPL_ASSERT( assets.asset() == vault->at(sfAsset), - "ripple::assetsToSharesWithdraw : assets and vault match"); + "xrpl::assetsToSharesWithdraw : assets and vault match"); if (assets.negative() || assets.asset() != vault->at(sfAsset)) return std::nullopt; // LCOV_EXCL_LINE @@ -2955,10 +2953,10 @@ sharesToAssetsWithdraw( { XRPL_ASSERT( !shares.negative(), - "ripple::sharesToAssetsDeposit : non-negative shares"); + "xrpl::sharesToAssetsDeposit : non-negative shares"); XRPL_ASSERT( shares.asset() == vault->at(sfShareMPTID), - "ripple::sharesToAssetsWithdraw : shares and vault match"); + "xrpl::sharesToAssetsWithdraw : shares and vault match"); if (shares.negative() || shares.asset() != vault->at(sfShareMPTID)) return std::nullopt; // LCOV_EXCL_LINE @@ -3081,7 +3079,7 @@ rippleUnlockEscrowMPT( if (!view.rules().enabled(fixTokenEscrowV1)) XRPL_ASSERT( netAmount == grossAmount, - "ripple::rippleUnlockEscrowMPT : netAmount == grossAmount"); + "xrpl::rippleUnlockEscrowMPT : netAmount == grossAmount"); auto const& issuer = netAmount.getIssuer(); auto const& mptIssue = netAmount.get(); @@ -3249,4 +3247,4 @@ after(NetClock::time_point now, std::uint32_t mark) return now.time_since_epoch().count() > mark; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/net/HTTPClient.cpp b/src/libxrpl/net/HTTPClient.cpp index 807b5f9823..6057d81a1e 100644 --- a/src/libxrpl/net/HTTPClient.cpp +++ b/src/libxrpl/net/HTTPClient.cpp @@ -12,7 +12,7 @@ #include -namespace ripple { +namespace xrpl { static std::optional httpClientSSLContext; @@ -605,4 +605,4 @@ HTTPClient::request( client->request(bSSL, deqSites, setRequest, timeout, complete); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/net/RegisterSSLCerts.cpp b/src/libxrpl/net/RegisterSSLCerts.cpp index b93e70463b..f489cf29a3 100644 --- a/src/libxrpl/net/RegisterSSLCerts.cpp +++ b/src/libxrpl/net/RegisterSSLCerts.cpp @@ -13,7 +13,7 @@ #include #endif -namespace ripple { +namespace xrpl { void registerSSLCerts( @@ -89,7 +89,7 @@ registerSSLCerts( #endif } -} // namespace ripple +} // namespace xrpl // There is a very unpleasant interaction between and // openssl x509 types (namely the former has macros that stomp diff --git a/src/libxrpl/nodestore/BatchWriter.cpp b/src/libxrpl/nodestore/BatchWriter.cpp index cb5f7bb436..3ce7900480 100644 --- a/src/libxrpl/nodestore/BatchWriter.cpp +++ b/src/libxrpl/nodestore/BatchWriter.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { namespace NodeStore { BatchWriter::BatchWriter(Callback& callback, Scheduler& scheduler) @@ -66,7 +66,7 @@ BatchWriter::writeBatch() mWriteSet.swap(set); XRPL_ASSERT( mWriteSet.empty(), - "ripple::NodeStore::BatchWriter::writeBatch : writes not set"); + "xrpl::NodeStore::BatchWriter::writeBatch : writes not set"); mWriteLoad = set.size(); if (set.empty()) @@ -102,4 +102,4 @@ BatchWriter::waitForWriting() } } // namespace NodeStore -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/nodestore/Database.cpp b/src/libxrpl/nodestore/Database.cpp index e80efee115..41e8ac8632 100644 --- a/src/libxrpl/nodestore/Database.cpp +++ b/src/libxrpl/nodestore/Database.cpp @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { namespace NodeStore { Database::Database( @@ -24,7 +24,7 @@ Database::Database( { XRPL_ASSERT( readThreads, - "ripple::NodeStore::Database::Database : nonzero threads input"); + "xrpl::NodeStore::Database::Database : nonzero threads input"); if (earliestLedgerSeq_ < 1) Throw("Invalid earliest_seq"); @@ -73,7 +73,7 @@ Database::Database( { XRPL_ASSERT( !it->second.empty(), - "ripple::NodeStore::Database::Database : non-empty " + "xrpl::NodeStore::Database::Database : non-empty " "data"); auto const& hash = it->first; @@ -150,7 +150,7 @@ Database::stop() { XRPL_ASSERT( steady_clock::now() - start < 30s, - "ripple::NodeStore::Database::stop : maximum stop duration"); + "xrpl::NodeStore::Database::stop : maximum stop duration"); std::this_thread::yield(); } @@ -203,7 +203,7 @@ Database::importInternal(Backend& dstBackend, Database& srcDB) srcDB.for_each([&](std::shared_ptr nodeObject) { XRPL_ASSERT( nodeObject, - "ripple::NodeStore::Database::importInternal : non-null node"); + "xrpl::NodeStore::Database::importInternal : non-null node"); if (!nodeObject) // This should never happen return; @@ -249,7 +249,7 @@ Database::getCountsJson(Json::Value& obj) { XRPL_ASSERT( obj.isObject(), - "ripple::NodeStore::Database::getCountsJson : valid input type"); + "xrpl::NodeStore::Database::getCountsJson : valid input type"); { std::unique_lock lock(readLock_); @@ -269,4 +269,4 @@ Database::getCountsJson(Json::Value& obj) } } // namespace NodeStore -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/nodestore/DatabaseNodeImp.cpp b/src/libxrpl/nodestore/DatabaseNodeImp.cpp index a83d531b66..0578351e58 100644 --- a/src/libxrpl/nodestore/DatabaseNodeImp.cpp +++ b/src/libxrpl/nodestore/DatabaseNodeImp.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { namespace NodeStore { void @@ -194,4 +194,4 @@ DatabaseNodeImp::fetchBatch(std::vector const& hashes) } } // namespace NodeStore -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/nodestore/DatabaseRotatingImp.cpp b/src/libxrpl/nodestore/DatabaseRotatingImp.cpp index dabe38ec8b..f51771f023 100644 --- a/src/libxrpl/nodestore/DatabaseRotatingImp.cpp +++ b/src/libxrpl/nodestore/DatabaseRotatingImp.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { namespace NodeStore { DatabaseRotatingImp::DatabaseRotatingImp( @@ -192,4 +192,4 @@ DatabaseRotatingImp::for_each( } } // namespace NodeStore -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/nodestore/DecodedBlob.cpp b/src/libxrpl/nodestore/DecodedBlob.cpp index 11387ed8c8..e3d54fae78 100644 --- a/src/libxrpl/nodestore/DecodedBlob.cpp +++ b/src/libxrpl/nodestore/DecodedBlob.cpp @@ -4,7 +4,7 @@ #include -namespace ripple { +namespace xrpl { namespace NodeStore { DecodedBlob::DecodedBlob(void const* key, void const* value, int valueBytes) @@ -56,7 +56,7 @@ DecodedBlob::createObject() { XRPL_ASSERT( m_success, - "ripple::NodeStore::DecodedBlob::createObject : valid object type"); + "xrpl::NodeStore::DecodedBlob::createObject : valid object type"); std::shared_ptr object; @@ -72,4 +72,4 @@ DecodedBlob::createObject() } } // namespace NodeStore -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/nodestore/DummyScheduler.cpp b/src/libxrpl/nodestore/DummyScheduler.cpp index 9ba7c25cfb..21c1b5c92e 100644 --- a/src/libxrpl/nodestore/DummyScheduler.cpp +++ b/src/libxrpl/nodestore/DummyScheduler.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { namespace NodeStore { void @@ -21,4 +21,4 @@ DummyScheduler::onBatchWrite(BatchWriteReport const& report) } } // namespace NodeStore -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/nodestore/ManagerImp.cpp b/src/libxrpl/nodestore/ManagerImp.cpp index 627550c4e9..b53d03e668 100644 --- a/src/libxrpl/nodestore/ManagerImp.cpp +++ b/src/libxrpl/nodestore/ManagerImp.cpp @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace NodeStore { @@ -95,7 +95,7 @@ ManagerImp::erase(Factory& factory) }); XRPL_ASSERT( iter != list_.end(), - "ripple::NodeStore::ManagerImp::erase : valid input"); + "xrpl::NodeStore::ManagerImp::erase : valid input"); list_.erase(iter); } @@ -121,4 +121,4 @@ Manager::instance() } } // namespace NodeStore -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/nodestore/NodeObject.cpp b/src/libxrpl/nodestore/NodeObject.cpp index 953a23b70e..3758862e18 100644 --- a/src/libxrpl/nodestore/NodeObject.cpp +++ b/src/libxrpl/nodestore/NodeObject.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { //------------------------------------------------------------------------------ @@ -40,4 +40,4 @@ NodeObject::getData() const return mData; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/nodestore/backend/MemoryFactory.cpp b/src/libxrpl/nodestore/backend/MemoryFactory.cpp index d4f14b7560..923ae95ebb 100644 --- a/src/libxrpl/nodestore/backend/MemoryFactory.cpp +++ b/src/libxrpl/nodestore/backend/MemoryFactory.cpp @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace NodeStore { struct MemoryDB @@ -122,7 +122,7 @@ public: fetch(void const* key, std::shared_ptr* pObject) override { XRPL_ASSERT( - db_, "ripple::NodeStore::MemoryBackend::fetch : non-null database"); + db_, "xrpl::NodeStore::MemoryBackend::fetch : non-null database"); uint256 const hash(uint256::fromVoid(key)); std::lock_guard _(db_->mutex); @@ -159,7 +159,7 @@ public: store(std::shared_ptr const& object) override { XRPL_ASSERT( - db_, "ripple::NodeStore::MemoryBackend::store : non-null database"); + db_, "xrpl::NodeStore::MemoryBackend::store : non-null database"); std::lock_guard _(db_->mutex); db_->table.emplace(object->getHash(), object); } @@ -181,7 +181,7 @@ public: { XRPL_ASSERT( db_, - "ripple::NodeStore::MemoryBackend::for_each : non-null database"); + "xrpl::NodeStore::MemoryBackend::for_each : non-null database"); for (auto const& e : db_->table) f(e.second); } @@ -229,4 +229,4 @@ MemoryFactory::createInstance( } } // namespace NodeStore -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/nodestore/backend/NuDBFactory.cpp b/src/libxrpl/nodestore/backend/NuDBFactory.cpp index 9d4297ac27..71a5811162 100644 --- a/src/libxrpl/nodestore/backend/NuDBFactory.cpp +++ b/src/libxrpl/nodestore/backend/NuDBFactory.cpp @@ -17,7 +17,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace NodeStore { class NuDBBackend : public Backend @@ -113,7 +113,7 @@ public: { // LCOV_EXCL_START UNREACHABLE( - "ripple::NodeStore::NuDBBackend::open : database is already " + "xrpl::NodeStore::NuDBBackend::open : database is already " "open"); JLOG(j_.error()) << "database is already open"; return; @@ -455,4 +455,4 @@ registerNuDBFactory(Manager& manager) } } // namespace NodeStore -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/nodestore/backend/NullFactory.cpp b/src/libxrpl/nodestore/backend/NullFactory.cpp index f533693416..ffe1eb931f 100644 --- a/src/libxrpl/nodestore/backend/NullFactory.cpp +++ b/src/libxrpl/nodestore/backend/NullFactory.cpp @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace NodeStore { class NullBackend : public Backend @@ -126,4 +126,4 @@ registerNullFactory(Manager& manager) } } // namespace NodeStore -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/nodestore/backend/RocksDBFactory.cpp b/src/libxrpl/nodestore/backend/RocksDBFactory.cpp index 01e87f338e..97d5484554 100644 --- a/src/libxrpl/nodestore/backend/RocksDBFactory.cpp +++ b/src/libxrpl/nodestore/backend/RocksDBFactory.cpp @@ -14,7 +14,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace NodeStore { class RocksDBEnv : public rocksdb::EnvWrapper @@ -213,7 +213,7 @@ public: { // LCOV_EXCL_START UNREACHABLE( - "ripple::NodeStore::RocksDBBackend::open : database is already " + "xrpl::NodeStore::RocksDBBackend::open : database is already " "open"); JLOG(m_journal.error()) << "database is already open"; return; @@ -261,8 +261,7 @@ public: fetch(void const* key, std::shared_ptr* pObject) override { XRPL_ASSERT( - m_db, - "ripple::NodeStore::RocksDBBackend::fetch : non-null database"); + m_db, "xrpl::NodeStore::RocksDBBackend::fetch : non-null database"); pObject->reset(); Status status(ok); @@ -340,7 +339,7 @@ public: { XRPL_ASSERT( m_db, - "ripple::NodeStore::RocksDBBackend::storeBatch : non-null " + "xrpl::NodeStore::RocksDBBackend::storeBatch : non-null " "database"); rocksdb::WriteBatch wb; @@ -375,7 +374,7 @@ public: { XRPL_ASSERT( m_db, - "ripple::NodeStore::RocksDBBackend::for_each : non-null database"); + "xrpl::NodeStore::RocksDBBackend::for_each : non-null database"); rocksdb::ReadOptions const options; std::unique_ptr it(m_db->NewIterator(options)); @@ -477,6 +476,6 @@ registerRocksDBFactory(Manager& manager) } } // namespace NodeStore -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/libxrpl/protocol/AMMCore.cpp b/src/libxrpl/protocol/AMMCore.cpp index a91da3ff6c..71ce6ea98e 100644 --- a/src/libxrpl/protocol/AMMCore.cpp +++ b/src/libxrpl/protocol/AMMCore.cpp @@ -18,7 +18,7 @@ #include #include -namespace ripple { +namespace xrpl { Currency ammLPTCurrency(Currency const& cur1, Currency const& cur2) @@ -93,7 +93,7 @@ ammAuctionTimeSlot(std::uint64_t current, STObject const& auctionSlot) auto const expiration = auctionSlot[sfExpiration]; XRPL_ASSERT( expiration >= TOTAL_TIME_SLOT_SECS, - "ripple::ammAuctionTimeSlot : minimum expiration"); + "xrpl::ammAuctionTimeSlot : minimum expiration"); if (expiration >= TOTAL_TIME_SLOT_SECS) { if (auto const start = expiration - TOTAL_TIME_SLOT_SECS; @@ -112,4 +112,4 @@ ammEnabled(Rules const& rules) return rules.enabled(featureAMM) && rules.enabled(fixUniversalNumber); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/AccountID.cpp b/src/libxrpl/protocol/AccountID.cpp index 4032d4f829..779018613f 100644 --- a/src/libxrpl/protocol/AccountID.cpp +++ b/src/libxrpl/protocol/AccountID.cpp @@ -16,7 +16,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { @@ -68,7 +68,7 @@ public: XRPL_ASSERT( ret.size() <= 38, - "ripple::detail::AccountIdCache : maximum result size"); + "xrpl::detail::AccountIdCache : maximum result size"); { std::lock_guard lock(sl); @@ -181,4 +181,4 @@ to_issuer(AccountID& issuer, std::string const& s) return true; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/Asset.cpp b/src/libxrpl/protocol/Asset.cpp index 54c6732825..1a4a94f744 100644 --- a/src/libxrpl/protocol/Asset.cpp +++ b/src/libxrpl/protocol/Asset.cpp @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { AccountID const& Asset::getIssuer() const @@ -66,4 +66,4 @@ assetFromJson(Json::Value const& v) return mptIssueFromJson(v); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/Book.cpp b/src/libxrpl/protocol/Book.cpp index 0315cf83ae..d26aaf3384 100644 --- a/src/libxrpl/protocol/Book.cpp +++ b/src/libxrpl/protocol/Book.cpp @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { bool isConsistent(Book const& book) @@ -32,4 +32,4 @@ reversed(Book const& book) return Book(book.out, book.in, book.domain); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/BuildInfo.cpp b/src/libxrpl/protocol/BuildInfo.cpp index af21ce5985..1ada9413f9 100644 --- a/src/libxrpl/protocol/BuildInfo.cpp +++ b/src/libxrpl/protocol/BuildInfo.cpp @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace BuildInfo { @@ -159,4 +159,4 @@ isNewerVersion(std::uint64_t version) } // namespace BuildInfo -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/ErrorCodes.cpp b/src/libxrpl/protocol/ErrorCodes.cpp index 5d7accb4a1..f37ba0c8e4 100644 --- a/src/libxrpl/protocol/ErrorCodes.cpp +++ b/src/libxrpl/protocol/ErrorCodes.cpp @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace RPC { namespace detail { @@ -205,8 +205,8 @@ rpcErrorString(Json::Value const& jv) { XRPL_ASSERT( RPC::contains_error(jv), - "ripple::RPC::rpcErrorString : input contains an error"); + "xrpl::RPC::rpcErrorString : input contains an error"); return jv[jss::error].asString() + jv[jss::error_message].asString(); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/Feature.cpp b/src/libxrpl/protocol/Feature.cpp index 8d09378fc7..b0113ea55a 100644 --- a/src/libxrpl/protocol/Feature.cpp +++ b/src/libxrpl/protocol/Feature.cpp @@ -19,10 +19,10 @@ #include #include -namespace ripple { +namespace xrpl { inline std::size_t -hash_value(ripple::uint256 const& feature) +hash_value(xrpl::uint256 const& feature) { std::size_t seed = 0; using namespace boost; @@ -205,7 +205,7 @@ public: FeatureCollections::FeatureCollections() { - features.reserve(ripple::detail::numFeatures); + features.reserve(xrpl::detail::numFeatures); } std::optional @@ -213,7 +213,7 @@ FeatureCollections::getRegisteredFeature(std::string const& name) const { XRPL_ASSERT( readOnly.load(), - "ripple::FeatureCollections::getRegisteredFeature : startup completed"); + "xrpl::FeatureCollections::getRegisteredFeature : startup completed"); Feature const* feature = getByName(name); if (feature) return feature->feature; @@ -294,7 +294,7 @@ FeatureCollections::featureToBitsetIndex(uint256 const& f) const { XRPL_ASSERT( readOnly.load(), - "ripple::FeatureCollections::featureToBitsetIndex : startup completed"); + "xrpl::FeatureCollections::featureToBitsetIndex : startup completed"); Feature const* feature = getByFeature(f); if (!feature) @@ -308,7 +308,7 @@ FeatureCollections::bitsetIndexToFeature(size_t i) const { XRPL_ASSERT( readOnly.load(), - "ripple::FeatureCollections::bitsetIndexToFeature : startup completed"); + "xrpl::FeatureCollections::bitsetIndexToFeature : startup completed"); Feature const& feature = getByIndex(i); return feature.feature; } @@ -318,7 +318,7 @@ FeatureCollections::featureToName(uint256 const& f) const { XRPL_ASSERT( readOnly.load(), - "ripple::FeatureCollections::featureToName : startup completed"); + "xrpl::FeatureCollections::featureToName : startup completed"); Feature const* feature = getByFeature(f); return feature ? feature->name : to_string(f); } @@ -443,4 +443,4 @@ featureToName(uint256 const& f) [[maybe_unused]] static bool const readOnlySet = featureCollections.registrationIsDone(); -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/IOUAmount.cpp b/src/libxrpl/protocol/IOUAmount.cpp index 3c893709d7..01283886e1 100644 --- a/src/libxrpl/protocol/IOUAmount.cpp +++ b/src/libxrpl/protocol/IOUAmount.cpp @@ -14,7 +14,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace { @@ -303,4 +303,4 @@ mulRatio( return result; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/Indexes.cpp b/src/libxrpl/protocol/Indexes.cpp index fbe591074e..597de87822 100644 --- a/src/libxrpl/protocol/Indexes.cpp +++ b/src/libxrpl/protocol/Indexes.cpp @@ -25,7 +25,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Type-specific prefix for calculating ledger indices. @@ -95,8 +95,7 @@ indexHash(LedgerNameSpace space, Args const&... args) uint256 getBookBase(Book const& book) { - XRPL_ASSERT( - isConsistent(book), "ripple::getBookBase : input is consistent"); + XRPL_ASSERT(isConsistent(book), "xrpl::getBookBase : input is consistent"); auto const index = book.domain ? indexHash( LedgerNameSpace::BOOK_DIR, @@ -143,7 +142,7 @@ getTicketIndex(AccountID const& account, std::uint32_t ticketSeq) uint256 getTicketIndex(AccountID const& account, SeqProxy ticketSeq) { - XRPL_ASSERT(ticketSeq.isTicket(), "ripple::getTicketIndex : valid input"); + XRPL_ASSERT(ticketSeq.isTicket(), "xrpl::getTicketIndex : valid input"); return getTicketIndex(account, ticketSeq.value()); } @@ -230,7 +229,7 @@ line( // There is code in SetTrust that calls us with id0 == id1, to allow users // to locate and delete such "weird" trustlines. If we remove that code, we // could enable this assert: - // XRPL_ASSERT(id0 != id1, "ripple::keylet::line : accounts must be + // XRPL_ASSERT(id0 != id1, "xrpl::keylet::line : accounts must be // different"); // A trust line is shared between two accounts; while we typically think @@ -261,7 +260,7 @@ Keylet quality(Keylet const& k, std::uint64_t q) noexcept { XRPL_ASSERT( - k.type == ltDIR_NODE, "ripple::keylet::quality : valid input type"); + k.type == ltDIR_NODE, "xrpl::keylet::quality : valid input type"); // Indexes are stored in big endian format: they print as hex as stored. // Most significant bytes are first and the least significant bytes @@ -281,7 +280,7 @@ next_t::operator()(Keylet const& k) const { XRPL_ASSERT( k.type == ltDIR_NODE, - "ripple::keylet::next_t::operator() : valid input type"); + "xrpl::keylet::next_t::operator() : valid input type"); return {ltDIR_NODE, getQualityNext(k.key)}; } @@ -400,7 +399,7 @@ Keylet nftpage(Keylet const& k, uint256 const& token) { XRPL_ASSERT( - k.type == ltNFTOKEN_PAGE, "ripple::keylet::nftpage : valid input type"); + k.type == ltNFTOKEN_PAGE, "xrpl::keylet::nftpage : valid input type"); return {ltNFTOKEN_PAGE, (k.key & ~nft::pageMask) + (token & nft::pageMask)}; } @@ -563,4 +562,4 @@ permissionedDomain(uint256 const& domainID) noexcept } // namespace keylet -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/InnerObjectFormats.cpp b/src/libxrpl/protocol/InnerObjectFormats.cpp index 60a2f51f44..305a4b5e7a 100644 --- a/src/libxrpl/protocol/InnerObjectFormats.cpp +++ b/src/libxrpl/protocol/InnerObjectFormats.cpp @@ -2,7 +2,7 @@ #include #include -namespace ripple { +namespace xrpl { InnerObjectFormats::InnerObjectFormats() { @@ -172,4 +172,4 @@ InnerObjectFormats::findSOTemplateBySField(SField const& sField) const return nullptr; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/Issue.cpp b/src/libxrpl/protocol/Issue.cpp index 205648fe4d..b858a31e3e 100644 --- a/src/libxrpl/protocol/Issue.cpp +++ b/src/libxrpl/protocol/Issue.cpp @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { std::string Issue::getText() const @@ -132,4 +132,4 @@ operator<<(std::ostream& os, Issue const& x) return os; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/Keylet.cpp b/src/libxrpl/protocol/Keylet.cpp index 9d2202e19b..2c65bb9ed4 100644 --- a/src/libxrpl/protocol/Keylet.cpp +++ b/src/libxrpl/protocol/Keylet.cpp @@ -3,14 +3,14 @@ #include #include -namespace ripple { +namespace xrpl { bool Keylet::check(STLedgerEntry const& sle) const { XRPL_ASSERT( sle.getType() != ltANY || sle.getType() != ltCHILD, - "ripple::Keylet::check : valid input type"); + "xrpl::Keylet::check : valid input type"); if (type == ltANY) return true; @@ -21,4 +21,4 @@ Keylet::check(STLedgerEntry const& sle) const return sle.getType() == type && sle.key() == key; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/LedgerFormats.cpp b/src/libxrpl/protocol/LedgerFormats.cpp index 908b28ae43..2056cfab7b 100644 --- a/src/libxrpl/protocol/LedgerFormats.cpp +++ b/src/libxrpl/protocol/LedgerFormats.cpp @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { LedgerFormats::LedgerFormats() { @@ -40,4 +40,4 @@ LedgerFormats::getInstance() return instance; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/LedgerHeader.cpp b/src/libxrpl/protocol/LedgerHeader.cpp index 84d026b613..5258bdbc22 100644 --- a/src/libxrpl/protocol/LedgerHeader.cpp +++ b/src/libxrpl/protocol/LedgerHeader.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { void addRaw(LedgerHeader const& info, Serializer& s, bool includeHash) @@ -52,4 +52,4 @@ deserializePrefixedHeader(Slice data, bool hasHash) return deserializeHeader(data + 4, hasHash); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/MPTAmount.cpp b/src/libxrpl/protocol/MPTAmount.cpp index 046e81199a..1950407ab5 100644 --- a/src/libxrpl/protocol/MPTAmount.cpp +++ b/src/libxrpl/protocol/MPTAmount.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { MPTAmount& MPTAmount::operator+=(MPTAmount const& other) @@ -46,4 +46,4 @@ MPTAmount::minPositiveAmount() return MPTAmount{1}; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/MPTIssue.cpp b/src/libxrpl/protocol/MPTIssue.cpp index c7d54ee6d6..c92ac60b73 100644 --- a/src/libxrpl/protocol/MPTIssue.cpp +++ b/src/libxrpl/protocol/MPTIssue.cpp @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { MPTIssue::MPTIssue(MPTID const& issuanceID) : mptID_(issuanceID) { @@ -88,4 +88,4 @@ mptIssueFromJson(Json::Value const& v) return MPTIssue{id}; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/NFTSyntheticSerializer.cpp b/src/libxrpl/protocol/NFTSyntheticSerializer.cpp index ee677b798c..e4ce3b7611 100644 --- a/src/libxrpl/protocol/NFTSyntheticSerializer.cpp +++ b/src/libxrpl/protocol/NFTSyntheticSerializer.cpp @@ -8,7 +8,7 @@ #include -namespace ripple { +namespace xrpl { namespace RPC { void @@ -22,4 +22,4 @@ insertNFTSyntheticInJson( } } // namespace RPC -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/NFTokenID.cpp b/src/libxrpl/protocol/NFTokenID.cpp index 50a6f30bf8..64fadce3c9 100644 --- a/src/libxrpl/protocol/NFTokenID.cpp +++ b/src/libxrpl/protocol/NFTokenID.cpp @@ -17,7 +17,7 @@ #include #include -namespace ripple { +namespace xrpl { bool canHaveNFTokenID( @@ -184,4 +184,4 @@ insertNFTokenID( } } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/NFTokenOfferID.cpp b/src/libxrpl/protocol/NFTokenOfferID.cpp index 77b836207f..b1a08081c0 100644 --- a/src/libxrpl/protocol/NFTokenOfferID.cpp +++ b/src/libxrpl/protocol/NFTokenOfferID.cpp @@ -13,7 +13,7 @@ #include #include -namespace ripple { +namespace xrpl { bool canHaveNFTokenOfferID( @@ -64,4 +64,4 @@ insertNFTokenOfferID( response[jss::offer_id] = to_string(result.value()); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/Permissions.cpp b/src/libxrpl/protocol/Permissions.cpp index c73e38304f..a5d447a23c 100644 --- a/src/libxrpl/protocol/Permissions.cpp +++ b/src/libxrpl/protocol/Permissions.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { Permission::Permission() { @@ -71,7 +71,7 @@ Permission::Permission() for ([[maybe_unused]] auto const& permission : granularPermissionMap_) XRPL_ASSERT( permission.second > UINT16_MAX, - "ripple::Permission::granularPermissionMap_ : granular permission " + "xrpl::Permission::granularPermissionMap_ : granular permission " "value must not exceed the maximum uint16_t value."); } @@ -134,7 +134,7 @@ Permission::getTxFeature(TxType txType) const auto const txFeaturesIt = txFeatureMap_.find(txType); XRPL_ASSERT( txFeaturesIt != txFeatureMap_.end(), - "ripple::Permissions::getTxFeature : tx exists in txFeatureMap_"); + "xrpl::Permissions::getTxFeature : tx exists in txFeatureMap_"); if (txFeaturesIt->second == uint256{}) return std::nullopt; @@ -161,7 +161,7 @@ Permission::isDelegatable( auto const txFeaturesIt = txFeatureMap_.find(txType); XRPL_ASSERT( txFeaturesIt != txFeatureMap_.end(), - "ripple::Permissions::isDelegatable : tx exists in txFeatureMap_"); + "xrpl::Permissions::isDelegatable : tx exists in txFeatureMap_"); // Delegation is only allowed if the required amendment for the transaction // is enabled. For transactions that do not require an amendment, delegation @@ -188,4 +188,4 @@ Permission::permissionToTxType(uint32_t const& value) const return static_cast(value - 1); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/PublicKey.cpp b/src/libxrpl/protocol/PublicKey.cpp index 0a29af7d32..524e1e1ac4 100644 --- a/src/libxrpl/protocol/PublicKey.cpp +++ b/src/libxrpl/protocol/PublicKey.cpp @@ -22,7 +22,7 @@ #include #include -namespace ripple { +namespace xrpl { std::ostream& operator<<(std::ostream& os, PublicKey const& pk) @@ -307,4 +307,4 @@ calcNodeID(PublicKey const& pk) return NodeID{static_cast(h)}; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/Quality.cpp b/src/libxrpl/protocol/Quality.cpp index f20145036b..cd56f237fc 100644 --- a/src/libxrpl/protocol/Quality.cpp +++ b/src/libxrpl/protocol/Quality.cpp @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { Quality::Quality(std::uint64_t value) : m_value(value) { @@ -21,7 +21,7 @@ Quality::Quality(Amounts const& amount) Quality& Quality::operator++() { - XRPL_ASSERT(m_value > 0, "ripple::Quality::operator++() : minimum value"); + XRPL_ASSERT(m_value > 0, "xrpl::Quality::operator++() : minimum value"); --m_value; return *this; } @@ -39,7 +39,7 @@ Quality::operator--() { XRPL_ASSERT( m_value < std::numeric_limits::max(), - "ripple::Quality::operator--() : maximum value"); + "xrpl::Quality::operator--() : maximum value"); ++m_value; return *this; } @@ -70,11 +70,10 @@ ceil_in_impl( if (result.out > amount.out) result.out = amount.out; XRPL_ASSERT( - result.in == limit, "ripple::ceil_in_impl : result matches limit"); + result.in == limit, "xrpl::ceil_in_impl : result matches limit"); return result; } - XRPL_ASSERT( - amount.in <= limit, "ripple::ceil_in_impl : result inside limit"); + XRPL_ASSERT(amount.in <= limit, "xrpl::ceil_in_impl : result inside limit"); return amount; } @@ -111,12 +110,11 @@ ceil_out_impl( if (result.in > amount.in) result.in = amount.in; XRPL_ASSERT( - result.out == limit, - "ripple::ceil_out_impl : result matches limit"); + result.out == limit, "xrpl::ceil_out_impl : result matches limit"); return result; } XRPL_ASSERT( - amount.out <= limit, "ripple::ceil_out_impl : result inside limit"); + amount.out <= limit, "xrpl::ceil_out_impl : result inside limit"); return amount; } @@ -140,13 +138,12 @@ composed_quality(Quality const& lhs, Quality const& rhs) { STAmount const lhs_rate(lhs.rate()); XRPL_ASSERT( - lhs_rate != beast::zero, - "ripple::composed_quality : nonzero left input"); + lhs_rate != beast::zero, "xrpl::composed_quality : nonzero left input"); STAmount const rhs_rate(rhs.rate()); XRPL_ASSERT( rhs_rate != beast::zero, - "ripple::composed_quality : nonzero right input"); + "xrpl::composed_quality : nonzero right input"); STAmount const rate(mulRound(lhs_rate, rhs_rate, lhs_rate.asset(), true)); @@ -155,7 +152,7 @@ composed_quality(Quality const& lhs, Quality const& rhs) XRPL_ASSERT( (stored_exponent > 0) && (stored_exponent <= 255), - "ripple::composed_quality : valid exponent"); + "xrpl::composed_quality : valid exponent"); return Quality((stored_exponent << (64 - 8)) | stored_mantissa); } @@ -192,4 +189,4 @@ Quality::round(int digits) const return Quality{(exponent << (64 - 8)) | mantissa}; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/QualityFunction.cpp b/src/libxrpl/protocol/QualityFunction.cpp index 8273743cfa..b254e1af86 100644 --- a/src/libxrpl/protocol/QualityFunction.cpp +++ b/src/libxrpl/protocol/QualityFunction.cpp @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { QualityFunction::QualityFunction( Quality const& quality, @@ -42,4 +42,4 @@ QualityFunction::outFromAvgQ(Quality const& quality) return std::nullopt; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/RPCErr.cpp b/src/libxrpl/protocol/RPCErr.cpp index 4984f91279..658dd06b3d 100644 --- a/src/libxrpl/protocol/RPCErr.cpp +++ b/src/libxrpl/protocol/RPCErr.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { struct RPCErr; @@ -23,4 +23,4 @@ isRpcError(Json::Value jvResult) return jvResult.isObject() && jvResult.isMember(jss::error); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/Rate2.cpp b/src/libxrpl/protocol/Rate2.cpp index 36c6ae37f9..511b28cc67 100644 --- a/src/libxrpl/protocol/Rate2.cpp +++ b/src/libxrpl/protocol/Rate2.cpp @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { Rate const parityRate(QUALITY_ONE); @@ -33,7 +33,7 @@ transferFeeAsRate(std::uint16_t fee) STAmount multiply(STAmount const& amount, Rate const& rate) { - XRPL_ASSERT(rate.value, "ripple::nft::multiply : nonzero rate input"); + XRPL_ASSERT(rate.value, "xrpl::nft::multiply : nonzero rate input"); if (rate == parityRate) return amount; @@ -44,7 +44,7 @@ multiply(STAmount const& amount, Rate const& rate) STAmount multiplyRound(STAmount const& amount, Rate const& rate, bool roundUp) { - XRPL_ASSERT(rate.value, "ripple::nft::multiplyRound : nonzero rate input"); + XRPL_ASSERT(rate.value, "xrpl::nft::multiplyRound : nonzero rate input"); if (rate == parityRate) return amount; @@ -60,7 +60,7 @@ multiplyRound( bool roundUp) { XRPL_ASSERT( - rate.value, "ripple::nft::multiplyRound(Issue) : nonzero rate input"); + rate.value, "xrpl::nft::multiplyRound(Issue) : nonzero rate input"); if (rate == parityRate) { @@ -73,7 +73,7 @@ multiplyRound( STAmount divide(STAmount const& amount, Rate const& rate) { - XRPL_ASSERT(rate.value, "ripple::nft::divide : nonzero rate input"); + XRPL_ASSERT(rate.value, "xrpl::nft::divide : nonzero rate input"); if (rate == parityRate) return amount; @@ -84,7 +84,7 @@ divide(STAmount const& amount, Rate const& rate) STAmount divideRound(STAmount const& amount, Rate const& rate, bool roundUp) { - XRPL_ASSERT(rate.value, "ripple::nft::divideRound : nonzero rate input"); + XRPL_ASSERT(rate.value, "xrpl::nft::divideRound : nonzero rate input"); if (rate == parityRate) return amount; @@ -100,7 +100,7 @@ divideRound( bool roundUp) { XRPL_ASSERT( - rate.value, "ripple::nft::divideRound(Issue) : nonzero rate input"); + rate.value, "xrpl::nft::divideRound(Issue) : nonzero rate input"); if (rate == parityRate) return amount; @@ -108,4 +108,4 @@ divideRound( return divRound(amount, detail::as_amount(rate), asset, roundUp); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/Rules.cpp b/src/libxrpl/protocol/Rules.cpp index 3fd9667817..cf6b2c2d35 100644 --- a/src/libxrpl/protocol/Rules.cpp +++ b/src/libxrpl/protocol/Rules.cpp @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace { // Use a static inside a function to help prevent order-of-initialization issues @@ -82,7 +82,7 @@ public: return false; XRPL_ASSERT( presets_ == other.presets_, - "ripple::Rules::Impl::operator==(Impl) const : input presets do " + "xrpl::Rules::Impl::operator==(Impl) const : input presets do " "match"); return *digest_ == *other.digest_; } @@ -110,7 +110,7 @@ Rules::presets() const bool Rules::enabled(uint256 const& feature) const { - XRPL_ASSERT(impl_, "ripple::Rules::enabled : initialized"); + XRPL_ASSERT(impl_, "xrpl::Rules::enabled : initialized"); // The functionality of the "NonFungibleTokensV1_1" amendment is // precisely the functionality of the following three amendments @@ -131,7 +131,7 @@ Rules::operator==(Rules const& other) const { XRPL_ASSERT( impl_ && other.impl_, - "ripple::Rules::operator==(Rules) const : both initialized"); + "xrpl::Rules::operator==(Rules) const : both initialized"); if (impl_.get() == other.impl_.get()) return true; return *impl_ == *other.impl_; @@ -150,4 +150,4 @@ isFeatureEnabled(uint256 const& feature) return rules && rules->enabled(feature); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/SField.cpp b/src/libxrpl/protocol/SField.cpp index 61d7aff930..54402ea6e2 100644 --- a/src/libxrpl/protocol/SField.cpp +++ b/src/libxrpl/protocol/SField.cpp @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { // Storage for static const members. SField::IsSigning const SField::notSigning; @@ -84,10 +84,10 @@ SField::SField( { XRPL_ASSERT( !knownCodeToField.contains(fieldCode), - "ripple::SField::SField(tid,fv,fn,meta,signing) : fieldCode is unique"); + "xrpl::SField::SField(tid,fv,fn,meta,signing) : fieldCode is unique"); XRPL_ASSERT( !knownNameToField.contains(fieldName), - "ripple::SField::SField(tid,fv,fn,meta,signing) : fieldName is unique"); + "xrpl::SField::SField(tid,fv,fn,meta,signing) : fieldName is unique"); knownCodeToField[fieldCode] = this; knownNameToField[fieldName] = this; } @@ -104,10 +104,10 @@ SField::SField(private_access_tag_t, int fc, char const* fn) { XRPL_ASSERT( !knownCodeToField.contains(fieldCode), - "ripple::SField::SField(fc,fn) : fieldCode is unique"); + "xrpl::SField::SField(fc,fn) : fieldCode is unique"); XRPL_ASSERT( !knownNameToField.contains(fieldName), - "ripple::SField::SField(fc,fn) : fieldName is unique"); + "xrpl::SField::SField(fc,fn) : fieldName is unique"); knownCodeToField[fieldCode] = this; knownNameToField[fieldName] = this; } @@ -152,4 +152,4 @@ SField::getField(std::string const& fieldName) return sfInvalid; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/SOTemplate.cpp b/src/libxrpl/protocol/SOTemplate.cpp index 6bd5b7a5c6..46edf98710 100644 --- a/src/libxrpl/protocol/SOTemplate.cpp +++ b/src/libxrpl/protocol/SOTemplate.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { SOTemplate::SOTemplate( std::initializer_list uniqueFields, @@ -50,4 +50,4 @@ SOTemplate::getIndex(SField const& sField) const return indices_[sField.getNum()]; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/STAccount.cpp b/src/libxrpl/protocol/STAccount.cpp index b452be7ee4..728fb25f6c 100644 --- a/src/libxrpl/protocol/STAccount.cpp +++ b/src/libxrpl/protocol/STAccount.cpp @@ -14,7 +14,7 @@ #include #include -namespace ripple { +namespace xrpl { STAccount::STAccount() : STBase(), value_(beast::zero), default_(true) { @@ -74,10 +74,10 @@ void STAccount::add(Serializer& s) const { XRPL_ASSERT( - getFName().isBinary(), "ripple::STAccount::add : field is binary"); + getFName().isBinary(), "xrpl::STAccount::add : field is binary"); XRPL_ASSERT( getFName().fieldType == STI_ACCOUNT, - "ripple::STAccount::add : valid field type"); + "xrpl::STAccount::add : valid field type"); // Preserve the serialization behavior of an STBlob: // o If we are default (all zeros) serialize as an empty blob. @@ -107,4 +107,4 @@ STAccount::getText() const return toBase58(value()); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/STAmount.cpp b/src/libxrpl/protocol/STAmount.cpp index 4aac551003..f43b3c1891 100644 --- a/src/libxrpl/protocol/STAmount.cpp +++ b/src/libxrpl/protocol/STAmount.cpp @@ -47,7 +47,7 @@ #include #include -namespace ripple { +namespace xrpl { static std::uint64_t const tenTo14 = 100000000000000ull; static std::uint64_t const tenTo14m1 = tenTo14 - 1; @@ -60,13 +60,13 @@ getInt64Value(STAmount const& amount, bool valid, char const* error) if (!valid) Throw(error); XRPL_ASSERT( - amount.exponent() == 0, "ripple::getInt64Value : exponent is zero"); + amount.exponent() == 0, "xrpl::getInt64Value : exponent is zero"); auto ret = static_cast(amount.mantissa()); XRPL_ASSERT( static_cast(ret) == amount.mantissa(), - "ripple::getInt64Value : mantissa must roundtrip"); + "xrpl::getInt64Value : mantissa must roundtrip"); if (amount.negative()) ret = -ret; @@ -195,7 +195,7 @@ STAmount::STAmount(SField const& name, std::uint64_t mantissa, bool negative) { XRPL_ASSERT( mValue <= std::numeric_limits::max(), - "ripple::STAmount::STAmount(SField, std::uint64_t, bool) : maximum " + "xrpl::STAmount::STAmount(SField, std::uint64_t, bool) : maximum " "mantissa input"); } @@ -208,7 +208,7 @@ STAmount::STAmount(SField const& name, STAmount const& from) { XRPL_ASSERT( mValue <= std::numeric_limits::max(), - "ripple::STAmount::STAmount(SField, STAmount) : maximum input"); + "xrpl::STAmount::STAmount(SField, STAmount) : maximum input"); canonicalize(); } @@ -222,7 +222,7 @@ STAmount::STAmount(std::uint64_t mantissa, bool negative) { XRPL_ASSERT( mValue <= std::numeric_limits::max(), - "ripple::STAmount::STAmount(std::uint64_t, bool) : maximum mantissa " + "xrpl::STAmount::STAmount(std::uint64_t, bool) : maximum mantissa " "input"); } @@ -268,7 +268,7 @@ STAmount::xrp() const "Cannot return non-native STAmount as XRPAmount"); auto drops = static_cast(mValue); - XRPL_ASSERT(mOffset == 0, "ripple::STAmount::xrp : amount is canonical"); + XRPL_ASSERT(mOffset == 0, "xrpl::STAmount::xrp : amount is canonical"); if (mIsNegative) drops = -drops; @@ -298,7 +298,7 @@ STAmount::mpt() const Throw("Cannot return STAmount as MPTAmount"); auto value = static_cast(mValue); - XRPL_ASSERT(mOffset == 0, "ripple::STAmount::mpt : amount is canonical"); + XRPL_ASSERT(mOffset == 0, "xrpl::STAmount::mpt : amount is canonical"); if (mIsNegative) value = -value; @@ -310,8 +310,7 @@ STAmount& STAmount::operator=(IOUAmount const& iou) { XRPL_ASSERT( - native() == false, - "ripple::STAmount::operator=(IOUAmount) : is not XRP"); + native() == false, "xrpl::STAmount::operator=(IOUAmount) : is not XRP"); mOffset = iou.exponent(); mIsNegative = iou < beast::zero; if (mIsNegative) @@ -452,7 +451,7 @@ getRate(STAmount const& offerOut, STAmount const& offerIn) return 0; XRPL_ASSERT( (r.exponent() >= -100) && (r.exponent() <= 155), - "ripple::getRate : exponent inside range"); + "xrpl::getRate : exponent inside range"); std::uint64_t ret = r.exponent() + 100; return (ret << (64 - 8)) | r.mantissa(); } @@ -689,7 +688,7 @@ STAmount::getText() const return ret; } - XRPL_ASSERT(mOffset + 43 > 0, "ripple::STAmount::getText : minimum offset"); + XRPL_ASSERT(mOffset + 43 > 0, "xrpl::STAmount::getText : minimum offset"); size_t const pad_prefix = 27; size_t const pad_suffix = 23; @@ -714,8 +713,7 @@ STAmount::getText() const pre_from += pad_prefix; XRPL_ASSERT( - post_to >= post_from, - "ripple::STAmount::getText : first distance check"); + post_to >= post_from, "xrpl::STAmount::getText : first distance check"); pre_from = std::find_if(pre_from, pre_to, [](char c) { return c != '0'; }); @@ -726,7 +724,7 @@ STAmount::getText() const XRPL_ASSERT( post_to >= post_from, - "ripple::STAmount::getText : second distance check"); + "xrpl::STAmount::getText : second distance check"); post_to = std::find_if( std::make_reverse_iterator(post_to), @@ -762,7 +760,7 @@ STAmount::add(Serializer& s) const { if (native()) { - XRPL_ASSERT(mOffset == 0, "ripple::STAmount::add : zero offset"); + XRPL_ASSERT(mOffset == 0, "xrpl::STAmount::add : zero offset"); if (!mIsNegative) s.add64(mValue | cPositive); @@ -935,13 +933,13 @@ STAmount::canonicalize() XRPL_ASSERT( (mValue == 0) || ((mValue >= cMinValue) && (mValue <= cMaxValue)), - "ripple::STAmount::canonicalize : value inside range"); + "xrpl::STAmount::canonicalize : value inside range"); XRPL_ASSERT( (mValue == 0) || ((mOffset >= cMinOffset) && (mOffset <= cMaxOffset)), - "ripple::STAmount::canonicalize : offset inside range"); + "xrpl::STAmount::canonicalize : offset inside range"); XRPL_ASSERT( (mValue != 0) || (mOffset != -100), - "ripple::STAmount::canonicalize : value or offset set"); + "xrpl::STAmount::canonicalize : value or offset set"); } void @@ -1719,4 +1717,4 @@ divRoundStrict( return divRoundImpl(num, den, asset, roundUp); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/STArray.cpp b/src/libxrpl/protocol/STArray.cpp index 4d60e6f5ce..de1e6905c6 100644 --- a/src/libxrpl/protocol/STArray.cpp +++ b/src/libxrpl/protocol/STArray.cpp @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { STArray::STArray(STArray&& other) : STBase(other.getFName()), v_(std::move(other.v_)) @@ -180,4 +180,4 @@ STArray::sort(bool (*compare)(STObject const&, STObject const&)) std::sort(v_.begin(), v_.end(), compare); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/STBase.cpp b/src/libxrpl/protocol/STBase.cpp index 0cbe575a2a..d3faf090eb 100644 --- a/src/libxrpl/protocol/STBase.cpp +++ b/src/libxrpl/protocol/STBase.cpp @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { STBase::STBase() : fName(&sfGeneric) { @@ -17,7 +17,7 @@ STBase::STBase() : fName(&sfGeneric) STBase::STBase(SField const& n) : fName(&n) { - XRPL_ASSERT(fName, "ripple::STBase::STBase : field is set"); + XRPL_ASSERT(fName, "xrpl::STBase::STBase : field is set"); } STBase& @@ -94,7 +94,7 @@ STBase::add(Serializer& s) const { // Should never be called // LCOV_EXCL_START - UNREACHABLE("ripple::STBase::add : not implemented"); + UNREACHABLE("xrpl::STBase::add : not implemented"); // LCOV_EXCL_STOP } @@ -103,7 +103,7 @@ STBase::isEquivalent(STBase const& t) const { XRPL_ASSERT( getSType() == STI_NOTPRESENT, - "ripple::STBase::isEquivalent : type not present"); + "xrpl::STBase::isEquivalent : type not present"); return t.getSType() == STI_NOTPRESENT; } @@ -117,7 +117,7 @@ void STBase::setFName(SField const& n) { fName = &n; - XRPL_ASSERT(fName, "ripple::STBase::setFName : field is set"); + XRPL_ASSERT(fName, "xrpl::STBase::setFName : field is set"); } SField const& @@ -130,7 +130,7 @@ void STBase::addFieldID(Serializer& s) const { XRPL_ASSERT( - fName->isBinary(), "ripple::STBase::addFieldID : field is binary"); + fName->isBinary(), "xrpl::STBase::addFieldID : field is binary"); s.addFieldID(fName->fieldType, fName->fieldValue); } @@ -142,4 +142,4 @@ operator<<(std::ostream& out, STBase const& t) return out << t.getFullText(); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/STBlob.cpp b/src/libxrpl/protocol/STBlob.cpp index 5b46f941de..65670a6a9f 100644 --- a/src/libxrpl/protocol/STBlob.cpp +++ b/src/libxrpl/protocol/STBlob.cpp @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { STBlob::STBlob(SerialIter& st, SField const& name) : STBase(name), value_(st.getVLBuffer()) @@ -43,11 +43,11 @@ STBlob::getText() const void STBlob::add(Serializer& s) const { - XRPL_ASSERT(getFName().isBinary(), "ripple::STBlob::add : field is binary"); + XRPL_ASSERT(getFName().isBinary(), "xrpl::STBlob::add : field is binary"); XRPL_ASSERT( (getFName().fieldType == STI_VL) || (getFName().fieldType == STI_ACCOUNT), - "ripple::STBlob::add : valid field type"); + "xrpl::STBlob::add : valid field type"); s.addVL(value_.data(), value_.size()); } @@ -64,4 +64,4 @@ STBlob::isDefault() const return value_.empty(); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/STCurrency.cpp b/src/libxrpl/protocol/STCurrency.cpp index 3b30e1b757..d4c10b48d3 100644 --- a/src/libxrpl/protocol/STCurrency.cpp +++ b/src/libxrpl/protocol/STCurrency.cpp @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { STCurrency::STCurrency(SField const& name) : STBase{name} { @@ -102,4 +102,4 @@ currencyFromJson(SField const& name, Json::Value const& v) return STCurrency{name, currency}; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/STInteger.cpp b/src/libxrpl/protocol/STInteger.cpp index c71e70e1b2..e701fc4203 100644 --- a/src/libxrpl/protocol/STInteger.cpp +++ b/src/libxrpl/protocol/STInteger.cpp @@ -17,7 +17,7 @@ #include #include -namespace ripple { +namespace xrpl { template <> STInteger::STInteger(SerialIter& sit, SField const& name) @@ -210,14 +210,14 @@ STUInt64::getJson(JsonOptions) const auto convertToString = [](uint64_t const value, int const base) { XRPL_ASSERT( base == 10 || base == 16, - "ripple::STUInt64::getJson : base 10 or 16"); + "xrpl::STUInt64::getJson : base 10 or 16"); std::string str( base == 10 ? 20 : 16, 0); // Allocate space depending on base auto ret = std::to_chars(str.data(), str.data() + str.size(), value, base); XRPL_ASSERT( ret.ec == std::errc(), - "ripple::STUInt64::getJson : to_chars succeeded"); + "xrpl::STUInt64::getJson : to_chars succeeded"); str.resize(std::distance(str.data(), ret.ptr)); return str; }; @@ -259,4 +259,4 @@ STInt32::getJson(JsonOptions) const return value_; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/STIssue.cpp b/src/libxrpl/protocol/STIssue.cpp index 346f73d5ae..213c8b7962 100644 --- a/src/libxrpl/protocol/STIssue.cpp +++ b/src/libxrpl/protocol/STIssue.cpp @@ -17,7 +17,7 @@ #include #include -namespace ripple { +namespace xrpl { STIssue::STIssue(SField const& name) : STBase{name} { @@ -139,4 +139,4 @@ issueFromJson(SField const& name, Json::Value const& v) return STIssue{name, assetFromJson(v)}; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/STLedgerEntry.cpp b/src/libxrpl/protocol/STLedgerEntry.cpp index 5665bc1508..8ee3669a24 100644 --- a/src/libxrpl/protocol/STLedgerEntry.cpp +++ b/src/libxrpl/protocol/STLedgerEntry.cpp @@ -26,7 +26,7 @@ #include #include -namespace ripple { +namespace xrpl { STLedgerEntry::STLedgerEntry(Keylet const& k) : STObject(sfLedgerEntry), key_(k.key), type_(k.type) @@ -157,7 +157,7 @@ STLedgerEntry::thread( // this transaction is already threaded XRPL_ASSERT( getFieldU32(sfPreviousTxnLgrSeq) == ledgerSeq, - "ripple::STLedgerEntry::thread : ledger sequence match"); + "xrpl::STLedgerEntry::thread : ledger sequence match"); return false; } @@ -168,4 +168,4 @@ STLedgerEntry::thread( return true; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/STNumber.cpp b/src/libxrpl/protocol/STNumber.cpp index 889dd9ee68..0b2dbc32cc 100644 --- a/src/libxrpl/protocol/STNumber.cpp +++ b/src/libxrpl/protocol/STNumber.cpp @@ -14,7 +14,7 @@ #include #include -namespace ripple { +namespace xrpl { STNumber::STNumber(SField const& field, Number const& value) : STBase(field), value_(value) @@ -45,11 +45,10 @@ STNumber::getText() const void STNumber::add(Serializer& s) const { - XRPL_ASSERT( - getFName().isBinary(), "ripple::STNumber::add : field is binary"); + XRPL_ASSERT(getFName().isBinary(), "xrpl::STNumber::add : field is binary"); XRPL_ASSERT( getFName().fieldType == getSType(), - "ripple::STNumber::add : field type match"); + "xrpl::STNumber::add : field type match"); s.add64(value_.mantissa()); s.add32(value_.exponent()); } @@ -83,7 +82,7 @@ STNumber::isEquivalent(STBase const& t) const { XRPL_ASSERT( t.getSType() == this->getSType(), - "ripple::STNumber::isEquivalent : field type match"); + "xrpl::STNumber::isEquivalent : field type match"); STNumber const& v = dynamic_cast(t); return value_ == v; } @@ -196,4 +195,4 @@ numberFromJson(SField const& field, Json::Value const& value) return STNumber{field, Number{mantissa, parts.exponent}}; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/STObject.cpp b/src/libxrpl/protocol/STObject.cpp index 1c39eb9108..6007753ed1 100644 --- a/src/libxrpl/protocol/STObject.cpp +++ b/src/libxrpl/protocol/STObject.cpp @@ -39,7 +39,7 @@ #include #include -namespace ripple { +namespace xrpl { STObject::STObject(STObject&& other) : STBase(other.getFName()), v_(std::move(other.v_)), mType(other.mType) @@ -904,7 +904,7 @@ STObject::add(Serializer& s, WhichFields whichFields) const XRPL_ASSERT( (sType != STI_OBJECT) || (field->getFName().fieldType == STI_OBJECT), - "ripple::STObject::add : valid field type"); + "xrpl::STObject::add : valid field type"); field->addFieldID(s); field->add(s); if (sType == STI_ARRAY || sType == STI_OBJECT) @@ -937,4 +937,4 @@ STObject::getSortedFields(STObject const& objToSort, WhichFields whichFields) return sf; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/STParsedJSON.cpp b/src/libxrpl/protocol/STParsedJSON.cpp index 8443f92f75..34c8b70e45 100644 --- a/src/libxrpl/protocol/STParsedJSON.cpp +++ b/src/libxrpl/protocol/STParsedJSON.cpp @@ -41,7 +41,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace STParsedJSONDetail { template @@ -1190,4 +1190,4 @@ STParsedJSONObject::STParsedJSONObject( object = parseObject(name, json, sfGeneric, 0, error); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/STPathSet.cpp b/src/libxrpl/protocol/STPathSet.cpp index 3132c81cc6..631fd51d8a 100644 --- a/src/libxrpl/protocol/STPathSet.cpp +++ b/src/libxrpl/protocol/STPathSet.cpp @@ -15,7 +15,7 @@ #include #include -namespace ripple { +namespace xrpl { std::size_t STPathElement::get_hash(STPathElement const& element) @@ -201,10 +201,10 @@ void STPathSet::add(Serializer& s) const { XRPL_ASSERT( - getFName().isBinary(), "ripple::STPathSet::add : field is binary"); + getFName().isBinary(), "xrpl::STPathSet::add : field is binary"); XRPL_ASSERT( getFName().fieldType == STI_PATHSET, - "ripple::STPathSet::add : valid field type"); + "xrpl::STPathSet::add : valid field type"); bool first = true; for (auto const& spPath : value) @@ -234,4 +234,4 @@ STPathSet::add(Serializer& s) const s.add8(STPathElement::typeNone); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/STTx.cpp b/src/libxrpl/protocol/STTx.cpp index f868ab0711..b8e944c204 100644 --- a/src/libxrpl/protocol/STTx.cpp +++ b/src/libxrpl/protocol/STTx.cpp @@ -51,7 +51,7 @@ #include #include -namespace ripple { +namespace xrpl { static auto getTxFormat(TxType type) @@ -150,7 +150,7 @@ STTx::getMentionedAccounts() const { XRPL_ASSERT( !sacc->isDefault(), - "ripple::STTx::getMentionedAccounts : account is set"); + "xrpl::STTx::getMentionedAccounts : account is set"); if (!sacc->isDefault()) list.insert(sacc->value()); } @@ -222,7 +222,7 @@ STTx::sign( { auto const data = getSigningData(*this); - auto const sig = ripple::sign(publicKey, secretKey, makeSlice(data)); + auto const sig = xrpl::sign(publicKey, secretKey, makeSlice(data)); if (signatureTarget) { @@ -386,7 +386,7 @@ STTx::getMetaSQL( std::string rTxn = sqlBlobLiteral(rawTxn.peekData()); auto format = TxFormats::getInstance().findByType(tx_type_); - XRPL_ASSERT(format, "ripple::STTx::getMetaSQL : non-null type format"); + XRPL_ASSERT(format, "xrpl::STTx::getMetaSQL : non-null type format"); return str( boost::format(bfTrans) % to_string(getTransactionID()) % @@ -860,4 +860,4 @@ isPseudoTx(STObject const& tx) return tt == ttAMENDMENT || tt == ttFEE || tt == ttUNL_MODIFY; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/STValidation.cpp b/src/libxrpl/protocol/STValidation.cpp index 8e3ad354a8..237a4bac82 100644 --- a/src/libxrpl/protocol/STValidation.cpp +++ b/src/libxrpl/protocol/STValidation.cpp @@ -16,7 +16,7 @@ #include #include -namespace ripple { +namespace xrpl { STBase* STValidation::copy(std::size_t n, void* buf) const @@ -102,7 +102,7 @@ STValidation::isValid() const noexcept { XRPL_ASSERT( publicKeyType(getSignerPublic()) == KeyType::secp256k1, - "ripple::STValidation::isValid : valid key type"); + "xrpl::STValidation::isValid : valid key type"); valid_ = verifyDigest( getSignerPublic(), @@ -134,4 +134,4 @@ STValidation::getSerialized() const return s.peekData(); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/STVar.cpp b/src/libxrpl/protocol/STVar.cpp index 2b0e59b4c3..e0df5d51a9 100644 --- a/src/libxrpl/protocol/STVar.cpp +++ b/src/libxrpl/protocol/STVar.cpp @@ -22,7 +22,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { defaultObject_t defaultObject; @@ -109,7 +109,7 @@ STVar::STVar(SerializedTypeID id, SField const& name) { XRPL_ASSERT( (id == STI_NOTPRESENT) || (id == name.fieldType), - "ripple::detail::STVar::STVar(SerializedTypeID) : valid type input"); + "xrpl::detail::STVar::STVar(SerializedTypeID) : valid type input"); constructST(id, 0, name); } @@ -225,4 +225,4 @@ STVar::constructST(SerializedTypeID id, int depth, Args&&... args) } } // namespace detail -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/STVector256.cpp b/src/libxrpl/protocol/STVector256.cpp index ba7cf3252c..17b4895b62 100644 --- a/src/libxrpl/protocol/STVector256.cpp +++ b/src/libxrpl/protocol/STVector256.cpp @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { STVector256::STVector256(SerialIter& sit, SField const& name) : STBase(name) { @@ -59,10 +59,10 @@ void STVector256::add(Serializer& s) const { XRPL_ASSERT( - getFName().isBinary(), "ripple::STVector256::add : field is binary"); + getFName().isBinary(), "xrpl::STVector256::add : field is binary"); XRPL_ASSERT( getFName().fieldType == STI_VECTOR256, - "ripple::STVector256::add : valid field type"); + "xrpl::STVector256::add : valid field type"); s.addVL(mValue.begin(), mValue.end(), mValue.size() * (256 / 8)); } @@ -84,4 +84,4 @@ STVector256::getJson(JsonOptions) const return ret; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/STXChainBridge.cpp b/src/libxrpl/protocol/STXChainBridge.cpp index aa10a87bbc..065b87558f 100644 --- a/src/libxrpl/protocol/STXChainBridge.cpp +++ b/src/libxrpl/protocol/STXChainBridge.cpp @@ -18,7 +18,7 @@ #include #include -namespace ripple { +namespace xrpl { STXChainBridge::STXChainBridge() : STBase{sfXChainBridge} { @@ -66,7 +66,7 @@ STXChainBridge::STXChainBridge(SField const& name, Json::Value const& v) auto checkExtra = [](Json::Value const& v) { static auto const jbridge = - ripple::STXChainBridge().getJson(ripple::JsonOptions::none); + xrpl::STXChainBridge().getJson(xrpl::JsonOptions::none); for (auto it = v.begin(); it != v.end(); ++it) { std::string const name = it.memberName(); @@ -207,4 +207,4 @@ STXChainBridge::move(std::size_t n, void* buf) { return emplace(n, buf, std::move(*this)); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/SecretKey.cpp b/src/libxrpl/protocol/SecretKey.cpp index 8f07b4d03f..24696257e9 100644 --- a/src/libxrpl/protocol/SecretKey.cpp +++ b/src/libxrpl/protocol/SecretKey.cpp @@ -27,7 +27,7 @@ #include #include -namespace ripple { +namespace xrpl { SecretKey::~SecretKey() { @@ -382,4 +382,4 @@ parseBase58(TokenType type, std::string const& s) return SecretKey(makeSlice(result)); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/Seed.cpp b/src/libxrpl/protocol/Seed.cpp index 9c41a534b9..18e89ef6ca 100644 --- a/src/libxrpl/protocol/Seed.cpp +++ b/src/libxrpl/protocol/Seed.cpp @@ -20,7 +20,7 @@ #include #include -namespace ripple { +namespace xrpl { Seed::~Seed() { @@ -124,4 +124,4 @@ seedAs1751(Seed const& seed) return encodedKey; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/Serializer.cpp b/src/libxrpl/protocol/Serializer.cpp index 7fbec19bd2..e6c1e6967f 100644 --- a/src/libxrpl/protocol/Serializer.cpp +++ b/src/libxrpl/protocol/Serializer.cpp @@ -18,7 +18,7 @@ #include #include -namespace ripple { +namespace xrpl { int Serializer::add16(std::uint16_t i) @@ -109,7 +109,7 @@ Serializer::addFieldID(int type, int name) int ret = mData.size(); XRPL_ASSERT( (type > 0) && (type < 256) && (name > 0) && (name < 256), - "ripple::Serializer::addFieldID : inputs inside range"); + "xrpl::Serializer::addFieldID : inputs inside range"); if (type < 16) { @@ -181,7 +181,7 @@ Serializer::addVL(Blob const& vector) XRPL_ASSERT( mData.size() == (ret + vector.size() + encodeLengthLength(vector.size())), - "ripple::Serializer::addVL : size matches expected"); + "xrpl::Serializer::addVL : size matches expected"); return ret; } @@ -486,7 +486,7 @@ SerialIter::getVLDataLength() else { XRPL_ASSERT( - lenLen == 3, "ripple::SerialIter::getVLDataLength : lenLen is 3"); + lenLen == 3, "xrpl::SerialIter::getVLDataLength : lenLen is 3"); int b2 = get8(); int b3 = get8(); datLen = Serializer::decodeVLLength(b1, b2, b3); @@ -519,4 +519,4 @@ SerialIter::getVLBuffer() return getRawHelper(getVLDataLength()); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/Sign.cpp b/src/libxrpl/protocol/Sign.cpp index 3a6b52ac84..9edd2bbfa4 100644 --- a/src/libxrpl/protocol/Sign.cpp +++ b/src/libxrpl/protocol/Sign.cpp @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { void sign( @@ -90,4 +90,4 @@ startMultiSigningData(STObject const& obj) return s; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/TER.cpp b/src/libxrpl/protocol/TER.cpp index 8cdcced347..6871cf5700 100644 --- a/src/libxrpl/protocol/TER.cpp +++ b/src/libxrpl/protocol/TER.cpp @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { std::unordered_map< TERUnderlyingType, @@ -281,4 +281,4 @@ transCode(std::string const& token) return TER::fromInt(r->second); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/TxFormats.cpp b/src/libxrpl/protocol/TxFormats.cpp index 0b42f8cefb..12f92615cd 100644 --- a/src/libxrpl/protocol/TxFormats.cpp +++ b/src/libxrpl/protocol/TxFormats.cpp @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { TxFormats::TxFormats() { @@ -55,4 +55,4 @@ TxFormats::getInstance() return instance; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/TxMeta.cpp b/src/libxrpl/protocol/TxMeta.cpp index ebc1d87b14..f0077c7f92 100644 --- a/src/libxrpl/protocol/TxMeta.cpp +++ b/src/libxrpl/protocol/TxMeta.cpp @@ -18,7 +18,7 @@ #include #include -namespace ripple { +namespace xrpl { TxMeta::TxMeta(uint256 const& txid, std::uint32_t ledger, STObject const& obj) : transactionID_(txid) @@ -31,8 +31,7 @@ TxMeta::TxMeta(uint256 const& txid, std::uint32_t ledger, STObject const& obj) auto affectedNodes = dynamic_cast(obj.peekAtPField(sfAffectedNodes)); XRPL_ASSERT( - affectedNodes, - "ripple::TxMeta::TxMeta(STObject) : type cast succeeded"); + affectedNodes, "xrpl::TxMeta::TxMeta(STObject) : type cast succeeded"); if (affectedNodes) nodes_ = *affectedNodes; @@ -84,7 +83,7 @@ TxMeta::setAffectedNode( XRPL_ASSERT( obj.getFName() == type, - "ripple::TxMeta::setAffectedNode : field type match"); + "xrpl::TxMeta::setAffectedNode : field type match"); obj.setFieldH256(sfLedgerIndex, node); obj.setFieldU16(sfLedgerEntryType, nodeType); } @@ -108,7 +107,7 @@ TxMeta::getAffectedAccounts() const dynamic_cast(&node.peekAtIndex(index)); XRPL_ASSERT( inner, - "ripple::getAffectedAccounts : STObject type cast succeeded"); + "xrpl::getAffectedAccounts : STObject type cast succeeded"); if (inner) { for (auto const& field : *inner) @@ -117,7 +116,7 @@ TxMeta::getAffectedAccounts() const { XRPL_ASSERT( !sa->isDefault(), - "ripple::getAffectedAccounts : account is set"); + "xrpl::getAffectedAccounts : account is set"); if (!sa->isDefault()) list.insert(sa->value()); } @@ -130,7 +129,7 @@ TxMeta::getAffectedAccounts() const auto lim = dynamic_cast(&field); XRPL_ASSERT( lim, - "ripple::getAffectedAccounts : STAmount type cast " + "xrpl::getAffectedAccounts : STAmount type cast " "succeeded"); if (lim != nullptr) @@ -175,7 +174,7 @@ TxMeta::getAffectedNode(SLE::ref node, SField const& type) XRPL_ASSERT( obj.getFName() == type, - "ripple::TxMeta::getAffectedNode(SLE::ref) : field type match"); + "xrpl::TxMeta::getAffectedNode(SLE::ref) : field type match"); obj.setFieldH256(sfLedgerIndex, index); obj.setFieldU16(sfLedgerEntryType, node->getFieldU16(sfLedgerEntryType)); @@ -191,7 +190,7 @@ TxMeta::getAffectedNode(uint256 const& node) return n; } // LCOV_EXCL_START - UNREACHABLE("ripple::TxMeta::getAffectedNode(uint256) : node not found"); + UNREACHABLE("xrpl::TxMeta::getAffectedNode(uint256) : node not found"); Throw("Affected node not found"); return *(nodes_.begin()); // Silence compiler warning. // LCOV_EXCL_STOP @@ -201,7 +200,7 @@ STObject TxMeta::getAsObject() const { STObject metaData(sfTransactionMetaData); - XRPL_ASSERT(result_ != 255, "ripple::TxMeta::getAsObject : result_ is set"); + XRPL_ASSERT(result_ != 255, "xrpl::TxMeta::getAsObject : result_ is set"); metaData.setFieldU8(sfTransactionResult, result_); metaData.setFieldU32(sfTransactionIndex, index_); metaData.emplace_back(nodes_); @@ -221,7 +220,7 @@ TxMeta::addRaw(Serializer& s, TER result, std::uint32_t index) index_ = index; XRPL_ASSERT( (result_ == 0) || ((result_ > 100) && (result_ <= 255)), - "ripple::TxMeta::addRaw : valid TER input"); + "xrpl::TxMeta::addRaw : valid TER input"); nodes_.sort([](STObject const& o1, STObject const& o2) { return o1.getFieldH256(sfLedgerIndex) < o2.getFieldH256(sfLedgerIndex); @@ -230,4 +229,4 @@ TxMeta::addRaw(Serializer& s, TER result, std::uint32_t index) getAsObject().add(s); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/UintTypes.cpp b/src/libxrpl/protocol/UintTypes.cpp index ca7f09b5f5..6c799397ee 100644 --- a/src/libxrpl/protocol/UintTypes.cpp +++ b/src/libxrpl/protocol/UintTypes.cpp @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { // For details on the protocol-level serialization please visit // https://xrpl.org/serialization.html#currency-codes @@ -117,4 +117,4 @@ badCurrency() return currency; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/XChainAttestations.cpp b/src/libxrpl/protocol/XChainAttestations.cpp index da5f2d4ccb..89771b63b0 100644 --- a/src/libxrpl/protocol/XChainAttestations.cpp +++ b/src/libxrpl/protocol/XChainAttestations.cpp @@ -22,7 +22,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace Attestations { AttestationBase::AttestationBase( @@ -83,7 +83,7 @@ bool AttestationBase::verify(STXChainBridge const& bridge) const { std::vector msg = message(bridge); - return ripple::verify(publicKey, makeSlice(msg), signature); + return xrpl::verify(publicKey, makeSlice(msg), signature); } AttestationBase::AttestationBase(STObject const& o) @@ -742,4 +742,4 @@ XChainAttestationsBase::toSTArray() const template class XChainAttestationsBase; template class XChainAttestationsBase; -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/digest.cpp b/src/libxrpl/protocol/digest.cpp index ca7bab7372..dd4ecd7688 100644 --- a/src/libxrpl/protocol/digest.cpp +++ b/src/libxrpl/protocol/digest.cpp @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { openssl_ripemd160_hasher::openssl_ripemd160_hasher() { @@ -86,4 +86,4 @@ openssl_sha256_hasher::operator result_type() noexcept return digest; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/protocol/tokens.cpp b/src/libxrpl/protocol/tokens.cpp index a9a9ddb110..d4253a2df1 100644 --- a/src/libxrpl/protocol/tokens.cpp +++ b/src/libxrpl/protocol/tokens.cpp @@ -119,7 +119,7 @@ of another base), and doing the multi-precision computations with larger coefficients sizes greatly speeds up the multi-precision computations. */ -namespace ripple { +namespace xrpl { static constexpr char const* alphabetForward = "rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz"; @@ -235,7 +235,7 @@ encodeBase58( carry /= 58; } XRPL_ASSERT( - carry == 0, "ripple::b58_ref::detail::encodeBase58 : zero carry"); + carry == 0, "xrpl::b58_ref::detail::encodeBase58 : zero carry"); pbegin++; } @@ -286,7 +286,7 @@ decodeBase58(std::string const& s) carry /= 256; } XRPL_ASSERT( - carry == 0, "ripple::b58_ref::detail::decodeBase58 : zero carry"); + carry == 0, "xrpl::b58_ref::detail::decodeBase58 : zero carry"); ++psz; --remain; } @@ -430,7 +430,7 @@ b256_to_b58_be(std::span input, std::span out) while (cur_2_64_end > 0) { base_58_10_coeff[num_58_10_coeffs] = - ripple::b58_fast::detail::inplace_bigint_div_rem( + xrpl::b58_fast::detail::inplace_bigint_div_rem( base_2_64_coeff.subspan(0, cur_2_64_end), B_58_10); num_58_10_coeffs += 1; if (base_2_64_coeff[cur_2_64_end - 1] == 0) @@ -442,7 +442,7 @@ b256_to_b58_be(std::span input, std::span out) // Translate the result into the alphabet // Put all the zeros at the beginning, then all the values from the output std::fill( - out.begin(), out.begin() + input_zeros, ::ripple::alphabetForward[0]); + out.begin(), out.begin() + input_zeros, ::xrpl::alphabetForward[0]); // iterate through the base 58^10 coeff // convert to base 58 big endian then @@ -461,7 +461,7 @@ b256_to_b58_be(std::span input, std::span out) return Unexpected(TokenCodecErrc::inputTooLarge); } std::array const b58_be = - ripple::b58_fast::detail::b58_10_to_b58_be(base_58_10_coeff[i]); + xrpl::b58_fast::detail::b58_10_to_b58_be(base_58_10_coeff[i]); std::size_t to_skip = 0; std::span b58_be_s{b58_be.data(), b58_be.size()}; if (skip_zeros) @@ -475,7 +475,7 @@ b256_to_b58_be(std::span input, std::span out) } for (auto b58_coeff : b58_be_s.subspan(to_skip)) { - out[out_index] = ::ripple::alphabetForward[b58_coeff]; + out[out_index] = ::xrpl::alphabetForward[b58_coeff]; out_index += 1; } } @@ -504,7 +504,7 @@ b58_to_b256_be(std::string_view input, std::span out) std::size_t count = 0; for (auto const& c : col) { - if (c != ::ripple::alphabetForward[0]) + if (c != ::xrpl::alphabetForward[0]) { return count; } @@ -520,15 +520,15 @@ b58_to_b256_be(std::string_view input, std::span out) // log(2^(38*8),58^10)) ~= 5.18. So 6 coeff are enough std::array b_58_10_coeff{}; auto [num_full_coeffs, partial_coeff_len] = - ripple::b58_fast::detail::div_rem(input.size(), 10); + xrpl::b58_fast::detail::div_rem(input.size(), 10); auto const num_partial_coeffs = partial_coeff_len ? 1 : 0; auto const num_b_58_10_coeffs = num_full_coeffs + num_partial_coeffs; XRPL_ASSERT( num_b_58_10_coeffs <= b_58_10_coeff.size(), - "ripple::b58_fast::detail::b58_to_b256_be : maximum coeff"); + "xrpl::b58_fast::detail::b58_to_b256_be : maximum coeff"); for (unsigned char c : input.substr(0, partial_coeff_len)) { - auto cur_val = ::ripple::alphabetReverse[c]; + auto cur_val = ::xrpl::alphabetReverse[c]; if (cur_val < 0) { return Unexpected(TokenCodecErrc::invalidEncodingChar); @@ -541,7 +541,7 @@ b58_to_b256_be(std::string_view input, std::span out) for (int j = 0; j < num_full_coeffs; ++j) { unsigned char c = input[partial_coeff_len + j * 10 + i]; - auto cur_val = ::ripple::alphabetReverse[c]; + auto cur_val = ::xrpl::alphabetReverse[c]; if (cur_val < 0) { return Unexpected(TokenCodecErrc::invalidEncodingChar); @@ -562,7 +562,7 @@ b58_to_b256_be(std::string_view input, std::span out) std::uint64_t const c = b_58_10_coeff[i]; { - auto code = ripple::b58_fast::detail::inplace_bigint_mul( + auto code = xrpl::b58_fast::detail::inplace_bigint_mul( std::span(&result[0], cur_result_size + 1), B_58_10); if (code != TokenCodecErrc::success) { @@ -570,7 +570,7 @@ b58_to_b256_be(std::string_view input, std::span out) } } { - auto code = ripple::b58_fast::detail::inplace_bigint_add( + auto code = xrpl::b58_fast::detail::inplace_bigint_add( std::span(&result[0], cur_result_size + 1), c); if (code != TokenCodecErrc::success) { @@ -732,4 +732,4 @@ decodeBase58Token(std::string const& s, TokenType type) } // namespace b58_fast #endif // _MSC_VER -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/resource/Charge.cpp b/src/libxrpl/resource/Charge.cpp index 43901d8985..1d88526b65 100644 --- a/src/libxrpl/resource/Charge.cpp +++ b/src/libxrpl/resource/Charge.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace Resource { Charge::Charge(value_type cost, std::string const& label) @@ -59,4 +59,4 @@ Charge::operator*(value_type m) const } } // namespace Resource -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/resource/Consumer.cpp b/src/libxrpl/resource/Consumer.cpp index 8f396c5012..c9d8ea6125 100644 --- a/src/libxrpl/resource/Consumer.cpp +++ b/src/libxrpl/resource/Consumer.cpp @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace Resource { Consumer::Consumer(Logic& logic, Entry& entry) @@ -97,7 +97,7 @@ Consumer::charge(Charge const& what, std::string const& context) bool Consumer::warn() { - XRPL_ASSERT(m_entry, "ripple::Resource::Consumer::warn : non-null entry"); + XRPL_ASSERT(m_entry, "xrpl::Resource::Consumer::warn : non-null entry"); return m_logic->warn(*m_entry); } @@ -105,7 +105,7 @@ bool Consumer::disconnect(beast::Journal const& j) { XRPL_ASSERT( - m_entry, "ripple::Resource::Consumer::disconnect : non-null entry"); + m_entry, "xrpl::Resource::Consumer::disconnect : non-null entry"); bool const d = m_logic->disconnect(*m_entry); if (d) { @@ -117,15 +117,14 @@ Consumer::disconnect(beast::Journal const& j) int Consumer::balance() { - XRPL_ASSERT( - m_entry, "ripple::Resource::Consumer::balance : non-null entry"); + XRPL_ASSERT(m_entry, "xrpl::Resource::Consumer::balance : non-null entry"); return m_logic->balance(*m_entry); } Entry& Consumer::entry() { - XRPL_ASSERT(m_entry, "ripple::Resource::Consumer::entry : non-null entry"); + XRPL_ASSERT(m_entry, "xrpl::Resource::Consumer::entry : non-null entry"); return *m_entry; } @@ -143,4 +142,4 @@ operator<<(std::ostream& os, Consumer const& v) } } // namespace Resource -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/resource/Fees.cpp b/src/libxrpl/resource/Fees.cpp index f300a70d7c..d5999458b7 100644 --- a/src/libxrpl/resource/Fees.cpp +++ b/src/libxrpl/resource/Fees.cpp @@ -1,7 +1,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace Resource { Charge const feeMalformedRequest(200, "malformed request"); @@ -26,4 +26,4 @@ Charge const feeDrop(6000, "dropped"); // See also Resource::Logic::charge for log level cutoff values } // namespace Resource -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/resource/ResourceManager.cpp b/src/libxrpl/resource/ResourceManager.cpp index 5e647cfce9..8582836611 100644 --- a/src/libxrpl/resource/ResourceManager.cpp +++ b/src/libxrpl/resource/ResourceManager.cpp @@ -22,7 +22,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace Resource { class ManagerImp : public Manager @@ -171,4 +171,4 @@ make_Manager( } } // namespace Resource -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/server/JSONRPCUtil.cpp b/src/libxrpl/server/JSONRPCUtil.cpp index 1a804677bd..845781374d 100644 --- a/src/libxrpl/server/JSONRPCUtil.cpp +++ b/src/libxrpl/server/JSONRPCUtil.cpp @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { std::string getHTTPHeaderTimestamp() @@ -139,4 +139,4 @@ HTTPReply( output("\r\n"); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/server/Port.cpp b/src/libxrpl/server/Port.cpp index 6c7ec04f6f..03a503e940 100644 --- a/src/libxrpl/server/Port.cpp +++ b/src/libxrpl/server/Port.cpp @@ -21,7 +21,7 @@ #include #include -namespace ripple { +namespace xrpl { bool Port::secure() const @@ -320,4 +320,4 @@ parse_Port(ParsedPort& port, Section const& section, std::ostream& log) port.pmd_options.memLevel = section.value_or("memory_level", 4); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/shamap/SHAMap.cpp b/src/libxrpl/shamap/SHAMap.cpp index ef27d37ed3..7cfa66b1ac 100644 --- a/src/libxrpl/shamap/SHAMap.cpp +++ b/src/libxrpl/shamap/SHAMap.cpp @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { [[nodiscard]] intr_ptr::SharedPtr makeTypedLeaf( @@ -85,10 +85,10 @@ SHAMap::dirtyUp( XRPL_ASSERT( (state_ != SHAMapState::Synching) && (state_ != SHAMapState::Immutable), - "ripple::SHAMap::dirtyUp : valid state"); + "xrpl::SHAMap::dirtyUp : valid state"); XRPL_ASSERT( child && (child->cowid() == cowid_), - "ripple::SHAMap::dirtyUp : valid child input"); + "xrpl::SHAMap::dirtyUp : valid child input"); while (!stack.empty()) { @@ -96,10 +96,10 @@ SHAMap::dirtyUp( intr_ptr::dynamic_pointer_cast(stack.top().first); SHAMapNodeID nodeID = stack.top().second; stack.pop(); - XRPL_ASSERT(node, "ripple::SHAMap::dirtyUp : non-null node"); + XRPL_ASSERT(node, "xrpl::SHAMap::dirtyUp : non-null node"); int branch = selectBranch(nodeID, target); - XRPL_ASSERT(branch >= 0, "ripple::SHAMap::dirtyUp : valid branch"); + XRPL_ASSERT(branch >= 0, "xrpl::SHAMap::dirtyUp : valid branch"); node = unshareNode(std::move(node), nodeID); node->setChild(branch, std::move(child)); @@ -113,7 +113,7 @@ SHAMap::walkTowardsKey(uint256 const& id, SharedPtrNodeStack* stack) const { XRPL_ASSERT( stack == nullptr || stack->empty(), - "ripple::SHAMap::walkTowardsKey : empty stack input"); + "xrpl::SHAMap::walkTowardsKey : empty stack input"); auto inNode = root_; SHAMapNodeID nodeID; @@ -149,7 +149,7 @@ SHAMap::findKey(uint256 const& id) const intr_ptr::SharedPtr SHAMap::fetchNodeFromDB(SHAMapHash const& hash) const { - XRPL_ASSERT(backed_, "ripple::SHAMap::fetchNodeFromDB : is backed"); + XRPL_ASSERT(backed_, "xrpl::SHAMap::fetchNodeFromDB : is backed"); auto obj = f_.db().fetchNodeObject(hash.as_uint256(), ledgerSeq_); return finishFetch(hash, obj); } @@ -159,7 +159,7 @@ SHAMap::finishFetch( SHAMapHash const& hash, std::shared_ptr const& object) const { - XRPL_ASSERT(backed_, "ripple::SHAMap::finishFetch : is backed"); + XRPL_ASSERT(backed_, "xrpl::SHAMap::finishFetch : is backed"); try { @@ -344,13 +344,13 @@ SHAMap::descend( SHAMapSyncFilter* filter) const { XRPL_ASSERT( - parent->isInner(), "ripple::SHAMap::descend : valid parent input"); + parent->isInner(), "xrpl::SHAMap::descend : valid parent input"); XRPL_ASSERT( (branch >= 0) && (branch < branchFactor), - "ripple::SHAMap::descend : valid branch input"); + "xrpl::SHAMap::descend : valid branch input"); XRPL_ASSERT( !parent->isEmptyBranch(branch), - "ripple::SHAMap::descend : parent branch is non-empty"); + "xrpl::SHAMap::descend : parent branch is non-empty"); SHAMapTreeNode* child = parent->getChildPointer(branch); @@ -420,13 +420,13 @@ SHAMap::unshareNode(intr_ptr::SharedPtr node, SHAMapNodeID const& nodeID) // make sure the node is suitable for the intended operation (copy on write) XRPL_ASSERT( node->cowid() <= cowid_, - "ripple::SHAMap::unshareNode : node valid for cowid"); + "xrpl::SHAMap::unshareNode : node valid for cowid"); if (node->cowid() != cowid_) { // have a CoW XRPL_ASSERT( state_ != SHAMapState::Immutable, - "ripple::SHAMap::unshareNode : not immutable"); + "xrpl::SHAMap::unshareNode : not immutable"); node = intr_ptr::static_pointer_cast(node->clone(cowid_)); if (nodeID.isRoot()) root_ = node; @@ -460,8 +460,7 @@ SHAMap::belowHelper( { node.adopt(descendThrow(inner.get(), i)); XRPL_ASSERT( - !stack.empty(), - "ripple::SHAMap::belowHelper : non-empty stack"); + !stack.empty(), "xrpl::SHAMap::belowHelper : non-empty stack"); if (node->isLeaf()) { auto n = intr_ptr::static_pointer_cast(node); @@ -526,7 +525,7 @@ SHAMap::onlyBelow(SHAMapTreeNode* node) const if (!nextNode) { // LCOV_EXCL_START - UNREACHABLE("ripple::SHAMap::onlyBelow : no next node"); + UNREACHABLE("xrpl::SHAMap::onlyBelow : no next node"); return no_item; // LCOV_EXCL_STOP } @@ -539,7 +538,7 @@ SHAMap::onlyBelow(SHAMapTreeNode* node) const auto const leaf = static_cast(node); XRPL_ASSERT( leaf->peekItem() || (leaf == root_.get()), - "ripple::SHAMap::onlyBelow : valid inner node"); + "xrpl::SHAMap::onlyBelow : valid inner node"); return leaf->peekItem(); } @@ -547,7 +546,7 @@ SHAMapLeafNode const* SHAMap::peekFirstItem(SharedPtrNodeStack& stack) const { XRPL_ASSERT( - stack.empty(), "ripple::SHAMap::peekFirstItem : empty stack input"); + stack.empty(), "xrpl::SHAMap::peekFirstItem : empty stack input"); SHAMapLeafNode* node = firstBelow(root_, stack); if (!node) { @@ -562,17 +561,17 @@ SHAMapLeafNode const* SHAMap::peekNextItem(uint256 const& id, SharedPtrNodeStack& stack) const { XRPL_ASSERT( - !stack.empty(), "ripple::SHAMap::peekNextItem : non-empty stack input"); + !stack.empty(), "xrpl::SHAMap::peekNextItem : non-empty stack input"); XRPL_ASSERT( stack.top().first->isLeaf(), - "ripple::SHAMap::peekNextItem : stack starts with leaf"); + "xrpl::SHAMap::peekNextItem : stack starts with leaf"); stack.pop(); while (!stack.empty()) { auto [node, nodeID] = stack.top(); XRPL_ASSERT( !node->isLeaf(), - "ripple::SHAMap::peekNextItem : another node is not leaf"); + "xrpl::SHAMap::peekNextItem : another node is not leaf"); auto inner = intr_ptr::static_pointer_cast(node); for (auto i = selectBranch(nodeID, id) + 1; i < branchFactor; ++i) { @@ -584,7 +583,7 @@ SHAMap::peekNextItem(uint256 const& id, SharedPtrNodeStack& stack) const Throw(type_, id); XRPL_ASSERT( leaf->isLeaf(), - "ripple::SHAMap::peekNextItem : leaf is valid"); + "xrpl::SHAMap::peekNextItem : leaf is valid"); return leaf; } } @@ -704,7 +703,7 @@ SHAMap::delItem(uint256 const& id) // delete the item with this ID XRPL_ASSERT( state_ != SHAMapState::Immutable, - "ripple::SHAMap::delItem : not immutable"); + "xrpl::SHAMap::delItem : not immutable"); SharedPtrNodeStack stack; walkTowardsKey(id, &stack); @@ -787,10 +786,10 @@ SHAMap::addGiveItem( { XRPL_ASSERT( state_ != SHAMapState::Immutable, - "ripple::SHAMap::addGiveItem : not immutable"); + "xrpl::SHAMap::addGiveItem : not immutable"); XRPL_ASSERT( type != SHAMapNodeType::tnINNER, - "ripple::SHAMap::addGiveItem : valid type input"); + "xrpl::SHAMap::addGiveItem : valid type input"); // add the specified item, does not update uint256 tag = item->key(); @@ -818,7 +817,7 @@ SHAMap::addGiveItem( int branch = selectBranch(nodeID, tag); XRPL_ASSERT( inner->isEmptyBranch(branch), - "ripple::SHAMap::addGiveItem : inner branch is empty"); + "xrpl::SHAMap::addGiveItem : inner branch is empty"); inner->setChild(branch, makeTypedLeaf(type, std::move(item), cowid_)); } else @@ -829,7 +828,7 @@ SHAMap::addGiveItem( auto otherItem = leaf->peekItem(); XRPL_ASSERT( otherItem && (tag != otherItem->key()), - "ripple::SHAMap::addGiveItem : non-null item"); + "xrpl::SHAMap::addGiveItem : non-null item"); node = intr_ptr::make_shared(node->cowid()); @@ -848,7 +847,7 @@ SHAMap::addGiveItem( // we can add the two leaf nodes here XRPL_ASSERT( - node->isInner(), "ripple::SHAMap::addGiveItem : node is inner"); + node->isInner(), "xrpl::SHAMap::addGiveItem : node is inner"); auto inner = static_cast(node.get()); inner->setChild(b1, makeTypedLeaf(type, std::move(item), cowid_)); @@ -889,7 +888,7 @@ SHAMap::updateGiveItem( XRPL_ASSERT( state_ != SHAMapState::Immutable, - "ripple::SHAMap::updateGiveItem : not immutable"); + "xrpl::SHAMap::updateGiveItem : not immutable"); SharedPtrNodeStack stack; walkTowardsKey(tag, &stack); @@ -905,7 +904,7 @@ SHAMap::updateGiveItem( if (!node || (node->peekItem()->key() != tag)) { // LCOV_EXCL_START - UNREACHABLE("ripple::SHAMap::updateGiveItem : invalid node"); + UNREACHABLE("xrpl::SHAMap::updateGiveItem : invalid node"); return false; // LCOV_EXCL_STOP } @@ -953,7 +952,7 @@ SHAMap::fetchRoot(SHAMapHash const& hash, SHAMapSyncFilter* filter) root_ = newRoot; XRPL_ASSERT( root_->getHash() == hash, - "ripple::SHAMap::fetchRoot : root hash do match"); + "xrpl::SHAMap::fetchRoot : root hash do match"); return true; } @@ -977,8 +976,8 @@ SHAMap::writeNode(NodeObjectType t, intr_ptr::SharedPtr node) const { XRPL_ASSERT( - node->cowid() == 0, "ripple::SHAMap::writeNode : valid input node"); - XRPL_ASSERT(backed_, "ripple::SHAMap::writeNode : is backed"); + node->cowid() == 0, "xrpl::SHAMap::writeNode : valid input node"); + XRPL_ASSERT(backed_, "xrpl::SHAMap::writeNode : is backed"); canonicalize(node->getHash(), node); @@ -998,8 +997,7 @@ SHAMap::preFlushNode(intr_ptr::SharedPtr node) const { // A shared node should never need to be flushed // because that would imply someone modified it - XRPL_ASSERT( - node->cowid(), "ripple::SHAMap::preFlushNode : valid input node"); + XRPL_ASSERT(node->cowid(), "xrpl::SHAMap::preFlushNode : valid input node"); if (node->cowid() != cowid_) { @@ -1027,8 +1025,7 @@ SHAMap::flushDirty(NodeObjectType t) int SHAMap::walkSubTree(bool doWrite, NodeObjectType t) { - XRPL_ASSERT( - !doWrite || backed_, "ripple::SHAMap::walkSubTree : valid input"); + XRPL_ASSERT(!doWrite || backed_, "xrpl::SHAMap::walkSubTree : valid input"); int flushed = 0; @@ -1105,7 +1102,7 @@ SHAMap::walkSubTree(bool doWrite, NodeObjectType t) XRPL_ASSERT( node->cowid() == cowid_, - "ripple::SHAMap::walkSubTree : node cowid do " + "xrpl::SHAMap::walkSubTree : node cowid do " "match"); child->updateHash(); child->unshare(); @@ -1141,7 +1138,7 @@ SHAMap::walkSubTree(bool doWrite, NodeObjectType t) // Hook this inner node to its parent XRPL_ASSERT( parent->cowid() == cowid_, - "ripple::SHAMap::walkSubTree : parent cowid do match"); + "xrpl::SHAMap::walkSubTree : parent cowid do match"); parent->shareChild(pos, node); // Continue with parent's next child, if any @@ -1187,7 +1184,7 @@ SHAMap::dump(bool hash) const { XRPL_ASSERT( child->getHash() == inner->getChildHash(i), - "ripple::SHAMap::dump : child hash do match"); + "xrpl::SHAMap::dump : child hash do match"); stack.push({child, nodeID.getChildNodeID(i)}); } } @@ -1206,7 +1203,7 @@ SHAMap::cacheLookup(SHAMapHash const& hash) const auto ret = f_.getTreeNodeCache()->fetch(hash.as_uint256()); XRPL_ASSERT( !ret || !ret->cowid(), - "ripple::SHAMap::cacheLookup : not found or zero cowid"); + "xrpl::SHAMap::cacheLookup : not found or zero cowid"); return ret; } @@ -1215,12 +1212,12 @@ SHAMap::canonicalize( SHAMapHash const& hash, intr_ptr::SharedPtr& node) const { - XRPL_ASSERT(backed_, "ripple::SHAMap::canonicalize : is backed"); + XRPL_ASSERT(backed_, "xrpl::SHAMap::canonicalize : is backed"); XRPL_ASSERT( - node->cowid() == 0, "ripple::SHAMap::canonicalize : valid node input"); + node->cowid() == 0, "xrpl::SHAMap::canonicalize : valid node input"); XRPL_ASSERT( node->getHash() == hash, - "ripple::SHAMap::canonicalize : node hash do match"); + "xrpl::SHAMap::canonicalize : node hash do match"); f_.getTreeNodeCache()->canonicalize_replace_client(hash.as_uint256(), node); } @@ -1230,9 +1227,9 @@ SHAMap::invariants() const { (void)getHash(); // update node hashes auto node = root_.get(); - XRPL_ASSERT(node, "ripple::SHAMap::invariants : non-null root node"); + XRPL_ASSERT(node, "xrpl::SHAMap::invariants : non-null root node"); XRPL_ASSERT( - !node->isLeaf(), "ripple::SHAMap::invariants : root node is not leaf"); + !node->isLeaf(), "xrpl::SHAMap::invariants : root node is not leaf"); SharedPtrNodeStack stack; for (auto leaf = peekFirstItem(stack); leaf != nullptr; leaf = peekNextItem(leaf->peekItem()->key(), stack)) @@ -1240,4 +1237,4 @@ SHAMap::invariants() const node->invariants(true); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/shamap/SHAMapDelta.cpp b/src/libxrpl/shamap/SHAMapDelta.cpp index 063c41993d..d7234bcbab 100644 --- a/src/libxrpl/shamap/SHAMapDelta.cpp +++ b/src/libxrpl/shamap/SHAMapDelta.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { // This code is used to compare another node's transaction tree // to our own. It returns a map containing all items that are different @@ -112,7 +112,7 @@ SHAMap::compare(SHAMap const& otherMap, Delta& differences, int maxCount) const XRPL_ASSERT( isValid() && otherMap.isValid(), - "ripple::SHAMap::compare : valid state and valid input"); + "xrpl::SHAMap::compare : valid state and valid input"); if (getHash() == otherMap.getHash()) return true; @@ -130,7 +130,7 @@ SHAMap::compare(SHAMap const& otherMap, Delta& differences, int maxCount) const if (!ourNode || !otherNode) { // LCOV_EXCL_START - UNREACHABLE("ripple::SHAMap::compare : missing a node"); + UNREACHABLE("xrpl::SHAMap::compare : missing a node"); Throw(type_, uint256()); // LCOV_EXCL_STOP } @@ -214,7 +214,7 @@ SHAMap::compare(SHAMap const& otherMap, Delta& differences, int maxCount) const else { // LCOV_EXCL_START - UNREACHABLE("ripple::SHAMap::compare : invalid node"); + UNREACHABLE("xrpl::SHAMap::compare : invalid node"); // LCOV_EXCL_STOP } } @@ -315,7 +315,7 @@ SHAMap::walkMapParallel( std::move(nodeStack.top()); XRPL_ASSERT( node, - "ripple::SHAMap::walkMapParallel : non-null node"); + "xrpl::SHAMap::walkMapParallel : non-null node"); nodeStack.pop(); for (int i = 0; i < 16; ++i) @@ -366,4 +366,4 @@ SHAMap::walkMapParallel( return false; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/shamap/SHAMapInnerNode.cpp b/src/libxrpl/shamap/SHAMapInnerNode.cpp index f17f86bcb1..5d4a0fd27f 100644 --- a/src/libxrpl/shamap/SHAMapInnerNode.cpp +++ b/src/libxrpl/shamap/SHAMapInnerNode.cpp @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { SHAMapInnerNode::SHAMapInnerNode( std::uint32_t cowid, @@ -212,7 +212,7 @@ void SHAMapInnerNode::serializeForWire(Serializer& s) const { XRPL_ASSERT( - !isEmpty(), "ripple::SHAMapInnerNode::serializeForWire : is non-empty"); + !isEmpty(), "xrpl::SHAMapInnerNode::serializeForWire : is non-empty"); // If the node is sparse, then only send non-empty branches: if (getBranchCount() < 12) @@ -238,7 +238,7 @@ SHAMapInnerNode::serializeWithPrefix(Serializer& s) const { XRPL_ASSERT( !isEmpty(), - "ripple::SHAMapInnerNode::serializeWithPrefix : is non-empty"); + "xrpl::SHAMapInnerNode::serializeWithPrefix : is non-empty"); s.add32(HashPrefix::innerNode); iterChildren( @@ -265,11 +265,11 @@ SHAMapInnerNode::setChild(int m, intr_ptr::SharedPtr child) { XRPL_ASSERT( (m >= 0) && (m < branchFactor), - "ripple::SHAMapInnerNode::setChild : valid branch input"); - XRPL_ASSERT(cowid_, "ripple::SHAMapInnerNode::setChild : nonzero cowid"); + "xrpl::SHAMapInnerNode::setChild : valid branch input"); + XRPL_ASSERT(cowid_, "xrpl::SHAMapInnerNode::setChild : nonzero cowid"); XRPL_ASSERT( child.get() != this, - "ripple::SHAMapInnerNode::setChild : valid child input"); + "xrpl::SHAMapInnerNode::setChild : valid child input"); auto const dstIsBranch = [&] { if (child) @@ -298,7 +298,7 @@ SHAMapInnerNode::setChild(int m, intr_ptr::SharedPtr child) XRPL_ASSERT( getBranchCount() <= hashesAndChildren_.capacity(), - "ripple::SHAMapInnerNode::setChild : maximum branch count"); + "xrpl::SHAMapInnerNode::setChild : maximum branch count"); } // finished modifying, now make shareable @@ -309,17 +309,17 @@ SHAMapInnerNode::shareChild( { XRPL_ASSERT( (m >= 0) && (m < branchFactor), - "ripple::SHAMapInnerNode::shareChild : valid branch input"); - XRPL_ASSERT(cowid_, "ripple::SHAMapInnerNode::shareChild : nonzero cowid"); + "xrpl::SHAMapInnerNode::shareChild : valid branch input"); + XRPL_ASSERT(cowid_, "xrpl::SHAMapInnerNode::shareChild : nonzero cowid"); XRPL_ASSERT( - child, "ripple::SHAMapInnerNode::shareChild : non-null child input"); + child, "xrpl::SHAMapInnerNode::shareChild : non-null child input"); XRPL_ASSERT( child.get() != this, - "ripple::SHAMapInnerNode::shareChild : valid child input"); + "xrpl::SHAMapInnerNode::shareChild : valid child input"); XRPL_ASSERT( !isEmptyBranch(m), - "ripple::SHAMapInnerNode::shareChild : non-empty branch input"); + "xrpl::SHAMapInnerNode::shareChild : non-empty branch input"); hashesAndChildren_.getChildren()[*getChildIndex(m)] = child; } @@ -328,10 +328,10 @@ SHAMapInnerNode::getChildPointer(int branch) { XRPL_ASSERT( branch >= 0 && branch < branchFactor, - "ripple::SHAMapInnerNode::getChildPointer : valid branch input"); + "xrpl::SHAMapInnerNode::getChildPointer : valid branch input"); XRPL_ASSERT( !isEmptyBranch(branch), - "ripple::SHAMapInnerNode::getChildPointer : non-empty branch input"); + "xrpl::SHAMapInnerNode::getChildPointer : non-empty branch input"); auto const index = *getChildIndex(branch); @@ -345,10 +345,10 @@ SHAMapInnerNode::getChild(int branch) { XRPL_ASSERT( branch >= 0 && branch < branchFactor, - "ripple::SHAMapInnerNode::getChild : valid branch input"); + "xrpl::SHAMapInnerNode::getChild : valid branch input"); XRPL_ASSERT( !isEmptyBranch(branch), - "ripple::SHAMapInnerNode::getChild : non-empty branch input"); + "xrpl::SHAMapInnerNode::getChild : non-empty branch input"); auto const index = *getChildIndex(branch); @@ -362,7 +362,7 @@ SHAMapInnerNode::getChildHash(int m) const { XRPL_ASSERT( (m >= 0) && (m < branchFactor), - "ripple::SHAMapInnerNode::getChildHash : valid branch input"); + "xrpl::SHAMapInnerNode::getChildHash : valid branch input"); if (auto const i = getChildIndex(m)) return hashesAndChildren_.getHashes()[*i]; @@ -376,18 +376,18 @@ SHAMapInnerNode::canonicalizeChild( { XRPL_ASSERT( branch >= 0 && branch < branchFactor, - "ripple::SHAMapInnerNode::canonicalizeChild : valid branch input"); + "xrpl::SHAMapInnerNode::canonicalizeChild : valid branch input"); XRPL_ASSERT( node != nullptr, - "ripple::SHAMapInnerNode::canonicalizeChild : valid node input"); + "xrpl::SHAMapInnerNode::canonicalizeChild : valid node input"); XRPL_ASSERT( !isEmptyBranch(branch), - "ripple::SHAMapInnerNode::canonicalizeChild : non-empty branch input"); + "xrpl::SHAMapInnerNode::canonicalizeChild : non-empty branch input"); auto const childIndex = *getChildIndex(branch); auto [_, hashes, children] = hashesAndChildren_.getHashesAndChildren(); XRPL_ASSERT( node->getHash() == hashes[childIndex], - "ripple::SHAMapInnerNode::canonicalizeChild : node and branch inputs " + "xrpl::SHAMapInnerNode::canonicalizeChild : node and branch inputs " "hash do match"); packed_spinlock sl(lock_, childIndex); @@ -420,7 +420,7 @@ SHAMapInnerNode::invariants(bool is_root) const { XRPL_ASSERT( hashes[i].isNonZero(), - "ripple::SHAMapInnerNode::invariants : nonzero hash in branch"); + "xrpl::SHAMapInnerNode::invariants : nonzero hash in branch"); if (children[i] != nullptr) children[i]->invariants(); ++count; @@ -434,7 +434,7 @@ SHAMapInnerNode::invariants(bool is_root) const { XRPL_ASSERT( (isBranch_ & (1 << i)), - "ripple::SHAMapInnerNode::invariants : valid branch when " + "xrpl::SHAMapInnerNode::invariants : valid branch when " "nonzero hash"); if (children[i] != nullptr) children[i]->invariants(); @@ -444,7 +444,7 @@ SHAMapInnerNode::invariants(bool is_root) const { XRPL_ASSERT( (isBranch_ & (1 << i)) == 0, - "ripple::SHAMapInnerNode::invariants : valid branch when " + "xrpl::SHAMapInnerNode::invariants : valid branch when " "zero hash"); } } @@ -454,13 +454,13 @@ SHAMapInnerNode::invariants(bool is_root) const { XRPL_ASSERT( hash_.isNonZero(), - "ripple::SHAMapInnerNode::invariants : nonzero hash"); + "xrpl::SHAMapInnerNode::invariants : nonzero hash"); XRPL_ASSERT( - count >= 1, "ripple::SHAMapInnerNode::invariants : minimum count"); + count >= 1, "xrpl::SHAMapInnerNode::invariants : minimum count"); } XRPL_ASSERT( (count == 0) ? hash_.isZero() : hash_.isNonZero(), - "ripple::SHAMapInnerNode::invariants : hash and count do match"); + "xrpl::SHAMapInnerNode::invariants : hash and count do match"); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/shamap/SHAMapLeafNode.cpp b/src/libxrpl/shamap/SHAMapLeafNode.cpp index d2fd88ba5a..72e57cd737 100644 --- a/src/libxrpl/shamap/SHAMapLeafNode.cpp +++ b/src/libxrpl/shamap/SHAMapLeafNode.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { SHAMapLeafNode::SHAMapLeafNode( boost::intrusive_ptr item, @@ -9,7 +9,7 @@ SHAMapLeafNode::SHAMapLeafNode( { XRPL_ASSERT( item_->size() >= 12, - "ripple::SHAMapLeafNode::SHAMapLeafNode(boost::intrusive_ptr<" + "xrpl::SHAMapLeafNode::SHAMapLeafNode(boost::intrusive_ptr<" "SHAMapItem const>, std::uint32_t) : minimum input size"); } @@ -21,7 +21,7 @@ SHAMapLeafNode::SHAMapLeafNode( { XRPL_ASSERT( item_->size() >= 12, - "ripple::SHAMapLeafNode::SHAMapLeafNode(boost::intrusive_ptr<" + "xrpl::SHAMapLeafNode::SHAMapLeafNode(boost::intrusive_ptr<" "SHAMapItem const>, std::uint32_t, SHAMapHash const&) : minimum input " "size"); } @@ -35,7 +35,7 @@ SHAMapLeafNode::peekItem() const bool SHAMapLeafNode::setItem(boost::intrusive_ptr item) { - XRPL_ASSERT(cowid_, "ripple::SHAMapLeafNode::setItem : nonzero cowid"); + XRPL_ASSERT(cowid_, "xrpl::SHAMapLeafNode::setItem : nonzero cowid"); item_ = std::move(item); auto const oldHash = hash_; @@ -74,8 +74,8 @@ void SHAMapLeafNode::invariants(bool) const { XRPL_ASSERT( - hash_.isNonZero(), "ripple::SHAMapLeafNode::invariants : nonzero hash"); - XRPL_ASSERT(item_, "ripple::SHAMapLeafNode::invariants : non-null item"); + hash_.isNonZero(), "xrpl::SHAMapLeafNode::invariants : nonzero hash"); + XRPL_ASSERT(item_, "xrpl::SHAMapLeafNode::invariants : non-null item"); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/shamap/SHAMapNodeID.cpp b/src/libxrpl/shamap/SHAMapNodeID.cpp index 33d38ebb03..a32ff5c28e 100644 --- a/src/libxrpl/shamap/SHAMapNodeID.cpp +++ b/src/libxrpl/shamap/SHAMapNodeID.cpp @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { static uint256 const& depthMask(unsigned int depth) @@ -39,10 +39,10 @@ SHAMapNodeID::SHAMapNodeID(unsigned int depth, uint256 const& hash) { XRPL_ASSERT( depth <= SHAMap::leafDepth, - "ripple::SHAMapNodeID::SHAMapNodeID : maximum depth input"); + "xrpl::SHAMapNodeID::SHAMapNodeID : maximum depth input"); XRPL_ASSERT( id_ == (id_ & depthMask(depth)), - "ripple::SHAMapNodeID::SHAMapNodeID : hash and depth inputs do match"); + "xrpl::SHAMapNodeID::SHAMapNodeID : hash and depth inputs do match"); } std::string @@ -59,7 +59,7 @@ SHAMapNodeID::getChildNodeID(unsigned int m) const { XRPL_ASSERT( m < SHAMap::branchFactor, - "ripple::SHAMapNodeID::getChildNodeID : valid branch input"); + "xrpl::SHAMapNodeID::getChildNodeID : valid branch input"); // A SHAMap has exactly 65 levels, so nodes must not exceed that // depth; if they do, this breaks the invariant of never allowing @@ -71,7 +71,7 @@ SHAMapNodeID::getChildNodeID(unsigned int m) const // constructing a child node from them would break the above invariant. XRPL_ASSERT( depth_ <= SHAMap::leafDepth, - "ripple::SHAMapNodeID::getChildNodeID : maximum leaf depth"); + "xrpl::SHAMapNodeID::getChildNodeID : maximum leaf depth"); if (depth_ >= SHAMap::leafDepth) Throw( @@ -117,7 +117,7 @@ selectBranch(SHAMapNodeID const& id, uint256 const& hash) branch >>= 4; XRPL_ASSERT( - branch < SHAMap::branchFactor, "ripple::selectBranch : maximum result"); + branch < SHAMap::branchFactor, "xrpl::selectBranch : maximum result"); return branch; } @@ -126,8 +126,8 @@ SHAMapNodeID::createID(int depth, uint256 const& key) { XRPL_ASSERT( (depth >= 0) && (depth < 65), - "ripple::SHAMapNodeID::createID : valid branch input"); + "xrpl::SHAMapNodeID::createID : valid branch input"); return SHAMapNodeID(depth, key & depthMask(depth)); } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/shamap/SHAMapSync.cpp b/src/libxrpl/shamap/SHAMapSync.cpp index 3bc2d5561e..d9c0846fbf 100644 --- a/src/libxrpl/shamap/SHAMapSync.cpp +++ b/src/libxrpl/shamap/SHAMapSync.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { void SHAMap::visitLeaves( @@ -300,8 +300,8 @@ SHAMap::getMissingNodes(int max, SHAMapSyncFilter* filter) { XRPL_ASSERT( root_->getHash().isNonZero(), - "ripple::SHAMap::getMissingNodes : nonzero root hash"); - XRPL_ASSERT(max > 0, "ripple::SHAMap::getMissingNodes : valid max input"); + "xrpl::SHAMap::getMissingNodes : nonzero root hash"); + XRPL_ASSERT(max > 0, "xrpl::SHAMap::getMissingNodes : valid max input"); MissingNodes mn( max, @@ -362,7 +362,7 @@ SHAMap::getMissingNodes(int max, SHAMapSyncFilter* filter) } XRPL_ASSERT( node, - "ripple::SHAMap::getMissingNodes : first non-null node"); + "xrpl::SHAMap::getMissingNodes : first non-null node"); } } @@ -395,7 +395,7 @@ SHAMap::getMissingNodes(int max, SHAMapSyncFilter* filter) mn.stack_.pop(); XRPL_ASSERT( node, - "ripple::SHAMap::getMissingNodes : second non-null node"); + "xrpl::SHAMap::getMissingNodes : second non-null node"); } } @@ -524,11 +524,11 @@ SHAMap::addRootNode( JLOG(journal_.trace()) << "got root node, already have one"; XRPL_ASSERT( root_->getHash() == hash, - "ripple::SHAMap::addRootNode : valid hash input"); + "xrpl::SHAMap::addRootNode : valid hash input"); return SHAMapAddNode::duplicate(); } - XRPL_ASSERT(cowid_ >= 1, "ripple::SHAMap::addRootNode : valid cowid"); + XRPL_ASSERT(cowid_ >= 1, "xrpl::SHAMap::addRootNode : valid cowid"); auto node = SHAMapTreeNode::makeFromWire(rootNode); if (!node || node->getHash() != hash) return SHAMapAddNode::invalid(); @@ -563,7 +563,7 @@ SHAMap::addKnownNode( SHAMapSyncFilter* filter) { XRPL_ASSERT( - !node.isRoot(), "ripple::SHAMap::addKnownNode : valid node input"); + !node.isRoot(), "xrpl::SHAMap::addKnownNode : valid node input"); if (!isSynching()) { @@ -580,7 +580,7 @@ SHAMap::addKnownNode( (currNodeID.getDepth() < node.getDepth())) { int const branch = selectBranch(currNodeID, node.getNodeID()); - XRPL_ASSERT(branch >= 0, "ripple::SHAMap::addKnownNode : valid branch"); + XRPL_ASSERT(branch >= 0, "xrpl::SHAMap::addKnownNode : valid branch"); auto inner = static_cast(currNode); if (inner->isEmptyBranch(branch)) { @@ -884,4 +884,4 @@ SHAMap::verifyProofPath( return false; } -} // namespace ripple +} // namespace xrpl diff --git a/src/libxrpl/shamap/SHAMapTreeNode.cpp b/src/libxrpl/shamap/SHAMapTreeNode.cpp index 453be08756..854b4c1097 100644 --- a/src/libxrpl/shamap/SHAMapTreeNode.cpp +++ b/src/libxrpl/shamap/SHAMapTreeNode.cpp @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { intr_ptr::SharedPtr SHAMapTreeNode::makeTransaction( @@ -164,4 +164,4 @@ SHAMapTreeNode::getString(SHAMapNodeID const& id) const return to_string(id); } -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/AMMCalc_test.cpp b/src/test/app/AMMCalc_test.cpp index 998642afb7..042ab8c208 100644 --- a/src/test/app/AMMCalc_test.cpp +++ b/src/test/app/AMMCalc_test.cpp @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { /** AMM Calculator. Uses AMM formulas to simulate the payment engine @@ -442,4 +442,4 @@ class AMMCalc_test : public beast::unit_test::suite BEAST_DEFINE_TESTSUITE_MANUAL(AMMCalc, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/AMMClawback_test.cpp b/src/test/app/AMMClawback_test.cpp index 003bffae8f..346ef9247e 100644 --- a/src/test/app/AMMClawback_test.cpp +++ b/src/test/app/AMMClawback_test.cpp @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { class AMMClawback_test : public beast::unit_test::suite { @@ -2449,4 +2449,4 @@ class AMMClawback_test : public beast::unit_test::suite }; BEAST_DEFINE_TESTSUITE(AMMClawback, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/AMMExtended_test.cpp b/src/test/app/AMMExtended_test.cpp index 2cfd690183..c48e21759b 100644 --- a/src/test/app/AMMExtended_test.cpp +++ b/src/test/app/AMMExtended_test.cpp @@ -18,7 +18,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { /** @@ -3841,4 +3841,4 @@ private: BEAST_DEFINE_TESTSUITE_PRIO(AMMExtended, app, ripple, 1); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/AMM_test.cpp b/src/test/app/AMM_test.cpp index 5a1816ebae..fc07e67bb4 100644 --- a/src/test/app/AMM_test.cpp +++ b/src/test/app/AMM_test.cpp @@ -21,7 +21,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { /** @@ -7481,7 +7481,7 @@ private: for (int i = 0; i < 256; ++i) { AccountID const accountId = - ripple::pseudoAccountAddress(*env.current(), keylet.key); + xrpl::pseudoAccountAddress(*env.current(), keylet.key); env(pay(env.master.id(), accountId, XRP(1000)), seq(autofill), @@ -7955,4 +7955,4 @@ private: BEAST_DEFINE_TESTSUITE_PRIO(AMM, app, ripple, 1); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/AccountDelete_test.cpp b/src/test/app/AccountDelete_test.cpp index 9328b4e017..3ee1800ea9 100644 --- a/src/test/app/AccountDelete_test.cpp +++ b/src/test/app/AccountDelete_test.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class AccountDelete_test : public beast::unit_test::suite @@ -1253,4 +1253,4 @@ public: BEAST_DEFINE_TESTSUITE_PRIO(AccountDelete, app, ripple, 2); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/AccountTxPaging_test.cpp b/src/test/app/AccountTxPaging_test.cpp index fe72f1fe1f..a9cf035e39 100644 --- a/src/test/app/AccountTxPaging_test.cpp +++ b/src/test/app/AccountTxPaging_test.cpp @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { class AccountTxPaging_test : public beast::unit_test::suite { @@ -253,4 +253,4 @@ public: BEAST_DEFINE_TESTSUITE(AccountTxPaging, app, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/AmendmentTable_test.cpp b/src/test/app/AmendmentTable_test.cpp index 6aad3fa05f..98d25ef15c 100644 --- a/src/test/app/AmendmentTable_test.cpp +++ b/src/test/app/AmendmentTable_test.cpp @@ -16,7 +16,7 @@ #include #include -namespace ripple { +namespace xrpl { class AmendmentTable_test final : public beast::unit_test::suite { @@ -534,7 +534,7 @@ public: } auto v = std::make_shared( - ripple::NetClock::time_point{}, + xrpl::NetClock::time_point{}, pub, sec, calcNodeID(pub), @@ -1273,4 +1273,4 @@ public: BEAST_DEFINE_TESTSUITE(AmendmentTable, app, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/Batch_test.cpp b/src/test/app/Batch_test.cpp index 222d6714a8..2817912496 100644 --- a/src/test/app/Batch_test.cpp +++ b/src/test/app/Batch_test.cpp @@ -14,7 +14,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class Batch_test : public beast::unit_test::suite @@ -546,7 +546,7 @@ class Batch_test : public beast::unit_test::suite Serializer msg; serializeBatch( msg, tfAllOrNothing, jt.stx->getBatchTransactionIDs()); - auto const sig = ripple::sign(bob.pk(), bob.sk(), msg.slice()); + auto const sig = xrpl::sign(bob.pk(), bob.sk(), msg.slice()); jt.jv[sfBatchSigners.jsonName][0u][sfBatchSigner.jsonName] [sfAccount.jsonName] = bob.human(); jt.jv[sfBatchSigners.jsonName][0u][sfBatchSigner.jsonName] @@ -1377,7 +1377,7 @@ class Batch_test : public beast::unit_test::suite env.app().openLedger().modify( [&](OpenView& view, beast::Journal j) { auto const result = - ripple::apply(env.app(), view, *jt.stx, tapNONE, j); + xrpl::apply(env.app(), view, *jt.stx, tapNONE, j); BEAST_EXPECT( !result.applied && result.ter == temARRAY_TOO_LARGE); return result.applied; @@ -1423,7 +1423,7 @@ class Batch_test : public beast::unit_test::suite env.app().openLedger().modify( [&](OpenView& view, beast::Journal j) { auto const result = - ripple::apply(env.app(), view, *jt.stx, tapNONE, j); + xrpl::apply(env.app(), view, *jt.stx, tapNONE, j); BEAST_EXPECT( !result.applied && result.ter == temARRAY_TOO_LARGE); return result.applied; @@ -3390,7 +3390,7 @@ class Batch_test : public beast::unit_test::suite BEAST_EXPECT(!passesLocalChecks(stx, reason)); BEAST_EXPECT(reason == "Cannot submit pseudo transactions."); env.app().openLedger().modify([&](OpenView& view, beast::Journal j) { - auto const result = ripple::apply(env.app(), view, stx, tapNONE, j); + auto const result = xrpl::apply(env.app(), view, stx, tapNONE, j); BEAST_EXPECT(!result.applied && result.ter == temINVALID_FLAG); return result.applied; }); @@ -4156,4 +4156,4 @@ public: BEAST_DEFINE_TESTSUITE(Batch, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/Check_test.cpp b/src/test/app/Check_test.cpp index 9fec61da7b..ccbda32847 100644 --- a/src/test/app/Check_test.cpp +++ b/src/test/app/Check_test.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -2019,7 +2019,7 @@ class Check_test : public beast::unit_test::suite return acct; } - operator ripple::AccountID() const + operator xrpl::AccountID() const { return acct.id(); } @@ -2698,4 +2698,4 @@ public: BEAST_DEFINE_TESTSUITE(Check, app, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/Clawback_test.cpp b/src/test/app/Clawback_test.cpp index 933e9678aa..d6d1fa2374 100644 --- a/src/test/app/Clawback_test.cpp +++ b/src/test/app/Clawback_test.cpp @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class Clawback_test : public beast::unit_test::suite { @@ -938,4 +938,4 @@ public: }; BEAST_DEFINE_TESTSUITE(Clawback, app, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/Credentials_test.cpp b/src/test/app/Credentials_test.cpp index fd4a7f41a6..d0a565e857 100644 --- a/src/test/app/Credentials_test.cpp +++ b/src/test/app/Credentials_test.cpp @@ -11,7 +11,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { struct Credentials_test : public beast::unit_test::suite @@ -926,8 +926,7 @@ struct Credentials_test : public beast::unit_test::suite testcase("deleteSLE fail, bad SLE."); auto view = std::make_shared( env.current().get(), ApplyFlags::tapNONE); - auto ter = - ripple::credentials::deleteSLE(*view, {}, env.journal); + auto ter = xrpl::credentials::deleteSLE(*view, {}, env.journal); BEAST_EXPECT(ter == tecNO_ENTRY); } } @@ -1111,4 +1110,4 @@ struct Credentials_test : public beast::unit_test::suite BEAST_DEFINE_TESTSUITE(Credentials, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/CrossingLimits_test.cpp b/src/test/app/CrossingLimits_test.cpp index 8f0483b590..5d1056f28b 100644 --- a/src/test/app/CrossingLimits_test.cpp +++ b/src/test/app/CrossingLimits_test.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class CrossingLimits_test : public beast::unit_test::suite @@ -516,4 +516,4 @@ public: BEAST_DEFINE_TESTSUITE_MANUAL_PRIO(CrossingLimits, app, ripple, 10); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/DID_test.cpp b/src/test/app/DID_test.cpp index 20d4e3d34d..4d34379999 100644 --- a/src/test/app/DID_test.cpp +++ b/src/test/app/DID_test.cpp @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { struct DID_test : public beast::unit_test::suite @@ -382,4 +382,4 @@ struct DID_test : public beast::unit_test::suite BEAST_DEFINE_TESTSUITE(DID, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/DNS_test.cpp b/src/test/app/DNS_test.cpp index cf5bfb31f7..16a7818502 100644 --- a/src/test/app/DNS_test.cpp +++ b/src/test/app/DNS_test.cpp @@ -7,14 +7,14 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class DNS_test : public beast::unit_test::suite { using endpoint_type = boost::asio::ip::tcp::endpoint; using error_code = boost::system::error_code; - std::weak_ptr work_; + std::weak_ptr work_; endpoint_type lastEndpoint_{}; parsedURL pUrl_; std::string port_; @@ -33,14 +33,14 @@ public: { auto onFetch = [&](error_code const& errorCode, endpoint_type const& endpoint, - ripple::detail::response_type&& resp) { + xrpl::detail::response_type&& resp) { BEAST_EXPECT(!errorCode); lastEndpoint_ = endpoint; resolved_[endpoint.address().to_string()]++; cv_.notify_all(); }; - auto sp = std::make_shared( + auto sp = std::make_shared( pUrl_.domain, pUrl_.path, port_, @@ -113,4 +113,4 @@ public: BEAST_DEFINE_TESTSUITE_MANUAL_PRIO(DNS, app, ripple, 20); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/Delegate_test.cpp b/src/test/app/Delegate_test.cpp index 0912f30e7c..b768618fd9 100644 --- a/src/test/app/Delegate_test.cpp +++ b/src/test/app/Delegate_test.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class Delegate_test : public beast::unit_test::suite { @@ -1865,4 +1865,4 @@ class Delegate_test : public beast::unit_test::suite }; BEAST_DEFINE_TESTSUITE(Delegate, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/DeliverMin_test.cpp b/src/test/app/DeliverMin_test.cpp index 9a2bc9372e..216ebfd074 100644 --- a/src/test/app/DeliverMin_test.cpp +++ b/src/test/app/DeliverMin_test.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class DeliverMin_test : public beast::unit_test::suite @@ -132,4 +132,4 @@ public: BEAST_DEFINE_TESTSUITE(DeliverMin, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/DepositAuth_test.cpp b/src/test/app/DepositAuth_test.cpp index 8d12a31088..76f0096bb6 100644 --- a/src/test/app/DepositAuth_test.cpp +++ b/src/test/app/DepositAuth_test.cpp @@ -4,7 +4,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { // Helper function that returns the reserve on an account based on @@ -1560,4 +1560,4 @@ BEAST_DEFINE_TESTSUITE(DepositAuth, app, ripple); BEAST_DEFINE_TESTSUITE(DepositPreauth, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/Discrepancy_test.cpp b/src/test/app/Discrepancy_test.cpp index b7ac66e1df..e415412362 100644 --- a/src/test/app/Discrepancy_test.cpp +++ b/src/test/app/Discrepancy_test.cpp @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { class Discrepancy_test : public beast::unit_test::suite { @@ -135,4 +135,4 @@ public: BEAST_DEFINE_TESTSUITE(Discrepancy, app, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/EscrowToken_test.cpp b/src/test/app/EscrowToken_test.cpp index f1dc6155f4..0c1acbb442 100644 --- a/src/test/app/EscrowToken_test.cpp +++ b/src/test/app/EscrowToken_test.cpp @@ -13,7 +13,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { struct EscrowToken_test : public beast::unit_test::suite @@ -1000,14 +1000,14 @@ struct EscrowToken_test : public beast::unit_test::suite auto const aa = env.le(keylet::escrow(alice.id(), aseq)); BEAST_EXPECT(aa); { - ripple::Dir aod(*env.current(), keylet::ownerDir(alice.id())); + xrpl::Dir aod(*env.current(), keylet::ownerDir(alice.id())); BEAST_EXPECT(std::distance(aod.begin(), aod.end()) == 2); BEAST_EXPECT( std::find(aod.begin(), aod.end(), aa) != aod.end()); } { - ripple::Dir iod(*env.current(), keylet::ownerDir(gw.id())); + xrpl::Dir iod(*env.current(), keylet::ownerDir(gw.id())); BEAST_EXPECT(std::distance(iod.begin(), iod.end()) == 4); BEAST_EXPECT( std::find(iod.begin(), iod.end(), aa) != iod.end()); @@ -1024,14 +1024,14 @@ struct EscrowToken_test : public beast::unit_test::suite BEAST_EXPECT(bb); { - ripple::Dir bod(*env.current(), keylet::ownerDir(bob.id())); + xrpl::Dir bod(*env.current(), keylet::ownerDir(bob.id())); BEAST_EXPECT(std::distance(bod.begin(), bod.end()) == 2); BEAST_EXPECT( std::find(bod.begin(), bod.end(), bb) != bod.end()); } { - ripple::Dir iod(*env.current(), keylet::ownerDir(gw.id())); + xrpl::Dir iod(*env.current(), keylet::ownerDir(gw.id())); BEAST_EXPECT(std::distance(iod.begin(), iod.end()) == 5); BEAST_EXPECT( std::find(iod.begin(), iod.end(), bb) != iod.end()); @@ -1045,17 +1045,17 @@ struct EscrowToken_test : public beast::unit_test::suite (*env.meta())[sfTransactionResult] == static_cast(tesSUCCESS)); - ripple::Dir aod(*env.current(), keylet::ownerDir(alice.id())); + xrpl::Dir aod(*env.current(), keylet::ownerDir(alice.id())); BEAST_EXPECT(std::distance(aod.begin(), aod.end()) == 1); BEAST_EXPECT( std::find(aod.begin(), aod.end(), aa) == aod.end()); - ripple::Dir bod(*env.current(), keylet::ownerDir(bob.id())); + xrpl::Dir bod(*env.current(), keylet::ownerDir(bob.id())); BEAST_EXPECT(std::distance(bod.begin(), bod.end()) == 2); BEAST_EXPECT( std::find(bod.begin(), bod.end(), bb) != bod.end()); - ripple::Dir iod(*env.current(), keylet::ownerDir(gw.id())); + xrpl::Dir iod(*env.current(), keylet::ownerDir(gw.id())); BEAST_EXPECT(std::distance(iod.begin(), iod.end()) == 4); BEAST_EXPECT( std::find(iod.begin(), iod.end(), bb) != iod.end()); @@ -1069,12 +1069,12 @@ struct EscrowToken_test : public beast::unit_test::suite (*env.meta())[sfTransactionResult] == static_cast(tesSUCCESS)); - ripple::Dir bod(*env.current(), keylet::ownerDir(bob.id())); + xrpl::Dir bod(*env.current(), keylet::ownerDir(bob.id())); BEAST_EXPECT(std::distance(bod.begin(), bod.end()) == 1); BEAST_EXPECT( std::find(bod.begin(), bod.end(), bb) == bod.end()); - ripple::Dir iod(*env.current(), keylet::ownerDir(gw.id())); + xrpl::Dir iod(*env.current(), keylet::ownerDir(gw.id())); BEAST_EXPECT(std::distance(iod.begin(), iod.end()) == 3); BEAST_EXPECT( std::find(iod.begin(), iod.end(), bb) == iod.end()); @@ -1117,24 +1117,24 @@ struct EscrowToken_test : public beast::unit_test::suite BEAST_EXPECT(bc); { - ripple::Dir aod(*env.current(), keylet::ownerDir(alice.id())); + xrpl::Dir aod(*env.current(), keylet::ownerDir(alice.id())); BEAST_EXPECT(std::distance(aod.begin(), aod.end()) == 2); BEAST_EXPECT( std::find(aod.begin(), aod.end(), ab) != aod.end()); - ripple::Dir bod(*env.current(), keylet::ownerDir(bob.id())); + xrpl::Dir bod(*env.current(), keylet::ownerDir(bob.id())); BEAST_EXPECT(std::distance(bod.begin(), bod.end()) == 3); BEAST_EXPECT( std::find(bod.begin(), bod.end(), ab) != bod.end()); BEAST_EXPECT( std::find(bod.begin(), bod.end(), bc) != bod.end()); - ripple::Dir cod(*env.current(), keylet::ownerDir(carol.id())); + xrpl::Dir cod(*env.current(), keylet::ownerDir(carol.id())); BEAST_EXPECT(std::distance(cod.begin(), cod.end()) == 2); BEAST_EXPECT( std::find(cod.begin(), cod.end(), bc) != cod.end()); - ripple::Dir iod(*env.current(), keylet::ownerDir(gw.id())); + xrpl::Dir iod(*env.current(), keylet::ownerDir(gw.id())); BEAST_EXPECT(std::distance(iod.begin(), iod.end()) == 5); BEAST_EXPECT( std::find(iod.begin(), iod.end(), ab) != iod.end()); @@ -1148,22 +1148,22 @@ struct EscrowToken_test : public beast::unit_test::suite BEAST_EXPECT(!env.le(keylet::escrow(alice.id(), aseq))); BEAST_EXPECT(env.le(keylet::escrow(bob.id(), bseq))); - ripple::Dir aod(*env.current(), keylet::ownerDir(alice.id())); + xrpl::Dir aod(*env.current(), keylet::ownerDir(alice.id())); BEAST_EXPECT(std::distance(aod.begin(), aod.end()) == 1); BEAST_EXPECT( std::find(aod.begin(), aod.end(), ab) == aod.end()); - ripple::Dir bod(*env.current(), keylet::ownerDir(bob.id())); + xrpl::Dir bod(*env.current(), keylet::ownerDir(bob.id())); BEAST_EXPECT(std::distance(bod.begin(), bod.end()) == 2); BEAST_EXPECT( std::find(bod.begin(), bod.end(), ab) == bod.end()); BEAST_EXPECT( std::find(bod.begin(), bod.end(), bc) != bod.end()); - ripple::Dir cod(*env.current(), keylet::ownerDir(carol.id())); + xrpl::Dir cod(*env.current(), keylet::ownerDir(carol.id())); BEAST_EXPECT(std::distance(cod.begin(), cod.end()) == 2); - ripple::Dir iod(*env.current(), keylet::ownerDir(gw.id())); + xrpl::Dir iod(*env.current(), keylet::ownerDir(gw.id())); BEAST_EXPECT(std::distance(iod.begin(), iod.end()) == 4); BEAST_EXPECT( std::find(iod.begin(), iod.end(), ab) == iod.end()); @@ -1177,22 +1177,22 @@ struct EscrowToken_test : public beast::unit_test::suite BEAST_EXPECT(!env.le(keylet::escrow(alice.id(), aseq))); BEAST_EXPECT(!env.le(keylet::escrow(bob.id(), bseq))); - ripple::Dir aod(*env.current(), keylet::ownerDir(alice.id())); + xrpl::Dir aod(*env.current(), keylet::ownerDir(alice.id())); BEAST_EXPECT(std::distance(aod.begin(), aod.end()) == 1); BEAST_EXPECT( std::find(aod.begin(), aod.end(), ab) == aod.end()); - ripple::Dir bod(*env.current(), keylet::ownerDir(bob.id())); + xrpl::Dir bod(*env.current(), keylet::ownerDir(bob.id())); BEAST_EXPECT(std::distance(bod.begin(), bod.end()) == 1); BEAST_EXPECT( std::find(bod.begin(), bod.end(), ab) == bod.end()); BEAST_EXPECT( std::find(bod.begin(), bod.end(), bc) == bod.end()); - ripple::Dir cod(*env.current(), keylet::ownerDir(carol.id())); + xrpl::Dir cod(*env.current(), keylet::ownerDir(carol.id())); BEAST_EXPECT(std::distance(cod.begin(), cod.end()) == 1); - ripple::Dir iod(*env.current(), keylet::ownerDir(gw.id())); + xrpl::Dir iod(*env.current(), keylet::ownerDir(gw.id())); BEAST_EXPECT(std::distance(iod.begin(), iod.end()) == 3); BEAST_EXPECT( std::find(iod.begin(), iod.end(), ab) == iod.end()); @@ -1232,15 +1232,15 @@ struct EscrowToken_test : public beast::unit_test::suite BEAST_EXPECT(ag); { - ripple::Dir aod(*env.current(), keylet::ownerDir(alice.id())); + xrpl::Dir aod(*env.current(), keylet::ownerDir(alice.id())); BEAST_EXPECT(std::distance(aod.begin(), aod.end()) == 2); BEAST_EXPECT( std::find(aod.begin(), aod.end(), ag) != aod.end()); - ripple::Dir cod(*env.current(), keylet::ownerDir(carol.id())); + xrpl::Dir cod(*env.current(), keylet::ownerDir(carol.id())); BEAST_EXPECT(std::distance(cod.begin(), cod.end()) == 1); - ripple::Dir iod(*env.current(), keylet::ownerDir(gw.id())); + xrpl::Dir iod(*env.current(), keylet::ownerDir(gw.id())); BEAST_EXPECT(std::distance(iod.begin(), iod.end()) == 3); BEAST_EXPECT( std::find(iod.begin(), iod.end(), ag) != iod.end()); @@ -1251,15 +1251,15 @@ struct EscrowToken_test : public beast::unit_test::suite { BEAST_EXPECT(!env.le(keylet::escrow(alice.id(), aseq))); - ripple::Dir aod(*env.current(), keylet::ownerDir(alice.id())); + xrpl::Dir aod(*env.current(), keylet::ownerDir(alice.id())); BEAST_EXPECT(std::distance(aod.begin(), aod.end()) == 1); BEAST_EXPECT( std::find(aod.begin(), aod.end(), ag) == aod.end()); - ripple::Dir cod(*env.current(), keylet::ownerDir(carol.id())); + xrpl::Dir cod(*env.current(), keylet::ownerDir(carol.id())); BEAST_EXPECT(std::distance(cod.begin(), cod.end()) == 1); - ripple::Dir iod(*env.current(), keylet::ownerDir(gw.id())); + xrpl::Dir iod(*env.current(), keylet::ownerDir(gw.id())); BEAST_EXPECT(std::distance(iod.begin(), iod.end()) == 2); BEAST_EXPECT( std::find(iod.begin(), iod.end(), ag) == iod.end()); @@ -2265,7 +2265,7 @@ struct EscrowToken_test : public beast::unit_test::suite env.fund(XRP(10'000), alice, bob, gw); env.close(); - auto const mpt = ripple::test::jtx::MPT( + auto const mpt = xrpl::test::jtx::MPT( alice.name(), makeMptID(env.seq(alice), alice)); Json::Value jv = escrow::create(alice, bob, mpt(2)); jv[jss::Amount][jss::mpt_issuance_id] = @@ -3209,14 +3209,14 @@ struct EscrowToken_test : public beast::unit_test::suite auto const aa = env.le(keylet::escrow(alice.id(), aseq)); BEAST_EXPECT(aa); { - ripple::Dir aod(*env.current(), keylet::ownerDir(alice.id())); + xrpl::Dir aod(*env.current(), keylet::ownerDir(alice.id())); BEAST_EXPECT(std::distance(aod.begin(), aod.end()) == 2); BEAST_EXPECT( std::find(aod.begin(), aod.end(), aa) != aod.end()); } { - ripple::Dir iod(*env.current(), keylet::ownerDir(gw.id())); + xrpl::Dir iod(*env.current(), keylet::ownerDir(gw.id())); BEAST_EXPECT(std::distance(iod.begin(), iod.end()) == 1); BEAST_EXPECT( std::find(iod.begin(), iod.end(), aa) == iod.end()); @@ -3233,7 +3233,7 @@ struct EscrowToken_test : public beast::unit_test::suite BEAST_EXPECT(bb); { - ripple::Dir bod(*env.current(), keylet::ownerDir(bob.id())); + xrpl::Dir bod(*env.current(), keylet::ownerDir(bob.id())); BEAST_EXPECT(std::distance(bod.begin(), bod.end()) == 2); BEAST_EXPECT( std::find(bod.begin(), bod.end(), bb) != bod.end()); @@ -3247,12 +3247,12 @@ struct EscrowToken_test : public beast::unit_test::suite (*env.meta())[sfTransactionResult] == static_cast(tesSUCCESS)); - ripple::Dir aod(*env.current(), keylet::ownerDir(alice.id())); + xrpl::Dir aod(*env.current(), keylet::ownerDir(alice.id())); BEAST_EXPECT(std::distance(aod.begin(), aod.end()) == 1); BEAST_EXPECT( std::find(aod.begin(), aod.end(), aa) == aod.end()); - ripple::Dir bod(*env.current(), keylet::ownerDir(bob.id())); + xrpl::Dir bod(*env.current(), keylet::ownerDir(bob.id())); BEAST_EXPECT(std::distance(bod.begin(), bod.end()) == 2); BEAST_EXPECT( std::find(bod.begin(), bod.end(), bb) != bod.end()); @@ -3266,7 +3266,7 @@ struct EscrowToken_test : public beast::unit_test::suite (*env.meta())[sfTransactionResult] == static_cast(tesSUCCESS)); - ripple::Dir bod(*env.current(), keylet::ownerDir(bob.id())); + xrpl::Dir bod(*env.current(), keylet::ownerDir(bob.id())); BEAST_EXPECT(std::distance(bod.begin(), bod.end()) == 1); BEAST_EXPECT( std::find(bod.begin(), bod.end(), bb) == bod.end()); @@ -3314,19 +3314,19 @@ struct EscrowToken_test : public beast::unit_test::suite BEAST_EXPECT(bc); { - ripple::Dir aod(*env.current(), keylet::ownerDir(alice.id())); + xrpl::Dir aod(*env.current(), keylet::ownerDir(alice.id())); BEAST_EXPECT(std::distance(aod.begin(), aod.end()) == 2); BEAST_EXPECT( std::find(aod.begin(), aod.end(), ab) != aod.end()); - ripple::Dir bod(*env.current(), keylet::ownerDir(bob.id())); + xrpl::Dir bod(*env.current(), keylet::ownerDir(bob.id())); BEAST_EXPECT(std::distance(bod.begin(), bod.end()) == 3); BEAST_EXPECT( std::find(bod.begin(), bod.end(), ab) != bod.end()); BEAST_EXPECT( std::find(bod.begin(), bod.end(), bc) != bod.end()); - ripple::Dir cod(*env.current(), keylet::ownerDir(carol.id())); + xrpl::Dir cod(*env.current(), keylet::ownerDir(carol.id())); BEAST_EXPECT(std::distance(cod.begin(), cod.end()) == 2); BEAST_EXPECT( std::find(cod.begin(), cod.end(), bc) != cod.end()); @@ -3338,19 +3338,19 @@ struct EscrowToken_test : public beast::unit_test::suite BEAST_EXPECT(!env.le(keylet::escrow(alice.id(), aseq))); BEAST_EXPECT(env.le(keylet::escrow(bob.id(), bseq))); - ripple::Dir aod(*env.current(), keylet::ownerDir(alice.id())); + xrpl::Dir aod(*env.current(), keylet::ownerDir(alice.id())); BEAST_EXPECT(std::distance(aod.begin(), aod.end()) == 1); BEAST_EXPECT( std::find(aod.begin(), aod.end(), ab) == aod.end()); - ripple::Dir bod(*env.current(), keylet::ownerDir(bob.id())); + xrpl::Dir bod(*env.current(), keylet::ownerDir(bob.id())); BEAST_EXPECT(std::distance(bod.begin(), bod.end()) == 2); BEAST_EXPECT( std::find(bod.begin(), bod.end(), ab) == bod.end()); BEAST_EXPECT( std::find(bod.begin(), bod.end(), bc) != bod.end()); - ripple::Dir cod(*env.current(), keylet::ownerDir(carol.id())); + xrpl::Dir cod(*env.current(), keylet::ownerDir(carol.id())); BEAST_EXPECT(std::distance(cod.begin(), cod.end()) == 2); } @@ -3360,19 +3360,19 @@ struct EscrowToken_test : public beast::unit_test::suite BEAST_EXPECT(!env.le(keylet::escrow(alice.id(), aseq))); BEAST_EXPECT(!env.le(keylet::escrow(bob.id(), bseq))); - ripple::Dir aod(*env.current(), keylet::ownerDir(alice.id())); + xrpl::Dir aod(*env.current(), keylet::ownerDir(alice.id())); BEAST_EXPECT(std::distance(aod.begin(), aod.end()) == 1); BEAST_EXPECT( std::find(aod.begin(), aod.end(), ab) == aod.end()); - ripple::Dir bod(*env.current(), keylet::ownerDir(bob.id())); + xrpl::Dir bod(*env.current(), keylet::ownerDir(bob.id())); BEAST_EXPECT(std::distance(bod.begin(), bod.end()) == 1); BEAST_EXPECT( std::find(bod.begin(), bod.end(), ab) == bod.end()); BEAST_EXPECT( std::find(bod.begin(), bod.end(), bc) == bod.end()); - ripple::Dir cod(*env.current(), keylet::ownerDir(carol.id())); + xrpl::Dir cod(*env.current(), keylet::ownerDir(carol.id())); BEAST_EXPECT(std::distance(cod.begin(), cod.end()) == 1); } } @@ -3933,4 +3933,4 @@ public: BEAST_DEFINE_TESTSUITE(EscrowToken, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/Escrow_test.cpp b/src/test/app/Escrow_test.cpp index 22e81ccca4..364ef6c2b7 100644 --- a/src/test/app/Escrow_test.cpp +++ b/src/test/app/Escrow_test.cpp @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { struct Escrow_test : public beast::unit_test::suite @@ -1154,7 +1154,7 @@ struct Escrow_test : public beast::unit_test::suite BEAST_EXPECT(aa); { - ripple::Dir aod(*env.current(), keylet::ownerDir(alice.id())); + xrpl::Dir aod(*env.current(), keylet::ownerDir(alice.id())); BEAST_EXPECT(std::distance(aod.begin(), aod.end()) == 1); BEAST_EXPECT( std::find(aod.begin(), aod.end(), aa) != aod.end()); @@ -1171,7 +1171,7 @@ struct Escrow_test : public beast::unit_test::suite BEAST_EXPECT(bb); { - ripple::Dir bod(*env.current(), keylet::ownerDir(bruce.id())); + xrpl::Dir bod(*env.current(), keylet::ownerDir(bruce.id())); BEAST_EXPECT(std::distance(bod.begin(), bod.end()) == 1); BEAST_EXPECT( std::find(bod.begin(), bod.end(), bb) != bod.end()); @@ -1185,12 +1185,12 @@ struct Escrow_test : public beast::unit_test::suite (*env.meta())[sfTransactionResult] == static_cast(tesSUCCESS)); - ripple::Dir aod(*env.current(), keylet::ownerDir(alice.id())); + xrpl::Dir aod(*env.current(), keylet::ownerDir(alice.id())); BEAST_EXPECT(std::distance(aod.begin(), aod.end()) == 0); BEAST_EXPECT( std::find(aod.begin(), aod.end(), aa) == aod.end()); - ripple::Dir bod(*env.current(), keylet::ownerDir(bruce.id())); + xrpl::Dir bod(*env.current(), keylet::ownerDir(bruce.id())); BEAST_EXPECT(std::distance(bod.begin(), bod.end()) == 1); BEAST_EXPECT( std::find(bod.begin(), bod.end(), bb) != bod.end()); @@ -1204,7 +1204,7 @@ struct Escrow_test : public beast::unit_test::suite (*env.meta())[sfTransactionResult] == static_cast(tesSUCCESS)); - ripple::Dir bod(*env.current(), keylet::ownerDir(bruce.id())); + xrpl::Dir bod(*env.current(), keylet::ownerDir(bruce.id())); BEAST_EXPECT(std::distance(bod.begin(), bod.end()) == 0); BEAST_EXPECT( std::find(bod.begin(), bod.end(), bb) == bod.end()); @@ -1239,19 +1239,19 @@ struct Escrow_test : public beast::unit_test::suite BEAST_EXPECT(bc); { - ripple::Dir aod(*env.current(), keylet::ownerDir(alice.id())); + xrpl::Dir aod(*env.current(), keylet::ownerDir(alice.id())); BEAST_EXPECT(std::distance(aod.begin(), aod.end()) == 1); BEAST_EXPECT( std::find(aod.begin(), aod.end(), ab) != aod.end()); - ripple::Dir bod(*env.current(), keylet::ownerDir(bruce.id())); + xrpl::Dir bod(*env.current(), keylet::ownerDir(bruce.id())); BEAST_EXPECT(std::distance(bod.begin(), bod.end()) == 2); BEAST_EXPECT( std::find(bod.begin(), bod.end(), ab) != bod.end()); BEAST_EXPECT( std::find(bod.begin(), bod.end(), bc) != bod.end()); - ripple::Dir cod(*env.current(), keylet::ownerDir(carol.id())); + xrpl::Dir cod(*env.current(), keylet::ownerDir(carol.id())); BEAST_EXPECT(std::distance(cod.begin(), cod.end()) == 1); BEAST_EXPECT( std::find(cod.begin(), cod.end(), bc) != cod.end()); @@ -1263,19 +1263,19 @@ struct Escrow_test : public beast::unit_test::suite BEAST_EXPECT(!env.le(keylet::escrow(alice.id(), aseq))); BEAST_EXPECT(env.le(keylet::escrow(bruce.id(), bseq))); - ripple::Dir aod(*env.current(), keylet::ownerDir(alice.id())); + xrpl::Dir aod(*env.current(), keylet::ownerDir(alice.id())); BEAST_EXPECT(std::distance(aod.begin(), aod.end()) == 0); BEAST_EXPECT( std::find(aod.begin(), aod.end(), ab) == aod.end()); - ripple::Dir bod(*env.current(), keylet::ownerDir(bruce.id())); + xrpl::Dir bod(*env.current(), keylet::ownerDir(bruce.id())); BEAST_EXPECT(std::distance(bod.begin(), bod.end()) == 1); BEAST_EXPECT( std::find(bod.begin(), bod.end(), ab) == bod.end()); BEAST_EXPECT( std::find(bod.begin(), bod.end(), bc) != bod.end()); - ripple::Dir cod(*env.current(), keylet::ownerDir(carol.id())); + xrpl::Dir cod(*env.current(), keylet::ownerDir(carol.id())); BEAST_EXPECT(std::distance(cod.begin(), cod.end()) == 1); } @@ -1285,19 +1285,19 @@ struct Escrow_test : public beast::unit_test::suite BEAST_EXPECT(!env.le(keylet::escrow(alice.id(), aseq))); BEAST_EXPECT(!env.le(keylet::escrow(bruce.id(), bseq))); - ripple::Dir aod(*env.current(), keylet::ownerDir(alice.id())); + xrpl::Dir aod(*env.current(), keylet::ownerDir(alice.id())); BEAST_EXPECT(std::distance(aod.begin(), aod.end()) == 0); BEAST_EXPECT( std::find(aod.begin(), aod.end(), ab) == aod.end()); - ripple::Dir bod(*env.current(), keylet::ownerDir(bruce.id())); + xrpl::Dir bod(*env.current(), keylet::ownerDir(bruce.id())); BEAST_EXPECT(std::distance(bod.begin(), bod.end()) == 0); BEAST_EXPECT( std::find(bod.begin(), bod.end(), ab) == bod.end()); BEAST_EXPECT( std::find(bod.begin(), bod.end(), bc) == bod.end()); - ripple::Dir cod(*env.current(), keylet::ownerDir(carol.id())); + xrpl::Dir cod(*env.current(), keylet::ownerDir(carol.id())); BEAST_EXPECT(std::distance(cod.begin(), cod.end()) == 0); } } @@ -1691,4 +1691,4 @@ public: BEAST_DEFINE_TESTSUITE(Escrow, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/FeeVote_test.cpp b/src/test/app/FeeVote_test.cpp index 94f753d8f3..b9ad8fe9a8 100644 --- a/src/test/app/FeeVote_test.cpp +++ b/src/test/app/FeeVote_test.cpp @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { struct FeeSettingsFields @@ -783,4 +783,4 @@ class FeeVote_test : public beast::unit_test::suite BEAST_DEFINE_TESTSUITE(FeeVote, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/FixNFTokenPageLinks_test.cpp b/src/test/app/FixNFTokenPageLinks_test.cpp index be621029f4..6b6c64660f 100644 --- a/src/test/app/FixNFTokenPageLinks_test.cpp +++ b/src/test/app/FixNFTokenPageLinks_test.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { class FixNFTokenPageLinks_test : public beast::unit_test::suite { @@ -646,4 +646,4 @@ public: BEAST_DEFINE_TESTSUITE(FixNFTokenPageLinks, app, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/Flow_test.cpp b/src/test/app/Flow_test.cpp index 12dcc91b98..f3ee073ca6 100644 --- a/src/test/app/Flow_test.cpp +++ b/src/test/app/Flow_test.cpp @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { bool @@ -1333,4 +1333,4 @@ BEAST_DEFINE_TESTSUITE_PRIO(Flow, app, ripple, 2); BEAST_DEFINE_TESTSUITE_MANUAL_PRIO(Flow_manual, app, ripple, 4); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/Freeze_test.cpp b/src/test/app/Freeze_test.cpp index 43d7c6d1e4..09ee4c69aa 100644 --- a/src/test/app/Freeze_test.cpp +++ b/src/test/app/Freeze_test.cpp @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { class Freeze_test : public beast::unit_test::suite { @@ -2089,4 +2089,4 @@ public: }; BEAST_DEFINE_TESTSUITE(Freeze, app, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/HashRouter_test.cpp b/src/test/app/HashRouter_test.cpp index b3f692c2b0..508f1a3f70 100644 --- a/src/test/app/HashRouter_test.cpp +++ b/src/test/app/HashRouter_test.cpp @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class HashRouter_test : public beast::unit_test::suite @@ -407,4 +407,4 @@ public: BEAST_DEFINE_TESTSUITE(HashRouter, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/Invariants_test.cpp b/src/test/app/Invariants_test.cpp index 63682dff0d..722942fdf7 100644 --- a/src/test/app/Invariants_test.cpp +++ b/src/test/app/Invariants_test.cpp @@ -20,7 +20,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { class Invariants_test : public beast::unit_test::suite @@ -1744,7 +1744,7 @@ class Invariants_test : public beast::unit_test::suite std::optional accountShares = {}; }; auto constexpr adjust = [&](ApplyView& ac, - ripple::Keylet keylet, + xrpl::Keylet keylet, Adjustments args) { auto sleVault = ac.peek(keylet); if (!sleVault) @@ -3494,4 +3494,4 @@ public: BEAST_DEFINE_TESTSUITE(Invariants, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/LPTokenTransfer_test.cpp b/src/test/app/LPTokenTransfer_test.cpp index acce2312ac..5615e75c77 100644 --- a/src/test/app/LPTokenTransfer_test.cpp +++ b/src/test/app/LPTokenTransfer_test.cpp @@ -2,7 +2,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class LPTokenTransfer_test : public jtx::AMMTest @@ -464,4 +464,4 @@ public: BEAST_DEFINE_TESTSUITE(LPTokenTransfer, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/LedgerHistory_test.cpp b/src/test/app/LedgerHistory_test.cpp index e286440679..593be37cea 100644 --- a/src/test/app/LedgerHistory_test.cpp +++ b/src/test/app/LedgerHistory_test.cpp @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class LedgerHistory_test : public beast::unit_test::suite @@ -185,4 +185,4 @@ public: BEAST_DEFINE_TESTSUITE(LedgerHistory, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/LedgerLoad_test.cpp b/src/test/app/LedgerLoad_test.cpp index ac0fcdba35..04d464e0b5 100644 --- a/src/test/app/LedgerLoad_test.cpp +++ b/src/test/app/LedgerLoad_test.cpp @@ -13,7 +13,7 @@ #include -namespace ripple { +namespace xrpl { class LedgerLoad_test : public beast::unit_test::suite { @@ -372,4 +372,4 @@ public: BEAST_DEFINE_TESTSUITE(LedgerLoad, app, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/LedgerMaster_test.cpp b/src/test/app/LedgerMaster_test.cpp index 5b815caeda..089b8e7ecc 100644 --- a/src/test/app/LedgerMaster_test.cpp +++ b/src/test/app/LedgerMaster_test.cpp @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { class LedgerMaster_test : public beast::unit_test::suite @@ -119,4 +119,4 @@ public: BEAST_DEFINE_TESTSUITE(LedgerMaster, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/LedgerReplay_test.cpp b/src/test/app/LedgerReplay_test.cpp index 9edaaec0a5..20637ed22c 100644 --- a/src/test/app/LedgerReplay_test.cpp +++ b/src/test/app/LedgerReplay_test.cpp @@ -17,7 +17,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { struct LedgerReplay_test : public beast::unit_test::suite @@ -1084,8 +1084,7 @@ struct LedgerReplayer_test : public beast::unit_test::suite { testcase("handshake test"); auto handshake = [&](bool client, bool server, bool expecting) -> bool { - auto request = - ripple::makeRequest(true, false, client, false, false); + auto request = xrpl::makeRequest(true, false, client, false, false); http_request_type http_request; http_request.version(request.version()); http_request.base() = request.base(); @@ -1098,7 +1097,7 @@ struct LedgerReplayer_test : public beast::unit_test::suite boost::asio::ip::make_address("172.1.1.100"); jtx::Env serverEnv(*this); serverEnv.app().config().LEDGER_REPLAY = server; - auto http_resp = ripple::makeResponse( + auto http_resp = xrpl::makeResponse( true, http_request, addr, @@ -1602,4 +1601,4 @@ BEAST_DEFINE_TESTSUITE(LedgerReplayerTimeout, app, ripple); BEAST_DEFINE_TESTSUITE_MANUAL(LedgerReplayerLong, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/LoadFeeTrack_test.cpp b/src/test/app/LoadFeeTrack_test.cpp index 10b51b5c0b..0b6e900ac6 100644 --- a/src/test/app/LoadFeeTrack_test.cpp +++ b/src/test/app/LoadFeeTrack_test.cpp @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { class LoadFeeTrack_test : public beast::unit_test::suite { @@ -70,4 +70,4 @@ public: BEAST_DEFINE_TESTSUITE(LoadFeeTrack, app, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/MPToken_test.cpp b/src/test/app/MPToken_test.cpp index f7c93d3c62..637bb15a4d 100644 --- a/src/test/app/MPToken_test.cpp +++ b/src/test/app/MPToken_test.cpp @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class MPToken_test : public beast::unit_test::suite @@ -2349,7 +2349,7 @@ class MPToken_test : public beast::unit_test::suite env.close(); auto const USD = alice["USD"]; - auto const mpt = ripple::test::jtx::MPT( + auto const mpt = xrpl::test::jtx::MPT( alice.name(), makeMptID(env.seq(alice), alice)); env(claw(alice, bob["USD"](5), bob), ter(temMALFORMED)); @@ -2372,7 +2372,7 @@ class MPToken_test : public beast::unit_test::suite env.close(); auto const USD = alice["USD"]; - auto const mpt = ripple::test::jtx::MPT( + auto const mpt = xrpl::test::jtx::MPT( alice.name(), makeMptID(env.seq(alice), alice)); // clawing back IOU from a MPT holder fails @@ -2431,7 +2431,7 @@ class MPToken_test : public beast::unit_test::suite env.close(); MPTTester mptAlice(env, alice, {.holders = {bob}}); - auto const fakeMpt = ripple::test::jtx::MPT( + auto const fakeMpt = xrpl::test::jtx::MPT( alice.name(), makeMptID(env.seq(alice), alice)); // issuer tries to clawback MPT where issuance doesn't exist @@ -2470,7 +2470,7 @@ class MPToken_test : public beast::unit_test::suite env.fund(XRP(1000), alice, bob); env.close(); - auto const mpt = ripple::test::jtx::MPT( + auto const mpt = xrpl::test::jtx::MPT( alice.name(), makeMptID(env.seq(alice), alice)); Json::Value jv = claw(alice, mpt(1), bob); @@ -3678,4 +3678,4 @@ public: BEAST_DEFINE_TESTSUITE_PRIO(MPToken, app, ripple, 2); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/Manifest_test.cpp b/src/test/app/Manifest_test.cpp index b2c8c859fd..623a961ebc 100644 --- a/src/test/app/Manifest_test.cpp +++ b/src/test/app/Manifest_test.cpp @@ -15,7 +15,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class Manifest_test : public beast::unit_test::suite @@ -1069,4 +1069,4 @@ public: BEAST_DEFINE_TESTSUITE(Manifest, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/MultiSign_test.cpp b/src/test/app/MultiSign_test.cpp index 73b10af339..aee66a57de 100644 --- a/src/test/app/MultiSign_test.cpp +++ b/src/test/app/MultiSign_test.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class MultiSign_test : public beast::unit_test::suite @@ -1603,8 +1603,8 @@ public: uint8_t tag2[] = "hello world some ascii 32b long"; // including 1 byte for NUL - uint256 bogie_tag = ripple::base_uint<256>::fromVoid(tag1); - uint256 demon_tag = ripple::base_uint<256>::fromVoid(tag2); + uint256 bogie_tag = xrpl::base_uint<256>::fromVoid(tag1); + uint256 demon_tag = xrpl::base_uint<256>::fromVoid(tag2); // Attach phantom signers to alice and use them for a transaction. env(signers(alice, 1, {{bogie, 1, bogie_tag}, {demon, 1, demon_tag}})); @@ -1765,4 +1765,4 @@ public: BEAST_DEFINE_TESTSUITE(MultiSign, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/NFTokenAuth_test.cpp b/src/test/app/NFTokenAuth_test.cpp index b22a99ce73..fa32765f10 100644 --- a/src/test/app/NFTokenAuth_test.cpp +++ b/src/test/app/NFTokenAuth_test.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { class NFTokenAuth_test : public beast::unit_test::suite { @@ -602,4 +602,4 @@ public: BEAST_DEFINE_TESTSUITE_PRIO(NFTokenAuth, app, ripple, 2); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/NFTokenBurn_test.cpp b/src/test/app/NFTokenBurn_test.cpp index 0b5165624f..b92efc4daa 100644 --- a/src/test/app/NFTokenBurn_test.cpp +++ b/src/test/app/NFTokenBurn_test.cpp @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { class NFTokenBurnBaseUtil_test : public beast::unit_test::suite { @@ -1433,4 +1433,4 @@ BEAST_DEFINE_TESTSUITE_PRIO(NFTokenBurnWOFixTokenRemint, app, ripple, 3); BEAST_DEFINE_TESTSUITE_PRIO(NFTokenBurnWOFixNFTPageLinks, app, ripple, 3); BEAST_DEFINE_TESTSUITE_PRIO(NFTokenBurnAllFeatures, app, ripple, 3); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/NFTokenDir_test.cpp b/src/test/app/NFTokenDir_test.cpp index be8274d03a..efb453cddc 100644 --- a/src/test/app/NFTokenDir_test.cpp +++ b/src/test/app/NFTokenDir_test.cpp @@ -8,7 +8,7 @@ #include -namespace ripple { +namespace xrpl { class NFTokenDir_test : public beast::unit_test::suite { @@ -1091,7 +1091,7 @@ public: BEAST_DEFINE_TESTSUITE_PRIO(NFTokenDir, app, ripple, 1); -} // namespace ripple +} // namespace xrpl // Seed that produces an account with the low-32 bits == 0xFFFFFFFF in // case it is needed for future testing: diff --git a/src/test/app/NFToken_test.cpp b/src/test/app/NFToken_test.cpp index c7e7e6d407..dce386560e 100644 --- a/src/test/app/NFToken_test.cpp +++ b/src/test/app/NFToken_test.cpp @@ -8,7 +8,7 @@ #include -namespace ripple { +namespace xrpl { class NFTokenBaseUtil_test : public beast::unit_test::suite { @@ -8160,4 +8160,4 @@ BEAST_DEFINE_TESTSUITE_PRIO(NFTokenWOMintOffer, app, ripple, 2); BEAST_DEFINE_TESTSUITE_PRIO(NFTokenWOModify, app, ripple, 2); BEAST_DEFINE_TESTSUITE_PRIO(NFTokenAllFeatures, app, ripple, 2); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/NetworkID_test.cpp b/src/test/app/NetworkID_test.cpp index 01db95835e..cb945a30b6 100644 --- a/src/test/app/NetworkID_test.cpp +++ b/src/test/app/NetworkID_test.cpp @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { class NetworkID_test : public beast::unit_test::suite @@ -145,4 +145,4 @@ public: BEAST_DEFINE_TESTSUITE(NetworkID, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/NetworkOPs_test.cpp b/src/test/app/NetworkOPs_test.cpp index 166c3140d4..e62ab67abd 100644 --- a/src/test/app/NetworkOPs_test.cpp +++ b/src/test/app/NetworkOPs_test.cpp @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { class NetworkOPs_test : public beast::unit_test::suite @@ -60,4 +60,4 @@ public: BEAST_DEFINE_TESTSUITE(NetworkOPs, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/OfferStream_test.cpp b/src/test/app/OfferStream_test.cpp index fac5ab18ab..eb47c6f8e7 100644 --- a/src/test/app/OfferStream_test.cpp +++ b/src/test/app/OfferStream_test.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { class OfferStream_test : public beast::unit_test::suite { @@ -22,4 +22,4 @@ public: BEAST_DEFINE_TESTSUITE(OfferStream, app, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/Offer_test.cpp b/src/test/app/Offer_test.cpp index 467e988800..5c7284e95c 100644 --- a/src/test/app/Offer_test.cpp +++ b/src/test/app/Offer_test.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class OfferBaseUtil_test : public beast::unit_test::suite @@ -5365,4 +5365,4 @@ BEAST_DEFINE_TESTSUITE_PRIO(OfferAllFeatures, app, ripple, 2); BEAST_DEFINE_TESTSUITE_MANUAL_PRIO(Offer_manual, app, ripple, 20); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/Oracle_test.cpp b/src/test/app/Oracle_test.cpp index 91f2942cd2..186af94b4d 100644 --- a/src/test/app/Oracle_test.cpp +++ b/src/test/app/Oracle_test.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { namespace oracle { @@ -876,4 +876,4 @@ BEAST_DEFINE_TESTSUITE(Oracle, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/OversizeMeta_test.cpp b/src/test/app/OversizeMeta_test.cpp index dbb5310e01..4991682a85 100644 --- a/src/test/app/OversizeMeta_test.cpp +++ b/src/test/app/OversizeMeta_test.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { // Make sure "plump" order books don't have problems @@ -169,4 +169,4 @@ public: BEAST_DEFINE_TESTSUITE_MANUAL_PRIO(FindOversizeCross, app, ripple, 50); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/Path_test.cpp b/src/test/app/Path_test.cpp index d08812fb20..233c2ee18c 100644 --- a/src/test/app/Path_test.cpp +++ b/src/test/app/Path_test.cpp @@ -23,7 +23,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { //------------------------------------------------------------------------------ @@ -2117,4 +2117,4 @@ public: BEAST_DEFINE_TESTSUITE(Path, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/PayChan_test.cpp b/src/test/app/PayChan_test.cpp index 6b0822cc01..c256d7ae81 100644 --- a/src/test/app/PayChan_test.cpp +++ b/src/test/app/PayChan_test.cpp @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { using namespace jtx::paychan; @@ -1811,14 +1811,14 @@ struct PayChan_test : public beast::unit_test::suite auto inOwnerDir = [](ReadView const& view, Account const& acc, std::shared_ptr const& chan) -> bool { - ripple::Dir const ownerDir(view, keylet::ownerDir(acc.id())); + xrpl::Dir const ownerDir(view, keylet::ownerDir(acc.id())); return std::find(ownerDir.begin(), ownerDir.end(), chan) != ownerDir.end(); }; auto ownerDirCount = [](ReadView const& view, Account const& acc) -> std::size_t { - ripple::Dir const ownerDir(view, keylet::ownerDir(acc.id())); + xrpl::Dir const ownerDir(view, keylet::ownerDir(acc.id())); return std::distance(ownerDir.begin(), ownerDir.end()); }; @@ -2345,4 +2345,4 @@ public: BEAST_DEFINE_TESTSUITE(PayChan, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/PayStrand_test.cpp b/src/test/app/PayStrand_test.cpp index 7f8f49ec07..1a56046140 100644 --- a/src/test/app/PayStrand_test.cpp +++ b/src/test/app/PayStrand_test.cpp @@ -14,7 +14,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { struct DirectStepInfo @@ -86,7 +86,7 @@ equal(std::unique_ptr const& s1, XRPEndpointStepInfo const& xrpsi) } bool -equal(std::unique_ptr const& s1, ripple::Book const& bsi) +equal(std::unique_ptr const& s1, xrpl::Book const& bsi) { if (!s1) return false; @@ -300,7 +300,7 @@ public: struct ExistingElementPool { std::vector accounts; - std::vector currencies; + std::vector currencies; std::vector currencyNames; jtx::Account @@ -310,7 +310,7 @@ struct ExistingElementPool return accounts[id]; } - ripple::Currency + xrpl::Currency getCurrency(size_t id) { assert(id < currencies.size()); @@ -484,13 +484,13 @@ struct ExistingElementPool { std::vector> diffs; - auto xrpBalance = [](ReadView const& v, ripple::Keylet const& k) { + auto xrpBalance = [](ReadView const& v, xrpl::Keylet const& k) { auto const sle = v.read(k); if (!sle) return STAmount{}; return (*sle)[sfBalance]; }; - auto lineBalance = [](ReadView const& v, ripple::Keylet const& k) { + auto lineBalance = [](ReadView const& v, xrpl::Keylet const& k) { auto const sle = v.read(k); if (!sle) return STAmount{}; @@ -534,7 +534,7 @@ struct ExistingElementPool return getAccount(nextAvailAccount++); } - ripple::Currency + xrpl::Currency getAvailCurrency() { return getCurrency(nextAvailCurrency++); @@ -619,7 +619,7 @@ struct PayStrand_test : public beast::unit_test::suite auto const usdC = USD.currency; using D = DirectStepInfo; - using B = ripple::Book; + using B = xrpl::Book; using XRPS = XRPEndpointStepInfo; AMMContext ammContext(alice, false); @@ -1182,13 +1182,13 @@ struct PayStrand_test : public beast::unit_test::suite AccountID const srcAcc = alice.id(); AccountID dstAcc = bob.id(); STPathSet pathSet; - ::ripple::path::RippleCalc::Input inputs; + ::xrpl::path::RippleCalc::Input inputs; inputs.defaultPathsAllowed = true; try { PaymentSandbox sb{env.current().get(), tapNONE}; { - auto const r = ::ripple::path::RippleCalc::rippleCalculate( + auto const r = ::xrpl::path::RippleCalc::rippleCalculate( sb, sendMax, deliver, @@ -1201,7 +1201,7 @@ struct PayStrand_test : public beast::unit_test::suite BEAST_EXPECT(r.result() == temBAD_PATH); } { - auto const r = ::ripple::path::RippleCalc::rippleCalculate( + auto const r = ::xrpl::path::RippleCalc::rippleCalculate( sb, sendMax, deliver, @@ -1214,7 +1214,7 @@ struct PayStrand_test : public beast::unit_test::suite BEAST_EXPECT(r.result() == temBAD_PATH); } { - auto const r = ::ripple::path::RippleCalc::rippleCalculate( + auto const r = ::xrpl::path::RippleCalc::rippleCalculate( sb, noAccountAmount, deliver, @@ -1227,7 +1227,7 @@ struct PayStrand_test : public beast::unit_test::suite BEAST_EXPECT(r.result() == temBAD_PATH); } { - auto const r = ::ripple::path::RippleCalc::rippleCalculate( + auto const r = ::xrpl::path::RippleCalc::rippleCalculate( sb, sendMax, noAccountAmount, @@ -1267,4 +1267,4 @@ struct PayStrand_test : public beast::unit_test::suite BEAST_DEFINE_TESTSUITE(PayStrand, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/PermissionedDEX_test.cpp b/src/test/app/PermissionedDEX_test.cpp index d202b39e09..db6a11e32e 100644 --- a/src/test/app/PermissionedDEX_test.cpp +++ b/src/test/app/PermissionedDEX_test.cpp @@ -28,7 +28,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { using namespace jtx; @@ -1555,4 +1555,4 @@ public: BEAST_DEFINE_TESTSUITE(PermissionedDEX, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/PermissionedDomains_test.cpp b/src/test/app/PermissionedDomains_test.cpp index ba1946ee66..1c9df176ab 100644 --- a/src/test/app/PermissionedDomains_test.cpp +++ b/src/test/app/PermissionedDomains_test.cpp @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { using namespace jtx; @@ -563,4 +563,4 @@ public: BEAST_DEFINE_TESTSUITE(PermissionedDomains, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/PseudoTx_test.cpp b/src/test/app/PseudoTx_test.cpp index ea53b0bee5..9426ee250a 100644 --- a/src/test/app/PseudoTx_test.cpp +++ b/src/test/app/PseudoTx_test.cpp @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { struct PseudoTx_test : public beast::unit_test::suite @@ -76,7 +76,7 @@ struct PseudoTx_test : public beast::unit_test::suite env.app().openLedger().modify( [&](OpenView& view, beast::Journal j) { auto const result = - ripple::apply(env.app(), view, stx, tapNONE, j); + xrpl::apply(env.app(), view, stx, tapNONE, j); BEAST_EXPECT(!result.applied && result.ter == temINVALID); return result.applied; }); @@ -110,4 +110,4 @@ struct PseudoTx_test : public beast::unit_test::suite BEAST_DEFINE_TESTSUITE(PseudoTx, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/RCLValidations_test.cpp b/src/test/app/RCLValidations_test.cpp index 2edf61c8c2..5138c7334d 100644 --- a/src/test/app/RCLValidations_test.cpp +++ b/src/test/app/RCLValidations_test.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class RCLValidations_test : public beast::unit_test::suite @@ -17,7 +17,7 @@ class RCLValidations_test : public beast::unit_test::suite testcase("Change validation trusted status"); auto keys = randomKeyPair(KeyType::secp256k1); auto v = std::make_shared( - ripple::NetClock::time_point{}, + xrpl::NetClock::time_point{}, keys.first, keys.second, calcNodeID(keys.first), @@ -311,4 +311,4 @@ public: BEAST_DEFINE_TESTSUITE(RCLValidations, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/ReducedOffer_test.cpp b/src/test/app/ReducedOffer_test.cpp index f511721dda..998bc142f9 100644 --- a/src/test/app/ReducedOffer_test.cpp +++ b/src/test/app/ReducedOffer_test.cpp @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { class ReducedOffer_test : public beast::unit_test::suite @@ -722,4 +722,4 @@ public: BEAST_DEFINE_TESTSUITE_PRIO(ReducedOffer, app, ripple, 2); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/Regression_test.cpp b/src/test/app/Regression_test.cpp index 81184a595b..8644c0f1cd 100644 --- a/src/test/app/Regression_test.cpp +++ b/src/test/app/Regression_test.cpp @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { struct Regression_test : public beast::unit_test::suite @@ -63,7 +63,7 @@ struct Regression_test : public beast::unit_test::suite OpenView accum(&*next); auto const result = - ripple::apply(env.app(), accum, *jt.stx, tapNONE, env.journal); + xrpl::apply(env.app(), accum, *jt.stx, tapNONE, env.journal); BEAST_EXPECT(result.ter == tesSUCCESS); BEAST_EXPECT(result.applied); @@ -87,7 +87,7 @@ struct Regression_test : public beast::unit_test::suite OpenView accum(&*next); auto const result = - ripple::apply(env.app(), accum, *jt.stx, tapNONE, env.journal); + xrpl::apply(env.app(), accum, *jt.stx, tapNONE, env.journal); BEAST_EXPECT(result.ter == tecINSUFF_FEE); BEAST_EXPECT(result.applied); @@ -326,4 +326,4 @@ struct Regression_test : public beast::unit_test::suite BEAST_DEFINE_TESTSUITE(Regression, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/SHAMapStore_test.cpp b/src/test/app/SHAMapStore_test.cpp index e472685ec0..20a2e45667 100644 --- a/src/test/app/SHAMapStore_test.cpp +++ b/src/test/app/SHAMapStore_test.cpp @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class SHAMapStore_test : public beast::unit_test::suite @@ -640,4 +640,4 @@ public: BEAST_DEFINE_TESTSUITE(SHAMapStore, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/SetAuth_test.cpp b/src/test/app/SetAuth_test.cpp index 42766c87ff..2ee542487e 100644 --- a/src/test/app/SetAuth_test.cpp +++ b/src/test/app/SetAuth_test.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { struct SetAuth_test : public beast::unit_test::suite @@ -64,4 +64,4 @@ struct SetAuth_test : public beast::unit_test::suite BEAST_DEFINE_TESTSUITE(SetAuth, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/SetRegularKey_test.cpp b/src/test/app/SetRegularKey_test.cpp index 2065066ec3..ea6a8b1050 100644 --- a/src/test/app/SetRegularKey_test.cpp +++ b/src/test/app/SetRegularKey_test.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { class SetRegularKey_test : public beast::unit_test::suite { @@ -171,4 +171,4 @@ public: BEAST_DEFINE_TESTSUITE(SetRegularKey, app, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/SetTrust_test.cpp b/src/test/app/SetTrust_test.cpp index 88e359ab23..bcd3a1b0f9 100644 --- a/src/test/app/SetTrust_test.cpp +++ b/src/test/app/SetTrust_test.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { @@ -636,4 +636,4 @@ public: }; BEAST_DEFINE_TESTSUITE(SetTrust, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/TheoreticalQuality_test.cpp b/src/test/app/TheoreticalQuality_test.cpp index fe59ac6b1a..c86157f01f 100644 --- a/src/test/app/TheoreticalQuality_test.cpp +++ b/src/test/app/TheoreticalQuality_test.cpp @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { struct RippleCalcTestParams @@ -536,4 +536,4 @@ public: BEAST_DEFINE_TESTSUITE_PRIO(TheoreticalQuality, app, ripple, 3); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/Ticket_test.cpp b/src/test/app/Ticket_test.cpp index 10e159553f..815dd61cee 100644 --- a/src/test/app/Ticket_test.cpp +++ b/src/test/app/Ticket_test.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { class Ticket_test : public beast::unit_test::suite { @@ -983,4 +983,4 @@ public: BEAST_DEFINE_TESTSUITE(Ticket, app, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/Transaction_ordering_test.cpp b/src/test/app/Transaction_ordering_test.cpp index 80e7d43de6..e7d0bbc1c1 100644 --- a/src/test/app/Transaction_ordering_test.cpp +++ b/src/test/app/Transaction_ordering_test.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { struct Transaction_ordering_test : public beast::unit_test::suite @@ -146,4 +146,4 @@ struct Transaction_ordering_test : public beast::unit_test::suite BEAST_DEFINE_TESTSUITE(Transaction_ordering, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/TrustAndBalance_test.cpp b/src/test/app/TrustAndBalance_test.cpp index 6cad68d584..6a3ef3405a 100644 --- a/src/test/app/TrustAndBalance_test.cpp +++ b/src/test/app/TrustAndBalance_test.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { class TrustAndBalance_test : public beast::unit_test::suite { @@ -469,4 +469,4 @@ public: BEAST_DEFINE_TESTSUITE(TrustAndBalance, app, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/TxQ_test.cpp b/src/test/app/TxQ_test.cpp index d176744c5c..dbfdfe75e9 100644 --- a/src/test/app/TxQ_test.cpp +++ b/src/test/app/TxQ_test.cpp @@ -14,7 +14,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { @@ -99,7 +99,7 @@ class TxQPosNegFlows_test : public beast::unit_test::suite // fee (1) and amendment (numUpVotedAmendments()) // pseudotransactions. The queue treats the fees on these // transactions as though they are ordinary transactions. - auto const flagPerLedger = 1 + ripple::detail::numUpVotedAmendments(); + auto const flagPerLedger = 1 + xrpl::detail::numUpVotedAmendments(); auto const flagMaxQueue = ledgersInQueue * flagPerLedger; checkMetrics(*this, env, 0, flagMaxQueue, 0, flagPerLedger); @@ -977,13 +977,13 @@ public: Env::ParsedResult parsed; - env.app().openLedger().modify( - [&](OpenView& view, beast::Journal j) { - auto const result = ripple::apply( - env.app(), view, *jt.stx, tapNONE, env.journal); - parsed.ter = result.ter; - return result.applied; - }); + env.app().openLedger().modify([&](OpenView& view, + beast::Journal j) { + auto const result = + xrpl::apply(env.app(), view, *jt.stx, tapNONE, env.journal); + parsed.ter = result.ter; + return result.applied; + }); env.postconditions(jt, parsed); } checkMetrics(*this, env, 1, std::nullopt, 4, 2); @@ -4191,7 +4191,7 @@ public: auto const tx = env.jt(noop(alice), seq(aliceSeq), fee(openLedgerCost(env))); auto const result = - ripple::apply(env.app(), view, *tx.stx, tapUNLIMITED, j); + xrpl::apply(env.app(), view, *tx.stx, tapUNLIMITED, j); BEAST_EXPECT(result.ter == tesSUCCESS && result.applied); return result.applied; }); @@ -4263,7 +4263,7 @@ public: ticket::use(tktSeq0 + 1), fee(openLedgerCost(env))); auto const result = - ripple::apply(env.app(), view, *tx.stx, tapUNLIMITED, j); + xrpl::apply(env.app(), view, *tx.stx, tapUNLIMITED, j); BEAST_EXPECT(result.ter == tesSUCCESS && result.applied); return result.applied; }); @@ -4368,7 +4368,7 @@ public: if (!getMajorityAmendments(*env.closed()).empty()) break; } - auto expectedPerLedger = ripple::detail::numUpVotedAmendments() + 1; + auto expectedPerLedger = xrpl::detail::numUpVotedAmendments() + 1; checkMetrics( *this, env, 0, 5 * expectedPerLedger, 0, expectedPerLedger); @@ -5048,4 +5048,4 @@ BEAST_DEFINE_TESTSUITE_PRIO(TxQPosNegFlows, app, ripple, 1); BEAST_DEFINE_TESTSUITE_PRIO(TxQMetaInfo, app, ripple, 1); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/ValidatorKeys_test.cpp b/src/test/app/ValidatorKeys_test.cpp index 9770d6a0ff..8efa719fe1 100644 --- a/src/test/app/ValidatorKeys_test.cpp +++ b/src/test/app/ValidatorKeys_test.cpp @@ -10,7 +10,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { class ValidatorKeys_test : public beast::unit_test::suite @@ -174,4 +174,4 @@ public: BEAST_DEFINE_TESTSUITE(ValidatorKeys, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/ValidatorList_test.cpp b/src/test/app/ValidatorList_test.cpp index 370f262075..bc055d1da0 100644 --- a/src/test/app/ValidatorList_test.cpp +++ b/src/test/app/ValidatorList_test.cpp @@ -16,7 +16,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { class ValidatorList_test : public beast::unit_test::suite @@ -2294,7 +2294,7 @@ private: { testcase("Sha512 hashing"); // Tests that ValidatorList hash_append helpers with a single blob - // returns the same result as ripple::Sha512Half used by the + // returns the same result as xrpl::Sha512Half used by the // TMValidatorList protocol message handler std::string const manifest = "This is not really a manifest"; std::string const blob = "This is not really a blob"; @@ -4148,4 +4148,4 @@ public: BEAST_DEFINE_TESTSUITE(ValidatorList, app, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/ValidatorSite_test.cpp b/src/test/app/ValidatorSite_test.cpp index e94ca6a009..0bb8e772cf 100644 --- a/src/test/app/ValidatorSite_test.cpp +++ b/src/test/app/ValidatorSite_test.cpp @@ -17,7 +17,7 @@ #include -namespace ripple { +namespace xrpl { namespace detail { constexpr char const* realValidatorContents() @@ -691,4 +691,4 @@ public: BEAST_DEFINE_TESTSUITE_PRIO(ValidatorSite, app, ripple, 2); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/Vault_test.cpp b/src/test/app/Vault_test.cpp index ccbf0fed42..a992bd5a6b 100644 --- a/src/test/app/Vault_test.cpp +++ b/src/test/app/Vault_test.cpp @@ -27,12 +27,12 @@ #include -namespace ripple { +namespace xrpl { class Vault_test : public beast::unit_test::suite { - using PrettyAsset = ripple::test::jtx::PrettyAsset; - using PrettyAmount = ripple::test::jtx::PrettyAmount; + using PrettyAsset = xrpl::test::jtx::PrettyAsset; + using PrettyAmount = xrpl::test::jtx::PrettyAmount; static auto constexpr negativeAmount = [](PrettyAsset const& asset) -> PrettyAmount { @@ -2181,7 +2181,7 @@ class Vault_test : public beast::unit_test::suite env(tx); env.close(); - auto const issuanceId = [&env](ripple::Keylet keylet) -> MPTID { + auto const issuanceId = [&env](xrpl::Keylet keylet) -> MPTID { auto const vault = env.le(keylet); return vault->at(sfShareMPTID); }(keylet); @@ -2464,10 +2464,10 @@ class Vault_test : public beast::unit_test::suite Account const& owner, Account const& issuer, Account const& charlie, - std::function vaultAccount, + std::function vaultAccount, Vault& vault, PrettyAsset const& asset, - std::function issuanceId)> test, + std::function issuanceId)> test, CaseArgs args = {}) { Env env{*this, testable_amendments() | featureSingleAssetVault}; Account const owner{"owner"}; @@ -2486,10 +2486,10 @@ class Vault_test : public beast::unit_test::suite env.close(); auto const vaultAccount = - [&env](ripple::Keylet keylet) -> Account { + [&env](xrpl::Keylet keylet) -> Account { return Account("vault", env.le(keylet)->at(sfAccount)); }; - auto const issuanceId = [&env](ripple::Keylet keylet) -> MPTID { + auto const issuanceId = [&env](xrpl::Keylet keylet) -> MPTID { return env.le(keylet)->at(sfShareMPTID); }; @@ -2739,7 +2739,7 @@ class Vault_test : public beast::unit_test::suite env.close(); // Withdraw to 3rd party works - auto const withdrawToCharlie = [&](ripple::Keylet keylet) { + auto const withdrawToCharlie = [&](xrpl::Keylet keylet) { auto tx = vault.withdraw( {.depositor = owner, .id = keylet.key, @@ -2810,7 +2810,7 @@ class Vault_test : public beast::unit_test::suite env.close(); // Withdraw to 3rd party without trust line - auto const tx1 = [&](ripple::Keylet keylet) { + auto const tx1 = [&](xrpl::Keylet keylet) { auto tx = vault.withdraw( {.depositor = owner, .id = keylet.key, @@ -2849,7 +2849,7 @@ class Vault_test : public beast::unit_test::suite BEAST_EXPECT(trustline == nullptr); // Withdraw without trust line, will succeed - auto const tx1 = [&](ripple::Keylet keylet) { + auto const tx1 = [&](xrpl::Keylet keylet) { auto tx = vault.withdraw( {.depositor = owner, .id = keylet.key, @@ -2976,7 +2976,7 @@ class Vault_test : public beast::unit_test::suite env.close(); // Withdraw to 3rd party works - auto const withdrawToCharlie = [&](ripple::Keylet keylet) { + auto const withdrawToCharlie = [&](xrpl::Keylet keylet) { auto tx = vault.withdraw( {.depositor = owner, .id = keylet.key, @@ -3481,7 +3481,7 @@ class Vault_test : public beast::unit_test::suite for (int i = 0; i < 256; ++i) { AccountID const accountId = - ripple::pseudoAccountAddress(*env.current(), keylet.key); + xrpl::pseudoAccountAddress(*env.current(), keylet.key); env(pay(env.master.id(), accountId, XRP(1000)), seq(autofill), @@ -3509,7 +3509,7 @@ class Vault_test : public beast::unit_test::suite MPTIssue shares; PrettyAsset const& share; Vault& vault; - ripple::Keylet keylet; + xrpl::Keylet keylet; Issue assets; PrettyAsset const& asset; std::function)> peek; @@ -3539,7 +3539,7 @@ class Vault_test : public beast::unit_test::suite env(tx); auto const [vaultAccount, issuanceId] = - [&env](ripple::Keylet keylet) -> std::tuple { + [&env](xrpl::Keylet keylet) -> std::tuple { auto const vault = env.le(keylet); return { Account("vault", vault->at(sfAccount)), @@ -4992,4 +4992,4 @@ public: BEAST_DEFINE_TESTSUITE_PRIO(Vault, app, ripple, 1); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/app/XChain_test.cpp b/src/test/app/XChain_test.cpp index 158d913f46..3d56273ef3 100644 --- a/src/test/app/XChain_test.cpp +++ b/src/test/app/XChain_test.cpp @@ -23,7 +23,7 @@ #include #include -namespace ripple::test { +namespace xrpl::test { // SEnv class - encapsulate jtx::Env to make it more user-friendly, // for example having APIs that return a *this reference so that calls can be @@ -5174,4 +5174,4 @@ public: BEAST_DEFINE_TESTSUITE(XChain, app, ripple); BEAST_DEFINE_TESTSUITE(XChainSim, app, ripple); -} // namespace ripple::test +} // namespace xrpl::test diff --git a/src/test/app/tx/apply_test.cpp b/src/test/app/tx/apply_test.cpp index fcfa1a8328..5a013f2ab1 100644 --- a/src/test/app/tx/apply_test.cpp +++ b/src/test/app/tx/apply_test.cpp @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { class Apply_test : public beast::unit_test::suite { @@ -72,4 +72,4 @@ public: BEAST_DEFINE_TESTSUITE(Apply, tx, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/basics/Buffer_test.cpp b/src/test/basics/Buffer_test.cpp index f734741e0f..b078c3a763 100644 --- a/src/test/basics/Buffer_test.cpp +++ b/src/test/basics/Buffer_test.cpp @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { struct Buffer_test : beast::unit_test::suite @@ -264,4 +264,4 @@ struct Buffer_test : beast::unit_test::suite BEAST_DEFINE_TESTSUITE(Buffer, basics, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/basics/DetectCrash_test.cpp b/src/test/basics/DetectCrash_test.cpp index e2f7d39921..0dd2787dff 100644 --- a/src/test/basics/DetectCrash_test.cpp +++ b/src/test/basics/DetectCrash_test.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { struct DetectCrash_test : public beast::unit_test::suite @@ -25,4 +25,4 @@ struct DetectCrash_test : public beast::unit_test::suite BEAST_DEFINE_TESTSUITE_MANUAL(DetectCrash, basics, beast); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/basics/Expected_test.cpp b/src/test/basics/Expected_test.cpp index 173e8302aa..c9222fd788 100644 --- a/src/test/basics/Expected_test.cpp +++ b/src/test/basics/Expected_test.cpp @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { struct Expected_test : beast::unit_test::suite @@ -227,4 +227,4 @@ struct Expected_test : beast::unit_test::suite BEAST_DEFINE_TESTSUITE(Expected, basics, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/basics/FileUtilities_test.cpp b/src/test/basics/FileUtilities_test.cpp index d3e70911b8..6727ca7393 100644 --- a/src/test/basics/FileUtilities_test.cpp +++ b/src/test/basics/FileUtilities_test.cpp @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { class FileUtilities_test : public beast::unit_test::suite { @@ -12,7 +12,7 @@ public: void testGetFileContents() { - using namespace ripple::detail; + using namespace xrpl::detail; using namespace boost::system; constexpr char const* expectedContents = @@ -62,4 +62,4 @@ public: BEAST_DEFINE_TESTSUITE(FileUtilities, basics, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/basics/IOUAmount_test.cpp b/src/test/basics/IOUAmount_test.cpp index dd6389ed81..03780677c6 100644 --- a/src/test/basics/IOUAmount_test.cpp +++ b/src/test/basics/IOUAmount_test.cpp @@ -1,7 +1,7 @@ #include #include -namespace ripple { +namespace xrpl { class IOUAmount_test : public beast::unit_test::suite { @@ -239,7 +239,7 @@ public: IOUAmount big(maxMantissa, maxExponent); except([&] { mulRatio(big, 2, 0, true); }); } - } // namespace ripple + } // namespace xrpl //-------------------------------------------------------------------------- @@ -257,4 +257,4 @@ public: BEAST_DEFINE_TESTSUITE(IOUAmount, basics, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/basics/IntrusiveShared_test.cpp b/src/test/basics/IntrusiveShared_test.cpp index a3acc54d45..89a6dec04f 100644 --- a/src/test/basics/IntrusiveShared_test.cpp +++ b/src/test/basics/IntrusiveShared_test.cpp @@ -17,7 +17,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace tests { /** @@ -889,4 +889,4 @@ public: BEAST_DEFINE_TESTSUITE(IntrusiveShared, basics, ripple); } // namespace tests -} // namespace ripple +} // namespace xrpl diff --git a/src/test/basics/KeyCache_test.cpp b/src/test/basics/KeyCache_test.cpp index 3ba642682a..5cbce07f75 100644 --- a/src/test/basics/KeyCache_test.cpp +++ b/src/test/basics/KeyCache_test.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { class KeyCache_test : public beast::unit_test::suite { @@ -76,4 +76,4 @@ public: BEAST_DEFINE_TESTSUITE(KeyCache, basics, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/basics/Number_test.cpp b/src/test/basics/Number_test.cpp index 06203a4c2a..d6daf12588 100644 --- a/src/test/basics/Number_test.cpp +++ b/src/test/basics/Number_test.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { class Number_test : public beast::unit_test::suite { @@ -751,4 +751,4 @@ public: BEAST_DEFINE_TESTSUITE(Number, basics, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/basics/PerfLog_test.cpp b/src/test/basics/PerfLog_test.cpp index 5862889354..dca0c9eb59 100644 --- a/src/test/basics/PerfLog_test.cpp +++ b/src/test/basics/PerfLog_test.cpp @@ -18,7 +18,7 @@ //------------------------------------------------------------------------------ -namespace ripple { +namespace xrpl { class PerfLog_test : public beast::unit_test::suite { @@ -293,7 +293,7 @@ public: // Get the all the labels we can use for RPC interfaces without // causing an assert. std::vector labels = - test::jtx::make_vector(ripple::RPC::getHandlerNames()); + test::jtx::make_vector(xrpl::RPC::getHandlerNames()); std::shuffle(labels.begin(), labels.end(), default_prng()); // Get two IDs to associate with each label. Errors tend to happen at @@ -1044,4 +1044,4 @@ public: BEAST_DEFINE_TESTSUITE(PerfLog, basics, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/basics/StringUtilities_test.cpp b/src/test/basics/StringUtilities_test.cpp index 319eafe920..8bfd51cea0 100644 --- a/src/test/basics/StringUtilities_test.cpp +++ b/src/test/basics/StringUtilities_test.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { class StringUtilities_test : public beast::unit_test::suite { @@ -305,4 +305,4 @@ public: BEAST_DEFINE_TESTSUITE(StringUtilities, basics, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/basics/TaggedCache_test.cpp b/src/test/basics/TaggedCache_test.cpp index be0eb5d77b..b5f439fb4c 100644 --- a/src/test/basics/TaggedCache_test.cpp +++ b/src/test/basics/TaggedCache_test.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { /* I guess you can put some items in, make sure they're still there. Let some @@ -134,4 +134,4 @@ public: BEAST_DEFINE_TESTSUITE(TaggedCache, basics, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/basics/Units_test.cpp b/src/test/basics/Units_test.cpp index 7838926c87..5d1d1bd911 100644 --- a/src/test/basics/Units_test.cpp +++ b/src/test/basics/Units_test.cpp @@ -2,7 +2,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class units_test : public beast::unit_test::suite @@ -356,4 +356,4 @@ public: BEAST_DEFINE_TESTSUITE(units, basics, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/basics/XRPAmount_test.cpp b/src/test/basics/XRPAmount_test.cpp index a63f3bfd43..96708452ef 100644 --- a/src/test/basics/XRPAmount_test.cpp +++ b/src/test/basics/XRPAmount_test.cpp @@ -1,7 +1,7 @@ #include #include -namespace ripple { +namespace xrpl { class XRPAmount_test : public beast::unit_test::suite { @@ -308,7 +308,7 @@ public: XRPAmount bigNegative(minXRP + 10); BEAST_EXPECT(mulRatio(bigNegative, 2, 1, true) == minXRP); } - } // namespace ripple + } // namespace xrpl //-------------------------------------------------------------------------- @@ -327,4 +327,4 @@ public: BEAST_DEFINE_TESTSUITE(XRPAmount, basics, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/basics/base58_test.cpp b/src/test/basics/base58_test.cpp index 1700255df6..5c8fcd5435 100644 --- a/src/test/basics/base58_test.cpp +++ b/src/test/basics/base58_test.cpp @@ -13,7 +13,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace { @@ -30,13 +30,13 @@ randEngine() -> std::mt19937& constexpr int numTokenTypeIndexes = 9; [[nodiscard]] inline auto -tokenTypeAndSize(int i) -> std::tuple +tokenTypeAndSize(int i) -> std::tuple { assert(i < numTokenTypeIndexes); switch (i) { - using enum ripple::TokenType; + using enum xrpl::TokenType; case 0: return {None, 20}; case 1: @@ -63,9 +63,9 @@ tokenTypeAndSize(int i) -> std::tuple } [[nodiscard]] inline auto -randomTokenTypeAndSize() -> std::tuple +randomTokenTypeAndSize() -> std::tuple { - using namespace ripple; + using namespace xrpl; auto& rng = randEngine(); std::uniform_int_distribution<> d(0, 8); return tokenTypeAndSize(d(rng)); @@ -74,7 +74,7 @@ randomTokenTypeAndSize() -> std::tuple // Return the token type and subspan of `d` to use as test data. [[nodiscard]] inline auto randomB256TestData(std::span d) - -> std::tuple> + -> std::tuple> { auto& rng = randEngine(); std::uniform_int_distribution dist(0, 255); @@ -267,7 +267,7 @@ class base58_test : public beast::unit_test::suite std::span const outBuf{b58ResultBuf[i]}; if (i == 0) { - auto const r = ripple::b58_fast::detail::b256_to_b58_be( + auto const r = xrpl::b58_fast::detail::b256_to_b58_be( b256Data, outBuf); BEAST_EXPECT(r); b58Result[i] = r.value(); @@ -275,7 +275,7 @@ class base58_test : public beast::unit_test::suite else { std::array tmpBuf; - std::string const s = ripple::b58_ref::detail::encodeBase58( + std::string const s = xrpl::b58_ref::detail::encodeBase58( b256Data.data(), b256Data.size(), tmpBuf.data(), @@ -307,7 +307,7 @@ class base58_test : public beast::unit_test::suite b58Result[i].data(), b58Result[i].data() + b58Result[i].size()); auto const r = - ripple::b58_fast::detail::b58_to_b256_be(in, outBuf); + xrpl::b58_fast::detail::b58_to_b256_be(in, outBuf); BEAST_EXPECT(r); b256Result[i] = r.value(); } @@ -316,7 +316,7 @@ class base58_test : public beast::unit_test::suite std::string const st( b58Result[i].begin(), b58Result[i].end()); std::string const s = - ripple::b58_ref::detail::decodeBase58(st); + xrpl::b58_ref::detail::decodeBase58(st); BEAST_EXPECT(s.size()); b256Result[i] = outBuf.subspan(0, s.size()); std::copy(s.begin(), s.end(), b256Result[i].begin()); @@ -336,7 +336,7 @@ class base58_test : public beast::unit_test::suite } }; - auto testTokenEncode = [&](ripple::TokenType const tokType, + auto testTokenEncode = [&](xrpl::TokenType const tokType, std::span const& b256Data) { std::array b58ResultBuf[2]; std::array, 2> b58Result; @@ -349,14 +349,14 @@ class base58_test : public beast::unit_test::suite b58ResultBuf[i].data(), b58ResultBuf[i].size()}; if (i == 0) { - auto const r = ripple::b58_fast::encodeBase58Token( + auto const r = xrpl::b58_fast::encodeBase58Token( tokType, b256Data, outBuf); BEAST_EXPECT(r); b58Result[i] = r.value(); } else { - std::string const s = ripple::b58_ref::encodeBase58Token( + std::string const s = xrpl::b58_ref::encodeBase58Token( tokType, b256Data.data(), b256Data.size()); BEAST_EXPECT(s.size()); b58Result[i] = outBuf.subspan(0, s.size()); @@ -384,8 +384,8 @@ class base58_test : public beast::unit_test::suite std::string const in( b58Result[i].data(), b58Result[i].data() + b58Result[i].size()); - auto const r = ripple::b58_fast::decodeBase58Token( - tokType, in, outBuf); + auto const r = + xrpl::b58_fast::decodeBase58Token(tokType, in, outBuf); BEAST_EXPECT(r); b256Result[i] = r.value(); } @@ -394,7 +394,7 @@ class base58_test : public beast::unit_test::suite std::string const st( b58Result[i].begin(), b58Result[i].end()); std::string const s = - ripple::b58_ref::decodeBase58Token(st, tokType); + xrpl::b58_ref::decodeBase58Token(st, tokType); BEAST_EXPECT(s.size()); b256Result[i] = outBuf.subspan(0, s.size()); std::copy(s.begin(), s.end(), b256Result[i].begin()); @@ -414,7 +414,7 @@ class base58_test : public beast::unit_test::suite } }; - auto testIt = [&](ripple::TokenType const tokType, + auto testIt = [&](xrpl::TokenType const tokType, std::span const& b256Data) { testRawEncode(b256Data); testTokenEncode(tokType, b256Data); @@ -454,5 +454,5 @@ class base58_test : public beast::unit_test::suite BEAST_DEFINE_TESTSUITE(base58, basics, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl #endif // _MSC_VER diff --git a/src/test/basics/base_uint_test.cpp b/src/test/basics/base_uint_test.cpp index 0308fb4466..5e59481291 100644 --- a/src/test/basics/base_uint_test.cpp +++ b/src/test/basics/base_uint_test.cpp @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { // a non-hashing Hasher that just copies the bytes. @@ -59,7 +59,7 @@ struct base_uint_test : beast::unit_test::suite for (auto const& arg : test_args) { - ripple::base_uint<64> const u{arg.first}, v{arg.second}; + xrpl::base_uint<64> const u{arg.first}, v{arg.second}; BEAST_EXPECT(u < v); BEAST_EXPECT(u <= v); BEAST_EXPECT(u != v); @@ -92,7 +92,7 @@ struct base_uint_test : beast::unit_test::suite for (auto const& arg : test_args) { - ripple::base_uint<96> const u{arg.first}, v{arg.second}; + xrpl::base_uint<96> const u{arg.first}, v{arg.second}; BEAST_EXPECT(u < v); BEAST_EXPECT(u <= v); BEAST_EXPECT(u != v); @@ -355,4 +355,4 @@ struct base_uint_test : beast::unit_test::suite BEAST_DEFINE_TESTSUITE(base_uint, basics, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/basics/hardened_hash_test.cpp b/src/test/basics/hardened_hash_test.cpp index 9cd40d6a60..27ae495e38 100644 --- a/src/test/basics/hardened_hash_test.cpp +++ b/src/test/basics/hardened_hash_test.cpp @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { template @@ -51,11 +51,11 @@ public: }; } // namespace detail -} // namespace ripple +} // namespace xrpl //------------------------------------------------------------------------------ -namespace ripple { +namespace xrpl { namespace detail { @@ -148,11 +148,11 @@ using sha256_t = unsigned_integer<256, std::size_t>; static_assert(sha256_t::bits == 256, "sha256_t must have 256 bits"); #endif -} // namespace ripple +} // namespace xrpl //------------------------------------------------------------------------------ -namespace ripple { +namespace xrpl { class hardened_hash_test : public beast::unit_test::suite { @@ -236,4 +236,4 @@ public: BEAST_DEFINE_TESTSUITE(hardened_hash, basics, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/basics/join_test.cpp b/src/test/basics/join_test.cpp index 751f0290f8..4055848ce7 100644 --- a/src/test/basics/join_test.cpp +++ b/src/test/basics/join_test.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { struct join_test : beast::unit_test::suite @@ -83,4 +83,4 @@ struct join_test : beast::unit_test::suite BEAST_DEFINE_TESTSUITE(join, basics, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/beast/IPEndpointCommon.h b/src/test/beast/IPEndpointCommon.h index 83175834af..73cbe7d95b 100644 --- a/src/test/beast/IPEndpointCommon.h +++ b/src/test/beast/IPEndpointCommon.h @@ -7,7 +7,7 @@ namespace IP { inline Endpoint randomEP(bool v4 = true) { - using namespace ripple; + using namespace xrpl; auto dv4 = []() -> AddressV4::bytes_type { return { {static_cast(rand_int(1, UINT8_MAX)), diff --git a/src/test/beast/IPEndpoint_test.cpp b/src/test/beast/IPEndpoint_test.cpp index 3d4f2e7f02..1d451e94a2 100644 --- a/src/test/beast/IPEndpoint_test.cpp +++ b/src/test/beast/IPEndpoint_test.cpp @@ -380,7 +380,7 @@ public: float max_lf{0}; for (auto i = 0; i < items; ++i) { - eps.insert(randomEP(ripple::rand_int(0, 1) == 1)); + eps.insert(randomEP(xrpl::rand_int(0, 1) == 1)); max_lf = std::max(max_lf, eps.load_factor()); } BEAST_EXPECT(eps.bucket_count() >= items); diff --git a/src/test/beast/beast_CurrentThreadName_test.cpp b/src/test/beast/beast_CurrentThreadName_test.cpp index 9863c1bb3c..3d33ecb602 100644 --- a/src/test/beast/beast_CurrentThreadName_test.cpp +++ b/src/test/beast/beast_CurrentThreadName_test.cpp @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { class CurrentThreadName_test : public beast::unit_test::suite @@ -70,4 +70,4 @@ public: BEAST_DEFINE_TESTSUITE(CurrentThreadName, beast, beast); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/conditions/PreimageSha256_test.cpp b/src/test/conditions/PreimageSha256_test.cpp index 08f9e5fb5b..e92c1dbfec 100644 --- a/src/test/conditions/PreimageSha256_test.cpp +++ b/src/test/conditions/PreimageSha256_test.cpp @@ -13,7 +13,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace cryptoconditions { class PreimageSha256_test : public beast::unit_test::suite @@ -171,4 +171,4 @@ BEAST_DEFINE_TESTSUITE(PreimageSha256, conditions, ripple); } // namespace cryptoconditions -} // namespace ripple +} // namespace xrpl diff --git a/src/test/consensus/ByzantineFailureSim_test.cpp b/src/test/consensus/ByzantineFailureSim_test.cpp index f2a9a7d5c6..0462f5d162 100644 --- a/src/test/consensus/ByzantineFailureSim_test.cpp +++ b/src/test/consensus/ByzantineFailureSim_test.cpp @@ -4,7 +4,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { class ByzantineFailureSim_test : public beast::unit_test::suite @@ -82,4 +82,4 @@ class ByzantineFailureSim_test : public beast::unit_test::suite BEAST_DEFINE_TESTSUITE_MANUAL(ByzantineFailureSim, consensus, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/consensus/Consensus_test.cpp b/src/test/consensus/Consensus_test.cpp index 6318c86a12..6a5c57042b 100644 --- a/src/test/consensus/Consensus_test.cpp +++ b/src/test/consensus/Consensus_test.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class Consensus_test : public beast::unit_test::suite @@ -1520,4 +1520,4 @@ public: BEAST_DEFINE_TESTSUITE(Consensus, consensus, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/consensus/DistributedValidatorsSim_test.cpp b/src/test/consensus/DistributedValidatorsSim_test.cpp index 6e093a91c5..170d6cc360 100644 --- a/src/test/consensus/DistributedValidatorsSim_test.cpp +++ b/src/test/consensus/DistributedValidatorsSim_test.cpp @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { /** In progress simulations for diversifying and distributing validators @@ -257,4 +257,4 @@ class DistributedValidators_test : public beast::unit_test::suite BEAST_DEFINE_TESTSUITE_MANUAL_PRIO(DistributedValidators, consensus, ripple, 2); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/consensus/LedgerTiming_test.cpp b/src/test/consensus/LedgerTiming_test.cpp index c3ce86b4b3..789fc7ca47 100644 --- a/src/test/consensus/LedgerTiming_test.cpp +++ b/src/test/consensus/LedgerTiming_test.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { class LedgerTiming_test : public beast::unit_test::suite @@ -107,4 +107,4 @@ class LedgerTiming_test : public beast::unit_test::suite BEAST_DEFINE_TESTSUITE(LedgerTiming, consensus, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/consensus/LedgerTrie_test.cpp b/src/test/consensus/LedgerTrie_test.cpp index 5ad725fa73..bb0bbbf432 100644 --- a/src/test/consensus/LedgerTrie_test.cpp +++ b/src/test/consensus/LedgerTrie_test.cpp @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { class LedgerTrie_test : public beast::unit_test::suite @@ -661,4 +661,4 @@ class LedgerTrie_test : public beast::unit_test::suite BEAST_DEFINE_TESTSUITE(LedgerTrie, consensus, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/consensus/NegativeUNL_test.cpp b/src/test/consensus/NegativeUNL_test.cpp index 8457d0e2be..c36e7648d8 100644 --- a/src/test/consensus/NegativeUNL_test.cpp +++ b/src/test/consensus/NegativeUNL_test.cpp @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { /* @@ -1988,4 +1988,4 @@ createTx(bool disabling, LedgerIndex seq, PublicKey const& txKey) } } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/consensus/RCLCensorshipDetector_test.cpp b/src/test/consensus/RCLCensorshipDetector_test.cpp index 9be73735f9..c524ba52f0 100644 --- a/src/test/consensus/RCLCensorshipDetector_test.cpp +++ b/src/test/consensus/RCLCensorshipDetector_test.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class RCLCensorshipDetector_test : public beast::unit_test::suite @@ -81,4 +81,4 @@ public: BEAST_DEFINE_TESTSUITE(RCLCensorshipDetector, consensus, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/consensus/ScaleFreeSim_test.cpp b/src/test/consensus/ScaleFreeSim_test.cpp index 51b9ee542a..3c41d3dea4 100644 --- a/src/test/consensus/ScaleFreeSim_test.cpp +++ b/src/test/consensus/ScaleFreeSim_test.cpp @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { class ScaleFreeSim_test : public beast::unit_test::suite @@ -103,4 +103,4 @@ class ScaleFreeSim_test : public beast::unit_test::suite BEAST_DEFINE_TESTSUITE_MANUAL_PRIO(ScaleFreeSim, consensus, ripple, 80); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/consensus/Validations_test.cpp b/src/test/consensus/Validations_test.cpp index b1b5a46f38..c1c581abfd 100644 --- a/src/test/consensus/Validations_test.cpp +++ b/src/test/consensus/Validations_test.cpp @@ -9,7 +9,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace csf { class Validations_test : public beast::unit_test::suite @@ -1128,4 +1128,4 @@ class Validations_test : public beast::unit_test::suite BEAST_DEFINE_TESTSUITE(Validations, consensus, ripple); } // namespace csf } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/core/ClosureCounter_test.cpp b/src/test/core/ClosureCounter_test.cpp index dbe846c02d..aa02143820 100644 --- a/src/test/core/ClosureCounter_test.cpp +++ b/src/test/core/ClosureCounter_test.cpp @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { //------------------------------------------------------------------------------ @@ -322,4 +322,4 @@ public: BEAST_DEFINE_TESTSUITE(ClosureCounter, core, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/core/Config_test.cpp b/src/test/core/Config_test.cpp index 34c4a553b4..bf0c4f61ba 100644 --- a/src/test/core/Config_test.cpp +++ b/src/test/core/Config_test.cpp @@ -13,7 +13,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { std::string configContents(std::string const& dbPath, std::string const& validatorsFile) @@ -109,7 +109,7 @@ backend=sqlite /** Write a rippled config file and remove when done. */ -class RippledCfgGuard : public ripple::detail::FileDirGuard +class RippledCfgGuard : public xrpl::detail::FileDirGuard { private: path dataDir_; @@ -326,7 +326,7 @@ port_wss_admin { // read from file absolute path auto const cwd = current_path(); - ripple::detail::DirGuard const g0(*this, "test_db"); + xrpl::detail::DirGuard const g0(*this, "test_db"); path const dataDirRel("test_data_dir"); path const dataDirAbs(cwd / g0.subdir() / dataDirRel); detail::RippledCfgGuard const g( @@ -1499,4 +1499,4 @@ r.ripple.com:51235 BEAST_DEFINE_TESTSUITE(Config, core, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/core/Coroutine_test.cpp b/src/test/core/Coroutine_test.cpp index 2b9bd0a248..8bf30351bb 100644 --- a/src/test/core/Coroutine_test.cpp +++ b/src/test/core/Coroutine_test.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class Coroutine_test : public beast::unit_test::suite @@ -168,4 +168,4 @@ public: BEAST_DEFINE_TESTSUITE(Coroutine, core, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/core/JobQueue_test.cpp b/src/test/core/JobQueue_test.cpp index 0b6bbb13ae..651b7a281e 100644 --- a/src/test/core/JobQueue_test.cpp +++ b/src/test/core/JobQueue_test.cpp @@ -4,7 +4,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { //------------------------------------------------------------------------------ @@ -144,4 +144,4 @@ public: BEAST_DEFINE_TESTSUITE(JobQueue, core, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/core/SociDB_test.cpp b/src/test/core/SociDB_test.cpp index e201f75dba..2eb05c68e1 100644 --- a/src/test/core/SociDB_test.cpp +++ b/src/test/core/SociDB_test.cpp @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { class SociDB_test final : public TestSuite { private: @@ -353,4 +353,4 @@ public: BEAST_DEFINE_TESTSUITE(SociDB, core, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/core/Workers_test.cpp b/src/test/core/Workers_test.cpp index d8152d3ea8..26b6ca7184 100644 --- a/src/test/core/Workers_test.cpp +++ b/src/test/core/Workers_test.cpp @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { /** * Dummy class for unit tests. @@ -157,4 +157,4 @@ public: BEAST_DEFINE_TESTSUITE(Workers, core, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/csf/BasicNetwork.h b/src/test/csf/BasicNetwork.h index 7fce2e5f0e..cb4e691317 100644 --- a/src/test/csf/BasicNetwork.h +++ b/src/test/csf/BasicNetwork.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace csf { /** Peer to peer network simulator. @@ -234,6 +234,6 @@ BasicNetwork::send(Peer const& from, Peer const& to, Function&& f) } // namespace csf } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/csf/BasicNetwork_test.cpp b/src/test/csf/BasicNetwork_test.cpp index e5a8c545e5..9f69a4e47e 100644 --- a/src/test/csf/BasicNetwork_test.cpp +++ b/src/test/csf/BasicNetwork_test.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class BasicNetwork_test : public beast::unit_test::suite @@ -130,4 +130,4 @@ public: BEAST_DEFINE_TESTSUITE(BasicNetwork, csf, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/csf/CollectorRef.h b/src/test/csf/CollectorRef.h index 81aa048249..3aa2c6495f 100644 --- a/src/test/csf/CollectorRef.h +++ b/src/test/csf/CollectorRef.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace csf { @@ -327,6 +327,6 @@ public: } // namespace csf } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/csf/Digraph.h b/src/test/csf/Digraph.h index 24ff820e1d..688d0528d3 100644 --- a/src/test/csf/Digraph.h +++ b/src/test/csf/Digraph.h @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { // Dummy class when no edge data needed for graph struct NoEdgeData @@ -231,5 +231,5 @@ public: } // namespace csf } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/csf/Digraph_test.cpp b/src/test/csf/Digraph_test.cpp index bd37fef80c..26a0da9353 100644 --- a/src/test/csf/Digraph_test.cpp +++ b/src/test/csf/Digraph_test.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class Digraph_test : public beast::unit_test::suite @@ -76,4 +76,4 @@ public: BEAST_DEFINE_TESTSUITE(Digraph, csf, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/csf/Histogram.h b/src/test/csf/Histogram.h index 3a504557f2..b55af34846 100644 --- a/src/test/csf/Histogram.h +++ b/src/test/csf/Histogram.h @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace csf { @@ -111,6 +111,6 @@ public: } // namespace csf } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/csf/Histogram_test.cpp b/src/test/csf/Histogram_test.cpp index 964c065bfc..dce36775ac 100644 --- a/src/test/csf/Histogram_test.cpp +++ b/src/test/csf/Histogram_test.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { class Histogram_test : public beast::unit_test::suite @@ -65,4 +65,4 @@ public: BEAST_DEFINE_TESTSUITE(Histogram, csf, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/csf/Peer.h b/src/test/csf/Peer.h index 3a76e7b841..6bf0865c37 100644 --- a/src/test/csf/Peer.h +++ b/src/test/csf/Peer.h @@ -20,7 +20,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace csf { @@ -983,5 +983,5 @@ struct Peer } // namespace csf } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/csf/PeerGroup.h b/src/test/csf/PeerGroup.h index 8186b877c8..e674581546 100644 --- a/src/test/csf/PeerGroup.h +++ b/src/test/csf/PeerGroup.h @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace csf { @@ -351,5 +351,5 @@ randomRankedConnect( } // namespace csf } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/csf/Proposal.h b/src/test/csf/Proposal.h index bb09bbdde1..0bcf838080 100644 --- a/src/test/csf/Proposal.h +++ b/src/test/csf/Proposal.h @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace csf { /** Proposal is a position taken in the consensus process and is represented @@ -17,6 +17,6 @@ using Proposal = ConsensusProposal; } // namespace csf } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/csf/Scheduler.h b/src/test/csf/Scheduler.h index 7a44dda5da..2c250e6def 100644 --- a/src/test/csf/Scheduler.h +++ b/src/test/csf/Scheduler.h @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace csf { @@ -434,6 +434,6 @@ Scheduler::step_for(std::chrono::duration const& amount) } // namespace csf } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/csf/Scheduler_test.cpp b/src/test/csf/Scheduler_test.cpp index 0975cc09d0..465d2aee8b 100644 --- a/src/test/csf/Scheduler_test.cpp +++ b/src/test/csf/Scheduler_test.cpp @@ -4,7 +4,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { class Scheduler_test : public beast::unit_test::suite @@ -67,4 +67,4 @@ public: BEAST_DEFINE_TESTSUITE(Scheduler, csf, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/csf/Sim.h b/src/test/csf/Sim.h index 53c3875624..ad0927e87e 100644 --- a/src/test/csf/Sim.h +++ b/src/test/csf/Sim.h @@ -14,7 +14,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace csf { @@ -157,6 +157,6 @@ public: } // namespace csf } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/csf/SimTime.h b/src/test/csf/SimTime.h index d4ab34fe55..5d8c67b8f8 100644 --- a/src/test/csf/SimTime.h +++ b/src/test/csf/SimTime.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace csf { @@ -19,6 +19,6 @@ using SimTime = typename SimClock::time_point; } // namespace csf } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/csf/TrustGraph.h b/src/test/csf/TrustGraph.h index 936e13b963..f5b8a9e755 100644 --- a/src/test/csf/TrustGraph.h +++ b/src/test/csf/TrustGraph.h @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace csf { @@ -154,6 +154,6 @@ public: } // namespace csf } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/csf/Tx.h b/src/test/csf/Tx.h index e24c09be2f..cf3ee85940 100644 --- a/src/test/csf/Tx.h +++ b/src/test/csf/Tx.h @@ -14,7 +14,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace csf { @@ -210,6 +210,6 @@ hash_append(Hasher& h, Tx const& tx) } // namespace csf } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/csf/Validation.h b/src/test/csf/Validation.h index 77ba81681d..907eca79d0 100644 --- a/src/test/csf/Validation.h +++ b/src/test/csf/Validation.h @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace csf { @@ -183,6 +183,6 @@ public: } // namespace csf } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/csf/collectors.h b/src/test/csf/collectors.h index c361701b4e..e43c31b404 100644 --- a/src/test/csf/collectors.h +++ b/src/test/csf/collectors.h @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace csf { @@ -699,6 +699,6 @@ struct JumpCollector } // namespace csf } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/csf/events.h b/src/test/csf/events.h index bf01de4eb2..b5cdcccc6c 100644 --- a/src/test/csf/events.h +++ b/src/test/csf/events.h @@ -8,7 +8,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace csf { @@ -129,6 +129,6 @@ struct FullyValidateLedger } // namespace csf } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/csf/impl/Sim.cpp b/src/test/csf/impl/Sim.cpp index c17ea26939..4fbee56f0f 100644 --- a/src/test/csf/impl/Sim.cpp +++ b/src/test/csf/impl/Sim.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace csf { @@ -63,4 +63,4 @@ Sim::branches(PeerGroup const& g) const } // namespace csf } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/csf/impl/ledgers.cpp b/src/test/csf/impl/ledgers.cpp index 681020c12e..09a098f2d6 100644 --- a/src/test/csf/impl/ledgers.cpp +++ b/src/test/csf/impl/ledgers.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace csf { @@ -152,4 +152,4 @@ LedgerOracle::branches(std::set const& ledgers) const } } // namespace csf } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/csf/ledgers.h b/src/test/csf/ledgers.h index 26b416a2fb..1e9dc1e33e 100644 --- a/src/test/csf/ledgers.h +++ b/src/test/csf/ledgers.h @@ -16,7 +16,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace csf { @@ -230,8 +230,8 @@ private: class LedgerOracle { using InstanceMap = boost::bimaps::bimap< - boost::bimaps::set_of>, - boost::bimaps::set_of>>; + boost::bimaps::set_of>, + boost::bimaps::set_of>>; using InstanceEntry = InstanceMap::value_type; // Set of all known ledgers; note this is never pruned @@ -341,6 +341,6 @@ struct LedgerHistoryHelper } // namespace csf } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/csf/random.h b/src/test/csf/random.h index c3ad9564ba..8b3ac7e971 100644 --- a/src/test/csf/random.h +++ b/src/test/csf/random.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace csf { @@ -156,6 +156,6 @@ public: } // namespace csf } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/csf/submitters.h b/src/test/csf/submitters.h index 3cca62c10d..8a3632eb97 100644 --- a/src/test/csf/submitters.h +++ b/src/test/csf/submitters.h @@ -8,7 +8,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace csf { @@ -109,6 +109,6 @@ makeSubmitter( } // namespace csf } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/csf/timers.h b/src/test/csf/timers.h index c16beec885..b5902393c7 100644 --- a/src/test/csf/timers.h +++ b/src/test/csf/timers.h @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace csf { @@ -65,6 +65,6 @@ public: } // namespace csf } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/json/Object_test.cpp b/src/test/json/Object_test.cpp index 9d4f65492a..30225fc9de 100644 --- a/src/test/json/Object_test.cpp +++ b/src/test/json/Object_test.cpp @@ -5,7 +5,7 @@ namespace Json { -class JsonObject_test : public ripple::test::TestOutputSuite +class JsonObject_test : public xrpl::test::TestOutputSuite { void setup(std::string const& testName) diff --git a/src/test/json/TestOutputSuite.h b/src/test/json/TestOutputSuite.h index 0c1810bd39..934fe1de81 100644 --- a/src/test/json/TestOutputSuite.h +++ b/src/test/json/TestOutputSuite.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class TestOutputSuite : public TestSuite @@ -34,6 +34,6 @@ protected: }; } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/AMM.h b/src/test/jtx/AMM.h index 646d663f99..65c16ec627 100644 --- a/src/test/jtx/AMM.h +++ b/src/test/jtx/AMM.h @@ -13,7 +13,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -442,6 +442,6 @@ ammClawback( } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif // XRPL_TEST_JTX_AMM_H_INCLUDED diff --git a/src/test/jtx/AMMTest.h b/src/test/jtx/AMMTest.h index 91a18bec2c..83366d61e2 100644 --- a/src/test/jtx/AMMTest.h +++ b/src/test/jtx/AMMTest.h @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -148,6 +148,6 @@ protected: } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif // XRPL_TEST_JTX_AMMTEST_H_INCLUDED diff --git a/src/test/jtx/AbstractClient.h b/src/test/jtx/AbstractClient.h index 383586ce02..0bdfbd67de 100644 --- a/src/test/jtx/AbstractClient.h +++ b/src/test/jtx/AbstractClient.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { /* Abstract Ripple Client interface. @@ -40,6 +40,6 @@ public: }; } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/Account.h b/src/test/jtx/Account.h index 7545b620ee..af8870f22a 100644 --- a/src/test/jtx/Account.h +++ b/src/test/jtx/Account.h @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -152,6 +152,6 @@ operator<=>(Account const& lhs, Account const& rhs) noexcept } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/CaptureLogs.h b/src/test/jtx/CaptureLogs.h index 86f160c318..0ac855e402 100644 --- a/src/test/jtx/CaptureLogs.h +++ b/src/test/jtx/CaptureLogs.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { /** @@ -75,6 +75,6 @@ public: }; } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/CheckMessageLogs.h b/src/test/jtx/CheckMessageLogs.h index d71b09673e..b0e5f4c82e 100644 --- a/src/test/jtx/CheckMessageLogs.h +++ b/src/test/jtx/CheckMessageLogs.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { /** Log manager that searches for a specific message substring @@ -63,6 +63,6 @@ public: }; } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/Env.h b/src/test/jtx/Env.h index 94ae058cc6..292fe4c277 100644 --- a/src/test/jtx/Env.h +++ b/src/test/jtx/Env.h @@ -39,7 +39,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -817,6 +817,6 @@ Env::rpc(std::string const& cmd, Args&&... args) } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/Env_ss.h b/src/test/jtx/Env_ss.h index 726fbb4fe0..734eca5819 100644 --- a/src/test/jtx/Env_ss.h +++ b/src/test/jtx/Env_ss.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -59,6 +59,6 @@ public: } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/Env_test.cpp b/src/test/jtx/Env_test.cpp index 7ec453c9ff..dbac4f4ec6 100644 --- a/src/test/jtx/Env_test.cpp +++ b/src/test/jtx/Env_test.cpp @@ -14,7 +14,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class Env_test : public beast::unit_test::suite @@ -928,4 +928,4 @@ public: BEAST_DEFINE_TESTSUITE(Env, jtx, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/JSONRPCClient.h b/src/test/jtx/JSONRPCClient.h index a351694c3b..0513b43a93 100644 --- a/src/test/jtx/JSONRPCClient.h +++ b/src/test/jtx/JSONRPCClient.h @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { /** Returns a client using JSON-RPC over HTTP/S. */ @@ -15,6 +15,6 @@ std::unique_ptr makeJSONRPCClient(Config const& cfg, unsigned rpc_version = 2); } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/JTx.h b/src/test/jtx/JTx.h index d1160b0f34..486ad90618 100644 --- a/src/test/jtx/JTx.h +++ b/src/test/jtx/JTx.h @@ -13,7 +13,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -156,6 +156,6 @@ private: } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/ManualTimeKeeper.h b/src/test/jtx/ManualTimeKeeper.h index 251877986f..df3c7ff89a 100644 --- a/src/test/jtx/ManualTimeKeeper.h +++ b/src/test/jtx/ManualTimeKeeper.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { class ManualTimeKeeper : public TimeKeeper @@ -30,6 +30,6 @@ public: }; } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/Oracle.h b/src/test/jtx/Oracle.h index cbf3975771..fc7dc89cd1 100644 --- a/src/test/jtx/Oracle.h +++ b/src/test/jtx/Oracle.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { namespace oracle { @@ -185,6 +185,6 @@ public: } // namespace oracle } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif // XRPL_TEST_JTX_ORACLE_H_INCLUDED diff --git a/src/test/jtx/PathSet.h b/src/test/jtx/PathSet.h index 25f58150bb..0c54b6fb77 100644 --- a/src/test/jtx/PathSet.h +++ b/src/test/jtx/PathSet.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { /** Count offer @@ -182,6 +182,6 @@ private: }; } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/SignerUtils.h b/src/test/jtx/SignerUtils.h index 07d12d8cea..272909c887 100644 --- a/src/test/jtx/SignerUtils.h +++ b/src/test/jtx/SignerUtils.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -51,6 +51,6 @@ sortSigners(std::vector& signers) } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/TestHelpers.h b/src/test/jtx/TestHelpers.h index 5709d96983..b69193337f 100644 --- a/src/test/jtx/TestHelpers.h +++ b/src/test/jtx/TestHelpers.h @@ -23,7 +23,7 @@ using source_location = std::experimental::source_location; using std::source_location; #endif -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -697,6 +697,6 @@ checkMetrics( } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif // XRPL_TEST_JTX_TESTHELPERS_H_INCLUDED diff --git a/src/test/jtx/TestSuite.h b/src/test/jtx/TestSuite.h index 69ac910c54..69cbd2a210 100644 --- a/src/test/jtx/TestSuite.h +++ b/src/test/jtx/TestSuite.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { class TestSuite : public beast::unit_test::suite { @@ -119,6 +119,6 @@ private: } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/TrustedPublisherServer.h b/src/test/jtx/TrustedPublisherServer.h index 0f88e42f3d..e7ddef7ac9 100644 --- a/src/test/jtx/TrustedPublisherServer.h +++ b/src/test/jtx/TrustedPublisherServer.h @@ -23,7 +23,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class TrustedPublisherServer @@ -164,8 +164,7 @@ public: bool immediateStart = true, int sequence = 1) : sock_{ioc} - , ep_{boost::asio::ip::make_address( - ripple::test::getEnvLocalhostAddr()), + , ep_{boost::asio::ip::make_address(xrpl::test::getEnvLocalhostAddr()), // 0 means let OS pick the port based on what's available 0} , acceptor_{ioc} @@ -715,5 +714,5 @@ make_TrustedPublisherServer( } } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/WSClient.h b/src/test/jtx/WSClient.h index 9e7370a0fd..2365e8ce40 100644 --- a/src/test/jtx/WSClient.h +++ b/src/test/jtx/WSClient.h @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class WSClient : public AbstractClient @@ -37,6 +37,6 @@ makeWSClient( std::unordered_map const& headers = {}); } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/WSClient_test.cpp b/src/test/jtx/WSClient_test.cpp index 27285b2021..80a77aeec3 100644 --- a/src/test/jtx/WSClient_test.cpp +++ b/src/test/jtx/WSClient_test.cpp @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { class WSClient_test : public beast::unit_test::suite @@ -30,4 +30,4 @@ public: BEAST_DEFINE_TESTSUITE(WSClient, jtx, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/account_txn_id.h b/src/test/jtx/account_txn_id.h index bec9a195d3..fb48941925 100644 --- a/src/test/jtx/account_txn_id.h +++ b/src/test/jtx/account_txn_id.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -22,5 +22,5 @@ public: }; } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/acctdelete.h b/src/test/jtx/acctdelete.h index 73e7cb6e8d..71b8597db9 100644 --- a/src/test/jtx/acctdelete.h +++ b/src/test/jtx/acctdelete.h @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -26,6 +26,6 @@ incLgrSeqForAccDel( } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/amount.h b/src/test/jtx/amount.h index 4d32ef2d1a..0b2ee6d5c1 100644 --- a/src/test/jtx/amount.h +++ b/src/test/jtx/amount.h @@ -14,7 +14,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { struct epsilon_multiple @@ -220,9 +220,9 @@ public: struct BookSpec { AccountID account; - ripple::Currency currency; + xrpl::Currency currency; - BookSpec(AccountID const& account_, ripple::Currency const& currency_) + BookSpec(AccountID const& account_, xrpl::Currency const& currency_) : account(account_), currency(currency_) { } @@ -349,9 +349,9 @@ class IOU { public: Account account; - ripple::Currency currency; + xrpl::Currency currency; - IOU(Account const& account_, ripple::Currency const& currency_) + IOU(Account const& account_, xrpl::Currency const& currency_) : account(account_), currency(currency_) { } @@ -431,14 +431,14 @@ class MPT { public: std::string name; - ripple::MPTID issuanceID; + xrpl::MPTID issuanceID; - MPT(std::string const& n, ripple::MPTID const& issuanceID_) + MPT(std::string const& n, xrpl::MPTID const& issuanceID_) : name(n), issuanceID(issuanceID_) { } - ripple::MPTID const& + xrpl::MPTID const& mpt() const { return issuanceID; @@ -446,7 +446,7 @@ public: /** Explicit conversion to MPTIssue or asset. */ - ripple::MPTIssue + xrpl::MPTIssue mptIssue() const { return MPTIssue{issuanceID}; @@ -462,7 +462,7 @@ public: This allows passing an MPT value where an MPTIssue is expected. */ - operator ripple::MPTIssue() const + operator xrpl::MPTIssue() const { return mptIssue(); } @@ -555,6 +555,6 @@ extern any_t const any; } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/attester.h b/src/test/jtx/attester.h index 6aa69e23b5..345002f90a 100644 --- a/src/test/jtx/attester.h +++ b/src/test/jtx/attester.h @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { class PublicKey; class SecretKey; @@ -43,6 +43,6 @@ sign_create_account_attestation( AccountID const& dst); } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/balance.h b/src/test/jtx/balance.h index 8ca0f2fd47..999f6b7b0c 100644 --- a/src/test/jtx/balance.h +++ b/src/test/jtx/balance.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -45,6 +45,6 @@ public: } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/basic_prop.h b/src/test/jtx/basic_prop.h index 1ee7c04e08..32655e9f52 100644 --- a/src/test/jtx/basic_prop.h +++ b/src/test/jtx/basic_prop.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -41,6 +41,6 @@ struct prop_type : basic_prop } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/batch.h b/src/test/jtx/batch.h index 4c90c28a50..de4a3e0e19 100644 --- a/src/test/jtx/batch.h +++ b/src/test/jtx/batch.h @@ -15,7 +15,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -145,6 +145,6 @@ public: } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/check.h b/src/test/jtx/check.h index 863fce6f75..6152195f1f 100644 --- a/src/test/jtx/check.h +++ b/src/test/jtx/check.h @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -44,6 +44,6 @@ using checks = owner_count; } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/credentials.h b/src/test/jtx/credentials.h index 2ae0d1737e..2b41b5e7ef 100644 --- a/src/test/jtx/credentials.h +++ b/src/test/jtx/credentials.h @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -91,6 +91,6 @@ ledgerEntry(jtx::Env& env, std::string const& credIdx); } // namespace credentials } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/delegate.h b/src/test/jtx/delegate.h index 11b13cb9be..19707584ad 100644 --- a/src/test/jtx/delegate.h +++ b/src/test/jtx/delegate.h @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -40,4 +40,4 @@ public: } // namespace delegate } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/delivermin.h b/src/test/jtx/delivermin.h index 9d7ca4eaa2..70f092c9dc 100644 --- a/src/test/jtx/delivermin.h +++ b/src/test/jtx/delivermin.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -26,6 +26,6 @@ public: } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/deposit.h b/src/test/jtx/deposit.h index 91897038b6..5ea1e5bf06 100644 --- a/src/test/jtx/deposit.h +++ b/src/test/jtx/deposit.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -62,6 +62,6 @@ unauthCredentials( } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/did.h b/src/test/jtx/did.h index 883f1abe35..65407028eb 100644 --- a/src/test/jtx/did.h +++ b/src/test/jtx/did.h @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -80,6 +80,6 @@ del(jtx::Account const& account); } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/directory.h b/src/test/jtx/directory.h index 3abcc0562d..6129b79d1c 100644 --- a/src/test/jtx/directory.h +++ b/src/test/jtx/directory.h @@ -10,7 +10,7 @@ #include #include -namespace ripple::test::jtx { +namespace xrpl::test::jtx { /** Directory operations. */ namespace directory { @@ -57,6 +57,6 @@ maximumPageIndex(Env const& env) -> std::uint64_t } // namespace directory -} // namespace ripple::test::jtx +} // namespace xrpl::test::jtx #endif diff --git a/src/test/jtx/domain.h b/src/test/jtx/domain.h index b7199a843c..cb67ce3622 100644 --- a/src/test/jtx/domain.h +++ b/src/test/jtx/domain.h @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -23,4 +23,4 @@ public: } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/envconfig.h b/src/test/jtx/envconfig.h index efc1c50901..e71a950b7d 100644 --- a/src/test/jtx/envconfig.h +++ b/src/test/jtx/envconfig.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { // frequently used macros defined here for convinience. @@ -44,7 +44,7 @@ envconfig() /// /// @param modfunc callable function or lambda to modify the default config. /// The first argument to the function must be std::unique_ptr to -/// ripple::Config. The function takes ownership of the unique_ptr and +/// xrpl::Config. The function takes ownership of the unique_ptr and /// relinquishes ownership by returning a unique_ptr. /// /// @param args additional arguments that will be passed to @@ -115,6 +115,6 @@ makeConfig( } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/escrow.h b/src/test/jtx/escrow.h index d0d066c2d4..b8490d9534 100644 --- a/src/test/jtx/escrow.h +++ b/src/test/jtx/escrow.h @@ -9,7 +9,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -90,6 +90,6 @@ auto const fulfillment = JTxFieldWrapper(sfFulfillment); } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/fee.h b/src/test/jtx/fee.h index 17269b1a38..1b3a6ac49c 100644 --- a/src/test/jtx/fee.h +++ b/src/test/jtx/fee.h @@ -9,7 +9,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -51,6 +51,6 @@ public: } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/flags.h b/src/test/jtx/flags.h index 7b6be9fe22..6b8c230a79 100644 --- a/src/test/jtx/flags.h +++ b/src/test/jtx/flags.h @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { class flags_helper @@ -140,6 +140,6 @@ public: } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/impl/AMM.cpp b/src/test/jtx/impl/AMM.cpp index 50d1903578..3fa5a16067 100644 --- a/src/test/jtx/impl/AMM.cpp +++ b/src/test/jtx/impl/AMM.cpp @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -59,7 +59,7 @@ AMM::AMM( , msig_(ms) , fee_(fee) , ammAccount_(create(tfee, flags, seq, ter)) - , lptIssue_(ripple::ammLPTIssue( + , lptIssue_(xrpl::ammLPTIssue( asset1_.issue().currency, asset2_.issue().currency, ammAccount_)) @@ -832,4 +832,4 @@ ammClawback( } // namespace amm } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/AMMTest.cpp b/src/test/jtx/impl/AMMTest.cpp index dbb549f883..e826acada7 100644 --- a/src/test/jtx/impl/AMMTest.cpp +++ b/src/test/jtx/impl/AMMTest.cpp @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -280,4 +280,4 @@ AMMTest::find_paths( } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/Account.cpp b/src/test/jtx/impl/Account.cpp index 6cab28245d..232c9d4e6c 100644 --- a/src/test/jtx/impl/Account.cpp +++ b/src/test/jtx/impl/Account.cpp @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -85,4 +85,4 @@ Account::operator[](std::string const& s) const } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/Env.cpp b/src/test/jtx/impl/Env.cpp index 2ef7879c97..273605ba75 100644 --- a/src/test/jtx/impl/Env.cpp +++ b/src/test/jtx/impl/Env.cpp @@ -28,7 +28,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -670,4 +670,4 @@ Env::disableFeature(uint256 const feature) } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/JSONRPCClient.cpp b/src/test/jtx/impl/JSONRPCClient.cpp index 7374128e02..df41ed39be 100644 --- a/src/test/jtx/impl/JSONRPCClient.cpp +++ b/src/test/jtx/impl/JSONRPCClient.cpp @@ -14,7 +14,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { class JSONRPCClient : public AbstractClient @@ -147,4 +147,4 @@ makeJSONRPCClient(Config const& cfg, unsigned rpc_version) } } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/Oracle.cpp b/src/test/jtx/impl/Oracle.cpp index 4c5fab3b61..b81aa9cd22 100644 --- a/src/test/jtx/impl/Oracle.cpp +++ b/src/test/jtx/impl/Oracle.cpp @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { namespace oracle { @@ -358,4 +358,4 @@ validDocumentID(AnyValue const& v) } // namespace oracle } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/TestHelpers.cpp b/src/test/jtx/impl/TestHelpers.cpp index 9ea3e8fb03..533447d184 100644 --- a/src/test/jtx/impl/TestHelpers.cpp +++ b/src/test/jtx/impl/TestHelpers.cpp @@ -4,7 +4,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -358,4 +358,4 @@ allpe(AccountID const& a, Issue const& iss) } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/WSClient.cpp b/src/test/jtx/impl/WSClient.cpp index 5f9f123f81..878846b41d 100644 --- a/src/test/jtx/impl/WSClient.cpp +++ b/src/test/jtx/impl/WSClient.cpp @@ -16,7 +16,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class WSClientImpl : public WSClient @@ -311,4 +311,4 @@ makeWSClient( } } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/account_txn_id.cpp b/src/test/jtx/impl/account_txn_id.cpp index e2c05b4bc7..ceda6e7b50 100644 --- a/src/test/jtx/impl/account_txn_id.cpp +++ b/src/test/jtx/impl/account_txn_id.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -13,4 +13,4 @@ account_txn_id::operator()(Env&, JTx& jt) const } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/acctdelete.cpp b/src/test/jtx/impl/acctdelete.cpp index ab613671da..47ee1c39a6 100644 --- a/src/test/jtx/impl/acctdelete.cpp +++ b/src/test/jtx/impl/acctdelete.cpp @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -42,4 +42,4 @@ incLgrSeqForAccDel(jtx::Env& env, jtx::Account const& acc, std::uint32_t margin) } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/amount.cpp b/src/test/jtx/impl/amount.cpp index 08836e4aa3..2548a4423b 100644 --- a/src/test/jtx/impl/amount.cpp +++ b/src/test/jtx/impl/amount.cpp @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -115,4 +115,4 @@ any_t const any{}; } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/attester.cpp b/src/test/jtx/impl/attester.cpp index 2937aca785..1d00767f0c 100644 --- a/src/test/jtx/impl/attester.cpp +++ b/src/test/jtx/impl/attester.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -59,4 +59,4 @@ sign_create_account_attestation( } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/balance.cpp b/src/test/jtx/impl/balance.cpp index e3ab97950b..4449be223c 100644 --- a/src/test/jtx/impl/balance.cpp +++ b/src/test/jtx/impl/balance.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -74,4 +74,4 @@ balance::operator()(Env& env) const } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/batch.cpp b/src/test/jtx/impl/batch.cpp index b728ff391b..e0a52d0218 100644 --- a/src/test/jtx/impl/batch.cpp +++ b/src/test/jtx/impl/batch.cpp @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -81,7 +81,7 @@ sig::operator()(Env& env, JTx& jt) const Serializer msg; serializeBatch(msg, stx.getFlags(), stx.getBatchTransactionIDs()); - auto const sig = ripple::sign( + auto const sig = xrpl::sign( *publicKeyType(e.sig.pk().slice()), e.sig.sk(), msg.slice()); jo[sfTxnSignature.getJsonName()] = strHex(Slice{sig.data(), sig.size()}); @@ -121,7 +121,7 @@ msig::operator()(Env& env, JTx& jt) const Serializer msg; serializeBatch(msg, stx.getFlags(), stx.getBatchTransactionIDs()); finishMultiSigningData(e.acct.id(), msg); - auto const sig = ripple::sign( + auto const sig = xrpl::sign( *publicKeyType(e.sig.pk().slice()), e.sig.sk(), msg.slice()); iso[sfTxnSignature.getJsonName()] = strHex(Slice{sig.data(), sig.size()}); @@ -132,4 +132,4 @@ msig::operator()(Env& env, JTx& jt) const } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/check.cpp b/src/test/jtx/impl/check.cpp index f9de30a8ed..769771861d 100644 --- a/src/test/jtx/impl/check.cpp +++ b/src/test/jtx/impl/check.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -51,4 +51,4 @@ cancel(jtx::Account const& dest, uint256 const& checkId) } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/creds.cpp b/src/test/jtx/impl/creds.cpp index b5b65c4445..f93d951e48 100644 --- a/src/test/jtx/impl/creds.cpp +++ b/src/test/jtx/impl/creds.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -84,4 +84,4 @@ ledgerEntry(jtx::Env& env, std::string const& credIdx) } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/delegate.cpp b/src/test/jtx/impl/delegate.cpp index 62407776c4..7cca9aa738 100644 --- a/src/test/jtx/impl/delegate.cpp +++ b/src/test/jtx/impl/delegate.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -45,4 +45,4 @@ entry(jtx::Env& env, jtx::Account const& account, jtx::Account const& authorize) } // namespace delegate } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/delivermin.cpp b/src/test/jtx/impl/delivermin.cpp index 7ddccc9c91..5ad98edd09 100644 --- a/src/test/jtx/impl/delivermin.cpp +++ b/src/test/jtx/impl/delivermin.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -14,4 +14,4 @@ delivermin::operator()(Env& env, JTx& jt) const } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/deposit.cpp b/src/test/jtx/impl/deposit.cpp index ba947f48fb..7a49bee06a 100644 --- a/src/test/jtx/impl/deposit.cpp +++ b/src/test/jtx/impl/deposit.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -74,4 +74,4 @@ unauthCredentials( } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/dids.cpp b/src/test/jtx/impl/dids.cpp index 6257a0cddb..bb782bcd43 100644 --- a/src/test/jtx/impl/dids.cpp +++ b/src/test/jtx/impl/dids.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -43,4 +43,4 @@ del(jtx::Account const& account) } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/directory.cpp b/src/test/jtx/impl/directory.cpp index 275ce2c7b3..bb44b8d782 100644 --- a/src/test/jtx/impl/directory.cpp +++ b/src/test/jtx/impl/directory.cpp @@ -2,7 +2,7 @@ #include -namespace ripple::test::jtx { +namespace xrpl::test::jtx { /** Directory operations. */ namespace directory { @@ -123,4 +123,4 @@ adjustOwnerNode(ApplyView& view, uint256 key, std::uint64_t page) } // namespace directory -} // namespace ripple::test::jtx +} // namespace xrpl::test::jtx diff --git a/src/test/jtx/impl/domain.cpp b/src/test/jtx/impl/domain.cpp index d186fb950c..91568783d2 100644 --- a/src/test/jtx/impl/domain.cpp +++ b/src/test/jtx/impl/domain.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -14,4 +14,4 @@ domain::operator()(Env&, JTx& jt) const } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/envconfig.cpp b/src/test/jtx/impl/envconfig.cpp index 8cf416a4c5..67bbe3b457 100644 --- a/src/test/jtx/impl/envconfig.cpp +++ b/src/test/jtx/impl/envconfig.cpp @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { std::atomic envUseIPv4{false}; @@ -156,4 +156,4 @@ makeConfig( } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/escrow.cpp b/src/test/jtx/impl/escrow.cpp index 742bea6afa..067c304178 100644 --- a/src/test/jtx/impl/escrow.cpp +++ b/src/test/jtx/impl/escrow.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -51,7 +51,7 @@ rate(Env& env, Account const& account, std::uint32_t const& seq) { auto const sle = env.le(keylet::escrow(account.id(), seq)); if (sle->isFieldPresent(sfTransferRate)) - return ripple::Rate((*sle)[sfTransferRate]); + return xrpl::Rate((*sle)[sfTransferRate]); return Rate{0}; } @@ -60,4 +60,4 @@ rate(Env& env, Account const& account, std::uint32_t const& seq) } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/fee.cpp b/src/test/jtx/impl/fee.cpp index 8ce1dda6af..2b1ac6c398 100644 --- a/src/test/jtx/impl/fee.cpp +++ b/src/test/jtx/impl/fee.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -21,4 +21,4 @@ fee::operator()(Env& env, JTx& jt) const } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/flags.cpp b/src/test/jtx/impl/flags.cpp index 8ee7e4cffa..11e7831f55 100644 --- a/src/test/jtx/impl/flags.cpp +++ b/src/test/jtx/impl/flags.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -45,4 +45,4 @@ nflags::operator()(Env& env) const } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/invoice_id.cpp b/src/test/jtx/impl/invoice_id.cpp index 47eff96cb2..6d6dae0fbf 100644 --- a/src/test/jtx/impl/invoice_id.cpp +++ b/src/test/jtx/impl/invoice_id.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -13,4 +13,4 @@ invoice_id::operator()(Env&, JTx& jt) const } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/jtx_json.cpp b/src/test/jtx/impl/jtx_json.cpp index 1e39ec2dda..c39503d038 100644 --- a/src/test/jtx/impl/jtx_json.cpp +++ b/src/test/jtx/impl/jtx_json.cpp @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -32,4 +32,4 @@ json::operator()(Env&, JTx& jt) const } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/last_ledger_sequence.cpp b/src/test/jtx/impl/last_ledger_sequence.cpp index 1a00f7d4d9..5f29282ad6 100644 --- a/src/test/jtx/impl/last_ledger_sequence.cpp +++ b/src/test/jtx/impl/last_ledger_sequence.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -12,4 +12,4 @@ last_ledger_seq::operator()(Env&, JTx& jt) const } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/ledgerStateFixes.cpp b/src/test/jtx/impl/ledgerStateFixes.cpp index 704da218e8..f1e6b6eda1 100644 --- a/src/test/jtx/impl/ledgerStateFixes.cpp +++ b/src/test/jtx/impl/ledgerStateFixes.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -27,4 +27,4 @@ nftPageLinks(jtx::Account const& acct, jtx::Account const& owner) } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/memo.cpp b/src/test/jtx/impl/memo.cpp index 10bcede507..c815b916d7 100644 --- a/src/test/jtx/impl/memo.cpp +++ b/src/test/jtx/impl/memo.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -81,4 +81,4 @@ memontype::operator()(Env&, JTx& jt) const } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/mpt.cpp b/src/test/jtx/impl/mpt.cpp index ca6c4c6cd5..b653b3cdeb 100644 --- a/src/test/jtx/impl/mpt.cpp +++ b/src/test/jtx/impl/mpt.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -452,7 +452,7 @@ MPTTester::mpt(std::int64_t amount) const { if (!id_) Throw("MPT has not been created"); - return ripple::test::jtx::MPT(issuer_.name(), *id_)(amount); + return xrpl::test::jtx::MPT(issuer_.name(), *id_)(amount); } std::int64_t @@ -495,4 +495,4 @@ MPTTester::operator[](std::string const& name) const } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/multisign.cpp b/src/test/jtx/impl/multisign.cpp index 68662b114b..61af11fb3a 100644 --- a/src/test/jtx/impl/multisign.cpp +++ b/src/test/jtx/impl/multisign.cpp @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -78,7 +78,7 @@ msig::operator()(Env& env, JTx& jt) const jo[jss::SigningPubKey] = strHex(e.sig.pk().slice()); Serializer ss{buildMultiSigningData(*st, e.acct.id())}; - auto const sig = ripple::sign( + auto const sig = xrpl::sign( *publicKeyType(e.sig.pk().slice()), e.sig.sk(), ss.slice()); jo[sfTxnSignature.getJsonName()] = strHex(Slice{sig.data(), sig.size()}); @@ -92,4 +92,4 @@ msig::operator()(Env& env, JTx& jt) const } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/offer.cpp b/src/test/jtx/impl/offer.cpp index 69ee933049..251b659f3b 100644 --- a/src/test/jtx/impl/offer.cpp +++ b/src/test/jtx/impl/offer.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -35,4 +35,4 @@ offer_cancel(Account const& account, std::uint32_t offerSeq) } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/owners.cpp b/src/test/jtx/impl/owners.cpp index b3690563d2..ad449dab93 100644 --- a/src/test/jtx/impl/owners.cpp +++ b/src/test/jtx/impl/owners.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { namespace detail { std::uint32_t @@ -38,4 +38,4 @@ owners::operator()(Env& env) const } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/paths.cpp b/src/test/jtx/impl/paths.cpp index 37b59773c0..fd93ebd841 100644 --- a/src/test/jtx/impl/paths.cpp +++ b/src/test/jtx/impl/paths.cpp @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -98,4 +98,4 @@ path::operator()(Env& env, JTx& jt) const } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/pay.cpp b/src/test/jtx/impl/pay.cpp index 750a3f2abf..9e927c6270 100644 --- a/src/test/jtx/impl/pay.cpp +++ b/src/test/jtx/impl/pay.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -27,4 +27,4 @@ pay(Account const& account, Account const& to, AnyAmount amount) } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/permissioned_dex.cpp b/src/test/jtx/impl/permissioned_dex.cpp index 46c7a58689..87b7896663 100644 --- a/src/test/jtx/impl/permissioned_dex.cpp +++ b/src/test/jtx/impl/permissioned_dex.cpp @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -63,4 +63,4 @@ PermissionedDEX::PermissionedDEX(Env& env) } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/permissioned_domains.cpp b/src/test/jtx/impl/permissioned_domains.cpp index c57bde620e..aac9dcc05f 100644 --- a/src/test/jtx/impl/permissioned_domains.cpp +++ b/src/test/jtx/impl/permissioned_domains.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { namespace pdomain { @@ -158,4 +158,4 @@ getNewDomain(std::shared_ptr const& meta) } // namespace pdomain } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/quality2.cpp b/src/test/jtx/impl/quality2.cpp index dd2c900389..c202592b9d 100644 --- a/src/test/jtx/impl/quality2.cpp +++ b/src/test/jtx/impl/quality2.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -51,4 +51,4 @@ qualityOutPercent::operator()(Env&, JTx& jt) const } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/rate.cpp b/src/test/jtx/impl/rate.cpp index 14901e37e4..b4e9b2cb60 100644 --- a/src/test/jtx/impl/rate.cpp +++ b/src/test/jtx/impl/rate.cpp @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -23,4 +23,4 @@ rate(Account const& account, double multiplier) } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/regkey.cpp b/src/test/jtx/impl/regkey.cpp index 72d7331ce6..a2e2198eee 100644 --- a/src/test/jtx/impl/regkey.cpp +++ b/src/test/jtx/impl/regkey.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -27,4 +27,4 @@ regkey(Account const& account, Account const& signer) } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/sendmax.cpp b/src/test/jtx/impl/sendmax.cpp index 4a920f5be0..f117458cfa 100644 --- a/src/test/jtx/impl/sendmax.cpp +++ b/src/test/jtx/impl/sendmax.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -14,4 +14,4 @@ sendmax::operator()(Env& env, JTx& jt) const } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/seq.cpp b/src/test/jtx/impl/seq.cpp index c127029def..99c6ddbf0d 100644 --- a/src/test/jtx/impl/seq.cpp +++ b/src/test/jtx/impl/seq.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -18,4 +18,4 @@ seq::operator()(Env&, JTx& jt) const } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/sig.cpp b/src/test/jtx/impl/sig.cpp index 6d8a0b42c7..3ea7f669a7 100644 --- a/src/test/jtx/impl/sig.cpp +++ b/src/test/jtx/impl/sig.cpp @@ -1,7 +1,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -31,4 +31,4 @@ sig::operator()(Env&, JTx& jt) const } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/tag.cpp b/src/test/jtx/impl/tag.cpp index f9a6128c54..8321322f75 100644 --- a/src/test/jtx/impl/tag.cpp +++ b/src/test/jtx/impl/tag.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -18,4 +18,4 @@ stag::operator()(Env&, JTx& jt) const } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/ticket.cpp b/src/test/jtx/impl/ticket.cpp index 60318469fb..2cb1826bbb 100644 --- a/src/test/jtx/impl/ticket.cpp +++ b/src/test/jtx/impl/ticket.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -30,4 +30,4 @@ use::operator()(Env&, JTx& jt) const } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/token.cpp b/src/test/jtx/impl/token.cpp index 7b457d3daa..40bdd14229 100644 --- a/src/test/jtx/impl/token.cpp +++ b/src/test/jtx/impl/token.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { namespace token { @@ -76,7 +76,7 @@ getID( ->at(~sfFirstNFTokenSequence) .value_or(env.seq(issuer)); } - return ripple::NFTokenMint::createNFTokenID( + return xrpl::NFTokenMint::createNFTokenID( flags, xferFee, issuer, nft::toTaxon(nfTokenTaxon), nftSeq); } @@ -227,4 +227,4 @@ modify(jtx::Account const& account, uint256 const& nftokenID) } // namespace token } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/trust.cpp b/src/test/jtx/impl/trust.cpp index d53f87773c..a553efa7f2 100644 --- a/src/test/jtx/impl/trust.cpp +++ b/src/test/jtx/impl/trust.cpp @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -65,4 +65,4 @@ claw( } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/txflags.cpp b/src/test/jtx/impl/txflags.cpp index a7f69116d5..7b49f9380b 100644 --- a/src/test/jtx/impl/txflags.cpp +++ b/src/test/jtx/impl/txflags.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -14,4 +14,4 @@ txflags::operator()(Env&, JTx& jt) const } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/utility.cpp b/src/test/jtx/impl/utility.cpp index 92f7b16c8d..81bce576ce 100644 --- a/src/test/jtx/impl/utility.cpp +++ b/src/test/jtx/impl/utility.cpp @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -31,7 +31,7 @@ sign(Json::Value& jv, Account const& account, Json::Value& sigObject) Serializer ss; ss.add32(HashPrefix::txSign); parse(jv).addWithoutSigningFields(ss); - auto const sig = ripple::sign(account.pk(), account.sk(), ss.slice()); + auto const sig = xrpl::sign(account.pk(), account.sk(), ss.slice()); sigObject[jss::TxnSignature] = strHex(Slice{sig.data(), sig.size()}); } @@ -97,4 +97,4 @@ cmdToJSONRPC( } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/vault.cpp b/src/test/jtx/impl/vault.cpp index 8ec4422977..a1ad503f2f 100644 --- a/src/test/jtx/impl/vault.cpp +++ b/src/test/jtx/impl/vault.cpp @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -82,4 +82,4 @@ Vault::clawback(ClawbackArgs const& args) } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/impl/xchain_bridge.cpp b/src/test/jtx/impl/xchain_bridge.cpp index 5cfb6e4a11..cc6be6c737 100644 --- a/src/test/jtx/impl/xchain_bridge.cpp +++ b/src/test/jtx/impl/xchain_bridge.cpp @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -486,4 +486,4 @@ XChainBridgeObjects::createBridgeObjects(Env& mcEnv, Env& scEnv) } } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/invoice_id.h b/src/test/jtx/invoice_id.h index 492bb4a500..bdf1aa4250 100644 --- a/src/test/jtx/invoice_id.h +++ b/src/test/jtx/invoice_id.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -22,5 +22,5 @@ public: }; } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/jtx_json.h b/src/test/jtx/jtx_json.h index 4334db58f8..32fd3c8d30 100644 --- a/src/test/jtx/jtx_json.h +++ b/src/test/jtx/jtx_json.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -40,6 +40,6 @@ public: } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/last_ledger_sequence.h b/src/test/jtx/last_ledger_sequence.h index 59e4b9f401..6544294bd6 100644 --- a/src/test/jtx/last_ledger_sequence.h +++ b/src/test/jtx/last_ledger_sequence.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -23,6 +23,6 @@ public: } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/ledgerStateFix.h b/src/test/jtx/ledgerStateFix.h index c1ab04f249..f93c1bc3d8 100644 --- a/src/test/jtx/ledgerStateFix.h +++ b/src/test/jtx/ledgerStateFix.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -20,6 +20,6 @@ nftPageLinks(jtx::Account const& acct, jtx::Account const& owner); } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/memo.h b/src/test/jtx/memo.h index 4a1990e079..377dcbec4e 100644 --- a/src/test/jtx/memo.h +++ b/src/test/jtx/memo.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -124,6 +124,6 @@ public: } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/mpt.h b/src/test/jtx/mpt.h index 85c842737c..bef3bba179 100644 --- a/src/test/jtx/mpt.h +++ b/src/test/jtx/mpt.h @@ -8,7 +8,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -255,6 +255,6 @@ private: } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/multisign.h b/src/test/jtx/multisign.h index 68dc35442b..8582b27a77 100644 --- a/src/test/jtx/multisign.h +++ b/src/test/jtx/multisign.h @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -118,6 +118,6 @@ using siglists = owner_count; } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/noop.h b/src/test/jtx/noop.h index 70be63052a..3ef3a57c4b 100644 --- a/src/test/jtx/noop.h +++ b/src/test/jtx/noop.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -16,6 +16,6 @@ noop(Account const& account) } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/offer.h b/src/test/jtx/offer.h index 45dd358375..8b01a9381b 100644 --- a/src/test/jtx/offer.h +++ b/src/test/jtx/offer.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -24,6 +24,6 @@ offer_cancel(Account const& account, std::uint32_t offerSeq); } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/owners.h b/src/test/jtx/owners.h index 326835d507..fabaa148e4 100644 --- a/src/test/jtx/owners.h +++ b/src/test/jtx/owners.h @@ -9,7 +9,7 @@ #include -namespace ripple { +namespace xrpl { namespace detail { @@ -74,6 +74,6 @@ using offers = owner_count; } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/paths.h b/src/test/jtx/paths.h index 2ea4b623fc..b603db3f7b 100644 --- a/src/test/jtx/paths.h +++ b/src/test/jtx/paths.h @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -94,6 +94,6 @@ path::append(T const& t, Args const&... args) } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/pay.h b/src/test/jtx/pay.h index 6ebcd25b0c..4ef13d72a3 100644 --- a/src/test/jtx/pay.h +++ b/src/test/jtx/pay.h @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -18,6 +18,6 @@ pay(Account const& account, Account const& to, AnyAmount amount); } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/permissioned_dex.h b/src/test/jtx/permissioned_dex.h index b5c81a83ea..2023342ded 100644 --- a/src/test/jtx/permissioned_dex.h +++ b/src/test/jtx/permissioned_dex.h @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -31,4 +31,4 @@ public: } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/jtx/permissioned_domains.h b/src/test/jtx/permissioned_domains.h index 1cb81005c1..c0adacd0c5 100644 --- a/src/test/jtx/permissioned_domains.h +++ b/src/test/jtx/permissioned_domains.h @@ -5,13 +5,13 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { namespace pdomain { // Helpers for PermissionedDomains testing -using Credential = ripple::test::jtx::deposit::AuthorizeCredentials; +using Credential = xrpl::test::jtx::deposit::AuthorizeCredentials; using Credentials = std::vector; // helpers @@ -51,6 +51,6 @@ getNewDomain(std::shared_ptr const& meta); } // namespace pdomain } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/prop.h b/src/test/jtx/prop.h index 67a8e3f45c..3478e23d9b 100644 --- a/src/test/jtx/prop.h +++ b/src/test/jtx/prop.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -30,6 +30,6 @@ struct prop } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/quality.h b/src/test/jtx/quality.h index c05ccb0404..c112ad9934 100644 --- a/src/test/jtx/quality.h +++ b/src/test/jtx/quality.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -65,6 +65,6 @@ public: } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/rate.h b/src/test/jtx/rate.h index 1f0abd3e46..2ed8cec6f2 100644 --- a/src/test/jtx/rate.h +++ b/src/test/jtx/rate.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -15,6 +15,6 @@ rate(Account const& account, double multiplier); } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/regkey.h b/src/test/jtx/regkey.h index 3f9d10596c..b3ab9a0ed9 100644 --- a/src/test/jtx/regkey.h +++ b/src/test/jtx/regkey.h @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -20,6 +20,6 @@ regkey(Account const& account, Account const& signer); } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/require.h b/src/test/jtx/require.h index 3538df2cbc..21ff8a29ec 100644 --- a/src/test/jtx/require.h +++ b/src/test/jtx/require.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { @@ -63,6 +63,6 @@ public: } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/requires.h b/src/test/jtx/requires.h index 4e330c63cc..379c5ad67d 100644 --- a/src/test/jtx/requires.h +++ b/src/test/jtx/requires.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -15,6 +15,6 @@ using requires_t = std::vector; } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/rpc.h b/src/test/jtx/rpc.h index a525b04e6b..5a7c205aac 100644 --- a/src/test/jtx/rpc.h +++ b/src/test/jtx/rpc.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -63,6 +63,6 @@ public: } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/sendmax.h b/src/test/jtx/sendmax.h index f1cc0b2d8c..9082ef9ddd 100644 --- a/src/test/jtx/sendmax.h +++ b/src/test/jtx/sendmax.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -26,6 +26,6 @@ public: } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/seq.h b/src/test/jtx/seq.h index 6e174b5f97..102961db0e 100644 --- a/src/test/jtx/seq.h +++ b/src/test/jtx/seq.h @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -36,6 +36,6 @@ public: } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/sig.h b/src/test/jtx/sig.h index 1b21607d4d..27d18b322e 100644 --- a/src/test/jtx/sig.h +++ b/src/test/jtx/sig.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -60,6 +60,6 @@ public: } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/tag.h b/src/test/jtx/tag.h index 586eae1f27..688d2e92c1 100644 --- a/src/test/jtx/tag.h +++ b/src/test/jtx/tag.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -41,6 +41,6 @@ public: } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/tags.h b/src/test/jtx/tags.h index 631d40bb89..445bdebcb4 100644 --- a/src/test/jtx/tags.h +++ b/src/test/jtx/tags.h @@ -1,7 +1,7 @@ #ifndef XRPL_TEST_JTX_TAGS_H_INCLUDED #define XRPL_TEST_JTX_TAGS_H_INCLUDED -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -43,6 +43,6 @@ static increment_t const increment; } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/ter.h b/src/test/jtx/ter.h index 9200b2a265..f13c2a90e6 100644 --- a/src/test/jtx/ter.h +++ b/src/test/jtx/ter.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -35,6 +35,6 @@ public: } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/ticket.h b/src/test/jtx/ticket.h index 881757df5c..10cb772bbd 100644 --- a/src/test/jtx/ticket.h +++ b/src/test/jtx/ticket.h @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -47,6 +47,6 @@ using tickets = owner_count; } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/token.h b/src/test/jtx/token.h index 0f5921d080..5280799582 100644 --- a/src/test/jtx/token.h +++ b/src/test/jtx/token.h @@ -9,7 +9,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -227,6 +227,6 @@ modify(jtx::Account const& account, uint256 const& nftokenID); } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif // XRPL_TEST_JTX_NFT_H_INCLUDED diff --git a/src/test/jtx/trust.h b/src/test/jtx/trust.h index 667ecc9c2e..69a3e7ba53 100644 --- a/src/test/jtx/trust.h +++ b/src/test/jtx/trust.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -30,6 +30,6 @@ claw( } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/txflags.h b/src/test/jtx/txflags.h index 26a89c0f76..75a0d2740b 100644 --- a/src/test/jtx/txflags.h +++ b/src/test/jtx/txflags.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -24,6 +24,6 @@ public: } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/utility.h b/src/test/jtx/utility.h index 6c5c66d252..6ddd7befa0 100644 --- a/src/test/jtx/utility.h +++ b/src/test/jtx/utility.h @@ -11,7 +11,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -61,6 +61,6 @@ cmdToJSONRPC( } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/vault.h b/src/test/jtx/vault.h index 5ffcd620c1..485940f9f4 100644 --- a/src/test/jtx/vault.h +++ b/src/test/jtx/vault.h @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -85,6 +85,6 @@ struct Vault } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/jtx/xchain_bridge.h b/src/test/jtx/xchain_bridge.h index be5e4b4a5f..dfd6073ca4 100644 --- a/src/test/jtx/xchain_bridge.h +++ b/src/test/jtx/xchain_bridge.h @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { @@ -237,6 +237,6 @@ struct XChainBridgeObjects } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/ledger/BookDirs_test.cpp b/src/test/ledger/BookDirs_test.cpp index 7157d17301..1b94798a5b 100644 --- a/src/test/ledger/BookDirs_test.cpp +++ b/src/test/ledger/BookDirs_test.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { struct BookDirs_test : public beast::unit_test::suite @@ -94,4 +94,4 @@ struct BookDirs_test : public beast::unit_test::suite BEAST_DEFINE_TESTSUITE(BookDirs, ledger, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/ledger/Directory_test.cpp b/src/test/ledger/Directory_test.cpp index b927103f8f..fbc9cd6096 100644 --- a/src/test/ledger/Directory_test.cpp +++ b/src/test/ledger/Directory_test.cpp @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { struct Directory_test : public beast::unit_test::suite @@ -574,4 +574,4 @@ struct Directory_test : public beast::unit_test::suite BEAST_DEFINE_TESTSUITE_PRIO(Directory, ledger, ripple, 1); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/ledger/PaymentSandbox_test.cpp b/src/test/ledger/PaymentSandbox_test.cpp index 200aac76e2..c097aa3458 100644 --- a/src/test/ledger/PaymentSandbox_test.cpp +++ b/src/test/ledger/PaymentSandbox_test.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class PaymentSandbox_test : public beast::unit_test::suite @@ -409,4 +409,4 @@ public: BEAST_DEFINE_TESTSUITE(PaymentSandbox, ledger, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/ledger/PendingSaves_test.cpp b/src/test/ledger/PendingSaves_test.cpp index 95b1cc8ab7..b1d00aa579 100644 --- a/src/test/ledger/PendingSaves_test.cpp +++ b/src/test/ledger/PendingSaves_test.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { struct PendingSaves_test : public beast::unit_test::suite @@ -43,4 +43,4 @@ struct PendingSaves_test : public beast::unit_test::suite BEAST_DEFINE_TESTSUITE(PendingSaves, ledger, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/ledger/SkipList_test.cpp b/src/test/ledger/SkipList_test.cpp index b84f002503..b172b8a924 100644 --- a/src/test/ledger/SkipList_test.cpp +++ b/src/test/ledger/SkipList_test.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class SkipList_test : public beast::unit_test::suite @@ -87,4 +87,4 @@ class SkipList_test : public beast::unit_test::suite BEAST_DEFINE_TESTSUITE(SkipList, ledger, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/ledger/View_test.cpp b/src/test/ledger/View_test.cpp index b7dbf4ec9e..8e4e8f103d 100644 --- a/src/test/ledger/View_test.cpp +++ b/src/test/ledger/View_test.cpp @@ -11,7 +11,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { class View_test : public beast::unit_test::suite @@ -1149,4 +1149,4 @@ BEAST_DEFINE_TESTSUITE(View, ledger, ripple); BEAST_DEFINE_TESTSUITE(GetAmendments, ledger, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/nodestore/Backend_test.cpp b/src/test/nodestore/Backend_test.cpp index b65c138305..8631b1951d 100644 --- a/src/test/nodestore/Backend_test.cpp +++ b/src/test/nodestore/Backend_test.cpp @@ -9,7 +9,7 @@ #include -namespace ripple { +namespace xrpl { namespace NodeStore { @@ -104,4 +104,4 @@ public: BEAST_DEFINE_TESTSUITE(Backend, nodestore, ripple); } // namespace NodeStore -} // namespace ripple +} // namespace xrpl diff --git a/src/test/nodestore/Basics_test.cpp b/src/test/nodestore/Basics_test.cpp index 350c44ec5d..78052e44f0 100644 --- a/src/test/nodestore/Basics_test.cpp +++ b/src/test/nodestore/Basics_test.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace NodeStore { // Tests predictable batches, and NodeObject blob encoding @@ -69,4 +69,4 @@ public: BEAST_DEFINE_TESTSUITE(NodeStoreBasic, nodestore, ripple); } // namespace NodeStore -} // namespace ripple +} // namespace xrpl diff --git a/src/test/nodestore/Database_test.cpp b/src/test/nodestore/Database_test.cpp index 0efb1e7ba1..e86f9b35ae 100644 --- a/src/test/nodestore/Database_test.cpp +++ b/src/test/nodestore/Database_test.cpp @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace NodeStore { @@ -28,8 +28,8 @@ public: { testcase("Config"); - using namespace ripple::test; - using namespace ripple::test::jtx; + using namespace xrpl::test; + using namespace xrpl::test::jtx; auto const integrityWarning = "reducing the data integrity guarantees from the " @@ -749,4 +749,4 @@ public: BEAST_DEFINE_TESTSUITE(Database, nodestore, ripple); } // namespace NodeStore -} // namespace ripple +} // namespace xrpl diff --git a/src/test/nodestore/NuDBFactory_test.cpp b/src/test/nodestore/NuDBFactory_test.cpp index 951af7dd5b..142bc7ec8a 100644 --- a/src/test/nodestore/NuDBFactory_test.cpp +++ b/src/test/nodestore/NuDBFactory_test.cpp @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace NodeStore { class NuDBFactory_test : public TestBase @@ -455,4 +455,4 @@ public: BEAST_DEFINE_TESTSUITE(NuDBFactory, ripple_core, ripple); } // namespace NodeStore -} // namespace ripple +} // namespace xrpl diff --git a/src/test/nodestore/TestBase.h b/src/test/nodestore/TestBase.h index c1401abc33..f018fa0a11 100644 --- a/src/test/nodestore/TestBase.h +++ b/src/test/nodestore/TestBase.h @@ -14,7 +14,7 @@ #include -namespace ripple { +namespace xrpl { namespace NodeStore { /** Binary function that satisfies the strict-weak-ordering requirement. @@ -209,6 +209,6 @@ public: }; } // namespace NodeStore -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/nodestore/Timing_test.cpp b/src/test/nodestore/Timing_test.cpp index e6238925bb..585e1d9719 100644 --- a/src/test/nodestore/Timing_test.cpp +++ b/src/test/nodestore/Timing_test.cpp @@ -27,7 +27,7 @@ #define NODESTORE_TIMING_DO_VERIFY 0 #endif -namespace ripple { +namespace xrpl { namespace NodeStore { std::unique_ptr @@ -762,4 +762,4 @@ public: BEAST_DEFINE_TESTSUITE_MANUAL_PRIO(Timing, nodestore, ripple, 1); } // namespace NodeStore -} // namespace ripple +} // namespace xrpl diff --git a/src/test/nodestore/import_test.cpp b/src/test/nodestore/import_test.cpp index 69ef50d453..15794e1050 100644 --- a/src/test/nodestore/import_test.cpp +++ b/src/test/nodestore/import_test.cpp @@ -40,7 +40,7 @@ multi(32gb): */ -namespace ripple { +namespace xrpl { namespace detail { @@ -537,4 +537,4 @@ BEAST_DEFINE_TESTSUITE_MANUAL(import, nodestore, ripple); //------------------------------------------------------------------------------ } // namespace NodeStore -} // namespace ripple +} // namespace xrpl diff --git a/src/test/nodestore/varint_test.cpp b/src/test/nodestore/varint_test.cpp index 148d593aae..bc9fd60492 100644 --- a/src/test/nodestore/varint_test.cpp +++ b/src/test/nodestore/varint_test.cpp @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace NodeStore { namespace tests { @@ -56,4 +56,4 @@ BEAST_DEFINE_TESTSUITE(varint, nodestore, ripple); } // namespace tests } // namespace NodeStore -} // namespace ripple +} // namespace xrpl diff --git a/src/test/overlay/ProtocolVersion_test.cpp b/src/test/overlay/ProtocolVersion_test.cpp index d6bbe6282a..a980cb3d16 100644 --- a/src/test/overlay/ProtocolVersion_test.cpp +++ b/src/test/overlay/ProtocolVersion_test.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { class ProtocolVersion_test : public beast::unit_test::suite { @@ -81,4 +81,4 @@ public: BEAST_DEFINE_TESTSUITE(ProtocolVersion, overlay, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/overlay/cluster_test.cpp b/src/test/overlay/cluster_test.cpp index e5fd20bc1b..af81bf6c54 100644 --- a/src/test/overlay/cluster_test.cpp +++ b/src/test/overlay/cluster_test.cpp @@ -6,10 +6,10 @@ #include #include -namespace ripple { +namespace xrpl { namespace tests { -class cluster_test : public ripple::TestSuite +class cluster_test : public xrpl::TestSuite { test::SuiteJournal journal_; @@ -251,4 +251,4 @@ public: BEAST_DEFINE_TESTSUITE(cluster, overlay, ripple); } // namespace tests -} // namespace ripple +} // namespace xrpl diff --git a/src/test/overlay/compression_test.cpp b/src/test/overlay/compression_test.cpp index 4cee6f8034..e96c7b41f1 100644 --- a/src/test/overlay/compression_test.cpp +++ b/src/test/overlay/compression_test.cpp @@ -30,17 +30,17 @@ #include -namespace ripple { +namespace xrpl { namespace test { -using namespace ripple::test; -using namespace ripple::test::jtx; +using namespace xrpl::test; +using namespace xrpl::test::jtx; static uint256 ledgerHash(LedgerInfo const& info) { - return ripple::sha512Half( + return xrpl::sha512Half( HashPrefix::ledgerMaster, std::uint32_t(info.seq), std::uint64_t(info.drops.drops()), @@ -92,8 +92,8 @@ public: } boost::system::error_code ec; - auto header = ripple::detail::parseMessageHeader( - ec, buffers.data(), buffer.size()); + auto header = + xrpl::detail::parseMessageHeader(ec, buffers.data(), buffer.size()); BEAST_EXPECT(header); @@ -109,7 +109,7 @@ public: ZeroCopyInputStream stream(buffers.data()); stream.Skip(header->header_size); - auto decompressedSize = ripple::compression::decompress( + auto decompressedSize = xrpl::compression::decompress( stream, header->payload_wire_size, decompressed.data(), @@ -121,7 +121,7 @@ public: proto1->ParseFromArray(decompressed.data(), decompressedSize)); auto uncompressed = m.getBuffer(Compressed::Off); BEAST_EXPECT(std::equal( - uncompressed.begin() + ripple::compression::headerBytes, + uncompressed.begin() + xrpl::compression::headerBytes, uncompressed.end(), decompressed.begin())); } @@ -223,10 +223,10 @@ public: auto getLedger = std::make_shared(); getLedger->set_itype(protocol::liTS_CANDIDATE); getLedger->set_ltype(protocol::TMLedgerType::ltACCEPTED); - uint256 const hash(ripple::sha512Half(123456789)); + uint256 const hash(xrpl::sha512Half(123456789)); getLedger->set_ledgerhash(hash.begin(), hash.size()); getLedger->set_ledgerseq(123456789); - ripple::SHAMapNodeID sha(64, hash); + xrpl::SHAMapNodeID sha(64, hash); getLedger->add_nodeids(sha.getRawString()); getLedger->set_requestcookie(123456789); getLedger->set_querytype(protocol::qtINDIRECT); @@ -238,7 +238,7 @@ public: buildLedgerData(uint32_t n, Logs& logs) { auto ledgerData = std::make_shared(); - uint256 const hash(ripple::sha512Half(12356789)); + uint256 const hash(xrpl::sha512Half(12356789)); ledgerData->set_ledgerhash(hash.data(), hash.size()); ledgerData->set_ledgerseq(123456789); ledgerData->set_type(protocol::TMLedgerInfoType::liAS_NODE); @@ -255,9 +255,9 @@ public: LedgerInfo info; info.seq = i; info.parentCloseTime = ct; - info.hash = ripple::sha512Half(i); - info.txHash = ripple::sha512Half(i + 1); - info.accountHash = ripple::sha512Half(i + 2); + info.hash = xrpl::sha512Half(i); + info.txHash = xrpl::sha512Half(i + 1); + info.accountHash = xrpl::sha512Half(i + 2); info.parentHash = parentHash; info.drops = XRPAmount(10); info.closeTimeResolution = resolution; @@ -265,7 +265,7 @@ public: ct += resolution; parentHash = ledgerHash(info); Serializer nData; - ripple::addRaw(info, nData); + xrpl::addRaw(info, nData); ledgerData->add_nodes()->set_nodedata( nData.getDataPtr(), nData.getLength()); } @@ -282,15 +282,15 @@ public: TMGetObjectByHash_ObjectType_otTRANSACTION); getObject->set_query(true); getObject->set_seq(123456789); - uint256 hash(ripple::sha512Half(123456789)); + uint256 hash(xrpl::sha512Half(123456789)); getObject->set_ledgerhash(hash.data(), hash.size()); getObject->set_fat(true); for (int i = 0; i < 100; i++) { - uint256 hash(ripple::sha512Half(i)); + uint256 hash(xrpl::sha512Half(i)); auto object = getObject->add_objects(); object->set_hash(hash.data(), hash.size()); - ripple::SHAMapNodeID sha(64, hash); + xrpl::SHAMapNodeID sha(64, hash); object->set_nodeid(sha.getRawString()); object->set_index(""); object->set_data(""); @@ -323,7 +323,7 @@ public: list->set_manifest(s.data(), s.size()); list->set_version(3); STObject signature(sfSignature); - ripple::sign( + xrpl::sign( st, HashPrefix::manifest, KeyType::ed25519, std::get<1>(signing)); Serializer s1; st.add(s1); @@ -356,7 +356,7 @@ public: list->set_manifest(s.data(), s.size()); list->set_version(4); STObject signature(sfSignature); - ripple::sign( + xrpl::sign( st, HashPrefix::manifest, KeyType::ed25519, std::get<1>(signing)); Serializer s1; st.add(s1); @@ -469,7 +469,7 @@ public: boost::asio::ip::make_address("172.1.1.100"); auto env = getEnv(outboundEnable); - auto request = ripple::makeRequest( + auto request = xrpl::makeRequest( true, env->app().config().COMPRESSION, false, @@ -489,7 +489,7 @@ public: env.reset(); env = getEnv(inboundEnable); - auto http_resp = ripple::makeResponse( + auto http_resp = xrpl::makeResponse( true, http_request, addr, @@ -521,4 +521,4 @@ public: BEAST_DEFINE_TESTSUITE_MANUAL(compression, overlay, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/overlay/handshake_test.cpp b/src/test/overlay/handshake_test.cpp index b3b7c261a7..5ec13326de 100644 --- a/src/test/overlay/handshake_test.cpp +++ b/src/test/overlay/handshake_test.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { @@ -43,4 +43,4 @@ public: BEAST_DEFINE_TESTSUITE(handshake, overlay, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/overlay/reduce_relay_test.cpp b/src/test/overlay/reduce_relay_test.cpp index 8447a9fc9f..2df78ae7fa 100644 --- a/src/test/overlay/reduce_relay_test.cpp +++ b/src/test/overlay/reduce_relay_test.cpp @@ -19,7 +19,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { @@ -1646,7 +1646,7 @@ vp_base_squelch_max_selected_peers=2 boost::asio::ip::make_address("172.1.1.100"); setEnv(outboundEnable); - auto request = ripple::makeRequest( + auto request = xrpl::makeRequest( true, env_.app().config().COMPRESSION, false, @@ -1665,7 +1665,7 @@ vp_base_squelch_max_selected_peers=2 BEAST_EXPECT(!(peerEnabled ^ inboundEnabled)); setEnv(inboundEnable); - auto http_resp = ripple::makeResponse( + auto http_resp = xrpl::makeResponse( true, http_request, addr, @@ -1741,4 +1741,4 @@ BEAST_DEFINE_TESTSUITE_MANUAL(reduce_relay_simulate, overlay, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/overlay/short_read_test.cpp b/src/test/overlay/short_read_test.cpp index 05193e525c..983df38a66 100644 --- a/src/test/overlay/short_read_test.cpp +++ b/src/test/overlay/short_read_test.cpp @@ -18,7 +18,7 @@ #include #include -namespace ripple { +namespace xrpl { /* Findings from the test: @@ -640,4 +640,4 @@ public: BEAST_DEFINE_TESTSUITE(short_read, overlay, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/overlay/traffic_count_test.cpp b/src/test/overlay/traffic_count_test.cpp index d8c5636b59..fe4261bbc1 100644 --- a/src/test/overlay/traffic_count_test.cpp +++ b/src/test/overlay/traffic_count_test.cpp @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { @@ -135,4 +135,4 @@ public: BEAST_DEFINE_TESTSUITE(traffic_count, overlay, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/overlay/tx_reduce_relay_test.cpp b/src/test/overlay/tx_reduce_relay_test.cpp index 3eafa08713..66618281f9 100644 --- a/src/test/overlay/tx_reduce_relay_test.cpp +++ b/src/test/overlay/tx_reduce_relay_test.cpp @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { @@ -267,4 +267,4 @@ private: BEAST_DEFINE_TESTSUITE(tx_reduce_relay, overlay, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/peerfinder/Livecache_test.cpp b/src/test/peerfinder/Livecache_test.cpp index 2218191b56..652b839f2c 100644 --- a/src/test/peerfinder/Livecache_test.cpp +++ b/src/test/peerfinder/Livecache_test.cpp @@ -9,7 +9,7 @@ #include -namespace ripple { +namespace xrpl { namespace PeerFinder { bool @@ -120,9 +120,7 @@ public: constexpr auto num_eps = 40; Livecache<> c(clock_, journal_); for (auto i = 0; i < num_eps; ++i) - add(beast::IP::randomEP(true), - c, - ripple::rand_int()); + add(beast::IP::randomEP(true), c, xrpl::rand_int()); auto h = c.hops.histogram(); if (!BEAST_EXPECT(!h.empty())) return; @@ -146,9 +144,9 @@ public: for (auto i = 0; i < 100; ++i) add(beast::IP::randomEP(true), c, - ripple::rand_int(Tuning::maxHops + 1)); + xrpl::rand_int(Tuning::maxHops + 1)); - using at_hop = std::vector; + using at_hop = std::vector; using all_hops = std::array; auto cmp_EP = [](Endpoint const& a, Endpoint const& b) { @@ -223,4 +221,4 @@ public: BEAST_DEFINE_TESTSUITE(Livecache, peerfinder, ripple); } // namespace PeerFinder -} // namespace ripple +} // namespace xrpl diff --git a/src/test/peerfinder/PeerFinder_test.cpp b/src/test/peerfinder/PeerFinder_test.cpp index 96052bdb1a..9301fbd293 100644 --- a/src/test/peerfinder/PeerFinder_test.cpp +++ b/src/test/peerfinder/PeerFinder_test.cpp @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace PeerFinder { class PeerFinder_test : public beast::unit_test::suite @@ -395,7 +395,7 @@ public: std::uint16_t expectOut, std::uint16_t expectIn, std::uint16_t expectIpLimit) { - ripple::Config c; + xrpl::Config c; testcase(test); @@ -468,7 +468,7 @@ public: testcase("invalid config"); auto run = [&](std::string const& toLoad) { - ripple::Config c; + xrpl::Config c; try { c.loadFromString(toLoad); @@ -527,4 +527,4 @@ public: BEAST_DEFINE_TESTSUITE(PeerFinder, peerfinder, ripple); } // namespace PeerFinder -} // namespace ripple +} // namespace xrpl diff --git a/src/test/protocol/ApiVersion_test.cpp b/src/test/protocol/ApiVersion_test.cpp index f9e897ad74..d3413f4788 100644 --- a/src/test/protocol/ApiVersion_test.cpp +++ b/src/test/protocol/ApiVersion_test.cpp @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { struct ApiVersion_test : beast::unit_test::suite { @@ -52,4 +52,4 @@ struct ApiVersion_test : beast::unit_test::suite BEAST_DEFINE_TESTSUITE(ApiVersion, protocol, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/protocol/BuildInfo_test.cpp b/src/test/protocol/BuildInfo_test.cpp index b153e03608..903c566730 100644 --- a/src/test/protocol/BuildInfo_test.cpp +++ b/src/test/protocol/BuildInfo_test.cpp @@ -1,7 +1,7 @@ #include #include -namespace ripple { +namespace xrpl { class BuildInfo_test : public beast::unit_test::suite { @@ -96,4 +96,4 @@ public: }; BEAST_DEFINE_TESTSUITE(BuildInfo, protocol, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/protocol/Hooks_test.cpp b/src/test/protocol/Hooks_test.cpp index 9bbfc4850c..22aad20034 100644 --- a/src/test/protocol/Hooks_test.cpp +++ b/src/test/protocol/Hooks_test.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { class Hooks_test : public beast::unit_test::suite { @@ -176,4 +176,4 @@ public: BEAST_DEFINE_TESTSUITE(Hooks, protocol, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/protocol/InnerObjectFormats_test.cpp b/src/test/protocol/InnerObjectFormats_test.cpp index 5593d4644d..cdb755168a 100644 --- a/src/test/protocol/InnerObjectFormats_test.cpp +++ b/src/test/protocol/InnerObjectFormats_test.cpp @@ -6,7 +6,7 @@ #include // RPC::containsError #include // STParsedJSONObject -namespace ripple { +namespace xrpl { namespace InnerObjectFormatsUnitTestDetail { @@ -184,4 +184,4 @@ public: BEAST_DEFINE_TESTSUITE(InnerObjectFormatsParsedJSON, protocol, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/protocol/Issue_test.cpp b/src/test/protocol/Issue_test.cpp index cf0b6ff861..b127b12060 100644 --- a/src/test/protocol/Issue_test.cpp +++ b/src/test/protocol/Issue_test.cpp @@ -25,7 +25,7 @@ #endif #endif -namespace ripple { +namespace xrpl { class Issue_test : public beast::unit_test::suite { @@ -961,4 +961,4 @@ public: BEAST_DEFINE_TESTSUITE(Issue, protocol, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/protocol/Memo_test.cpp b/src/test/protocol/Memo_test.cpp index 415d23190a..28553c71ab 100644 --- a/src/test/protocol/Memo_test.cpp +++ b/src/test/protocol/Memo_test.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { class Memo_test : public beast::unit_test::suite { @@ -118,4 +118,4 @@ public: BEAST_DEFINE_TESTSUITE(Memo, protocol, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/protocol/MultiApiJson_test.cpp b/src/test/protocol/MultiApiJson_test.cpp index fb1549f5fd..f0e0852241 100644 --- a/src/test/protocol/MultiApiJson_test.cpp +++ b/src/test/protocol/MultiApiJson_test.cpp @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { namespace { @@ -36,7 +36,7 @@ struct MultiApiJson_test : beast::unit_test::suite void run() override { - using ripple::detail::MultiApiJson; + using xrpl::detail::MultiApiJson; Json::Value const obj1 = makeJson("value", 1); Json::Value const obj2 = makeJson("value", 2); @@ -1052,4 +1052,4 @@ struct MultiApiJson_test : beast::unit_test::suite BEAST_DEFINE_TESTSUITE(MultiApiJson, protocol, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/protocol/PublicKey_test.cpp b/src/test/protocol/PublicKey_test.cpp index 3bc50f2d95..a017377551 100644 --- a/src/test/protocol/PublicKey_test.cpp +++ b/src/test/protocol/PublicKey_test.cpp @@ -4,7 +4,7 @@ #include -namespace ripple { +namespace xrpl { class PublicKey_test : public beast::unit_test::suite { @@ -452,4 +452,4 @@ public: BEAST_DEFINE_TESTSUITE(PublicKey, protocol, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/protocol/Quality_test.cpp b/src/test/protocol/Quality_test.cpp index 5c6af14312..f9c2db769a 100644 --- a/src/test/protocol/Quality_test.cpp +++ b/src/test/protocol/Quality_test.cpp @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class Quality_test : public beast::unit_test::suite { @@ -398,4 +398,4 @@ public: BEAST_DEFINE_TESTSUITE(Quality, protocol, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/protocol/STAccount_test.cpp b/src/test/protocol/STAccount_test.cpp index 397b150a6c..c742841242 100644 --- a/src/test/protocol/STAccount_test.cpp +++ b/src/test/protocol/STAccount_test.cpp @@ -1,7 +1,7 @@ #include #include -namespace ripple { +namespace xrpl { struct STAccount_test : public beast::unit_test::suite { @@ -129,4 +129,4 @@ struct STAccount_test : public beast::unit_test::suite BEAST_DEFINE_TESTSUITE(STAccount, protocol, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/protocol/STAmount_test.cpp b/src/test/protocol/STAmount_test.cpp index 28e4fe6aac..fd68624d25 100644 --- a/src/test/protocol/STAmount_test.cpp +++ b/src/test/protocol/STAmount_test.cpp @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { class STAmount_test : public beast::unit_test::suite { @@ -1035,4 +1035,4 @@ public: BEAST_DEFINE_TESTSUITE(STAmount, protocol, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/protocol/STInteger_test.cpp b/src/test/protocol/STInteger_test.cpp index 5852fc873c..b00187afc9 100644 --- a/src/test/protocol/STInteger_test.cpp +++ b/src/test/protocol/STInteger_test.cpp @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { struct STInteger_test : public beast::unit_test::suite { @@ -141,4 +141,4 @@ struct STInteger_test : public beast::unit_test::suite BEAST_DEFINE_TESTSUITE(STInteger, protocol, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/protocol/STIssue_test.cpp b/src/test/protocol/STIssue_test.cpp index 110c544ec4..87c05aa10b 100644 --- a/src/test/protocol/STIssue_test.cpp +++ b/src/test/protocol/STIssue_test.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class STIssue_test : public beast::unit_test::suite @@ -143,4 +143,4 @@ public: BEAST_DEFINE_TESTSUITE(STIssue, protocol, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/protocol/STNumber_test.cpp b/src/test/protocol/STNumber_test.cpp index 927bc674e0..d715fadf37 100644 --- a/src/test/protocol/STNumber_test.cpp +++ b/src/test/protocol/STNumber_test.cpp @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { struct STNumber_test : public beast::unit_test::suite { @@ -265,4 +265,4 @@ testCompile(std::ostream& out) out << number; } -} // namespace ripple +} // namespace xrpl diff --git a/src/test/protocol/STObject_test.cpp b/src/test/protocol/STObject_test.cpp index c0d0297e37..3764368886 100644 --- a/src/test/protocol/STObject_test.cpp +++ b/src/test/protocol/STObject_test.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { class STObject_test : public beast::unit_test::suite { @@ -458,7 +458,7 @@ public: st[sf3] = std::vector{}; BEAST_EXPECT(cst[sf3].size() == 0); } - } // namespace ripple + } // namespace xrpl void testMalformed() @@ -505,4 +505,4 @@ public: BEAST_DEFINE_TESTSUITE(STObject, protocol, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/protocol/STParsedJSON_test.cpp b/src/test/protocol/STParsedJSON_test.cpp index 7ad7e36097..cabe6f63e7 100644 --- a/src/test/protocol/STParsedJSON_test.cpp +++ b/src/test/protocol/STParsedJSON_test.cpp @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { class STParsedJSON_test : public beast::unit_test::suite { @@ -2334,4 +2334,4 @@ class STParsedJSON_test : public beast::unit_test::suite BEAST_DEFINE_TESTSUITE(STParsedJSON, protocol, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/protocol/STTx_test.cpp b/src/test/protocol/STTx_test.cpp index 572219c357..4444536f7b 100644 --- a/src/test/protocol/STTx_test.cpp +++ b/src/test/protocol/STTx_test.cpp @@ -11,7 +11,7 @@ #include -namespace ripple { +namespace xrpl { /** * Return true if the string loosely matches the regex. @@ -1398,7 +1398,7 @@ public: SerialIter tenSit{tenDeep.slice()}; try { - auto stx = std::make_shared(tenSit); + auto stx = std::make_shared(tenSit); fail("STTx construction should have thrown."); } catch (std::runtime_error const& ex) @@ -1417,7 +1417,7 @@ public: SerialIter tooDeepSit{tooDeep.slice()}; try { - auto stx = std::make_shared(tooDeepSit); + auto stx = std::make_shared(tooDeepSit); fail("STTx construction should have thrown."); } catch (std::runtime_error const& ex) @@ -1463,7 +1463,7 @@ public: SerialIter nineSit{nineDeep.slice()}; try { - auto stx = std::make_shared(nineSit); + auto stx = std::make_shared(nineSit); fail("STTx construction should have thrown."); } catch (std::runtime_error const& ex) @@ -1483,7 +1483,7 @@ public: SerialIter tooDeepSit{tooDeep.slice()}; try { - auto stx = std::make_shared(tooDeepSit); + auto stx = std::make_shared(tooDeepSit); fail("STTx construction should have thrown."); } catch (std::runtime_error const& ex) @@ -1512,7 +1512,7 @@ public: { // Verify we have a valid transaction. SerialIter sit{serialized.slice()}; - auto stx = std::make_shared(sit); + auto stx = std::make_shared(sit); } // Tweak the serialized data to change the ClearFlag to @@ -1524,7 +1524,7 @@ public: SerialIter sit{serialized.slice()}; try { - auto stx = std::make_shared(sit); + auto stx = std::make_shared(sit); fail("An exception should have been thrown"); } catch (std::exception const& ex) @@ -1551,9 +1551,9 @@ public: // vary. BEAST_EXPECT(!tx2.ParseFromArray(payload1, sizeof(payload1))); - ripple::SerialIter sit(ripple::makeSlice(tx2.rawtransaction())); + xrpl::SerialIter sit(xrpl::makeSlice(tx2.rawtransaction())); - auto stx = std::make_shared(sit); + auto stx = std::make_shared(sit); fail("An exception should have been thrown"); } catch (std::exception const&) @@ -1563,8 +1563,8 @@ public: try { - ripple::SerialIter sit{payload2}; - auto stx = std::make_shared(sit); + xrpl::SerialIter sit{payload2}; + auto stx = std::make_shared(sit); fail("An exception should have been thrown"); } catch (std::exception const& ex) @@ -1574,8 +1574,8 @@ public: try { - ripple::SerialIter sit{payload3}; - auto stx = std::make_shared(sit); + xrpl::SerialIter sit{payload3}; + auto stx = std::make_shared(sit); fail("An exception should have been thrown"); } catch (std::exception const& ex) @@ -1586,8 +1586,8 @@ public: try { - ripple::SerialIter sit{payload4}; - auto stx = std::make_shared(sit); + xrpl::SerialIter sit{payload4}; + auto stx = std::make_shared(sit); fail("An exception should have been thrown"); } catch (std::exception const& ex) @@ -1841,4 +1841,4 @@ public: BEAST_DEFINE_TESTSUITE(STTx, protocol, ripple); BEAST_DEFINE_TESTSUITE(InnerObjectFormatsSerializer, protocol, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/protocol/STValidation_test.cpp b/src/test/protocol/STValidation_test.cpp index 88956ef2f6..556509e4e1 100644 --- a/src/test/protocol/STValidation_test.cpp +++ b/src/test/protocol/STValidation_test.cpp @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { class STValidation_test : public beast::unit_test::suite { @@ -187,7 +187,7 @@ public: try { SerialIter sit{payload1}; - auto val = std::make_shared( + auto val = std::make_shared( sit, [](PublicKey const& pk) { return calcNodeID(pk); }, false); fail("An exception should have been thrown"); } @@ -202,7 +202,7 @@ public: try { SerialIter sit{payload2}; - auto val = std::make_shared( + auto val = std::make_shared( sit, [](PublicKey const& pk) { return calcNodeID(pk); }, false); fail("An exception should have been thrown"); } @@ -215,7 +215,7 @@ public: try { SerialIter sit{payload3}; - auto val = std::make_shared( + auto val = std::make_shared( sit, [](PublicKey const& pk) { return calcNodeID(pk); }, false); fail("An exception should have been thrown"); } @@ -228,7 +228,7 @@ public: try { SerialIter sit{payload4}; - auto val = std::make_shared( + auto val = std::make_shared( sit, [](PublicKey const& pk) { return calcNodeID(pk); }, false); fail("An exception should have been thrown"); } @@ -332,4 +332,4 @@ public: BEAST_DEFINE_TESTSUITE(STValidation, protocol, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/protocol/SecretKey_test.cpp b/src/test/protocol/SecretKey_test.cpp index bd7e2ccfe4..4191a6644a 100644 --- a/src/test/protocol/SecretKey_test.cpp +++ b/src/test/protocol/SecretKey_test.cpp @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { class SecretKey_test : public beast::unit_test::suite { @@ -1496,4 +1496,4 @@ inline static TestKeyData const ed25519TestVectors[] = { BEAST_DEFINE_TESTSUITE(SecretKey, protocol, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/protocol/Seed_test.cpp b/src/test/protocol/Seed_test.cpp index dfac5416d9..cfd1fed897 100644 --- a/src/test/protocol/Seed_test.cpp +++ b/src/test/protocol/Seed_test.cpp @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { class Seed_test : public beast::unit_test::suite { @@ -341,4 +341,4 @@ public: BEAST_DEFINE_TESTSUITE(Seed, protocol, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/protocol/SeqProxy_test.cpp b/src/test/protocol/SeqProxy_test.cpp index fefea5a638..bf6b44079c 100644 --- a/src/test/protocol/SeqProxy_test.cpp +++ b/src/test/protocol/SeqProxy_test.cpp @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { struct SeqProxy_test : public beast::unit_test::suite { @@ -219,4 +219,4 @@ struct SeqProxy_test : public beast::unit_test::suite BEAST_DEFINE_TESTSUITE(SeqProxy, protocol, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/protocol/Serializer_test.cpp b/src/test/protocol/Serializer_test.cpp index 1b99266dc4..4c6c9c6e43 100644 --- a/src/test/protocol/Serializer_test.cpp +++ b/src/test/protocol/Serializer_test.cpp @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { struct Serializer_test : public beast::unit_test::suite { @@ -47,4 +47,4 @@ struct Serializer_test : public beast::unit_test::suite BEAST_DEFINE_TESTSUITE(Serializer, protocol, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/protocol/TER_test.cpp b/src/test/protocol/TER_test.cpp index 8c279a8c95..85fef41663 100644 --- a/src/test/protocol/TER_test.cpp +++ b/src/test/protocol/TER_test.cpp @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { struct TER_test : public beast::unit_test::suite { @@ -276,4 +276,4 @@ struct TER_test : public beast::unit_test::suite BEAST_DEFINE_TESTSUITE(TER, protocol, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/resource/Logic_test.cpp b/src/test/resource/Logic_test.cpp index 2cb2625708..7d008c49ad 100644 --- a/src/test/resource/Logic_test.cpp +++ b/src/test/resource/Logic_test.cpp @@ -11,7 +11,7 @@ #include -namespace ripple { +namespace xrpl { namespace Resource { class ResourceManager_test : public beast::unit_test::suite @@ -275,4 +275,4 @@ public: BEAST_DEFINE_TESTSUITE(ResourceManager, resource, ripple); } // namespace Resource -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/AMMInfo_test.cpp b/src/test/rpc/AMMInfo_test.cpp index 2e519d1fb2..09983ffc1f 100644 --- a/src/test/rpc/AMMInfo_test.cpp +++ b/src/test/rpc/AMMInfo_test.cpp @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { class AMMInfo_test : public jtx::AMMTestBase @@ -353,4 +353,4 @@ public: BEAST_DEFINE_TESTSUITE(AMMInfo, rpc, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/AccountCurrencies_test.cpp b/src/test/rpc/AccountCurrencies_test.cpp index dd62d2fea4..046d2e4c31 100644 --- a/src/test/rpc/AccountCurrencies_test.cpp +++ b/src/test/rpc/AccountCurrencies_test.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { class AccountCurrencies_test : public beast::unit_test::suite { @@ -209,4 +209,4 @@ public: BEAST_DEFINE_TESTSUITE(AccountCurrencies, rpc, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/AccountInfo_test.cpp b/src/test/rpc/AccountInfo_test.cpp index 86d0a4b4f6..48f436190c 100644 --- a/src/test/rpc/AccountInfo_test.cpp +++ b/src/test/rpc/AccountInfo_test.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class AccountInfo_test : public beast::unit_test::suite @@ -703,8 +703,7 @@ public: testSignerListsApiVersion2(); testSignerListsV2(); - FeatureBitset const allFeatures{ - ripple::test::jtx::testable_amendments()}; + FeatureBitset const allFeatures{xrpl::test::jtx::testable_amendments()}; testAccountFlags(allFeatures); testAccountFlags(allFeatures - featureDisallowIncoming); testAccountFlags( @@ -718,4 +717,4 @@ public: BEAST_DEFINE_TESTSUITE(AccountInfo, rpc, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/AccountLines_test.cpp b/src/test/rpc/AccountLines_test.cpp index d1bdc20687..4d0e23a954 100644 --- a/src/test/rpc/AccountLines_test.cpp +++ b/src/test/rpc/AccountLines_test.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace RPC { class AccountLines_test : public beast::unit_test::suite @@ -1385,4 +1385,4 @@ public: BEAST_DEFINE_TESTSUITE(AccountLines, rpc, ripple); } // namespace RPC -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/AccountObjects_test.cpp b/src/test/rpc/AccountObjects_test.cpp index 74c5a2c915..d4efde248e 100644 --- a/src/test/rpc/AccountObjects_test.cpp +++ b/src/test/rpc/AccountObjects_test.cpp @@ -14,7 +14,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { static char const* bobs_account_objects[] = { @@ -1430,4 +1430,4 @@ public: BEAST_DEFINE_TESTSUITE(AccountObjects, rpc, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/AccountOffers_test.cpp b/src/test/rpc/AccountOffers_test.cpp index 500828d9d7..b6e0c34fa0 100644 --- a/src/test/rpc/AccountOffers_test.cpp +++ b/src/test/rpc/AccountOffers_test.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { class AccountOffers_test : public beast::unit_test::suite @@ -323,4 +323,4 @@ public: BEAST_DEFINE_TESTSUITE(AccountOffers, rpc, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/AccountSet_test.cpp b/src/test/rpc/AccountSet_test.cpp index 31fc345862..2c90ff16c6 100644 --- a/src/test/rpc/AccountSet_test.cpp +++ b/src/test/rpc/AccountSet_test.cpp @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { class AccountSet_test : public beast::unit_test::suite { @@ -579,8 +579,7 @@ public: stx->at(sfSigningPubKey) = makeSlice(std::string("badkey")); env.app().openLedger().modify([&](OpenView& view, beast::Journal j) { - auto const result = - ripple::apply(env.app(), view, *stx, tapNONE, j); + auto const result = xrpl::apply(env.app(), view, *stx, tapNONE, j); BEAST_EXPECT(result.ter == temBAD_SIGNATURE); BEAST_EXPECT(!result.applied); return result.applied; @@ -609,4 +608,4 @@ public: BEAST_DEFINE_TESTSUITE_PRIO(AccountSet, rpc, ripple, 1); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/AccountTx_test.cpp b/src/test/rpc/AccountTx_test.cpp index f55d053c9e..533208ae66 100644 --- a/src/test/rpc/AccountTx_test.cpp +++ b/src/test/rpc/AccountTx_test.cpp @@ -9,7 +9,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { @@ -941,4 +941,4 @@ public: BEAST_DEFINE_TESTSUITE(AccountTx, rpc, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/AmendmentBlocked_test.cpp b/src/test/rpc/AmendmentBlocked_test.cpp index 05fa4908f3..7861cd982a 100644 --- a/src/test/rpc/AmendmentBlocked_test.cpp +++ b/src/test/rpc/AmendmentBlocked_test.cpp @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { class AmendmentBlocked_test : public beast::unit_test::suite { @@ -238,4 +238,4 @@ public: BEAST_DEFINE_TESTSUITE(AmendmentBlocked, rpc, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/BookChanges_test.cpp b/src/test/rpc/BookChanges_test.cpp index 5f58dfc383..bc5a865e06 100644 --- a/src/test/rpc/BookChanges_test.cpp +++ b/src/test/rpc/BookChanges_test.cpp @@ -4,7 +4,7 @@ #include "xrpl/beast/unit_test/suite.h" #include "xrpl/protocol/jss.h" -namespace ripple { +namespace xrpl { namespace test { class BookChanges_test : public beast::unit_test::suite @@ -127,4 +127,4 @@ public: BEAST_DEFINE_TESTSUITE(BookChanges, rpc, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/Book_test.cpp b/src/test/rpc/Book_test.cpp index f2798671b0..58cc32d2c0 100644 --- a/src/test/rpc/Book_test.cpp +++ b/src/test/rpc/Book_test.cpp @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class Book_test : public beast::unit_test::suite @@ -2014,4 +2014,4 @@ public: BEAST_DEFINE_TESTSUITE_PRIO(Book, rpc, ripple, 1); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/Connect_test.cpp b/src/test/rpc/Connect_test.cpp index a01ee05ff2..02e3e39076 100644 --- a/src/test/rpc/Connect_test.cpp +++ b/src/test/rpc/Connect_test.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { class Connect_test : public beast::unit_test::suite { @@ -38,4 +38,4 @@ public: BEAST_DEFINE_TESTSUITE(Connect, rpc, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/DeliveredAmount_test.cpp b/src/test/rpc/DeliveredAmount_test.cpp index 79447af780..dbf36e6a20 100644 --- a/src/test/rpc/DeliveredAmount_test.cpp +++ b/src/test/rpc/DeliveredAmount_test.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { // Helper class to track the expected number `delivered_amount` results. @@ -406,4 +406,4 @@ public: BEAST_DEFINE_TESTSUITE(DeliveredAmount, rpc, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/DepositAuthorized_test.cpp b/src/test/rpc/DepositAuthorized_test.cpp index b20f53592f..dcd140b973 100644 --- a/src/test/rpc/DepositAuthorized_test.cpp +++ b/src/test/rpc/DepositAuthorized_test.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { class DepositAuthorized_test : public beast::unit_test::suite @@ -622,4 +622,4 @@ public: BEAST_DEFINE_TESTSUITE(DepositAuthorized, rpc, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/Feature_test.cpp b/src/test/rpc/Feature_test.cpp index a326b42cce..d2869232d7 100644 --- a/src/test/rpc/Feature_test.cpp +++ b/src/test/rpc/Feature_test.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { class Feature_test : public beast::unit_test::suite { @@ -14,13 +14,13 @@ class Feature_test : public beast::unit_test::suite { testcase("internals"); - auto const& supportedAmendments = ripple::detail::supportedAmendments(); - auto const& allAmendments = ripple::allAmendments(); + auto const& supportedAmendments = xrpl::detail::supportedAmendments(); + auto const& allAmendments = xrpl::allAmendments(); BEAST_EXPECT( supportedAmendments.size() == - ripple::detail::numDownVotedAmendments() + - ripple::detail::numUpVotedAmendments()); + xrpl::detail::numDownVotedAmendments() + + xrpl::detail::numUpVotedAmendments()); { std::size_t up = 0, down = 0, obsolete = 0; for (auto const& [name, vote] : supportedAmendments) @@ -54,8 +54,8 @@ class Feature_test : public beast::unit_test::suite } } BEAST_EXPECT( - down + obsolete == ripple::detail::numDownVotedAmendments()); - BEAST_EXPECT(up == ripple::detail::numUpVotedAmendments()); + down + obsolete == xrpl::detail::numDownVotedAmendments()); + BEAST_EXPECT(up == xrpl::detail::numUpVotedAmendments()); } { std::size_t supported = 0, unsupported = 0, retired = 0; @@ -93,7 +93,7 @@ class Feature_test : public beast::unit_test::suite // Test all the supported features. In a perfect world, this would test // FeatureCollections::featureNames, but that's private. Leave it that // way. - auto const supported = ripple::detail::supportedAmendments(); + auto const supported = xrpl::detail::supportedAmendments(); for (auto const& [feature, vote] : supported) { @@ -138,7 +138,7 @@ class Feature_test : public beast::unit_test::suite Env env{*this}; std::map const& votes = - ripple::detail::supportedAmendments(); + xrpl::detail::supportedAmendments(); auto jrr = env.rpc("feature")[jss::result]; if (!BEAST_EXPECT(jrr.isMember(jss::features))) @@ -325,7 +325,7 @@ class Feature_test : public beast::unit_test::suite *this, FeatureBitset(featureDepositAuth, featureDepositPreauth)}; std::map const& votes = - ripple::detail::supportedAmendments(); + xrpl::detail::supportedAmendments(); auto jrr = env.rpc("feature")[jss::result]; if (!BEAST_EXPECT(jrr.isMember(jss::features))) @@ -423,7 +423,7 @@ class Feature_test : public beast::unit_test::suite // to avoid maintenance as more amendments are added in the future. BEAST_EXPECT(majorities.size() >= 5); std::map const& votes = - ripple::detail::supportedAmendments(); + xrpl::detail::supportedAmendments(); jrr = env.rpc("feature")[jss::result]; if (!BEAST_EXPECT(jrr.isMember(jss::features))) @@ -594,4 +594,4 @@ public: BEAST_DEFINE_TESTSUITE(Feature, rpc, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/GRPCTestClientBase.h b/src/test/rpc/GRPCTestClientBase.h index b5e50b1c94..6cb806a562 100644 --- a/src/test/rpc/GRPCTestClientBase.h +++ b/src/test/rpc/GRPCTestClientBase.h @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { struct GRPCTestClientBase @@ -29,5 +29,5 @@ struct GRPCTestClientBase }; } // namespace test -} // namespace ripple +} // namespace xrpl #endif // XRPL_GRPCTESTCLIENTBASE_H diff --git a/src/test/rpc/GatewayBalances_test.cpp b/src/test/rpc/GatewayBalances_test.cpp index 373f4e7e56..a2cb616862 100644 --- a/src/test/rpc/GatewayBalances_test.cpp +++ b/src/test/rpc/GatewayBalances_test.cpp @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class GatewayBalances_test : public beast::unit_test::suite @@ -248,4 +248,4 @@ public: BEAST_DEFINE_TESTSUITE(GatewayBalances, rpc, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/GetAggregatePrice_test.cpp b/src/test/rpc/GetAggregatePrice_test.cpp index a1a09ab592..15fefb7304 100644 --- a/src/test/rpc/GetAggregatePrice_test.cpp +++ b/src/test/rpc/GetAggregatePrice_test.cpp @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { namespace jtx { namespace oracle { @@ -332,4 +332,4 @@ BEAST_DEFINE_TESTSUITE(GetAggregatePrice, rpc, ripple); } // namespace oracle } // namespace jtx } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/GetCounts_test.cpp b/src/test/rpc/GetCounts_test.cpp index ea8d7a896a..6f87a79981 100644 --- a/src/test/rpc/GetCounts_test.cpp +++ b/src/test/rpc/GetCounts_test.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { class GetCounts_test : public beast::unit_test::suite { @@ -103,4 +103,4 @@ public: BEAST_DEFINE_TESTSUITE(GetCounts, rpc, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/Handler_test.cpp b/src/test/rpc/Handler_test.cpp index b0f386b925..9418c9d8bf 100644 --- a/src/test/rpc/Handler_test.cpp +++ b/src/test/rpc/Handler_test.cpp @@ -9,7 +9,7 @@ #include #include -namespace ripple::test { +namespace xrpl::test { // NOTE: there should be no need for this function; // `std::cout << some_duration` should just work if built with a compliant @@ -82,7 +82,7 @@ class Handler_test : public beast::unit_test::suite std::ranlux48 prng(dev()); std::vector names = - test::jtx::make_vector(ripple::RPC::getHandlerNames()); + test::jtx::make_vector(xrpl::RPC::getHandlerNames()); std::uniform_int_distribution distr{0, names.size() - 1}; @@ -111,4 +111,4 @@ public: BEAST_DEFINE_TESTSUITE_MANUAL(Handler, rpc, ripple); -} // namespace ripple::test +} // namespace xrpl::test diff --git a/src/test/rpc/JSONRPC_test.cpp b/src/test/rpc/JSONRPC_test.cpp index 7bcc26e3d3..85ee600fef 100644 --- a/src/test/rpc/JSONRPC_test.cpp +++ b/src/test/rpc/JSONRPC_test.cpp @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace RPC { @@ -2920,4 +2920,4 @@ public: BEAST_DEFINE_TESTSUITE(JSONRPC, rpc, ripple); } // namespace RPC -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/KeyGeneration_test.cpp b/src/test/rpc/KeyGeneration_test.cpp index b1bbac7340..ea595bea2b 100644 --- a/src/test/rpc/KeyGeneration_test.cpp +++ b/src/test/rpc/KeyGeneration_test.cpp @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace RPC { @@ -75,7 +75,7 @@ static key_strings const strong_brain_strings = { "attacks.", }; -class WalletPropose_test : public ripple::TestSuite +class WalletPropose_test : public xrpl::TestSuite { public: void @@ -878,4 +878,4 @@ public: BEAST_DEFINE_TESTSUITE(WalletPropose, rpc, ripple); } // namespace RPC -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/LedgerClosed_test.cpp b/src/test/rpc/LedgerClosed_test.cpp index b3a5e60afd..4250c1041c 100644 --- a/src/test/rpc/LedgerClosed_test.cpp +++ b/src/test/rpc/LedgerClosed_test.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { class LedgerClosed_test : public beast::unit_test::suite { @@ -51,4 +51,4 @@ public: BEAST_DEFINE_TESTSUITE(LedgerClosed, rpc, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/LedgerData_test.cpp b/src/test/rpc/LedgerData_test.cpp index 3705133432..923ded23d9 100644 --- a/src/test/rpc/LedgerData_test.cpp +++ b/src/test/rpc/LedgerData_test.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { class LedgerData_test : public beast::unit_test::suite { @@ -475,4 +475,4 @@ public: BEAST_DEFINE_TESTSUITE_PRIO(LedgerData, rpc, ripple, 1); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/LedgerEntry_test.cpp b/src/test/rpc/LedgerEntry_test.cpp index fdd3838e89..b32ed28399 100644 --- a/src/test/rpc/LedgerEntry_test.cpp +++ b/src/test/rpc/LedgerEntry_test.cpp @@ -19,7 +19,7 @@ using source_location = std::experimental::source_location; #include using std::source_location; #endif -namespace ripple { +namespace xrpl { namespace test { @@ -1774,8 +1774,8 @@ class LedgerEntry_test : public beast::unit_test::suite testInvalidOracleLedgerEntry() { testcase("Invalid Oracle Ledger Entry"); - using namespace ripple::test::jtx; - using namespace ripple::test::jtx::oracle; + using namespace xrpl::test::jtx; + using namespace xrpl::test::jtx::oracle; Env env(*this); Account const owner("owner"); @@ -1801,8 +1801,8 @@ class LedgerEntry_test : public beast::unit_test::suite testOracleLedgerEntry() { testcase("Oracle Ledger Entry"); - using namespace ripple::test::jtx; - using namespace ripple::test::jtx::oracle; + using namespace xrpl::test::jtx; + using namespace xrpl::test::jtx::oracle; Env env(*this); auto const baseFee = @@ -2371,4 +2371,4 @@ BEAST_DEFINE_TESTSUITE(LedgerEntry, rpc, ripple); BEAST_DEFINE_TESTSUITE(LedgerEntry_XChain, rpc, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/LedgerHeader_test.cpp b/src/test/rpc/LedgerHeader_test.cpp index 7ebf7a8a94..7a57f15178 100644 --- a/src/test/rpc/LedgerHeader_test.cpp +++ b/src/test/rpc/LedgerHeader_test.cpp @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class LedgerHeader_test : public beast::unit_test::suite { @@ -70,4 +70,4 @@ public: BEAST_DEFINE_TESTSUITE(LedgerHeader, rpc, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/LedgerRPC_test.cpp b/src/test/rpc/LedgerRPC_test.cpp index 2d9daa5d9d..44a1743db0 100644 --- a/src/test/rpc/LedgerRPC_test.cpp +++ b/src/test/rpc/LedgerRPC_test.cpp @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { @@ -722,4 +722,4 @@ public: BEAST_DEFINE_TESTSUITE(LedgerRPC, rpc, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/LedgerRequestRPC_test.cpp b/src/test/rpc/LedgerRequestRPC_test.cpp index 60d98b4272..908dc4e098 100644 --- a/src/test/rpc/LedgerRequestRPC_test.cpp +++ b/src/test/rpc/LedgerRequestRPC_test.cpp @@ -9,7 +9,7 @@ #include -namespace ripple { +namespace xrpl { namespace RPC { @@ -360,4 +360,4 @@ public: BEAST_DEFINE_TESTSUITE(LedgerRequestRPC, rpc, ripple); } // namespace RPC -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/ManifestRPC_test.cpp b/src/test/rpc/ManifestRPC_test.cpp index a875ecb479..23ddcc8f2d 100644 --- a/src/test/rpc/ManifestRPC_test.cpp +++ b/src/test/rpc/ManifestRPC_test.cpp @@ -9,7 +9,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { class ManifestRPC_test : public beast::unit_test::suite @@ -75,4 +75,4 @@ public: BEAST_DEFINE_TESTSUITE(ManifestRPC, rpc, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/NoRippleCheck_test.cpp b/src/test/rpc/NoRippleCheck_test.cpp index 94c85a59ef..1e6f035f6e 100644 --- a/src/test/rpc/NoRippleCheck_test.cpp +++ b/src/test/rpc/NoRippleCheck_test.cpp @@ -12,7 +12,7 @@ #include -namespace ripple { +namespace xrpl { class NoRippleCheck_test : public beast::unit_test::suite { @@ -257,7 +257,7 @@ class NoRippleCheckLimits_test : public beast::unit_test::suite // be better if we could add this functionality to Env somehow // or otherwise disable endpoint charging for certain test // cases. - using namespace ripple::Resource; + using namespace xrpl::Resource; using namespace std::chrono; using namespace beast::IP; auto c = env.app().getResourceManager().newInboundEndpoint( @@ -272,7 +272,7 @@ class NoRippleCheckLimits_test : public beast::unit_test::suite } }; - for (auto i = 0; i < ripple::RPC::Tuning::noRippleCheck.rmax + 5; ++i) + for (auto i = 0; i < xrpl::RPC::Tuning::noRippleCheck.rmax + 5; ++i) { if (!admin) checkBalance(); @@ -355,4 +355,4 @@ BEAST_DEFINE_TESTSUITE(NoRippleCheck, rpc, ripple); BEAST_DEFINE_TESTSUITE_MANUAL_PRIO(NoRippleCheckLimits, rpc, ripple, 1); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/NoRipple_test.cpp b/src/test/rpc/NoRipple_test.cpp index f86a1157ae..fe0951c494 100644 --- a/src/test/rpc/NoRipple_test.cpp +++ b/src/test/rpc/NoRipple_test.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { @@ -274,4 +274,4 @@ public: BEAST_DEFINE_TESTSUITE(NoRipple, rpc, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/OwnerInfo_test.cpp b/src/test/rpc/OwnerInfo_test.cpp index b3a4f6a0a4..64c0e5dbb3 100644 --- a/src/test/rpc/OwnerInfo_test.cpp +++ b/src/test/rpc/OwnerInfo_test.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { class OwnerInfo_test : public beast::unit_test::suite { @@ -202,4 +202,4 @@ public: BEAST_DEFINE_TESTSUITE(OwnerInfo, rpc, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/Peers_test.cpp b/src/test/rpc/Peers_test.cpp index a066a0a709..2860eb8a85 100644 --- a/src/test/rpc/Peers_test.cpp +++ b/src/test/rpc/Peers_test.cpp @@ -8,7 +8,7 @@ #include -namespace ripple { +namespace xrpl { class Peers_test : public beast::unit_test::suite { @@ -75,4 +75,4 @@ public: BEAST_DEFINE_TESTSUITE(Peers, rpc, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/RPCCall_test.cpp b/src/test/rpc/RPCCall_test.cpp index a5426f733d..7251b2ea32 100644 --- a/src/test/rpc/RPCCall_test.cpp +++ b/src/test/rpc/RPCCall_test.cpp @@ -14,7 +14,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { struct RPCCallTestData @@ -5990,4 +5990,4 @@ public: BEAST_DEFINE_TESTSUITE(RPCCall, rpc, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/RPCHelpers_test.cpp b/src/test/rpc/RPCHelpers_test.cpp index e2e5f5fcf9..b37e846464 100644 --- a/src/test/rpc/RPCHelpers_test.cpp +++ b/src/test/rpc/RPCHelpers_test.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class RPCHelpers_test : public beast::unit_test::suite @@ -73,4 +73,4 @@ public: BEAST_DEFINE_TESTSUITE(RPCHelpers, rpc, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/RPCOverload_test.cpp b/src/test/rpc/RPCOverload_test.cpp index 3eef88ff2a..b6a2bd4f5c 100644 --- a/src/test/rpc/RPCOverload_test.cpp +++ b/src/test/rpc/RPCOverload_test.cpp @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class RPCOverload_test : public beast::unit_test::suite @@ -73,4 +73,4 @@ public: BEAST_DEFINE_TESTSUITE(RPCOverload, rpc, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/RobustTransaction_test.cpp b/src/test/rpc/RobustTransaction_test.cpp index 29305092c4..675cc6f88b 100644 --- a/src/test/rpc/RobustTransaction_test.cpp +++ b/src/test/rpc/RobustTransaction_test.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class RobustTransaction_test : public beast::unit_test::suite @@ -494,4 +494,4 @@ public: BEAST_DEFINE_TESTSUITE(RobustTransaction, rpc, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/Roles_test.cpp b/src/test/rpc/Roles_test.cpp index 777cf1e2a2..c01734bfd6 100644 --- a/src/test/rpc/Roles_test.cpp +++ b/src/test/rpc/Roles_test.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { @@ -374,4 +374,4 @@ BEAST_DEFINE_TESTSUITE(Roles, rpc, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/ServerDefinitions_test.cpp b/src/test/rpc/ServerDefinitions_test.cpp index 051e9e00eb..ccd1b9acce 100644 --- a/src/test/rpc/ServerDefinitions_test.cpp +++ b/src/test/rpc/ServerDefinitions_test.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { @@ -146,4 +146,4 @@ public: BEAST_DEFINE_TESTSUITE(ServerDefinitions, rpc, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/ServerInfo_test.cpp b/src/test/rpc/ServerInfo_test.cpp index d149a0899c..637fd89ce3 100644 --- a/src/test/rpc/ServerInfo_test.cpp +++ b/src/test/rpc/ServerInfo_test.cpp @@ -8,7 +8,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { @@ -165,4 +165,4 @@ admin = 127.0.0.1 BEAST_DEFINE_TESTSUITE(ServerInfo, rpc, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/Simulate_test.cpp b/src/test/rpc/Simulate_test.cpp index d7018fdbbc..d354d434c4 100644 --- a/src/test/rpc/Simulate_test.cpp +++ b/src/test/rpc/Simulate_test.cpp @@ -14,7 +14,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { @@ -1320,4 +1320,4 @@ BEAST_DEFINE_TESTSUITE(Simulate, rpc, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/Status_test.cpp b/src/test/rpc/Status_test.cpp index 5e6ac1bca4..c2e9c836df 100644 --- a/src/test/rpc/Status_test.cpp +++ b/src/test/rpc/Status_test.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace RPC { class codeString_test : public beast::unit_test::suite @@ -202,4 +202,4 @@ public: BEAST_DEFINE_TESTSUITE(fillJson, rpc, RPC); } // namespace RPC -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/Subscribe_test.cpp b/src/test/rpc/Subscribe_test.cpp index 98e86484f5..366e92d899 100644 --- a/src/test/rpc/Subscribe_test.cpp +++ b/src/test/rpc/Subscribe_test.cpp @@ -14,7 +14,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { class Subscribe_test : public beast::unit_test::suite @@ -1594,4 +1594,4 @@ public: BEAST_DEFINE_TESTSUITE(Subscribe, rpc, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/TransactionEntry_test.cpp b/src/test/rpc/TransactionEntry_test.cpp index ed0890fd05..bc2556d565 100644 --- a/src/test/rpc/TransactionEntry_test.cpp +++ b/src/test/rpc/TransactionEntry_test.cpp @@ -9,7 +9,7 @@ #include -namespace ripple { +namespace xrpl { class TransactionEntry_test : public beast::unit_test::suite { @@ -379,4 +379,4 @@ public: BEAST_DEFINE_TESTSUITE(TransactionEntry, rpc, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/TransactionHistory_test.cpp b/src/test/rpc/TransactionHistory_test.cpp index ca8d128962..eaa8a67f2c 100644 --- a/src/test/rpc/TransactionHistory_test.cpp +++ b/src/test/rpc/TransactionHistory_test.cpp @@ -8,7 +8,7 @@ #include -namespace ripple { +namespace xrpl { class TransactionHistory_test : public beast::unit_test::suite { @@ -153,4 +153,4 @@ public: BEAST_DEFINE_TESTSUITE(TransactionHistory, rpc, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/Transaction_test.cpp b/src/test/rpc/Transaction_test.cpp index f8ce2bc830..2c547e978a 100644 --- a/src/test/rpc/Transaction_test.cpp +++ b/src/test/rpc/Transaction_test.cpp @@ -14,7 +14,7 @@ #include #include -namespace ripple { +namespace xrpl { class Transaction_test : public beast::unit_test::suite { @@ -940,4 +940,4 @@ public: BEAST_DEFINE_TESTSUITE(Transaction, rpc, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/ValidatorInfo_test.cpp b/src/test/rpc/ValidatorInfo_test.cpp index a115044194..82905d0d57 100644 --- a/src/test/rpc/ValidatorInfo_test.cpp +++ b/src/test/rpc/ValidatorInfo_test.cpp @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class ValidatorInfo_test : public beast::unit_test::suite @@ -106,4 +106,4 @@ public: BEAST_DEFINE_TESTSUITE(ValidatorInfo, rpc, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/ValidatorRPC_test.cpp b/src/test/rpc/ValidatorRPC_test.cpp index df7180ed10..1e6a5d5cee 100644 --- a/src/test/rpc/ValidatorRPC_test.cpp +++ b/src/test/rpc/ValidatorRPC_test.cpp @@ -11,7 +11,7 @@ #include -namespace ripple { +namespace xrpl { namespace test { @@ -578,4 +578,4 @@ public: BEAST_DEFINE_TESTSUITE(ValidatorRPC, rpc, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/rpc/Version_test.cpp b/src/test/rpc/Version_test.cpp index 294706249a..3eb185fc2c 100644 --- a/src/test/rpc/Version_test.cpp +++ b/src/test/rpc/Version_test.cpp @@ -4,7 +4,7 @@ #include -namespace ripple { +namespace xrpl { class Version_test : public beast::unit_test::suite { @@ -280,4 +280,4 @@ public: BEAST_DEFINE_TESTSUITE(Version, rpc, ripple); -} // namespace ripple +} // namespace xrpl diff --git a/src/test/server/ServerStatus_test.cpp b/src/test/server/ServerStatus_test.cpp index 0a82c3b7e1..d487a788df 100644 --- a/src/test/server/ServerStatus_test.cpp +++ b/src/test/server/ServerStatus_test.cpp @@ -24,7 +24,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class ServerStatus_test : public beast::unit_test::suite, @@ -1229,4 +1229,4 @@ public: BEAST_DEFINE_TESTSUITE(ServerStatus, server, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/server/Server_test.cpp b/src/test/server/Server_test.cpp index 55a9b17ea0..965a48d52b 100644 --- a/src/test/server/Server_test.cpp +++ b/src/test/server/Server_test.cpp @@ -22,7 +22,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { using socket_type = boost::beast::tcp_stream; @@ -520,4 +520,4 @@ public: BEAST_DEFINE_TESTSUITE(Server, server, ripple); } // namespace test -} // namespace ripple +} // namespace xrpl diff --git a/src/test/shamap/FetchPack_test.cpp b/src/test/shamap/FetchPack_test.cpp index 13ea267da9..0a84c84633 100644 --- a/src/test/shamap/FetchPack_test.cpp +++ b/src/test/shamap/FetchPack_test.cpp @@ -13,7 +13,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace tests { class FetchPack_test : public beast::unit_test::suite @@ -72,7 +72,7 @@ public: { Serializer s; for (int d = 0; d < 3; ++d) - s.add32(ripple::rand_int(r)); + s.add32(xrpl::rand_int(r)); return make_shamapitem(s.getSHA512Half(), s.slice()); } @@ -154,4 +154,4 @@ public: BEAST_DEFINE_TESTSUITE(FetchPack, shamap, ripple); } // namespace tests -} // namespace ripple +} // namespace xrpl diff --git a/src/test/shamap/SHAMapSync_test.cpp b/src/test/shamap/SHAMapSync_test.cpp index c71ad53ce8..4b81036a48 100644 --- a/src/test/shamap/SHAMapSync_test.cpp +++ b/src/test/shamap/SHAMapSync_test.cpp @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace tests { class SHAMapSync_test : public beast::unit_test::suite @@ -171,4 +171,4 @@ public: BEAST_DEFINE_TESTSUITE(SHAMapSync, shamap, ripple); } // namespace tests -} // namespace ripple +} // namespace xrpl diff --git a/src/test/shamap/SHAMap_test.cpp b/src/test/shamap/SHAMap_test.cpp index e3e541019b..b351eb1535 100644 --- a/src/test/shamap/SHAMap_test.cpp +++ b/src/test/shamap/SHAMap_test.cpp @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace tests { #ifndef __INTELLISENSE__ @@ -385,4 +385,4 @@ class SHAMapPathProof_test : public beast::unit_test::suite BEAST_DEFINE_TESTSUITE(SHAMap, shamap, ripple); BEAST_DEFINE_TESTSUITE(SHAMapPathProof, shamap, ripple); } // namespace tests -} // namespace ripple +} // namespace xrpl diff --git a/src/test/shamap/common.h b/src/test/shamap/common.h index ac9a716912..add2c79243 100644 --- a/src/test/shamap/common.h +++ b/src/test/shamap/common.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace tests { class TestNodeFamily : public Family @@ -109,6 +109,6 @@ public: }; } // namespace tests -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/unit_test/FileDirGuard.h b/src/test/unit_test/FileDirGuard.h index c5272015cc..94ca5948bd 100644 --- a/src/test/unit_test/FileDirGuard.h +++ b/src/test/unit_test/FileDirGuard.h @@ -9,7 +9,7 @@ #include -namespace ripple { +namespace xrpl { namespace detail { /** @@ -158,6 +158,6 @@ public: }; } // namespace detail -} // namespace ripple +} // namespace xrpl #endif // TEST_UNIT_TEST_DIRGUARD_H diff --git a/src/test/unit_test/SuiteJournal.h b/src/test/unit_test/SuiteJournal.h index d4883f4721..d64be9ea9b 100644 --- a/src/test/unit_test/SuiteJournal.h +++ b/src/test/unit_test/SuiteJournal.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { // A Journal::Sink intended for use with the beast unit test framework. @@ -140,6 +140,6 @@ public: }; } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/test/unit_test/multi_runner.cpp b/src/test/unit_test/multi_runner.cpp index f6f599977e..4b1a82cd3f 100644 --- a/src/test/unit_test/multi_runner.cpp +++ b/src/test/unit_test/multi_runner.cpp @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { @@ -636,4 +636,4 @@ template class multi_runner_base; template class multi_runner_base; } // namespace detail -} // namespace ripple +} // namespace xrpl diff --git a/src/test/unit_test/multi_runner.h b/src/test/unit_test/multi_runner.h index 8c302a8007..813af61572 100644 --- a/src/test/unit_test/multi_runner.h +++ b/src/test/unit_test/multi_runner.h @@ -20,7 +20,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { @@ -335,6 +335,6 @@ multi_runner_child::run_multi(Pred pred) } } // namespace test -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/tests/libxrpl/basics/RangeSet.cpp b/src/tests/libxrpl/basics/RangeSet.cpp index d6f3691d4b..8c43b26758 100644 --- a/src/tests/libxrpl/basics/RangeSet.cpp +++ b/src/tests/libxrpl/basics/RangeSet.cpp @@ -5,7 +5,7 @@ #include #include -using namespace ripple; +using namespace xrpl; TEST_SUITE_BEGIN("RangeSet"); diff --git a/src/tests/libxrpl/basics/Slice.cpp b/src/tests/libxrpl/basics/Slice.cpp index d85d7c03d7..03d89ff174 100644 --- a/src/tests/libxrpl/basics/Slice.cpp +++ b/src/tests/libxrpl/basics/Slice.cpp @@ -5,7 +5,7 @@ #include #include -using namespace ripple; +using namespace xrpl; static std::uint8_t const data[] = { 0xa8, 0xa1, 0x38, 0x45, 0x23, 0xec, 0xe4, 0x23, 0x71, 0x6d, 0x2a, diff --git a/src/tests/libxrpl/basics/base64.cpp b/src/tests/libxrpl/basics/base64.cpp index 1191319145..e4581126b4 100644 --- a/src/tests/libxrpl/basics/base64.cpp +++ b/src/tests/libxrpl/basics/base64.cpp @@ -4,7 +4,7 @@ #include -using namespace ripple; +using namespace xrpl; static void check(std::string const& in, std::string const& out) diff --git a/src/tests/libxrpl/basics/contract.cpp b/src/tests/libxrpl/basics/contract.cpp index c7be5f8ede..a1f6f0b777 100644 --- a/src/tests/libxrpl/basics/contract.cpp +++ b/src/tests/libxrpl/basics/contract.cpp @@ -5,7 +5,7 @@ #include #include -using namespace ripple; +using namespace xrpl; TEST_CASE("contract") { diff --git a/src/tests/libxrpl/basics/mulDiv.cpp b/src/tests/libxrpl/basics/mulDiv.cpp index 2a59ff81c6..d3c58ea2f4 100644 --- a/src/tests/libxrpl/basics/mulDiv.cpp +++ b/src/tests/libxrpl/basics/mulDiv.cpp @@ -5,7 +5,7 @@ #include #include -using namespace ripple; +using namespace xrpl; TEST_CASE("mulDiv") { diff --git a/src/tests/libxrpl/basics/scope.cpp b/src/tests/libxrpl/basics/scope.cpp index 2f8248ef9a..b3774d54bd 100644 --- a/src/tests/libxrpl/basics/scope.cpp +++ b/src/tests/libxrpl/basics/scope.cpp @@ -2,7 +2,7 @@ #include -using namespace ripple; +using namespace xrpl; TEST_CASE("scope_exit") { diff --git a/src/tests/libxrpl/basics/tagged_integer.cpp b/src/tests/libxrpl/basics/tagged_integer.cpp index 945eaf9156..45efc579ab 100644 --- a/src/tests/libxrpl/basics/tagged_integer.cpp +++ b/src/tests/libxrpl/basics/tagged_integer.cpp @@ -4,7 +4,7 @@ #include -using namespace ripple; +using namespace xrpl; struct Tag1 { diff --git a/src/tests/libxrpl/crypto/csprng.cpp b/src/tests/libxrpl/crypto/csprng.cpp index 88c55dc4d0..e59c8a555a 100644 --- a/src/tests/libxrpl/crypto/csprng.cpp +++ b/src/tests/libxrpl/crypto/csprng.cpp @@ -2,7 +2,7 @@ #include -using namespace ripple; +using namespace xrpl; TEST_CASE("get values") { diff --git a/src/tests/libxrpl/json/Output.cpp b/src/tests/libxrpl/json/Output.cpp index 4960171e56..6e6c20a0e5 100644 --- a/src/tests/libxrpl/json/Output.cpp +++ b/src/tests/libxrpl/json/Output.cpp @@ -6,7 +6,7 @@ #include -using namespace ripple; +using namespace xrpl; using namespace Json; TEST_SUITE_BEGIN("JsonOutput"); diff --git a/src/tests/libxrpl/json/Value.cpp b/src/tests/libxrpl/json/Value.cpp index b73e8aadc9..98a0899ab7 100644 --- a/src/tests/libxrpl/json/Value.cpp +++ b/src/tests/libxrpl/json/Value.cpp @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { TEST_SUITE_BEGIN("json_value"); @@ -1272,4 +1272,4 @@ TEST_CASE("memory leak") TEST_SUITE_END(); -} // namespace ripple +} // namespace xrpl diff --git a/src/tests/libxrpl/json/Writer.cpp b/src/tests/libxrpl/json/Writer.cpp index 46bfd61ae2..9637184c95 100644 --- a/src/tests/libxrpl/json/Writer.cpp +++ b/src/tests/libxrpl/json/Writer.cpp @@ -6,7 +6,7 @@ #include #include -using namespace ripple; +using namespace xrpl; using namespace Json; TEST_SUITE_BEGIN("JsonWriter"); diff --git a/src/tests/libxrpl/net/HTTPClient.cpp b/src/tests/libxrpl/net/HTTPClient.cpp index 5d46f68f0c..5a484c1f56 100644 --- a/src/tests/libxrpl/net/HTTPClient.cpp +++ b/src/tests/libxrpl/net/HTTPClient.cpp @@ -13,7 +13,7 @@ #include #include -using namespace ripple; +using namespace xrpl; namespace { diff --git a/src/xrpld/app/consensus/RCLCensorshipDetector.h b/src/xrpld/app/consensus/RCLCensorshipDetector.h index d53d1197db..97d2743dc1 100644 --- a/src/xrpld/app/consensus/RCLCensorshipDetector.h +++ b/src/xrpld/app/consensus/RCLCensorshipDetector.h @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { template class RCLCensorshipDetector @@ -122,6 +122,6 @@ public: } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/consensus/RCLConsensus.cpp b/src/xrpld/app/consensus/RCLConsensus.cpp index b6b281f209..e2db76830e 100644 --- a/src/xrpld/app/consensus/RCLConsensus.cpp +++ b/src/xrpld/app/consensus/RCLConsensus.cpp @@ -30,7 +30,7 @@ #include #include -namespace ripple { +namespace xrpl { RCLConsensus::RCLConsensus( Application& app, @@ -77,7 +77,7 @@ RCLConsensus::Adaptor::Adaptor( , nUnlVote_(validatorKeys_.nodeID, j_) { XRPL_ASSERT( - valCookie_, "ripple::RCLConsensus::Adaptor::Adaptor : nonzero cookie"); + valCookie_, "xrpl::RCLConsensus::Adaptor::Adaptor : nonzero cookie"); JLOG(j_.info()) << "Consensus engine started (cookie: " + std::to_string(valCookie_) + ")"; @@ -133,10 +133,10 @@ RCLConsensus::Adaptor::acquireLedger(LedgerHash const& hash) XRPL_ASSERT( !built->open() && built->isImmutable(), - "ripple::RCLConsensus::Adaptor::acquireLedger : valid ledger state"); + "xrpl::RCLConsensus::Adaptor::acquireLedger : valid ledger state"); XRPL_ASSERT( built->info().hash == hash, - "ripple::RCLConsensus::Adaptor::acquireLedger : ledger hash match"); + "xrpl::RCLConsensus::Adaptor::acquireLedger : ledger hash match"); // Notify inbound transactions of the new ledger sequence number inboundTransactions_.newRound(built->info().seq); @@ -193,8 +193,8 @@ void RCLConsensus::Adaptor::propose(RCLCxPeerPos::Proposal const& proposal) { JLOG(j_.trace()) << (proposal.isBowOut() ? "We bow out: " : "We propose: ") - << ripple::to_string(proposal.prevLedger()) << " -> " - << ripple::to_string(proposal.position()); + << xrpl::to_string(proposal.prevLedger()) << " -> " + << xrpl::to_string(proposal.position()); protocol::TMProposeSet prop; @@ -666,10 +666,10 @@ RCLConsensus::Adaptor::doAccept( // Do these need to exist? XRPL_ASSERT( ledgerMaster_.getClosedLedger()->info().hash == built.id(), - "ripple::RCLConsensus::Adaptor::doAccept : ledger hash match"); + "xrpl::RCLConsensus::Adaptor::doAccept : ledger hash match"); XRPL_ASSERT( app_.openLedger().current()->info().parentHash == built.id(), - "ripple::RCLConsensus::Adaptor::doAccept : parent hash match"); + "xrpl::RCLConsensus::Adaptor::doAccept : parent hash match"); } //------------------------------------------------------------------------- @@ -767,7 +767,7 @@ RCLConsensus::Adaptor::buildLCL( { XRPL_ASSERT( replayData->parent()->info().hash == previousLedger.id(), - "ripple::RCLConsensus::Adaptor::buildLCL : parent hash match"); + "xrpl::RCLConsensus::Adaptor::buildLCL : parent hash match"); return buildLedger(*replayData, tapNONE, app_, j_); } return buildLedger( @@ -1113,4 +1113,4 @@ RclConsensusLogger::~RclConsensusLogger() j_.sink().writeAlways(beast::severities::kInfo, outSs.str()); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/consensus/RCLConsensus.h b/src/xrpld/app/consensus/RCLConsensus.h index b9580be08a..06b14f1ba9 100644 --- a/src/xrpld/app/consensus/RCLConsensus.h +++ b/src/xrpld/app/consensus/RCLConsensus.h @@ -21,7 +21,7 @@ #include #include -namespace ripple { +namespace xrpl { class InboundTransactions; class LocalTxs; @@ -548,6 +548,6 @@ public: return ss_; } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/consensus/RCLCxLedger.h b/src/xrpld/app/consensus/RCLCxLedger.h index 93b55d76d3..91e62cc257 100644 --- a/src/xrpld/app/consensus/RCLCxLedger.h +++ b/src/xrpld/app/consensus/RCLCxLedger.h @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Represents a ledger in RCLConsensus. @@ -69,7 +69,7 @@ public: bool closeAgree() const { - return ripple::getCloseAgree(ledger_->info()); + return xrpl::getCloseAgree(ledger_->info()); } //! The close time of this ledger @@ -90,7 +90,7 @@ public: Json::Value getJson() const { - return ripple::getJson({*ledger_, {}}); + return xrpl::getJson({*ledger_, {}}); } /** The ledger instance. @@ -100,5 +100,5 @@ public: */ std::shared_ptr ledger_; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/consensus/RCLCxPeerPos.cpp b/src/xrpld/app/consensus/RCLCxPeerPos.cpp index c1ebfc20e2..5f227b00a9 100644 --- a/src/xrpld/app/consensus/RCLCxPeerPos.cpp +++ b/src/xrpld/app/consensus/RCLCxPeerPos.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { // Used to construct received proposals RCLCxPeerPos::RCLCxPeerPos( @@ -19,7 +19,7 @@ RCLCxPeerPos::RCLCxPeerPos( // this elsewhere, but we want to be extra careful here: XRPL_ASSERT( signature.size() != 0 && signature.size() <= signature_.capacity(), - "ripple::RCLCxPeerPos::RCLCxPeerPos : valid signature size"); + "xrpl::RCLCxPeerPos::RCLCxPeerPos : valid signature size"); if (signature.size() != 0 && signature.size() <= signature_.capacity()) signature_.assign(signature.begin(), signature.end()); @@ -63,4 +63,4 @@ proposalUniqueId( return s.getSHA512Half(); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/consensus/RCLCxPeerPos.h b/src/xrpld/app/consensus/RCLCxPeerPos.h index 7202503e76..08b93d4ba9 100644 --- a/src/xrpld/app/consensus/RCLCxPeerPos.h +++ b/src/xrpld/app/consensus/RCLCxPeerPos.h @@ -14,7 +14,7 @@ #include #include -namespace ripple { +namespace xrpl { /** A peer's signed, proposed position for use in RCLConsensus. @@ -128,6 +128,6 @@ proposalUniqueId( Slice const& publicKey, Slice const& signature); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/consensus/RCLCxTx.h b/src/xrpld/app/consensus/RCLCxTx.h index 0a2f25dbd2..5e92aea8a6 100644 --- a/src/xrpld/app/consensus/RCLCxTx.h +++ b/src/xrpld/app/consensus/RCLCxTx.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { /** Represents a transaction in RCLConsensus. @@ -90,7 +90,7 @@ public: RCLTxSet(std::shared_ptr m) : map_{std::move(m)} { XRPL_ASSERT( - map_, "ripple::RCLTxSet::MutableTxSet::RCLTxSet : non-null input"); + map_, "xrpl::RCLTxSet::MutableTxSet::RCLTxSet : non-null input"); } /** Constructor from a previously created MutableTxSet @@ -158,7 +158,7 @@ public: { XRPL_ASSERT( (v.first && !v.second) || (v.second && !v.first), - "ripple::RCLTxSet::compare : either side is set"); + "xrpl::RCLTxSet::compare : either side is set"); ret[k] = static_cast(v.first); } @@ -168,5 +168,5 @@ public: //! The SHAMap representing the transactions. std::shared_ptr map_; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/consensus/RCLValidations.cpp b/src/xrpld/app/consensus/RCLValidations.cpp index d6a8747c20..6cdd8c6cc6 100644 --- a/src/xrpld/app/consensus/RCLValidations.cpp +++ b/src/xrpld/app/consensus/RCLValidations.cpp @@ -13,7 +13,7 @@ #include -namespace ripple { +namespace xrpl { RCLValidatedLedger::RCLValidatedLedger(MakeGenesis) : ledgerID_{0}, ledgerSeq_{0}, j_{beast::Journal::getNullSink()} @@ -30,7 +30,7 @@ RCLValidatedLedger::RCLValidatedLedger( { XRPL_ASSERT( hashIndex->getFieldU32(sfLastLedgerSequence) == (seq() - 1), - "ripple::RCLValidatedLedger::RCLValidatedLedger(Ledger) : valid " + "xrpl::RCLValidatedLedger::RCLValidatedLedger(Ledger) : valid " "last ledger sequence"); ancestors_ = hashIndex->getFieldV256(sfHashes).value(); } @@ -134,10 +134,10 @@ RCLValidationsAdaptor::acquire(LedgerHash const& hash) XRPL_ASSERT( !ledger->open() && ledger->isImmutable(), - "ripple::RCLValidationsAdaptor::acquire : valid ledger state"); + "xrpl::RCLValidationsAdaptor::acquire : valid ledger state"); XRPL_ASSERT( ledger->info().hash == hash, - "ripple::RCLValidationsAdaptor::acquire : ledger hash match"); + "xrpl::RCLValidationsAdaptor::acquire : ledger hash match"); return RCLValidatedLedger(std::move(ledger), j_); } @@ -177,7 +177,7 @@ handleNewValidation( if (bypassAccept == BypassAccept::yes) { XRPL_ASSERT( - j, "ripple::handleNewValidation : journal is available"); + j, "xrpl::handleNewValidation : journal is available"); if (j.has_value()) { JLOG(j->trace()) << "Bypassing checkAccept for validation " @@ -228,4 +228,4 @@ handleNewValidation( } } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/consensus/RCLValidations.h b/src/xrpld/app/consensus/RCLValidations.h index ef6d8e9423..62dd52b1dd 100644 --- a/src/xrpld/app/consensus/RCLValidations.h +++ b/src/xrpld/app/consensus/RCLValidations.h @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { class Application; @@ -26,8 +26,8 @@ class RCLValidation std::shared_ptr val_; public: - using NodeKey = ripple::PublicKey; - using NodeID = ripple::NodeID; + using NodeKey = xrpl::PublicKey; + using NodeID = xrpl::NodeID; /** Constructor @@ -238,6 +238,6 @@ handleNewValidation( BypassAccept const bypassAccept = BypassAccept::no, std::optional j = std::nullopt); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/AbstractFetchPackContainer.h b/src/xrpld/app/ledger/AbstractFetchPackContainer.h index d8826a14e3..85efe09e29 100644 --- a/src/xrpld/app/ledger/AbstractFetchPackContainer.h +++ b/src/xrpld/app/ledger/AbstractFetchPackContainer.h @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { /** An interface facilitating retrieval of fetch packs without an application or ledgermaster object. @@ -26,6 +26,6 @@ public: getFetchPack(uint256 const& nodeHash) = 0; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/AcceptedLedger.cpp b/src/xrpld/app/ledger/AcceptedLedger.cpp index 85fc1dcb37..76099ff864 100644 --- a/src/xrpld/app/ledger/AcceptedLedger.cpp +++ b/src/xrpld/app/ledger/AcceptedLedger.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { AcceptedLedger::AcceptedLedger( std::shared_ptr const& ledger, @@ -28,4 +28,4 @@ AcceptedLedger::AcceptedLedger( }); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/ledger/AcceptedLedger.h b/src/xrpld/app/ledger/AcceptedLedger.h index 0d0fe19f10..41177e7078 100644 --- a/src/xrpld/app/ledger/AcceptedLedger.h +++ b/src/xrpld/app/ledger/AcceptedLedger.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { /** A ledger that has become irrevocable. @@ -57,6 +57,6 @@ private: std::vector> transactions_; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/AcceptedLedgerTx.cpp b/src/xrpld/app/ledger/AcceptedLedgerTx.cpp index 18de7b5d06..d57246444f 100644 --- a/src/xrpld/app/ledger/AcceptedLedgerTx.cpp +++ b/src/xrpld/app/ledger/AcceptedLedgerTx.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { AcceptedLedgerTx::AcceptedLedgerTx( std::shared_ptr const& ledger, @@ -17,7 +17,7 @@ AcceptedLedgerTx::AcceptedLedgerTx( { XRPL_ASSERT( !ledger->open(), - "ripple::AcceptedLedgerTx::AcceptedLedgerTx : valid ledger state"); + "xrpl::AcceptedLedgerTx::AcceptedLedgerTx : valid ledger state"); Serializer s; met->add(s); @@ -62,8 +62,8 @@ AcceptedLedgerTx::getEscMeta() const { XRPL_ASSERT( !mRawMeta.empty(), - "ripple::AcceptedLedgerTx::getEscMeta : metadata is set"); + "xrpl::AcceptedLedgerTx::getEscMeta : metadata is set"); return sqlBlobLiteral(mRawMeta); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/ledger/AcceptedLedgerTx.h b/src/xrpld/app/ledger/AcceptedLedgerTx.h index aeac800c5c..efea5b9162 100644 --- a/src/xrpld/app/ledger/AcceptedLedgerTx.h +++ b/src/xrpld/app/ledger/AcceptedLedgerTx.h @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { class Logs; @@ -85,6 +85,6 @@ private: Json::Value mJson; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/AccountStateSF.cpp b/src/xrpld/app/ledger/AccountStateSF.cpp index 052f9f9a69..44f18b5cd3 100644 --- a/src/xrpld/app/ledger/AccountStateSF.cpp +++ b/src/xrpld/app/ledger/AccountStateSF.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { void AccountStateSF::gotNode( @@ -20,4 +20,4 @@ AccountStateSF::getNode(SHAMapHash const& nodeHash) const return fp_.getFetchPack(nodeHash.as_uint256()); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/ledger/AccountStateSF.h b/src/xrpld/app/ledger/AccountStateSF.h index 13844e2417..84738f6e1f 100644 --- a/src/xrpld/app/ledger/AccountStateSF.h +++ b/src/xrpld/app/ledger/AccountStateSF.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { // This class is only needed on add functions // sync filter for account state nodes during ledger sync @@ -34,6 +34,6 @@ private: AbstractFetchPackContainer& fp_; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/BookListeners.cpp b/src/xrpld/app/ledger/BookListeners.cpp index 31b5d102ca..69d03058a9 100644 --- a/src/xrpld/app/ledger/BookListeners.cpp +++ b/src/xrpld/app/ledger/BookListeners.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { void BookListeners::addSubscriber(InfoSub::ref sub) @@ -44,4 +44,4 @@ BookListeners::publish( } } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/ledger/BookListeners.h b/src/xrpld/app/ledger/BookListeners.h index ad9e0fe0c7..784172974e 100644 --- a/src/xrpld/app/ledger/BookListeners.h +++ b/src/xrpld/app/ledger/BookListeners.h @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Listen to public/subscribe messages from a book. */ class BookListeners @@ -50,6 +50,6 @@ private: hash_map mListeners; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/BuildLedger.h b/src/xrpld/app/ledger/BuildLedger.h index 8c127fb365..ad6aba3288 100644 --- a/src/xrpld/app/ledger/BuildLedger.h +++ b/src/xrpld/app/ledger/BuildLedger.h @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { class Application; class CanonicalTXSet; @@ -57,5 +57,5 @@ buildLedger( Application& app, beast::Journal j); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/ConsensusTransSetSF.cpp b/src/xrpld/app/ledger/ConsensusTransSetSF.cpp index fbac9c8553..2fa07509f2 100644 --- a/src/xrpld/app/ledger/ConsensusTransSetSF.cpp +++ b/src/xrpld/app/ledger/ConsensusTransSetSF.cpp @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { ConsensusTransSetSF::ConsensusTransSetSF(Application& app, NodeCache& nodeCache) : app_(app), m_nodeCache(nodeCache), j_(app.journal("TransactionAcquire")) @@ -43,7 +43,7 @@ ConsensusTransSetSF::gotNode( auto stx = std::make_shared(std::ref(sit)); XRPL_ASSERT( stx->getTransactionID() == nodeHash.as_uint256(), - "ripple::ConsensusTransSetSF::gotNode : transaction hash " + "xrpl::ConsensusTransSetSF::gotNode : transaction hash " "match"); auto const pap = &app_; app_.getJobQueue().addJob(jtTRANSACTION, "TXS->TXN", [pap, stx]() { @@ -78,7 +78,7 @@ ConsensusTransSetSF::getNode(SHAMapHash const& nodeHash) const txn->getSTransaction()->add(s); XRPL_ASSERT( sha512Half(s.slice()) == nodeHash.as_uint256(), - "ripple::ConsensusTransSetSF::getNode : transaction hash match"); + "xrpl::ConsensusTransSetSF::getNode : transaction hash match"); nodeData = s.peekData(); return nodeData; } @@ -86,4 +86,4 @@ ConsensusTransSetSF::getNode(SHAMapHash const& nodeHash) const return std::nullopt; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/ledger/ConsensusTransSetSF.h b/src/xrpld/app/ledger/ConsensusTransSetSF.h index 23ee6b9fac..cdb1c47183 100644 --- a/src/xrpld/app/ledger/ConsensusTransSetSF.h +++ b/src/xrpld/app/ledger/ConsensusTransSetSF.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { // Sync filters allow low-level SHAMapSync code to interact correctly with // higher-level structures such as caches and transaction stores @@ -38,6 +38,6 @@ private: beast::Journal const j_; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/InboundLedger.h b/src/xrpld/app/ledger/InboundLedger.h index 0d5639909b..1b4353b260 100644 --- a/src/xrpld/app/ledger/InboundLedger.h +++ b/src/xrpld/app/ledger/InboundLedger.h @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { // A ledger we are trying to acquire class InboundLedger final : public TimeoutCounter, @@ -179,6 +179,6 @@ private: std::unique_ptr mPeerSet; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/InboundLedgers.h b/src/xrpld/app/ledger/InboundLedgers.h index 6eba2eec87..0e4d9996bb 100644 --- a/src/xrpld/app/ledger/InboundLedgers.h +++ b/src/xrpld/app/ledger/InboundLedgers.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { /** Manages the lifetime of inbound ledgers. @@ -84,6 +84,6 @@ make_InboundLedgers( InboundLedgers::clock_type& clock, beast::insight::Collector::ptr const& collector); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/InboundTransactions.h b/src/xrpld/app/ledger/InboundTransactions.h index 41dab5307e..6c0281e26f 100644 --- a/src/xrpld/app/ledger/InboundTransactions.h +++ b/src/xrpld/app/ledger/InboundTransactions.h @@ -8,7 +8,7 @@ #include -namespace ripple { +namespace xrpl { class Application; @@ -78,6 +78,6 @@ make_InboundTransactions( beast::insight::Collector::ptr const& collector, std::function const&, bool)> gotSet); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/Ledger.cpp b/src/xrpld/app/ledger/Ledger.cpp index 6bf3170f18..85c6cda0d3 100644 --- a/src/xrpld/app/ledger/Ledger.cpp +++ b/src/xrpld/app/ledger/Ledger.cpp @@ -27,7 +27,7 @@ #include #include -namespace ripple { +namespace xrpl { create_genesis_t const create_genesis{}; @@ -341,7 +341,7 @@ Ledger::setAccepted( bool correctCloseTime) { // Used when we witnessed the consensus. - XRPL_ASSERT(!open(), "ripple::Ledger::setAccepted : valid ledger state"); + XRPL_ASSERT(!open(), "xrpl::Ledger::setAccepted : valid ledger state"); info_.closeTime = closeTime; info_.closeTimeResolution = closeResolution; @@ -415,7 +415,7 @@ Ledger::read(Keylet const& k) const if (k.key == beast::zero) { // LCOV_EXCL_START - UNREACHABLE("ripple::Ledger::read : zero key"); + UNREACHABLE("xrpl::Ledger::read : zero key"); return nullptr; // LCOV_EXCL_STOP } @@ -537,7 +537,7 @@ Ledger::rawTxInsert( std::shared_ptr const& metaData) { XRPL_ASSERT( - metaData, "ripple::Ledger::rawTxInsert : non-null metadata input"); + metaData, "xrpl::Ledger::rawTxInsert : non-null metadata input"); // low-level - just add to table Serializer s(txn->getDataLength() + metaData->getDataLength() + 16); @@ -556,7 +556,7 @@ Ledger::rawTxInsertWithHash( { XRPL_ASSERT( metaData, - "ripple::Ledger::rawTxInsertWithHash : non-null metadata input"); + "xrpl::Ledger::rawTxInsertWithHash : non-null metadata input"); // low-level - just add to table Serializer s(txn->getDataLength() + metaData->getDataLength() + 16); @@ -654,7 +654,7 @@ Ledger::defaultFees(Config const& config) { XRPL_ASSERT( fees_.base == 0 && fees_.reserve == 0 && fees_.increment == 0, - "ripple::Ledger::defaultFees : zero fees"); + "xrpl::Ledger::defaultFees : zero fees"); if (fees_.base == 0) fees_.base = config.FEES.reference_fee; if (fees_.reserve == 0) @@ -851,7 +851,7 @@ Ledger::assertSensible(beast::Journal ledgerJ) const JLOG(ledgerJ.fatal()) << "ledger is not sensible" << j; - UNREACHABLE("ripple::Ledger::assertSensible : ledger is not sensible"); + UNREACHABLE("xrpl::Ledger::assertSensible : ledger is not sensible"); return false; // LCOV_EXCL_STOP @@ -888,7 +888,7 @@ Ledger::updateSkipList() XRPL_ASSERT( hashes.size() <= 256, - "ripple::Ledger::updateSkipList : first maximum hashes size"); + "xrpl::Ledger::updateSkipList : first maximum hashes size"); hashes.push_back(info_.parentHash); sle->setFieldV256(sfHashes, STVector256(hashes)); sle->setFieldU32(sfLastLedgerSequence, prevIndex); @@ -915,7 +915,7 @@ Ledger::updateSkipList() } XRPL_ASSERT( hashes.size() <= 256, - "ripple::Ledger::updateSkipList : second maximum hashes size"); + "xrpl::Ledger::updateSkipList : second maximum hashes size"); if (hashes.size() == 256) hashes.erase(hashes.begin()); hashes.push_back(info_.parentHash); @@ -997,7 +997,7 @@ pendSaveValidated( } XRPL_ASSERT( - ledger->isImmutable(), "ripple::pendSaveValidated : immutable ledger"); + ledger->isImmutable(), "xrpl::pendSaveValidated : immutable ledger"); if (!app.pendingSaves().shouldWork(ledger->info().seq, isSynchronous)) { @@ -1077,7 +1077,7 @@ finishLoadByIndexOrHash( XRPL_ASSERT( ledger->info().seq < XRP_LEDGER_EARLIEST_FEES || ledger->read(keylet::fees()), - "ripple::finishLoadByIndexOrHash : valid ledger fees"); + "xrpl::finishLoadByIndexOrHash : valid ledger fees"); ledger->setImmutable(); JLOG(j.trace()) << "Loaded ledger: " << to_string(ledger->info().hash); @@ -1118,10 +1118,10 @@ loadByHash(uint256 const& ledgerHash, Application& app, bool acquire) finishLoadByIndexOrHash(ledger, app.config(), app.journal("Ledger")); XRPL_ASSERT( !ledger || ledger->info().hash == ledgerHash, - "ripple::loadByHash : ledger hash match if loaded"); + "xrpl::loadByHash : ledger hash match if loaded"); return ledger; } return {}; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/ledger/Ledger.h b/src/xrpld/app/ledger/Ledger.h index 30bedc0447..04179c0d29 100644 --- a/src/xrpld/app/ledger/Ledger.h +++ b/src/xrpld/app/ledger/Ledger.h @@ -14,7 +14,7 @@ #include #include -namespace ripple { +namespace xrpl { class Application; class Job; @@ -459,6 +459,6 @@ deserializeTxPlusMeta(SHAMapItem const& item); uint256 calculateLedgerHash(LedgerInfo const& info); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/LedgerCleaner.h b/src/xrpld/app/ledger/LedgerCleaner.h index 66c8c070c9..2377485f22 100644 --- a/src/xrpld/app/ledger/LedgerCleaner.h +++ b/src/xrpld/app/ledger/LedgerCleaner.h @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Check the ledger/transaction databases to make sure they have continuity */ class LedgerCleaner : public beast::PropertyStream::Source @@ -43,6 +43,6 @@ public: std::unique_ptr make_LedgerCleaner(Application& app, beast::Journal journal); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/LedgerHistory.cpp b/src/xrpld/app/ledger/LedgerHistory.cpp index 4f2660c70a..4124b2006f 100644 --- a/src/xrpld/app/ledger/LedgerHistory.cpp +++ b/src/xrpld/app/ledger/LedgerHistory.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { // FIXME: Need to clean up ledgers by index at some point @@ -42,7 +42,7 @@ LedgerHistory::insert( XRPL_ASSERT( ledger->stateMap().getHash().isNonZero(), - "ripple::LedgerHistory::insert : nonzero hash"); + "xrpl::LedgerHistory::insert : nonzero hash"); std::unique_lock sl(m_ledgers_by_hash.peekMutex()); @@ -85,7 +85,7 @@ LedgerHistory::getLedgerBySeq(LedgerIndex index) XRPL_ASSERT( ret->info().seq == index, - "ripple::LedgerHistory::getLedgerBySeq : result sequence match"); + "xrpl::LedgerHistory::getLedgerBySeq : result sequence match"); { // Add this ledger to the local tracking by index @@ -93,7 +93,7 @@ LedgerHistory::getLedgerBySeq(LedgerIndex index) XRPL_ASSERT( ret->isImmutable(), - "ripple::LedgerHistory::getLedgerBySeq : immutable result ledger"); + "xrpl::LedgerHistory::getLedgerBySeq : immutable result ledger"); m_ledgers_by_hash.canonicalize_replace_client(ret->info().hash, ret); mLedgersByIndex[ret->info().seq] = ret->info().hash; return (ret->info().seq == index) ? ret : nullptr; @@ -109,11 +109,11 @@ LedgerHistory::getLedgerByHash(LedgerHash const& hash) { XRPL_ASSERT( ret->isImmutable(), - "ripple::LedgerHistory::getLedgerByHash : immutable fetched " + "xrpl::LedgerHistory::getLedgerByHash : immutable fetched " "ledger"); XRPL_ASSERT( ret->info().hash == hash, - "ripple::LedgerHistory::getLedgerByHash : fetched ledger hash " + "xrpl::LedgerHistory::getLedgerByHash : fetched ledger hash " "match"); return ret; } @@ -125,14 +125,14 @@ LedgerHistory::getLedgerByHash(LedgerHash const& hash) XRPL_ASSERT( ret->isImmutable(), - "ripple::LedgerHistory::getLedgerByHash : immutable loaded ledger"); + "xrpl::LedgerHistory::getLedgerByHash : immutable loaded ledger"); XRPL_ASSERT( ret->info().hash == hash, - "ripple::LedgerHistory::getLedgerByHash : loaded ledger hash match"); + "xrpl::LedgerHistory::getLedgerByHash : loaded ledger hash match"); m_ledgers_by_hash.canonicalize_replace_client(ret->info().hash, ret); XRPL_ASSERT( ret->info().hash == hash, - "ripple::LedgerHistory::getLedgerByHash : result hash match"); + "xrpl::LedgerHistory::getLedgerByHash : result hash match"); return ret; } @@ -178,7 +178,7 @@ log_metadata_difference( XRPL_ASSERT( validMetaData || builtMetaData, - "ripple::log_metadata_difference : some metadata present"); + "xrpl::log_metadata_difference : some metadata present"); if (validMetaData && builtMetaData) { @@ -325,8 +325,7 @@ LedgerHistory::handleMismatch( Json::Value const& consensus) { XRPL_ASSERT( - built != valid, - "ripple::LedgerHistory::handleMismatch : unequal hashes"); + built != valid, "xrpl::LedgerHistory::handleMismatch : unequal hashes"); ++mismatch_counter_; auto builtLedger = getLedgerByHash(built); @@ -343,7 +342,7 @@ LedgerHistory::handleMismatch( XRPL_ASSERT( builtLedger->info().seq == validLedger->info().seq, - "ripple::LedgerHistory::handleMismatch : sequence match"); + "xrpl::LedgerHistory::handleMismatch : sequence match"); if (auto stream = j_.debug()) { @@ -437,7 +436,7 @@ LedgerHistory::builtLedger( LedgerIndex index = ledger->info().seq; LedgerHash hash = ledger->info().hash; XRPL_ASSERT( - !hash.isZero(), "ripple::LedgerHistory::builtLedger : nonzero hash"); + !hash.isZero(), "xrpl::LedgerHistory::builtLedger : nonzero hash"); std::unique_lock sl(m_consensus_validated.peekMutex()); @@ -478,8 +477,7 @@ LedgerHistory::validatedLedger( LedgerIndex index = ledger->info().seq; LedgerHash hash = ledger->info().hash; XRPL_ASSERT( - !hash.isZero(), - "ripple::LedgerHistory::validatedLedger : nonzero hash"); + !hash.isZero(), "xrpl::LedgerHistory::validatedLedger : nonzero hash"); std::unique_lock sl(m_consensus_validated.peekMutex()); @@ -538,4 +536,4 @@ LedgerHistory::clearLedgerCachePrior(LedgerIndex seq) } } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/ledger/LedgerHistory.h b/src/xrpld/app/ledger/LedgerHistory.h index 02346265bd..279d009429 100644 --- a/src/xrpld/app/ledger/LedgerHistory.h +++ b/src/xrpld/app/ledger/LedgerHistory.h @@ -9,7 +9,7 @@ #include -namespace ripple { +namespace xrpl { // VFALCO TODO Rename to OldLedgers ? @@ -135,6 +135,6 @@ private: beast::Journal j_; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/LedgerHolder.h b/src/xrpld/app/ledger/LedgerHolder.h index 8925d688ac..c0a81778ae 100644 --- a/src/xrpld/app/ledger/LedgerHolder.h +++ b/src/xrpld/app/ledger/LedgerHolder.h @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { // Can std::atomic> make this lock free? @@ -53,6 +53,6 @@ private: std::shared_ptr m_heldLedger; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/LedgerMaster.h b/src/xrpld/app/ledger/LedgerMaster.h index eba57894be..38dff835b7 100644 --- a/src/xrpld/app/ledger/LedgerMaster.h +++ b/src/xrpld/app/ledger/LedgerMaster.h @@ -21,7 +21,7 @@ #include #include -namespace ripple { +namespace xrpl { class Peer; class Transaction; @@ -401,6 +401,6 @@ private: } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/LedgerReplay.h b/src/xrpld/app/ledger/LedgerReplay.h index 5d26d36e99..29e8a835fe 100644 --- a/src/xrpld/app/ledger/LedgerReplay.h +++ b/src/xrpld/app/ledger/LedgerReplay.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { class Ledger; class STTx; @@ -52,6 +52,6 @@ public: } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/LedgerReplayTask.h b/src/xrpld/app/ledger/LedgerReplayTask.h index d7d24f86f2..623a193d93 100644 --- a/src/xrpld/app/ledger/LedgerReplayTask.h +++ b/src/xrpld/app/ledger/LedgerReplayTask.h @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { class InboundLedgers; class Ledger; class LedgerDeltaAcquire; @@ -161,6 +161,6 @@ private: friend class test::LedgerReplayClient; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/LedgerReplayer.h b/src/xrpld/app/ledger/LedgerReplayer.h index b05d92d05d..e80b529576 100644 --- a/src/xrpld/app/ledger/LedgerReplayer.h +++ b/src/xrpld/app/ledger/LedgerReplayer.h @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace test { class LedgerReplayClient; @@ -141,6 +141,6 @@ private: friend class test::LedgerReplayClient; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/LedgerToJson.h b/src/xrpld/app/ledger/LedgerToJson.h index 6bc227ed43..4c25ff5e02 100644 --- a/src/xrpld/app/ledger/LedgerToJson.h +++ b/src/xrpld/app/ledger/LedgerToJson.h @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { struct LedgerFill { @@ -53,6 +53,6 @@ addJson(Json::Value&, LedgerFill const&); Json::Value getJson(LedgerFill const&); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/LocalTxs.h b/src/xrpld/app/ledger/LocalTxs.h index c60d3bce1a..d02e1027a0 100644 --- a/src/xrpld/app/ledger/LocalTxs.h +++ b/src/xrpld/app/ledger/LocalTxs.h @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { // Track transactions issued by local clients // Ensure we always apply them to our open ledger @@ -42,6 +42,6 @@ public: std::unique_ptr make_LocalTxs(); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/OpenLedger.h b/src/xrpld/app/ledger/OpenLedger.h index c21e858f44..45a3517168 100644 --- a/src/xrpld/app/ledger/OpenLedger.h +++ b/src/xrpld/app/ledger/OpenLedger.h @@ -14,7 +14,7 @@ #include -namespace ripple { +namespace xrpl { // How many total extra passes we make // We must ensure we make at least one non-retriable pass @@ -247,7 +247,7 @@ OpenLedger::apply( // If there are any transactions left, we must have // tried them in at least one final pass XRPL_ASSERT( - retries.empty() || !retry, "ripple::OpenLedger::apply : valid retries"); + retries.empty() || !retry, "xrpl::OpenLedger::apply : valid retries"); } //------------------------------------------------------------------------------ @@ -266,6 +266,6 @@ debugTostr(SHAMap const& set); std::string debugTostr(std::shared_ptr const& view); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/OrderBookDB.cpp b/src/xrpld/app/ledger/OrderBookDB.cpp index da4bc1d28f..916d7d4138 100644 --- a/src/xrpld/app/ledger/OrderBookDB.cpp +++ b/src/xrpld/app/ledger/OrderBookDB.cpp @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { OrderBookDB::OrderBookDB(Application& app) : app_(app), seq_(0), j_(app.journal("OrderBookDB")) @@ -249,7 +249,7 @@ OrderBookDB::makeBookListeners(Book const& book) mListeners[book] = ret; XRPL_ASSERT( getBookListeners(book) == ret, - "ripple::OrderBookDB::makeBookListeners : result roundtrip " + "xrpl::OrderBookDB::makeBookListeners : result roundtrip " "lookup"); } @@ -325,4 +325,4 @@ OrderBookDB::processTxn( } } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/ledger/OrderBookDB.h b/src/xrpld/app/ledger/OrderBookDB.h index 9a1528c794..68bdf294a9 100644 --- a/src/xrpld/app/ledger/OrderBookDB.h +++ b/src/xrpld/app/ledger/OrderBookDB.h @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { class OrderBookDB { @@ -81,6 +81,6 @@ private: beast::Journal const j_; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/PendingSaves.h b/src/xrpld/app/ledger/PendingSaves.h index 5082936ec8..24eb50e568 100644 --- a/src/xrpld/app/ledger/PendingSaves.h +++ b/src/xrpld/app/ledger/PendingSaves.h @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Keeps track of which ledgers haven't been fully saved. @@ -124,6 +124,6 @@ public: } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/TransactionMaster.h b/src/xrpld/app/ledger/TransactionMaster.h index 5fbf00a0d5..a9bf05065d 100644 --- a/src/xrpld/app/ledger/TransactionMaster.h +++ b/src/xrpld/app/ledger/TransactionMaster.h @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { class Application; class STTx; @@ -77,6 +77,6 @@ private: TaggedCache mCache; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/TransactionStateSF.cpp b/src/xrpld/app/ledger/TransactionStateSF.cpp index e861cbd2cc..af7dd8640a 100644 --- a/src/xrpld/app/ledger/TransactionStateSF.cpp +++ b/src/xrpld/app/ledger/TransactionStateSF.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { void TransactionStateSF::gotNode( @@ -13,7 +13,7 @@ TransactionStateSF::gotNode( { XRPL_ASSERT( type != SHAMapNodeType::tnTRANSACTION_NM, - "ripple::TransactionStateSF::gotNode : valid input"); + "xrpl::TransactionStateSF::gotNode : valid input"); db_.store( hotTRANSACTION_NODE, std::move(nodeData), @@ -27,4 +27,4 @@ TransactionStateSF::getNode(SHAMapHash const& nodeHash) const return fp_.getFetchPack(nodeHash.as_uint256()); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/ledger/TransactionStateSF.h b/src/xrpld/app/ledger/TransactionStateSF.h index 50a77edc56..9950134e4b 100644 --- a/src/xrpld/app/ledger/TransactionStateSF.h +++ b/src/xrpld/app/ledger/TransactionStateSF.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { // This class is only needed on add functions // sync filter for transactions tree during ledger sync @@ -34,6 +34,6 @@ private: AbstractFetchPackContainer& fp_; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/detail/BuildLedger.cpp b/src/xrpld/app/ledger/detail/BuildLedger.cpp index 97824e3023..1a3031c3c6 100644 --- a/src/xrpld/app/ledger/detail/BuildLedger.cpp +++ b/src/xrpld/app/ledger/detail/BuildLedger.cpp @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { /* Generic buildLedgerImpl that dispatches to ApplyTxs invocable with signature void(OpenView&, std::shared_ptr const&) @@ -39,7 +39,7 @@ buildLedgerImpl( { OpenView accum(&*built); XRPL_ASSERT( - !accum.open(), "ripple::buildLedgerImpl : valid ledger state"); + !accum.open(), "xrpl::buildLedgerImpl : valid ledger state"); applyTxs(accum, built); accum.apply(*built); } @@ -60,7 +60,7 @@ buildLedgerImpl( XRPL_ASSERT( built->info().seq < XRP_LEDGER_EARLIEST_FEES || built->read(keylet::fees()), - "ripple::buildLedgerImpl : valid ledger fees"); + "xrpl::buildLedgerImpl : valid ledger fees"); built->setAccepted(closeTime, closeResolution, closeTimeCorrect); return built; @@ -154,7 +154,7 @@ applyTransactions( // tried them in at least one final pass XRPL_ASSERT( txns.empty() || !certainRetry, - "ripple::applyTransactions : retry transactions"); + "xrpl::applyTransactions : retry transactions"); return count; } @@ -228,4 +228,4 @@ buildLedger( }); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/ledger/detail/InboundLedger.cpp b/src/xrpld/app/ledger/detail/InboundLedger.cpp index 5bfa9144d3..65316ec892 100644 --- a/src/xrpld/app/ledger/detail/InboundLedger.cpp +++ b/src/xrpld/app/ledger/detail/InboundLedger.cpp @@ -18,7 +18,7 @@ #include #include -namespace ripple { +namespace xrpl { using namespace std::chrono_literals; @@ -104,7 +104,7 @@ InboundLedger::init(ScopedLockType& collectionLock) XRPL_ASSERT( mLedger->info().seq < XRP_LEDGER_EARLIEST_FEES || mLedger->read(keylet::fees()), - "ripple::InboundLedger::init : valid ledger fees"); + "xrpl::InboundLedger::init : valid ledger fees"); mLedger->setImmutable(); if (mReason == Reason::HISTORY) @@ -336,7 +336,7 @@ InboundLedger::tryDB(NodeStore::Database& srcDB) XRPL_ASSERT( mLedger->info().seq < XRP_LEDGER_EARLIEST_FEES || mLedger->read(keylet::fees()), - "ripple::InboundLedger::tryDB : valid ledger fees"); + "xrpl::InboundLedger::tryDB : valid ledger fees"); mLedger->setImmutable(); } } @@ -431,15 +431,14 @@ InboundLedger::done() << mStats.get(); XRPL_ASSERT( - complete_ || failed_, - "ripple::InboundLedger::done : complete or failed"); + complete_ || failed_, "xrpl::InboundLedger::done : complete or failed"); if (complete_ && !failed_ && mLedger) { XRPL_ASSERT( mLedger->info().seq < XRP_LEDGER_EARLIEST_FEES || mLedger->read(keylet::fees()), - "ripple::InboundLedger::done : valid ledger fees"); + "xrpl::InboundLedger::done : valid ledger fees"); mLedger->setImmutable(); switch (mReason) { @@ -603,7 +602,7 @@ InboundLedger::trigger(std::shared_ptr const& peer, TriggerReason reason) { XRPL_ASSERT( mLedger, - "ripple::InboundLedger::trigger : non-null ledger to read state " + "xrpl::InboundLedger::trigger : non-null ledger to read state " "from"); if (!mLedger->stateMap().isValid()) @@ -678,7 +677,7 @@ InboundLedger::trigger(std::shared_ptr const& peer, TriggerReason reason) { XRPL_ASSERT( mLedger, - "ripple::InboundLedger::trigger : non-null ledger to read " + "xrpl::InboundLedger::trigger : non-null ledger to read " "transactions from"); if (!mLedger->txMap().isValid()) @@ -945,7 +944,7 @@ InboundLedger::takeAsRootNode(Slice const& data, SHAMapAddNode& san) if (!mHaveHeader) { // LCOV_EXCL_START - UNREACHABLE("ripple::InboundLedger::takeAsRootNode : no ledger header"); + UNREACHABLE("xrpl::InboundLedger::takeAsRootNode : no ledger header"); return false; // LCOV_EXCL_STOP } @@ -972,7 +971,7 @@ InboundLedger::takeTxRootNode(Slice const& data, SHAMapAddNode& san) if (!mHaveHeader) { // LCOV_EXCL_START - UNREACHABLE("ripple::InboundLedger::takeTxRootNode : no ledger header"); + UNREACHABLE("xrpl::InboundLedger::takeTxRootNode : no ledger header"); return false; // LCOV_EXCL_STOP } @@ -1334,4 +1333,4 @@ InboundLedger::getJson(int) return ret; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/ledger/detail/InboundLedgers.cpp b/src/xrpld/app/ledger/detail/InboundLedgers.cpp index 7e1ba88094..4f395e0c7b 100644 --- a/src/xrpld/app/ledger/detail/InboundLedgers.cpp +++ b/src/xrpld/app/ledger/detail/InboundLedgers.cpp @@ -16,7 +16,7 @@ #include #include -namespace ripple { +namespace xrpl { class InboundLedgersImp : public InboundLedgers { @@ -56,7 +56,7 @@ public: auto doAcquire = [&, seq, reason]() -> std::shared_ptr { XRPL_ASSERT( hash.isNonZero(), - "ripple::InboundLedgersImp::acquire::doAcquire : nonzero hash"); + "xrpl::InboundLedgersImp::acquire::doAcquire : nonzero hash"); // probably not the right rule if (app_.getOPs().isNeedNetworkLedger() && @@ -146,8 +146,7 @@ public: find(uint256 const& hash) override { XRPL_ASSERT( - hash.isNonZero(), - "ripple::InboundLedgersImp::find : nonzero input"); + hash.isNonZero(), "xrpl::InboundLedgersImp::find : nonzero input"); std::shared_ptr ret; @@ -311,7 +310,7 @@ public: { XRPL_ASSERT( it.second, - "ripple::InboundLedgersImp::getInfo : non-null ledger"); + "xrpl::InboundLedgersImp::getInfo : non-null ledger"); acqs.push_back(it); } for (auto const& it : mRecentFailures) @@ -348,7 +347,7 @@ public: { XRPL_ASSERT( it.second, - "ripple::InboundLedgersImp::gotFetchPack : non-null " + "xrpl::InboundLedgersImp::gotFetchPack : non-null " "ledger"); acquires.push_back(it.second); } @@ -458,4 +457,4 @@ make_InboundLedgers( app, clock, collector, make_PeerSetBuilder(app)); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/ledger/detail/InboundTransactions.cpp b/src/xrpld/app/ledger/detail/InboundTransactions.cpp index 93e0fbdec0..e443518529 100644 --- a/src/xrpld/app/ledger/detail/InboundTransactions.cpp +++ b/src/xrpld/app/ledger/detail/InboundTransactions.cpp @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { enum { // Ideal number of peers to start with @@ -258,4 +258,4 @@ make_InboundTransactions( app, collector, std::move(gotSet), make_PeerSetBuilder(app)); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/ledger/detail/LedgerCleaner.cpp b/src/xrpld/app/ledger/detail/LedgerCleaner.cpp index 5de811fc39..171cc63985 100644 --- a/src/xrpld/app/ledger/detail/LedgerCleaner.cpp +++ b/src/xrpld/app/ledger/detail/LedgerCleaner.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { /* @@ -215,7 +215,7 @@ private: break; XRPL_ASSERT( state_ == State::cleaning, - "ripple::LedgerCleanerImp::run : is cleaning"); + "xrpl::LedgerCleanerImp::run : is cleaning"); } doLedgerCleaner(); } @@ -338,8 +338,7 @@ private: bool const nonzero(refHash.isNonZero()); XRPL_ASSERT( - nonzero, - "ripple::LedgerCleanerImp::getHash : nonzero hash"); + nonzero, "xrpl::LedgerCleanerImp::getHash : nonzero hash"); if (nonzero) { // We found the hash and sequence of a better reference @@ -443,4 +442,4 @@ make_LedgerCleaner(Application& app, beast::Journal journal) return std::make_unique(app, journal); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/ledger/detail/LedgerDeltaAcquire.cpp b/src/xrpld/app/ledger/detail/LedgerDeltaAcquire.cpp index 4a91c597d5..0154e3a7e1 100644 --- a/src/xrpld/app/ledger/detail/LedgerDeltaAcquire.cpp +++ b/src/xrpld/app/ledger/detail/LedgerDeltaAcquire.cpp @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { LedgerDeltaAcquire::LedgerDeltaAcquire( Application& app, @@ -182,10 +182,10 @@ LedgerDeltaAcquire::tryBuild(std::shared_ptr const& parent) XRPL_ASSERT( parent->seq() + 1 == replayTemp_->seq(), - "ripple::LedgerDeltaAcquire::tryBuild : parent sequence match"); + "xrpl::LedgerDeltaAcquire::tryBuild : parent sequence match"); XRPL_ASSERT( parent->info().hash == replayTemp_->info().parentHash, - "ripple::LedgerDeltaAcquire::tryBuild : parent hash match"); + "xrpl::LedgerDeltaAcquire::tryBuild : parent hash match"); // build ledger LedgerReplay replayData(parent, replayTemp_, std::move(orderedTxns_)); fullLedger_ = buildLedger(replayData, tapNONE, app_, journal_); @@ -247,7 +247,7 @@ LedgerDeltaAcquire::onLedgerBuilt( void LedgerDeltaAcquire::notify(ScopedLockType& sl) { - XRPL_ASSERT(isDone(), "ripple::LedgerDeltaAcquire::notify : is done"); + XRPL_ASSERT(isDone(), "xrpl::LedgerDeltaAcquire::notify : is done"); std::vector toCall; std::swap(toCall, dataReadyCallbacks_); auto const good = !failed_; @@ -261,4 +261,4 @@ LedgerDeltaAcquire::notify(ScopedLockType& sl) sl.lock(); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/ledger/detail/LedgerDeltaAcquire.h b/src/xrpld/app/ledger/detail/LedgerDeltaAcquire.h index ece0ba44d5..62b09d5414 100644 --- a/src/xrpld/app/ledger/detail/LedgerDeltaAcquire.h +++ b/src/xrpld/app/ledger/detail/LedgerDeltaAcquire.h @@ -10,7 +10,7 @@ #include -namespace ripple { +namespace xrpl { class InboundLedgers; class PeerSet; namespace test { @@ -142,6 +142,6 @@ private: friend class test::LedgerReplayClient; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/detail/LedgerMaster.cpp b/src/xrpld/app/ledger/detail/LedgerMaster.cpp index 8f0a2601eb..40d2a77597 100644 --- a/src/xrpld/app/ledger/detail/LedgerMaster.cpp +++ b/src/xrpld/app/ledger/detail/LedgerMaster.cpp @@ -37,7 +37,7 @@ #include #include -namespace ripple { +namespace xrpl { // Don't catch up more than 100 ledgers (cannot exceed 256) static constexpr int MAX_LEDGER_GAP{100}; @@ -257,7 +257,7 @@ LedgerMaster::setValidLedger(std::shared_ptr const& l) mValidLedgerSeq || !app_.getMaxDisallowedLedger() || l->info().seq + max_ledger_difference_ > app_.getMaxDisallowedLedger(), - "ripple::LedgerMaster::setValidLedger : valid ledger sequence"); + "xrpl::LedgerMaster::setValidLedger : valid ledger sequence"); (void)max_ledger_difference_; mValidLedgerSeq = l->info().seq; @@ -322,7 +322,7 @@ LedgerMaster::addHeldTransaction( bool LedgerMaster::canBeCurrent(std::shared_ptr const& ledger) { - XRPL_ASSERT(ledger, "ripple::LedgerMaster::canBeCurrent : non-null input"); + XRPL_ASSERT(ledger, "xrpl::LedgerMaster::canBeCurrent : non-null input"); // Never jump to a candidate ledger that precedes our // last validated ledger @@ -390,7 +390,7 @@ LedgerMaster::canBeCurrent(std::shared_ptr const& ledger) void LedgerMaster::switchLCL(std::shared_ptr const& lastClosed) { - XRPL_ASSERT(lastClosed, "ripple::LedgerMaster::switchLCL : non-null input"); + XRPL_ASSERT(lastClosed, "xrpl::LedgerMaster::switchLCL : non-null input"); if (!lastClosed->isImmutable()) LogicError("mutable ledger in switchLCL"); @@ -500,7 +500,7 @@ LedgerMaster::isValidated(ReadView const& ledger) { XRPL_ASSERT( hash->isNonZero(), - "ripple::LedgerMaster::isValidated : nonzero hash"); + "xrpl::LedgerMaster::isValidated : nonzero hash"); uint256 valHash = app_.getRelationalDatabase().getHashByIndex(seq); if (valHash == ledger.info().hash) @@ -792,7 +792,7 @@ LedgerMaster::setFullLedger( << " accepted :" << ledger->info().hash; XRPL_ASSERT( ledger->stateMap().getHash().isNonZero(), - "ripple::LedgerMaster::setFullLedger : nonzero ledger state hash"); + "xrpl::LedgerMaster::setFullLedger : nonzero ledger state hash"); ledger->setValidated(); ledger->setFull(); @@ -1258,7 +1258,7 @@ LedgerMaster::findNewLedgersToPublish( JLOG(m_journal.fatal()) << "Ledger: " << valSeq << " does not have hash for " << seq; UNREACHABLE( - "ripple::LedgerMaster::findNewLedgersToPublish : ledger " + "xrpl::LedgerMaster::findNewLedgersToPublish : ledger " "not found"); // LCOV_EXCL_STOP } @@ -1349,7 +1349,7 @@ LedgerMaster::tryAdvance() XRPL_ASSERT( !mValidLedger.empty() && mAdvanceThread, - "ripple::LedgerMaster::tryAdvance : has valid ledger"); + "xrpl::LedgerMaster::tryAdvance : has valid ledger"); JLOG(m_journal.trace()) << "advanceThread<"; @@ -1650,7 +1650,7 @@ LedgerMaster::walkHashBySeq( // be located easily and should contain the hash. LedgerIndex refIndex = getCandidateLedger(index); auto const refHash = hashOfSeq(*referenceLedger, refIndex, m_journal); - XRPL_ASSERT(refHash, "ripple::LedgerMaster::walkHashBySeq : found ledger"); + XRPL_ASSERT(refHash, "xrpl::LedgerMaster::walkHashBySeq : found ledger"); if (refHash) { // Try the hash and sequence of a better reference ledger just found @@ -1677,7 +1677,7 @@ LedgerMaster::walkHashBySeq( ledgerHash = hashOfSeq(*l, index, m_journal); XRPL_ASSERT( ledgerHash, - "ripple::LedgerMaster::walkHashBySeq : has complete " + "xrpl::LedgerMaster::walkHashBySeq : has complete " "ledger"); } } @@ -1792,7 +1792,7 @@ LedgerMaster::fetchForHistory( { XRPL_ASSERT( hash->isNonZero(), - "ripple::LedgerMaster::fetchForHistory : found ledger"); + "xrpl::LedgerMaster::fetchForHistory : found ledger"); auto ledger = getLedgerByHash(*hash); if (!ledger) { @@ -1821,7 +1821,7 @@ LedgerMaster::fetchForHistory( auto seq = ledger->info().seq; XRPL_ASSERT( seq == missing, - "ripple::LedgerMaster::fetchForHistory : sequence match"); + "xrpl::LedgerMaster::fetchForHistory : sequence match"); JLOG(m_journal.trace()) << "fetchForHistory acquired " << seq; setFullLedger(ledger, false, false); int fillInProgress; @@ -1864,7 +1864,7 @@ LedgerMaster::fetchForHistory( { XRPL_ASSERT( h->isNonZero(), - "ripple::LedgerMaster::fetchForHistory : " + "xrpl::LedgerMaster::fetchForHistory : " "prefetched ledger"); app_.getInboundLedgers().acquire(*h, seq, reason); } @@ -2051,7 +2051,7 @@ populateFetchPack( std::uint32_t seq, bool withLeaves = true) { - XRPL_ASSERT(cnt, "ripple::populateFetchPack : nonzero count input"); + XRPL_ASSERT(cnt, "xrpl::populateFetchPack : nonzero count input"); Serializer s(1024); @@ -2241,4 +2241,4 @@ LedgerMaster::txnIdFromIndex(uint32_t ledgerSeq, uint32_t txnIndex) return {}; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/ledger/detail/LedgerReplay.cpp b/src/xrpld/app/ledger/detail/LedgerReplay.cpp index 85ec420bbf..5d7ce0e69f 100644 --- a/src/xrpld/app/ledger/detail/LedgerReplay.cpp +++ b/src/xrpld/app/ledger/detail/LedgerReplay.cpp @@ -1,7 +1,7 @@ #include #include -namespace ripple { +namespace xrpl { LedgerReplay::LedgerReplay( std::shared_ptr parent, @@ -26,4 +26,4 @@ LedgerReplay::LedgerReplay( { } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/ledger/detail/LedgerReplayMsgHandler.cpp b/src/xrpld/app/ledger/detail/LedgerReplayMsgHandler.cpp index da7f7db23d..0ef6671c7e 100644 --- a/src/xrpld/app/ledger/detail/LedgerReplayMsgHandler.cpp +++ b/src/xrpld/app/ledger/detail/LedgerReplayMsgHandler.cpp @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { LedgerReplayMsgHandler::LedgerReplayMsgHandler( Application& app, LedgerReplayer& replayer) @@ -273,4 +273,4 @@ LedgerReplayMsgHandler::processReplayDeltaResponse( return true; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/ledger/detail/LedgerReplayMsgHandler.h b/src/xrpld/app/ledger/detail/LedgerReplayMsgHandler.h index 276bf316e1..fff3e75460 100644 --- a/src/xrpld/app/ledger/detail/LedgerReplayMsgHandler.h +++ b/src/xrpld/app/ledger/detail/LedgerReplayMsgHandler.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { class Application; class LedgerReplayer; @@ -54,6 +54,6 @@ private: beast::Journal journal_; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/detail/LedgerReplayTask.cpp b/src/xrpld/app/ledger/detail/LedgerReplayTask.cpp index bee90346b4..e90c606cde 100644 --- a/src/xrpld/app/ledger/detail/LedgerReplayTask.cpp +++ b/src/xrpld/app/ledger/detail/LedgerReplayTask.cpp @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { LedgerReplayTask::TaskParameter::TaskParameter( InboundLedger::Reason r, @@ -14,7 +14,7 @@ LedgerReplayTask::TaskParameter::TaskParameter( { XRPL_ASSERT( finishLedgerHash.isNonZero() && totalNumLedgers > 0, - "ripple::LedgerReplayTask::TaskParameter::TaskParameter : valid " + "xrpl::LedgerReplayTask::TaskParameter::TaskParameter : valid " "inputs"); } @@ -33,7 +33,7 @@ LedgerReplayTask::TaskParameter::update( startHash_ = skipList_[skipList_.size() - totalLedgers_]; XRPL_ASSERT( startHash_.isNonZero(), - "ripple::LedgerReplayTask::TaskParameter::update : nonzero start hash"); + "xrpl::LedgerReplayTask::TaskParameter::update : nonzero start hash"); startSeq_ = finishSeq_ - totalLedgers_ + 1; full_ = true; return true; @@ -187,7 +187,7 @@ LedgerReplayTask::tryAdvance(ScopedLockType& sl) auto& delta = deltas_[deltaToBuild_]; XRPL_ASSERT( parent_->seq() + 1 == delta->ledgerSeq_, - "ripple::LedgerReplayTask::tryAdvance : consecutive sequence"); + "xrpl::LedgerReplayTask::tryAdvance : consecutive sequence"); if (auto l = delta->tryBuild(parent_); l) { JLOG(journal_.debug()) @@ -279,7 +279,7 @@ LedgerReplayTask::addDelta(std::shared_ptr const& delta) XRPL_ASSERT( deltas_.empty() || deltas_.back()->ledgerSeq_ + 1 == delta->ledgerSeq_, - "ripple::LedgerReplayTask::addDelta : no deltas or consecutive " + "xrpl::LedgerReplayTask::addDelta : no deltas or consecutive " "sequence", ); deltas_.push_back(delta); } @@ -292,4 +292,4 @@ LedgerReplayTask::finished() const return isDone(); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/ledger/detail/LedgerReplayer.cpp b/src/xrpld/app/ledger/detail/LedgerReplayer.cpp index 04a3d21b8f..6722893e2a 100644 --- a/src/xrpld/app/ledger/detail/LedgerReplayer.cpp +++ b/src/xrpld/app/ledger/detail/LedgerReplayer.cpp @@ -2,7 +2,7 @@ #include #include -namespace ripple { +namespace xrpl { LedgerReplayer::LedgerReplayer( Application& app, @@ -30,7 +30,7 @@ LedgerReplayer::replay( XRPL_ASSERT( finishLedgerHash.isNonZero() && totalNumLedgers > 0 && totalNumLedgers <= LedgerReplayParameters::MAX_TASK_SIZE, - "ripple::LedgerReplayer::replay : valid inputs"); + "xrpl::LedgerReplayer::replay : valid inputs"); LedgerReplayTask::TaskParameter parameter( r, finishLedgerHash, totalNumLedgers); @@ -266,4 +266,4 @@ LedgerReplayer::stop() JLOG(j_.info()) << "Stopped"; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/ledger/detail/LedgerToJson.cpp b/src/xrpld/app/ledger/detail/LedgerToJson.cpp index 85eb3feaf1..d932bd8afe 100644 --- a/src/xrpld/app/ledger/detail/LedgerToJson.cpp +++ b/src/xrpld/app/ledger/detail/LedgerToJson.cpp @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace { @@ -342,4 +342,4 @@ getJson(LedgerFill const& fill) return json; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/ledger/detail/LocalTxs.cpp b/src/xrpld/app/ledger/detail/LocalTxs.cpp index 557fde80ce..f2648f38a7 100644 --- a/src/xrpld/app/ledger/detail/LocalTxs.cpp +++ b/src/xrpld/app/ledger/detail/LocalTxs.cpp @@ -27,7 +27,7 @@ test-applied to all new open ledgers until seen in a fully- validated ledger */ -namespace ripple { +namespace xrpl { // This class wraps a pointer to a transaction along with // its expiration ledger. It also caches the issuing account. @@ -175,4 +175,4 @@ make_LocalTxs() return std::make_unique(); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/ledger/detail/OpenLedger.cpp b/src/xrpld/app/ledger/detail/OpenLedger.cpp index 1a009c91c7..2b5f0a96c4 100644 --- a/src/xrpld/app/ledger/detail/OpenLedger.cpp +++ b/src/xrpld/app/ledger/detail/OpenLedger.cpp @@ -11,7 +11,7 @@ #include -namespace ripple { +namespace xrpl { OpenLedger::OpenLedger( std::shared_ptr const& ledger, @@ -160,7 +160,7 @@ OpenLedger::apply_one( if (retry) flags = flags | tapRETRY; // If it's in anybody's proposed set, try to keep it in the ledger - auto const result = ripple::apply(app, view, *tx, flags, j); + auto const result = xrpl::apply(app, view, *tx, flags, j); if (result.applied || result.ter == terQUEUED) return Result::success; if (isTefFailure(result.ter) || isTemMalformed(result.ter) || @@ -217,4 +217,4 @@ debugTostr(std::shared_ptr const& view) return ss.str(); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/ledger/detail/SkipListAcquire.cpp b/src/xrpld/app/ledger/detail/SkipListAcquire.cpp index a6dbf40d4d..5f4b0dc339 100644 --- a/src/xrpld/app/ledger/detail/SkipListAcquire.cpp +++ b/src/xrpld/app/ledger/detail/SkipListAcquire.cpp @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { SkipListAcquire::SkipListAcquire( Application& app, @@ -121,7 +121,7 @@ SkipListAcquire::processData( { XRPL_ASSERT( ledgerSeq != 0 && item, - "ripple::SkipListAcquire::processData : valid inputs"); + "xrpl::SkipListAcquire::processData : valid inputs"); ScopedLockType sl(mtx_); if (isDone()) return; @@ -206,7 +206,7 @@ SkipListAcquire::onSkipListAcquired( void SkipListAcquire::notify(ScopedLockType& sl) { - XRPL_ASSERT(isDone(), "ripple::SkipListAcquire::notify : is done"); + XRPL_ASSERT(isDone(), "xrpl::SkipListAcquire::notify : is done"); std::vector toCall; std::swap(toCall, dataReadyCallbacks_); auto const good = !failed_; @@ -220,4 +220,4 @@ SkipListAcquire::notify(ScopedLockType& sl) sl.lock(); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/ledger/detail/SkipListAcquire.h b/src/xrpld/app/ledger/detail/SkipListAcquire.h index 816bacc4cb..15c420a5cd 100644 --- a/src/xrpld/app/ledger/detail/SkipListAcquire.h +++ b/src/xrpld/app/ledger/detail/SkipListAcquire.h @@ -8,7 +8,7 @@ #include -namespace ripple { +namespace xrpl { class InboundLedgers; class PeerSet; namespace test { @@ -36,11 +36,11 @@ public: struct SkipListData { std::uint32_t const ledgerSeq; - std::vector const skipList; + std::vector const skipList; SkipListData( std::uint32_t const ledgerSeq, - std::vector const& skipList) + std::vector const& skipList) : ledgerSeq(ledgerSeq), skipList(skipList) { } @@ -144,6 +144,6 @@ private: friend class test::LedgerReplayClient; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/detail/TimeoutCounter.cpp b/src/xrpld/app/ledger/detail/TimeoutCounter.cpp index 6db280ce8e..c26e9583cd 100644 --- a/src/xrpld/app/ledger/detail/TimeoutCounter.cpp +++ b/src/xrpld/app/ledger/detail/TimeoutCounter.cpp @@ -1,7 +1,7 @@ #include #include -namespace ripple { +namespace xrpl { using namespace std::chrono_literals; @@ -24,7 +24,7 @@ TimeoutCounter::TimeoutCounter( { XRPL_ASSERT( (timerInterval_ > 10ms) && (timerInterval_ < 30s), - "ripple::TimeoutCounter::TimeoutCounter : interval input inside range"); + "xrpl::TimeoutCounter::TimeoutCounter : interval input inside range"); } void @@ -106,4 +106,4 @@ TimeoutCounter::cancel() } } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/ledger/detail/TimeoutCounter.h b/src/xrpld/app/ledger/detail/TimeoutCounter.h index e97882ef1e..569129ae5a 100644 --- a/src/xrpld/app/ledger/detail/TimeoutCounter.h +++ b/src/xrpld/app/ledger/detail/TimeoutCounter.h @@ -10,7 +10,7 @@ #include -namespace ripple { +namespace xrpl { /** This class is an "active" object. It maintains its own timer @@ -102,7 +102,7 @@ protected: } // Used in this class for access to boost::asio::io_context and - // ripple::Overlay. Used in subtypes for the kitchen sink. + // xrpl::Overlay. Used in subtypes for the kitchen sink. Application& app_; beast::Journal journal_; mutable std::recursive_mutex mtx_; @@ -130,6 +130,6 @@ private: boost::asio::basic_waitable_timer timer_; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/detail/TransactionAcquire.cpp b/src/xrpld/app/ledger/detail/TransactionAcquire.cpp index 4c50c5087c..3cd0e84ef0 100644 --- a/src/xrpld/app/ledger/detail/TransactionAcquire.cpp +++ b/src/xrpld/app/ledger/detail/TransactionAcquire.cpp @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { using namespace std::chrono_literals; @@ -244,4 +244,4 @@ TransactionAcquire::stillNeed() failed_ = false; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/ledger/detail/TransactionAcquire.h b/src/xrpld/app/ledger/detail/TransactionAcquire.h index 60afab7928..83f9b62f83 100644 --- a/src/xrpld/app/ledger/detail/TransactionAcquire.h +++ b/src/xrpld/app/ledger/detail/TransactionAcquire.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { // VFALCO TODO rename to PeerTxRequest // A transaction set we are trying to acquire @@ -54,6 +54,6 @@ private: pmDowncast() override; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/ledger/detail/TransactionMaster.cpp b/src/xrpld/app/ledger/detail/TransactionMaster.cpp index 266a067f66..e8580bcfc6 100644 --- a/src/xrpld/app/ledger/detail/TransactionMaster.cpp +++ b/src/xrpld/app/ledger/detail/TransactionMaster.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { TransactionMaster::TransactionMaster(Application& app) : mApp(app) @@ -151,4 +151,4 @@ TransactionMaster::getCache() return mCache; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/main/Application.cpp b/src/xrpld/app/main/Application.cpp index d925c9c008..b48183badd 100644 --- a/src/xrpld/app/main/Application.cpp +++ b/src/xrpld/app/main/Application.cpp @@ -66,7 +66,7 @@ #include #include -namespace ripple { +namespace xrpl { static void fixConfigPorts(Config& config, Endpoints const& endpoints); @@ -569,7 +569,7 @@ public: { XRPL_ASSERT( serverHandler_, - "ripple::ApplicationImp::getServerHandler : non-null server " + "xrpl::ApplicationImp::getServerHandler : non-null server " "handle"); return *serverHandler_; } @@ -777,7 +777,7 @@ public: overlay() override { XRPL_ASSERT( - overlay_, "ripple::ApplicationImp::overlay : non-null overlay"); + overlay_, "xrpl::ApplicationImp::overlay : non-null overlay"); return *overlay_; } @@ -785,8 +785,7 @@ public: getTxQ() override { XRPL_ASSERT( - txQ_, - "ripple::ApplicationImp::getTxQ : non-null transaction queue"); + txQ_, "xrpl::ApplicationImp::getTxQ : non-null transaction queue"); return *txQ_; } @@ -795,7 +794,7 @@ public: { XRPL_ASSERT( mRelationalDatabase, - "ripple::ApplicationImp::getRelationalDatabase : non-null " + "xrpl::ApplicationImp::getRelationalDatabase : non-null " "relational database"); return *mRelationalDatabase; } @@ -805,7 +804,7 @@ public: { XRPL_ASSERT( mWalletDB, - "ripple::ApplicationImp::getWalletDB : non-null wallet database"); + "xrpl::ApplicationImp::getWalletDB : non-null wallet database"); return *mWalletDB; } @@ -822,7 +821,7 @@ public: { XRPL_ASSERT( mWalletDB.get() == nullptr, - "ripple::ApplicationImp::initRelationalDatabase : null wallet " + "xrpl::ApplicationImp::initRelationalDatabase : null wallet " "database"); try @@ -1223,9 +1222,9 @@ ApplicationImp::setup(boost::program_options::variables_map const& cmdline) supported.reserve(amendments.size()); for (auto const& [a, vote] : amendments) { - auto const f = ripple::getRegisteredFeature(a); + auto const f = xrpl::getRegisteredFeature(a); XRPL_ASSERT( - f, "ripple::ApplicationImp::setup : registered feature"); + f, "xrpl::ApplicationImp::setup : registered feature"); if (f) supported.emplace_back(a, *f, vote); } @@ -1701,7 +1700,7 @@ ApplicationImp::startGenesisLedger() XRPL_ASSERT( next->info().seq < XRP_LEDGER_EARLIEST_FEES || next->read(keylet::fees()), - "ripple::ApplicationImp::startGenesisLedger : valid ledger fees"); + "xrpl::ApplicationImp::startGenesisLedger : valid ledger fees"); next->setImmutable(); openLedger_.emplace(next, cachedSLEs_, logs_->journal("OpenLedger")); m_ledgerMaster->storeLedger(next); @@ -1723,7 +1722,7 @@ ApplicationImp::getLastFullLedger() XRPL_ASSERT( ledger->info().seq < XRP_LEDGER_EARLIEST_FEES || ledger->read(keylet::fees()), - "ripple::ApplicationImp::getLastFullLedger : valid ledger fees"); + "xrpl::ApplicationImp::getLastFullLedger : valid ledger fees"); ledger->setImmutable(); if (getLedgerMaster().haveLedger(seq)) @@ -1878,7 +1877,7 @@ ApplicationImp::loadLedgerFromFile(std::string const& name) XRPL_ASSERT( loadLedger->info().seq < XRP_LEDGER_EARLIEST_FEES || loadLedger->read(keylet::fees()), - "ripple::ApplicationImp::loadLedgerFromFile : valid ledger fees"); + "xrpl::ApplicationImp::loadLedgerFromFile : valid ledger fees"); loadLedger->setAccepted( closeTime, closeTimeResolution, !closeTimeEstimated); @@ -1978,7 +1977,7 @@ ApplicationImp::loadOldLedger( // LCOV_EXCL_START JLOG(m_journal.fatal()) << "Replay ledger missing/damaged"; UNREACHABLE( - "ripple::ApplicationImp::loadOldLedger : replay ledger " + "xrpl::ApplicationImp::loadOldLedger : replay ledger " "missing/damaged"); return false; // LCOV_EXCL_STOP @@ -2011,7 +2010,7 @@ ApplicationImp::loadOldLedger( // LCOV_EXCL_START JLOG(m_journal.fatal()) << "Ledger is empty."; UNREACHABLE( - "ripple::ApplicationImp::loadOldLedger : ledger is empty"); + "xrpl::ApplicationImp::loadOldLedger : ledger is empty"); return false; // LCOV_EXCL_STOP } @@ -2021,7 +2020,7 @@ ApplicationImp::loadOldLedger( // LCOV_EXCL_START JLOG(m_journal.fatal()) << "Ledger is missing nodes."; UNREACHABLE( - "ripple::ApplicationImp::loadOldLedger : ledger is missing " + "xrpl::ApplicationImp::loadOldLedger : ledger is missing " "nodes"); return false; // LCOV_EXCL_STOP @@ -2032,7 +2031,7 @@ ApplicationImp::loadOldLedger( // LCOV_EXCL_START JLOG(m_journal.fatal()) << "Ledger is not sensible."; UNREACHABLE( - "ripple::ApplicationImp::loadOldLedger : ledger is not " + "xrpl::ApplicationImp::loadOldLedger : ledger is not " "sensible"); return false; // LCOV_EXCL_STOP @@ -2206,4 +2205,4 @@ fixConfigPorts(Config& config, Endpoints const& endpoints) } } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/main/Application.h b/src/xrpld/app/main/Application.h index d8cceb687b..ffb3cd9983 100644 --- a/src/xrpld/app/main/Application.h +++ b/src/xrpld/app/main/Application.h @@ -14,7 +14,7 @@ #include -namespace ripple { +namespace xrpl { namespace unl { class Manager; @@ -264,6 +264,6 @@ make_Application( std::unique_ptr logs, std::unique_ptr timeKeeper); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/main/CollectorManager.cpp b/src/xrpld/app/main/CollectorManager.cpp index d66b08db8c..110ea564d8 100644 --- a/src/xrpld/app/main/CollectorManager.cpp +++ b/src/xrpld/app/main/CollectorManager.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { class CollectorManagerImp : public CollectorManager { @@ -56,4 +56,4 @@ make_CollectorManager(Section const& params, beast::Journal journal) return std::make_unique(params, journal); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/main/CollectorManager.h b/src/xrpld/app/main/CollectorManager.h index d0cc35f94f..d0d202625c 100644 --- a/src/xrpld/app/main/CollectorManager.h +++ b/src/xrpld/app/main/CollectorManager.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Provides the beast::insight::Collector service. */ class CollectorManager @@ -22,6 +22,6 @@ public: std::unique_ptr make_CollectorManager(Section const& params, beast::Journal journal); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/main/DBInit.h b/src/xrpld/app/main/DBInit.h index 9219db715a..60ff4b498b 100644 --- a/src/xrpld/app/main/DBInit.h +++ b/src/xrpld/app/main/DBInit.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { //////////////////////////////////////////////////////////////////////////////// @@ -116,6 +116,6 @@ inline constexpr std::array WalletDBInit{ "END TRANSACTION;"}}; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/main/GRPCServer.cpp b/src/xrpld/app/main/GRPCServer.cpp index 03aa0f6612..e415ee14cf 100644 --- a/src/xrpld/app/main/GRPCServer.cpp +++ b/src/xrpld/app/main/GRPCServer.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace { @@ -249,7 +249,7 @@ template std::optional GRPCServerImpl::CallData::getClientEndpoint() { - return ripple::getEndpoint(ctx_.peer()); + return xrpl::getEndpoint(ctx_.peer()); } template @@ -601,7 +601,7 @@ GRPCServer::stop() GRPCServer::~GRPCServer() { - XRPL_ASSERT(!running_, "ripple::GRPCServer::~GRPCServer : is not running"); + XRPL_ASSERT(!running_, "xrpl::GRPCServer::~GRPCServer : is not running"); } boost::asio::ip::tcp::endpoint @@ -610,4 +610,4 @@ GRPCServer::getEndpoint() const return impl_.getEndpoint(); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/main/GRPCServer.h b/src/xrpld/app/main/GRPCServer.h index 300f60979c..d67ee4cd92 100644 --- a/src/xrpld/app/main/GRPCServer.h +++ b/src/xrpld/app/main/GRPCServer.h @@ -15,7 +15,7 @@ #include -namespace ripple { +namespace xrpl { // Interface that CallData implements class Processor @@ -306,5 +306,5 @@ private: std::thread thread_; bool running_ = false; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/main/LoadManager.cpp b/src/xrpld/app/main/LoadManager.cpp index 92a4c49bf2..91afb67eb7 100644 --- a/src/xrpld/app/main/LoadManager.cpp +++ b/src/xrpld/app/main/LoadManager.cpp @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { LoadManager::LoadManager(Application& app, beast::Journal journal) : app_(app), journal_(journal), lastHeartbeat_(), armed_(false) @@ -56,8 +56,7 @@ LoadManager::start() { JLOG(journal_.debug()) << "Starting"; XRPL_ASSERT( - !thread_.joinable(), - "ripple::LoadManager::start : thread not joinable"); + !thread_.joinable(), "xrpl::LoadManager::start : thread not joinable"); thread_ = std::thread{&LoadManager::run, this}; } @@ -182,4 +181,4 @@ make_LoadManager(Application& app, beast::Journal journal) return std::unique_ptr{new LoadManager{app, journal}}; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/main/LoadManager.h b/src/xrpld/app/main/LoadManager.h index bd3a72b80b..15caa9b0f0 100644 --- a/src/xrpld/app/main/LoadManager.h +++ b/src/xrpld/app/main/LoadManager.h @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { class Application; @@ -94,6 +94,6 @@ private: std::unique_ptr make_LoadManager(Application& app, beast::Journal journal); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/main/Main.cpp b/src/xrpld/app/main/Main.cpp index 2491149160..7c138168e4 100644 --- a/src/xrpld/app/main/Main.cpp +++ b/src/xrpld/app/main/Main.cpp @@ -53,7 +53,7 @@ namespace po = boost::program_options; -namespace ripple { +namespace xrpl { bool adjustDescriptorLimit(int needed, beast::Journal j) @@ -248,9 +248,9 @@ runUnitTests( char** argv) { using namespace beast::unit_test; - using namespace ripple::test; + using namespace xrpl::test; - ripple::test::envUseIPv4 = (!ipv6); + xrpl::test::envUseIPv4 = (!ipv6); if (!child && num_jobs == 1) { @@ -829,7 +829,7 @@ run(int argc, char** argv) // LCOV_EXCL_STOP } -} // namespace ripple +} // namespace xrpl int main(int argc, char** argv) @@ -854,5 +854,5 @@ main(int argc, char** argv) atexit(&google::protobuf::ShutdownProtobufLibrary); - return ripple::run(argc, argv); + return xrpl::run(argc, argv); } diff --git a/src/xrpld/app/main/NodeIdentity.cpp b/src/xrpld/app/main/NodeIdentity.cpp index 4c7148642c..73ef3f0152 100644 --- a/src/xrpld/app/main/NodeIdentity.cpp +++ b/src/xrpld/app/main/NodeIdentity.cpp @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { std::pair getNodeIdentity( @@ -46,4 +46,4 @@ getNodeIdentity( return getNodeIdentity(*db); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/main/NodeIdentity.h b/src/xrpld/app/main/NodeIdentity.h index fcef1d1d03..7fdb748033 100644 --- a/src/xrpld/app/main/NodeIdentity.h +++ b/src/xrpld/app/main/NodeIdentity.h @@ -8,7 +8,7 @@ #include -namespace ripple { +namespace xrpl { /** The cryptographic credentials identifying this server instance. @@ -20,6 +20,6 @@ getNodeIdentity( Application& app, boost::program_options::variables_map const& cmdline); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/main/NodeStoreScheduler.cpp b/src/xrpld/app/main/NodeStoreScheduler.cpp index ba9c2ff281..221c1f098e 100644 --- a/src/xrpld/app/main/NodeStoreScheduler.cpp +++ b/src/xrpld/app/main/NodeStoreScheduler.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { NodeStoreScheduler::NodeStoreScheduler(JobQueue& jobQueue) : jobQueue_(jobQueue) { @@ -44,4 +44,4 @@ NodeStoreScheduler::onBatchWrite(NodeStore::BatchWriteReport const& report) jobQueue_.addLoadEvents(jtNS_WRITE, report.writeCount, report.elapsed); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/main/NodeStoreScheduler.h b/src/xrpld/app/main/NodeStoreScheduler.h index c1234a84c4..d5b18351a3 100644 --- a/src/xrpld/app/main/NodeStoreScheduler.h +++ b/src/xrpld/app/main/NodeStoreScheduler.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { /** A NodeStore::Scheduler which uses the JobQueue. */ class NodeStoreScheduler : public NodeStore::Scheduler @@ -24,6 +24,6 @@ private: JobQueue& jobQueue_; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/main/Tuning.h b/src/xrpld/app/main/Tuning.h index 6c7db8ea72..25cc2ef75d 100644 --- a/src/xrpld/app/main/Tuning.h +++ b/src/xrpld/app/main/Tuning.h @@ -3,13 +3,13 @@ #include -namespace ripple { +namespace xrpl { constexpr std::size_t fullBelowTargetSize = 524288; constexpr std::chrono::seconds fullBelowExpiration = std::chrono::minutes{10}; constexpr std::size_t maxPoppedTransactions = 10; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/misc/AMMHelpers.h b/src/xrpld/app/misc/AMMHelpers.h index c300774553..3a33f49ee4 100644 --- a/src/xrpld/app/misc/AMMHelpers.h +++ b/src/xrpld/app/misc/AMMHelpers.h @@ -13,7 +13,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { @@ -761,6 +761,6 @@ adjustFracByTokens( STAmount const& tokens, Number const& frac); -} // namespace ripple +} // namespace xrpl #endif // XRPL_APP_MISC_AMMHELPERS_H_INCLUDED diff --git a/src/xrpld/app/misc/AMMUtils.h b/src/xrpld/app/misc/AMMUtils.h index 7369ee4998..266f50bb87 100644 --- a/src/xrpld/app/misc/AMMUtils.h +++ b/src/xrpld/app/misc/AMMUtils.h @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { class ReadView; class ApplyView; @@ -116,6 +116,6 @@ verifyAndAdjustLPTokenBalance( std::shared_ptr& ammSle, AccountID const& account); -} // namespace ripple +} // namespace xrpl #endif // XRPL_APP_MISC_AMMUTILS_H_INCLUDED diff --git a/src/xrpld/app/misc/AmendmentTable.h b/src/xrpld/app/misc/AmendmentTable.h index af436205fb..0265e0127f 100644 --- a/src/xrpld/app/misc/AmendmentTable.h +++ b/src/xrpld/app/misc/AmendmentTable.h @@ -10,7 +10,7 @@ #include -namespace ripple { +namespace xrpl { /** The amendment table stores the list of enabled and potential amendments. Individuals amendments are voted on by validators during the consensus @@ -177,6 +177,6 @@ make_AmendmentTable( Section const& vetoed, beast::Journal journal); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/misc/CanonicalTXSet.cpp b/src/xrpld/app/misc/CanonicalTXSet.cpp index 311d120d4e..ac1b86e62f 100644 --- a/src/xrpld/app/misc/CanonicalTXSet.cpp +++ b/src/xrpld/app/misc/CanonicalTXSet.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { bool operator<(CanonicalTXSet::Key const& lhs, CanonicalTXSet::Key const& rhs) @@ -71,4 +71,4 @@ CanonicalTXSet::popAcctTransaction(std::shared_ptr const& tx) return result; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/misc/CanonicalTXSet.h b/src/xrpld/app/misc/CanonicalTXSet.h index 9a7d7fe171..8d0461a845 100644 --- a/src/xrpld/app/misc/CanonicalTXSet.h +++ b/src/xrpld/app/misc/CanonicalTXSet.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Holds transactions which were deferred to the next pass of consensus. @@ -156,6 +156,6 @@ private: uint256 salt_; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/misc/DelegateUtils.h b/src/xrpld/app/misc/DelegateUtils.h index 21b78ca71c..37d9195a82 100644 --- a/src/xrpld/app/misc/DelegateUtils.h +++ b/src/xrpld/app/misc/DelegateUtils.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { /** * Check if the delegate account has permission to execute the transaction. @@ -33,6 +33,6 @@ loadGranularPermission( TxType const& type, std::unordered_set& granularPermissions); -} // namespace ripple +} // namespace xrpl #endif // XRPL_APP_MISC_DELEGATEUTILS_H_INCLUDED diff --git a/src/xrpld/app/misc/DeliverMax.h b/src/xrpld/app/misc/DeliverMax.h index 0847bf185d..e9455354f8 100644 --- a/src/xrpld/app/misc/DeliverMax.h +++ b/src/xrpld/app/misc/DeliverMax.h @@ -7,7 +7,7 @@ namespace Json { class Value; } -namespace ripple { +namespace xrpl { namespace RPC { @@ -26,6 +26,6 @@ insertDeliverMax(Json::Value& tx_json, TxType txnType, unsigned int apiVersion); /** @} */ } // namespace RPC -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/misc/FeeVote.h b/src/xrpld/app/misc/FeeVote.h index 15fd8e39fe..aed64be2c2 100644 --- a/src/xrpld/app/misc/FeeVote.h +++ b/src/xrpld/app/misc/FeeVote.h @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Manager to process fee votes. */ class FeeVote @@ -44,6 +44,6 @@ struct FeeSetup; std::unique_ptr make_FeeVote(FeeSetup const& setup, beast::Journal journal); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/misc/FeeVoteImpl.cpp b/src/xrpld/app/misc/FeeVoteImpl.cpp index f116150681..e1c51bd379 100644 --- a/src/xrpld/app/misc/FeeVoteImpl.cpp +++ b/src/xrpld/app/misc/FeeVoteImpl.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { @@ -182,7 +182,7 @@ FeeVoteImpl::doVoting( // LCL must be flag ledger XRPL_ASSERT( lastClosedLedger && isFlagLedger(lastClosedLedger->seq()), - "ripple::FeeVoteImpl::doVoting : has a flag ledger"); + "xrpl::FeeVoteImpl::doVoting : has a flag ledger"); detail::VotableValue baseFeeVote( lastClosedLedger->fees().base, target_.reference_fee); @@ -323,4 +323,4 @@ make_FeeVote(FeeSetup const& setup, beast::Journal journal) return std::make_unique(setup, journal); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/misc/HashRouter.cpp b/src/xrpld/app/misc/HashRouter.cpp index da27158969..0cad01c27e 100644 --- a/src/xrpld/app/misc/HashRouter.cpp +++ b/src/xrpld/app/misc/HashRouter.cpp @@ -1,7 +1,7 @@ #include #include -namespace ripple { +namespace xrpl { auto HashRouter::emplace(uint256 const& key) -> std::pair @@ -87,7 +87,7 @@ bool HashRouter::setFlags(uint256 const& key, HashRouterFlags flags) { XRPL_ASSERT( - static_cast(flags), "ripple::HashRouter::setFlags : valid input"); + static_cast(flags), "xrpl::HashRouter::setFlags : valid input"); std::lock_guard lock(mutex_); @@ -149,4 +149,4 @@ setup_HashRouter(Config const& config) return setup; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/misc/HashRouter.h b/src/xrpld/app/misc/HashRouter.h index f7ecb153fe..1b59797b28 100644 --- a/src/xrpld/app/misc/HashRouter.h +++ b/src/xrpld/app/misc/HashRouter.h @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { enum class HashRouterFlags : std::uint16_t { // Public flags @@ -270,6 +270,6 @@ private: HashRouter::Setup setup_HashRouter(Config const&); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/misc/LoadFeeTrack.h b/src/xrpld/app/misc/LoadFeeTrack.h index dfae110fb4..181fb0536e 100644 --- a/src/xrpld/app/misc/LoadFeeTrack.h +++ b/src/xrpld/app/misc/LoadFeeTrack.h @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { struct Fees; @@ -147,6 +147,6 @@ scaleFeeLoad( Fees const& fees, bool bUnlimited); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/misc/Manifest.h b/src/xrpld/app/misc/Manifest.h index 49b345d095..24e4f5f71f 100644 --- a/src/xrpld/app/misc/Manifest.h +++ b/src/xrpld/app/misc/Manifest.h @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { /* Validator key manifests @@ -443,6 +443,6 @@ public: } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/misc/NegativeUNLVote.cpp b/src/xrpld/app/misc/NegativeUNLVote.cpp index e325403336..642df78d68 100644 --- a/src/xrpld/app/misc/NegativeUNLVote.cpp +++ b/src/xrpld/app/misc/NegativeUNLVote.cpp @@ -4,7 +4,7 @@ #include -namespace ripple { +namespace xrpl { NegativeUNLVote::NegativeUNLVote(NodeID const& myId, beast::Journal j) : myId_(myId), j_(j) @@ -73,7 +73,7 @@ NegativeUNLVote::doVoting( choose(prevLedger->info().hash, candidates.toDisableCandidates); XRPL_ASSERT( nidToKeyMap.contains(n), - "ripple::NegativeUNLVote::doVoting : found node to disable"); + "xrpl::NegativeUNLVote::doVoting : found node to disable"); addTx(seq, nidToKeyMap.at(n), ToDisable, initialSet); } @@ -83,7 +83,7 @@ NegativeUNLVote::doVoting( prevLedger->info().hash, candidates.toReEnableCandidates); XRPL_ASSERT( nidToKeyMap.contains(n), - "ripple::NegativeUNLVote::doVoting : found node to enable"); + "xrpl::NegativeUNLVote::doVoting : found node to enable"); addTx(seq, nidToKeyMap.at(n), ToReEnable, initialSet); } } @@ -127,8 +127,7 @@ NegativeUNLVote::choose( std::vector const& candidates) { XRPL_ASSERT( - !candidates.empty(), - "ripple::NegativeUNLVote::choose : non-empty input"); + !candidates.empty(), "xrpl::NegativeUNLVote::choose : non-empty input"); static_assert(NodeID::bytes <= uint256::bytes); NodeID randomPad = NodeID::fromVoid(randomPadData.data()); NodeID txNodeID = candidates[0]; @@ -336,4 +335,4 @@ NegativeUNLVote::purgeNewValidators(LedgerIndex seq) } } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/misc/NegativeUNLVote.h b/src/xrpld/app/misc/NegativeUNLVote.h index 77b4035a0d..3146294923 100644 --- a/src/xrpld/app/misc/NegativeUNLVote.h +++ b/src/xrpld/app/misc/NegativeUNLVote.h @@ -10,7 +10,7 @@ #include -namespace ripple { +namespace xrpl { template class Validations; @@ -194,6 +194,6 @@ private: friend class test::NegativeUNLVoteScoreTable_test; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/misc/NetworkOPs.cpp b/src/xrpld/app/misc/NetworkOPs.cpp index ebe539523b..2b48b74914 100644 --- a/src/xrpld/app/misc/NetworkOPs.cpp +++ b/src/xrpld/app/misc/NetworkOPs.cpp @@ -64,7 +64,7 @@ #include #include -namespace ripple { +namespace xrpl { class NetworkOPsImp final : public NetworkOPs { @@ -91,7 +91,7 @@ class NetworkOPsImp final : public NetworkOPs { XRPL_ASSERT( local || failType == FailHard::no, - "ripple::NetworkOPsImp::TransactionStatus::TransactionStatus : " + "xrpl::NetworkOPsImp::TransactionStatus::TransactionStatus : " "valid inputs"); } }; @@ -1267,7 +1267,7 @@ NetworkOPsImp::preProcessTransaction(std::shared_ptr& transaction) checkValidity(app_.getHashRouter(), sttx, view->rules(), app_.config()); XRPL_ASSERT( validity == Validity::Valid, - "ripple::NetworkOPsImp::processTransaction : valid validity"); + "xrpl::NetworkOPsImp::processTransaction : valid validity"); // Not concerned with local checks at this point. if (validity == Validity::SigBad) @@ -1442,7 +1442,7 @@ NetworkOPsImp::processTransactionSet(CanonicalTXSet const& set) doTransactionSyncBatch(lock, [&](std::unique_lock const&) { XRPL_ASSERT( lock.owns_lock(), - "ripple::NetworkOPsImp::processTransactionSet has lock"); + "xrpl::NetworkOPsImp::processTransactionSet has lock"); return std::any_of( mTransactions.begin(), mTransactions.end(), [](auto const& t) { return t.transaction->getApplying(); @@ -1472,10 +1472,10 @@ NetworkOPsImp::apply(std::unique_lock& batchLock) mTransactions.swap(transactions); XRPL_ASSERT( !transactions.empty(), - "ripple::NetworkOPsImp::apply : non-empty transactions"); + "xrpl::NetworkOPsImp::apply : non-empty transactions"); XRPL_ASSERT( mDispatchState != DispatchState::running, - "ripple::NetworkOPsImp::apply : is not running"); + "xrpl::NetworkOPsImp::apply : is not running"); mDispatchState = DispatchState::running; @@ -1753,7 +1753,7 @@ NetworkOPsImp::getOwnerInfo( auto sleCur = lpLedger->read(keylet::child(uDirEntry)); XRPL_ASSERT( sleCur, - "ripple::NetworkOPsImp::getOwnerInfo : non-null child SLE"); + "xrpl::NetworkOPsImp::getOwnerInfo : non-null child SLE"); switch (sleCur->getType()) { @@ -1782,7 +1782,7 @@ NetworkOPsImp::getOwnerInfo( // LCOV_EXCL_START default: UNREACHABLE( - "ripple::NetworkOPsImp::getOwnerInfo : invalid " + "xrpl::NetworkOPsImp::getOwnerInfo : invalid " "type"); break; // LCOV_EXCL_STOP @@ -1796,7 +1796,7 @@ NetworkOPsImp::getOwnerInfo( sleNode = lpLedger->read(keylet::page(root, uNodeDir)); XRPL_ASSERT( sleNode, - "ripple::NetworkOPsImp::getOwnerInfo : read next page"); + "xrpl::NetworkOPsImp::getOwnerInfo : read next page"); } } while (uNodeDir); } @@ -2031,7 +2031,7 @@ NetworkOPsImp::beginConsensus( { XRPL_ASSERT( networkClosed.isNonZero(), - "ripple::NetworkOPsImp::beginConsensus : nonzero input"); + "xrpl::NetworkOPsImp::beginConsensus : nonzero input"); auto closingInfo = m_ledgerMaster.getCurrentLedger()->info(); @@ -2056,11 +2056,11 @@ NetworkOPsImp::beginConsensus( XRPL_ASSERT( prevLedger->info().hash == closingInfo.parentHash, - "ripple::NetworkOPsImp::beginConsensus : prevLedger hash matches " + "xrpl::NetworkOPsImp::beginConsensus : prevLedger hash matches " "parent"); XRPL_ASSERT( closingInfo.parentHash == m_ledgerMaster.getClosedLedger()->info().hash, - "ripple::NetworkOPsImp::beginConsensus : closedLedger parent matches " + "xrpl::NetworkOPsImp::beginConsensus : closedLedger parent matches " "hash"); if (prevLedger->rules().enabled(featureNegativeUNL)) @@ -2323,7 +2323,7 @@ NetworkOPsImp::pubServer() f.em->openLedgerFeeLevel, f.loadBaseServer, f.em->referenceFeeLevel) - .value_or(ripple::muldiv_max)); + .value_or(xrpl::muldiv_max)); jvObj[jss::load_factor] = trunc32(loadFactor); jvObj[jss::load_factor_fee_escalation] = @@ -2839,7 +2839,7 @@ NetworkOPsImp::getServerInfo(bool human, bool admin, bool counters) escalationMetrics.openLedgerFeeLevel, loadBaseServer, escalationMetrics.referenceFeeLevel) - .value_or(ripple::muldiv_max); + .value_or(xrpl::muldiv_max); auto const loadFactor = std::max( safe_cast(loadFactorServer), loadFactorFeeEscalation); @@ -3091,7 +3091,7 @@ NetworkOPsImp::pubLedger(std::shared_ptr const& lpAccepted) XRPL_ASSERT( alpAccepted->getLedger().get() == lpAccepted.get(), - "ripple::NetworkOPsImp::pubLedger : accepted input"); + "xrpl::NetworkOPsImp::pubLedger : accepted input"); { JLOG(m_journal.debug()) @@ -3143,7 +3143,7 @@ NetworkOPsImp::pubLedger(std::shared_ptr const& lpAccepted) if (!mStreamMaps[sBookChanges].empty()) { - Json::Value jvObj = ripple::RPC::computeBookChanges(lpAccepted); + Json::Value jvObj = xrpl::RPC::computeBookChanges(lpAccepted); auto it = mStreamMaps[sBookChanges].begin(); while (it != mStreamMaps[sBookChanges].end()) @@ -3513,7 +3513,7 @@ NetworkOPsImp::pubAccountTransaction( XRPL_ASSERT( jvObj.isMember(jss::account_history_tx_stream) == MultiApiJson::none, - "ripple::NetworkOPsImp::pubAccountTransaction : " + "xrpl::NetworkOPsImp::pubAccountTransaction : " "account_history_tx_stream not set"); for (auto& info : accountHistoryNotify) { @@ -3590,7 +3590,7 @@ NetworkOPsImp::pubProposedAccountTransaction( XRPL_ASSERT( jvObj.isMember(jss::account_history_tx_stream) == MultiApiJson::none, - "ripple::NetworkOPs::pubProposedAccountTransaction : " + "xrpl::NetworkOPs::pubProposedAccountTransaction : " "account_history_tx_stream not set"); for (auto& info : accountHistoryNotify) { @@ -3707,8 +3707,7 @@ NetworkOPsImp::addAccountHistoryJob(SubAccountHistoryInfoWeak subInfo) if (databaseType == DatabaseType::None) { // LCOV_EXCL_START - UNREACHABLE( - "ripple::NetworkOPsImp::addAccountHistoryJob : no database"); + UNREACHABLE("xrpl::NetworkOPsImp::addAccountHistoryJob : no database"); JLOG(m_journal.error()) << "AccountHistory job for account " << toBase58(subInfo.index_->accountId_) << " no database"; @@ -3818,7 +3817,7 @@ NetworkOPsImp::addAccountHistoryJob(SubAccountHistoryInfoWeak subInfo) // LCOV_EXCL_START default: { UNREACHABLE( - "ripple::NetworkOPsImp::addAccountHistoryJob : " + "xrpl::NetworkOPsImp::addAccountHistoryJob : " "getMoreTxns : invalid database type"); return {}; } @@ -3885,7 +3884,7 @@ NetworkOPsImp::addAccountHistoryJob(SubAccountHistoryInfoWeak subInfo) { // LCOV_EXCL_START UNREACHABLE( - "ripple::NetworkOPsImp::addAccountHistoryJob : " + "xrpl::NetworkOPsImp::addAccountHistoryJob : " "getMoreTxns failed"); JLOG(m_journal.debug()) << "AccountHistory job for account " @@ -3917,7 +3916,7 @@ NetworkOPsImp::addAccountHistoryJob(SubAccountHistoryInfoWeak subInfo) { // LCOV_EXCL_START UNREACHABLE( - "ripple::NetworkOPsImp::addAccountHistoryJob : " + "xrpl::NetworkOPsImp::addAccountHistoryJob : " "getLedgerBySeq failed"); JLOG(m_journal.debug()) << "AccountHistory job for account " @@ -4033,7 +4032,7 @@ NetworkOPsImp::subAccountHistoryStart( { // LCOV_EXCL_START UNREACHABLE( - "ripple::NetworkOPsImp::subAccountHistoryStart : failed to " + "xrpl::NetworkOPsImp::subAccountHistoryStart : failed to " "access genesis account"); return; // LCOV_EXCL_STOP @@ -4145,7 +4144,7 @@ NetworkOPsImp::subBook(InfoSub::ref isrListener, Book const& book) else { // LCOV_EXCL_START - UNREACHABLE("ripple::NetworkOPsImp::subBook : null book listeners"); + UNREACHABLE("xrpl::NetworkOPsImp::subBook : null book listeners"); // LCOV_EXCL_STOP } return true; @@ -4167,7 +4166,7 @@ NetworkOPsImp::acceptLedger( // This code-path is exclusively used when the server is in standalone // mode via `ledger_accept` XRPL_ASSERT( - m_standalone, "ripple::NetworkOPsImp::acceptLedger : is standalone"); + m_standalone, "xrpl::NetworkOPsImp::acceptLedger : is standalone"); if (!m_standalone) Throw( @@ -4888,4 +4887,4 @@ make_NetworkOPs( collector); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/misc/NetworkOPs.h b/src/xrpld/app/misc/NetworkOPs.h index 544e6bfe93..cadc87bee4 100644 --- a/src/xrpld/app/misc/NetworkOPs.h +++ b/src/xrpld/app/misc/NetworkOPs.h @@ -14,7 +14,7 @@ #include -namespace ripple { +namespace xrpl { // Operations that clients may wish to perform against the network // Master operational handler, server sequencer, network tracker @@ -275,6 +275,6 @@ make_NetworkOPs( beast::Journal journal, beast::insight::Collector::ptr const& collector); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/misc/PermissionedDEXHelpers.cpp b/src/xrpld/app/misc/PermissionedDEXHelpers.cpp index d02ae8e180..463c8a4f9b 100644 --- a/src/xrpld/app/misc/PermissionedDEXHelpers.cpp +++ b/src/xrpld/app/misc/PermissionedDEXHelpers.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { namespace permissioned_dex { bool @@ -67,4 +67,4 @@ offerInDomain( } // namespace permissioned_dex -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/misc/PermissionedDEXHelpers.h b/src/xrpld/app/misc/PermissionedDEXHelpers.h index 87c8e64bcd..9b6d23d09d 100644 --- a/src/xrpld/app/misc/PermissionedDEXHelpers.h +++ b/src/xrpld/app/misc/PermissionedDEXHelpers.h @@ -1,7 +1,7 @@ #pragma once #include -namespace ripple { +namespace xrpl { namespace permissioned_dex { // Check if an account is in a permissioned domain @@ -21,4 +21,4 @@ offerInDomain( } // namespace permissioned_dex -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/misc/SHAMapStore.h b/src/xrpld/app/misc/SHAMapStore.h index a906966b37..26d6120f32 100644 --- a/src/xrpld/app/misc/SHAMapStore.h +++ b/src/xrpld/app/misc/SHAMapStore.h @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { class TransactionMaster; @@ -88,6 +88,6 @@ make_SHAMapStore( Application& app, NodeStore::Scheduler& scheduler, beast::Journal journal); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/misc/SHAMapStoreImp.cpp b/src/xrpld/app/misc/SHAMapStoreImp.cpp index d771145540..3b1f12cb36 100644 --- a/src/xrpld/app/misc/SHAMapStoreImp.cpp +++ b/src/xrpld/app/misc/SHAMapStoreImp.cpp @@ -12,7 +12,7 @@ #include -namespace ripple { +namespace xrpl { void SHAMapStoreImp::SavedStateDB::init( BasicConfig const& config, @@ -27,7 +27,7 @@ SHAMapStoreImp::SavedStateDB::getCanDelete() { std::lock_guard lock(mutex_); - return ripple::getCanDelete(sqlDb_); + return xrpl::getCanDelete(sqlDb_); } LedgerIndex @@ -35,7 +35,7 @@ SHAMapStoreImp::SavedStateDB::setCanDelete(LedgerIndex canDelete) { std::lock_guard lock(mutex_); - return ripple::setCanDelete(sqlDb_, canDelete); + return xrpl::setCanDelete(sqlDb_, canDelete); } SavedState @@ -43,21 +43,21 @@ SHAMapStoreImp::SavedStateDB::getState() { std::lock_guard lock(mutex_); - return ripple::getSavedState(sqlDb_); + return xrpl::getSavedState(sqlDb_); } void SHAMapStoreImp::SavedStateDB::setState(SavedState const& state) { std::lock_guard lock(mutex_); - ripple::setSavedState(sqlDb_, state); + xrpl::setSavedState(sqlDb_, state); } void SHAMapStoreImp::SavedStateDB::setLastRotated(LedgerIndex seq) { std::lock_guard lock(mutex_); - ripple::setLastRotated(sqlDb_, seq); + xrpl::setLastRotated(sqlDb_, seq); } //------------------------------------------------------------------------------ @@ -496,7 +496,7 @@ SHAMapStoreImp::clearSql( { XRPL_ASSERT( deleteInterval_, - "ripple::SHAMapStoreImp::clearSql : nonzero delete interval"); + "xrpl::SHAMapStoreImp::clearSql : nonzero delete interval"); LedgerIndex min = std::numeric_limits::max(); { @@ -669,4 +669,4 @@ make_SHAMapStore( return std::make_unique(app, scheduler, journal); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/misc/SHAMapStoreImp.h b/src/xrpld/app/misc/SHAMapStoreImp.h index 12079b9fec..e5a7435b0a 100644 --- a/src/xrpld/app/misc/SHAMapStoreImp.h +++ b/src/xrpld/app/misc/SHAMapStoreImp.h @@ -13,7 +13,7 @@ #include #include -namespace ripple { +namespace xrpl { class NetworkOPs; @@ -225,6 +225,6 @@ public: stop() override; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/misc/Transaction.h b/src/xrpld/app/misc/Transaction.h index 4f59377fe0..ac801a2cd0 100644 --- a/src/xrpld/app/misc/Transaction.h +++ b/src/xrpld/app/misc/Transaction.h @@ -13,7 +13,7 @@ #include #include -namespace ripple { +namespace xrpl { // // Transactions should be constructed in JSON with. Use STObject::parseJson to @@ -413,6 +413,6 @@ private: beast::Journal j_; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/misc/TxQ.h b/src/xrpld/app/misc/TxQ.h index 4c4bb3c923..aff7fc89db 100644 --- a/src/xrpld/app/misc/TxQ.h +++ b/src/xrpld/app/misc/TxQ.h @@ -15,7 +15,7 @@ #include -namespace ripple { +namespace xrpl { class Application; class Config; @@ -854,6 +854,6 @@ toFeeLevel(XRPAmount const& drops, XRPAmount const& baseFee) .value_or(FeeLevel64(std::numeric_limits::max())); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/misc/ValidatorKeys.h b/src/xrpld/app/misc/ValidatorKeys.h index 8c5060b488..a1511c134a 100644 --- a/src/xrpld/app/misc/ValidatorKeys.h +++ b/src/xrpld/app/misc/ValidatorKeys.h @@ -8,7 +8,7 @@ #include -namespace ripple { +namespace xrpl { class Config; @@ -59,6 +59,6 @@ private: bool configInvalid_ = false; //< Set to true if config was invalid }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/misc/ValidatorList.h b/src/xrpld/app/misc/ValidatorList.h index 77793619ac..d6758f8877 100644 --- a/src/xrpld/app/misc/ValidatorList.h +++ b/src/xrpld/app/misc/ValidatorList.h @@ -21,7 +21,7 @@ class TMValidatorList; class TMValidatorListCollection; } // namespace protocol -namespace ripple { +namespace xrpl { class Overlay; class HashRouter; @@ -927,7 +927,7 @@ hash_append(Hasher& h, std::map const& blobs) } } -} // namespace ripple +} // namespace xrpl namespace protocol { @@ -945,10 +945,7 @@ hash_append(Hasher& h, TMValidatorListCollection const& msg) { using beast::hash_append; hash_append( - h, - msg.manifest(), - ripple::ValidatorList::parseBlobs(msg), - msg.version()); + h, msg.manifest(), xrpl::ValidatorList::parseBlobs(msg), msg.version()); } } // namespace protocol diff --git a/src/xrpld/app/misc/ValidatorSite.h b/src/xrpld/app/misc/ValidatorSite.h index 9f20bef07a..64b22f065d 100644 --- a/src/xrpld/app/misc/ValidatorSite.h +++ b/src/xrpld/app/misc/ValidatorSite.h @@ -14,7 +14,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Validator Sites @@ -242,6 +242,6 @@ private: missingSite(std::lock_guard const&); }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/misc/detail/AMMHelpers.cpp b/src/xrpld/app/misc/detail/AMMHelpers.cpp index 2d5adc8f44..0b741c8d36 100644 --- a/src/xrpld/app/misc/detail/AMMHelpers.cpp +++ b/src/xrpld/app/misc/detail/AMMHelpers.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { STAmount ammLPTokens( @@ -236,7 +236,7 @@ adjustAmountsByLPTokens( XRPL_ASSERT( lpTokensActual == lpTokens, - "ripple::adjustAmountsByLPTokens : LP tokens match actual"); + "xrpl::adjustAmountsByLPTokens : LP tokens match actual"); return {amount, amount2, lpTokensActual}; } @@ -390,4 +390,4 @@ adjustFracByTokens( return tokens / lptAMMBalance; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/misc/detail/AMMUtils.cpp b/src/xrpld/app/misc/detail/AMMUtils.cpp index 84236b0b6e..9887bb49be 100644 --- a/src/xrpld/app/misc/detail/AMMUtils.cpp +++ b/src/xrpld/app/misc/detail/AMMUtils.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { std::pair ammPoolHolds( @@ -163,7 +163,7 @@ getTradingFee(ReadView const& view, SLE const& ammSle, AccountID const& account) XRPL_ASSERT( !view.rules().enabled(fixInnerObjTemplate) || ammSle.isFieldPresent(sfAuctionSlot), - "ripple::getTradingFee : auction present"); + "xrpl::getTradingFee : auction present"); if (ammSle.isFieldPresent(sfAuctionSlot)) { auto const& auctionSlot = @@ -474,4 +474,4 @@ verifyAndAdjustLPTokenBalance( return true; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/misc/detail/AccountTxPaging.cpp b/src/xrpld/app/misc/detail/AccountTxPaging.cpp index d58dace34c..e3fc2de4f8 100644 --- a/src/xrpld/app/misc/detail/AccountTxPaging.cpp +++ b/src/xrpld/app/misc/detail/AccountTxPaging.cpp @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { void convertBlobsToTxResult( @@ -44,4 +44,4 @@ saveLedgerAsync(Application& app, std::uint32_t seq) pendSaveValidated(app, l, false, false); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/misc/detail/AccountTxPaging.h b/src/xrpld/app/misc/detail/AccountTxPaging.h index b822d7186c..cbfe8c89bb 100644 --- a/src/xrpld/app/misc/detail/AccountTxPaging.h +++ b/src/xrpld/app/misc/detail/AccountTxPaging.h @@ -7,7 +7,7 @@ //------------------------------------------------------------------------------ -namespace ripple { +namespace xrpl { void convertBlobsToTxResult( @@ -21,6 +21,6 @@ convertBlobsToTxResult( void saveLedgerAsync(Application& app, std::uint32_t seq); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/misc/detail/AmendmentTable.cpp b/src/xrpld/app/misc/detail/AmendmentTable.cpp index b857f82213..8ed9bc12c5 100644 --- a/src/xrpld/app/misc/detail/AmendmentTable.cpp +++ b/src/xrpld/app/misc/detail/AmendmentTable.cpp @@ -16,7 +16,7 @@ #include #include -namespace ripple { +namespace xrpl { static std::vector> parseSection(Section const& section) @@ -211,7 +211,7 @@ public: { XRPL_ASSERT( votes.second.upVotes.empty(), - "ripple::TrustedVotes::recordVotes : received no " + "xrpl::TrustedVotes::recordVotes : received no " "upvotes"); JLOG(j.debug()) << "recordVotes: Have not received any " @@ -230,7 +230,7 @@ public: { XRPL_ASSERT( votes.second.timeout < newTimeout, - "ripple::TrustedVotes::recordVotes : votes not " + "xrpl::TrustedVotes::recordVotes : votes not " "expired"); using namespace std::chrono; auto const age = duration_cast( @@ -254,7 +254,7 @@ public: XRPL_ASSERT( validatorVotes.second.timeout || validatorVotes.second.upVotes.empty(), - "ripple::TrustedVotes::getVotes : valid votes"); + "xrpl::TrustedVotes::getVotes : valid votes"); if (validatorVotes.second.timeout) ++available; for (uint256 const& amendment : validatorVotes.second.upVotes) @@ -688,7 +688,7 @@ AmendmentTableImpl::persistVote( { XRPL_ASSERT( vote != AmendmentVote::obsolete, - "ripple::AmendmentTableImpl::persistVote : valid vote input"); + "xrpl::AmendmentTableImpl::persistVote : valid vote input"); auto db = db_.checkoutDb(); voteAmendment(*db, amendment, name, vote); } @@ -1042,4 +1042,4 @@ make_AmendmentTable( app, majorityTime, supported, enabled, vetoed, journal); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/misc/detail/DelegateUtils.cpp b/src/xrpld/app/misc/detail/DelegateUtils.cpp index 04728005af..027f2f1cc6 100644 --- a/src/xrpld/app/misc/detail/DelegateUtils.cpp +++ b/src/xrpld/app/misc/detail/DelegateUtils.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { NotTEC checkTxPermission(std::shared_ptr const& delegate, STTx const& tx) { @@ -44,4 +44,4 @@ loadGranularPermission( } } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/misc/detail/DeliverMax.cpp b/src/xrpld/app/misc/detail/DeliverMax.cpp index 3d0ef901ec..44500eec7e 100644 --- a/src/xrpld/app/misc/detail/DeliverMax.cpp +++ b/src/xrpld/app/misc/detail/DeliverMax.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { namespace RPC { void @@ -20,4 +20,4 @@ insertDeliverMax(Json::Value& tx_json, TxType txnType, unsigned int apiVersion) } } // namespace RPC -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/misc/detail/LoadFeeTrack.cpp b/src/xrpld/app/misc/detail/LoadFeeTrack.cpp index 9434ed5d02..6166656aee 100644 --- a/src/xrpld/app/misc/detail/LoadFeeTrack.cpp +++ b/src/xrpld/app/misc/detail/LoadFeeTrack.cpp @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { bool LoadFeeTrack::raiseLocalFee() @@ -90,4 +90,4 @@ scaleFeeLoad( return *result; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/misc/detail/Manifest.cpp b/src/xrpld/app/misc/detail/Manifest.cpp index 68d91599db..59a1325e32 100644 --- a/src/xrpld/app/misc/detail/Manifest.cpp +++ b/src/xrpld/app/misc/detail/Manifest.cpp @@ -14,7 +14,7 @@ #include #include -namespace ripple { +namespace xrpl { std::string to_string(Manifest const& m) @@ -187,11 +187,10 @@ Manifest::verify() const // Signing key and signature are not required for // master key revocations - if (!revoked() && !ripple::verify(st, HashPrefix::manifest, *signingKey)) + if (!revoked() && !xrpl::verify(st, HashPrefix::manifest, *signingKey)) return false; - return ripple::verify( - st, HashPrefix::manifest, masterKey, sfMasterSignature); + return xrpl::verify(st, HashPrefix::manifest, masterKey, sfMasterSignature); } uint256 @@ -374,7 +373,7 @@ ManifestCache::applyManifest(Manifest m) -> std::optional { XRPL_ASSERT( lock.owns_lock(), - "ripple::ManifestCache::applyManifest::prewriteCheck : locked"); + "xrpl::ManifestCache::applyManifest::prewriteCheck : locked"); (void)lock; // not used. parameter is present to ensure the mutex is // locked when the lambda is called. if (iter != map_.end() && m.sequence <= iter->second.sequence) @@ -525,7 +524,7 @@ void ManifestCache::load(DatabaseCon& dbCon, std::string const& dbTable) { auto db = dbCon.checkoutDb(); - ripple::getManifests(*db, dbTable, *this, j_); + xrpl::getManifests(*db, dbTable, *this, j_); } bool @@ -596,4 +595,4 @@ ManifestCache::save( saveManifests(*db, dbTable, isTrusted, map_, j_); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/misc/detail/Transaction.cpp b/src/xrpld/app/misc/detail/Transaction.cpp index 588bbc6fb7..77a8897d9c 100644 --- a/src/xrpld/app/misc/detail/Transaction.cpp +++ b/src/xrpld/app/misc/detail/Transaction.cpp @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { Transaction::Transaction( std::shared_ptr const& stx, @@ -71,7 +71,7 @@ Transaction::sqlTransactionStatus(boost::optional const& status) XRPL_ASSERT( c == txnSqlUnknown, - "ripple::Transaction::sqlTransactionStatus : unknown transaction " + "xrpl::Transaction::sqlTransactionStatus : unknown transaction " "status"); return INVALID; } @@ -183,4 +183,4 @@ Transaction::getJson(JsonOptions options, bool binary) const return ret; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/misc/detail/TxQ.cpp b/src/xrpld/app/misc/detail/TxQ.cpp index fd975f9178..270d3d33e5 100644 --- a/src/xrpld/app/misc/detail/TxQ.cpp +++ b/src/xrpld/app/misc/detail/TxQ.cpp @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { ////////////////////////////////////////////////////////////////////////// @@ -34,7 +34,7 @@ getFeeLevelPaid(ReadView const& view, STTx const& tx) return std::pair{baseFee + mod, feePaid + mod}; }(); - XRPL_ASSERT(baseFee.signum() > 0, "ripple::getFeeLevelPaid : positive fee"); + XRPL_ASSERT(baseFee.signum() > 0, "xrpl::getFeeLevelPaid : positive fee"); if (effectiveFeePaid.signum() <= 0 || baseFee.signum() <= 0) { return FeeLevel64(0); @@ -56,7 +56,7 @@ static FeeLevel64 increase(FeeLevel64 level, std::uint32_t increasePercent) { return mulDiv(level, 100 + increasePercent, 100) - .value_or(static_cast(ripple::muldiv_max)); + .value_or(static_cast(xrpl::muldiv_max)); } ////////////////////////////////////////////////////////////////////////// @@ -79,7 +79,7 @@ TxQ::FeeMetrics::update( std::sort(feeLevels.begin(), feeLevels.end()); XRPL_ASSERT( size == feeLevels.size(), - "ripple::TxQ::FeeMetrics::update : fee levels size"); + "xrpl::TxQ::FeeMetrics::update : fee levels size"); JLOG((timeLeap ? j_.warn() : j_.debug())) << "Ledger " << view.info().seq << " has " << size << " transactions. " @@ -95,10 +95,10 @@ TxQ::FeeMetrics::update( // upperLimit must be >= minimumTxnCount_ or std::clamp can give // unexpected results auto const upperLimit = std::max( - mulDiv(txnsExpected_, cutPct, 100).value_or(ripple::muldiv_max), + mulDiv(txnsExpected_, cutPct, 100).value_or(xrpl::muldiv_max), minimumTxnCount_); txnsExpected_ = std::clamp( - mulDiv(size, cutPct, 100).value_or(ripple::muldiv_max), + mulDiv(size, cutPct, 100).value_or(xrpl::muldiv_max), minimumTxnCount_, upperLimit); recentTxnCounts_.clear(); @@ -107,7 +107,7 @@ TxQ::FeeMetrics::update( { recentTxnCounts_.push_back( mulDiv(size, 100 + setup.normalConsensusIncreasePercent, 100) - .value_or(ripple::muldiv_max)); + .value_or(xrpl::muldiv_max)); auto const iter = std::max_element(recentTxnCounts_.begin(), recentTxnCounts_.end()); BOOST_ASSERT(iter != recentTxnCounts_.end()); @@ -166,7 +166,7 @@ TxQ::FeeMetrics::scaleFeeLevel(Snapshot const& snapshot, OpenView const& view) // Compute escalated fee level // Don't care about the overflow flag return mulDiv(multiplier, current * current, target * target) - .value_or(static_cast(ripple::muldiv_max)); + .value_or(static_cast(xrpl::muldiv_max)); } return baseLevel; @@ -233,7 +233,7 @@ TxQ::FeeMetrics::escalatedSeriesFeeLevel( XRPL_ASSERT( current > target, - "ripple::TxQ::FeeMetrics::escalatedSeriesFeeLevel : current over " + "xrpl::TxQ::FeeMetrics::escalatedSeriesFeeLevel : current over " "target"); /* Calculate (apologies for the terrible notation) @@ -280,7 +280,7 @@ TxQ::MaybeTx::apply(Application& app, OpenView& view, beast::Journal j) { // If the rules or flags change, preflight again XRPL_ASSERT( - pfresult, "ripple::TxQ::MaybeTx::apply : preflight result is set"); + pfresult, "xrpl::TxQ::MaybeTx::apply : preflight result is set"); NumberSO stNumberSO{view.rules().enabled(fixUniversalNumber)}; if (pfresult->rules != view.rules() || pfresult->flags != flags) @@ -325,10 +325,10 @@ TxQ::TxQAccount::add(MaybeTx&& txn) auto result = transactions.emplace(seqProx, std::move(txn)); XRPL_ASSERT( - result.second, "ripple::TxQ::TxQAccount::add : emplace succeeded"); + result.second, "xrpl::TxQ::TxQAccount::add : emplace succeeded"); XRPL_ASSERT( &result.first->second != &txn, - "ripple::TxQ::TxQAccount::add : transaction moved"); + "xrpl::TxQ::TxQAccount::add : transaction moved"); return result.first->second; } @@ -437,7 +437,7 @@ TxQ::erase(TxQ::FeeMultiSet::const_iterator_type candidateIter) // intrusive list remove it from the TxQAccount // so the memory can be freed. [[maybe_unused]] auto const found = txQAccount.remove(seqProx); - XRPL_ASSERT(found, "ripple::TxQ::erase : account removed"); + XRPL_ASSERT(found, "xrpl::TxQ::erase : account removed"); return newCandidateIter; } @@ -451,7 +451,7 @@ TxQ::eraseAndAdvance(TxQ::FeeMultiSet::const_iterator_type candidateIter) txQAccount.transactions.find(candidateIter->seqProxy); XRPL_ASSERT( accountIter != txQAccount.transactions.end(), - "ripple::TxQ::eraseAndAdvance : account found"); + "xrpl::TxQ::eraseAndAdvance : account found"); // Note that sequence-based transactions must be applied in sequence order // from smallest to largest. But ticket-based transactions can be @@ -459,10 +459,10 @@ TxQ::eraseAndAdvance(TxQ::FeeMultiSet::const_iterator_type candidateIter) XRPL_ASSERT( candidateIter->seqProxy.isTicket() || accountIter == txQAccount.transactions.begin(), - "ripple::TxQ::eraseAndAdvance : ticket or sequence"); + "xrpl::TxQ::eraseAndAdvance : ticket or sequence"); XRPL_ASSERT( byFee_.iterator_to(accountIter->second) == candidateIter, - "ripple::TxQ::eraseAndAdvance : found in byFee"); + "xrpl::TxQ::eraseAndAdvance : found in byFee"); auto const accountNextIter = std::next(accountIter); // Check if the next transaction for this account is earlier in the queue, @@ -511,7 +511,7 @@ TxQ::tryClearAccountQueueUpThruTx( SeqProxy const tSeqProx{tx.getSeqProxy()}; XRPL_ASSERT( beginTxIter != accountIter->second.transactions.end(), - "ripple::TxQ::tryClearAccountQueueUpThruTx : non-empty accounts input"); + "xrpl::TxQ::tryClearAccountQueueUpThruTx : non-empty accounts input"); // This check is only concerned with the range from // [aSeqProxy, tSeqProxy) @@ -993,8 +993,7 @@ TxQ::apply( // o The current first thing in the queue has a Ticket and // * The tx has a Ticket that precedes it or // * txSeqProx == acctSeqProx. - XRPL_ASSERT( - prevIter != txIter->end, "ripple::TxQ::apply : not end"); + XRPL_ASSERT(prevIter != txIter->end, "xrpl::TxQ::apply : not end"); if (prevIter == txIter->end || txSeqProx < prevIter->first) { // The first Sequence number in the queue must be the @@ -1119,7 +1118,7 @@ TxQ::apply( potentialTotalSpend > XRPAmount{0} || (potentialTotalSpend == XRPAmount{0} && multiTxn->applyView.fees().base == 0), - "ripple::TxQ::apply : total spend check"); + "xrpl::TxQ::apply : total spend check"); sleBump->setFieldAmount(sfBalance, balance - potentialTotalSpend); // The transaction's sequence/ticket will be valid when the other // transactions in the queue have been processed. If the tx has a @@ -1149,7 +1148,7 @@ TxQ::apply( return {pcresult.ter, false}; // Too low of a fee should get caught by preclaim - XRPL_ASSERT(feeLevelPaid >= baseLevel, "ripple::TxQ::apply : minimum fee"); + XRPL_ASSERT(feeLevelPaid >= baseLevel, "xrpl::TxQ::apply : minimum fee"); JLOG(j_.trace()) << "Transaction " << transactionID << " from account " << account << " has fee level of " << feeLevelPaid @@ -1276,7 +1275,7 @@ TxQ::apply( auto dropRIter = endAccount.transactions.rbegin(); XRPL_ASSERT( dropRIter->second.account == lastRIter->account, - "ripple::TxQ::apply : cheapest transaction found"); + "xrpl::TxQ::apply : cheapest transaction found"); JLOG(j_.info()) << "Removing last item of account " << lastRIter->account << " from queue with average fee of " << endEffectiveFeeLevel @@ -1305,7 +1304,7 @@ TxQ::apply( [[maybe_unused]] bool created = false; std::tie(accountIter, created) = byAccount_.emplace(account, TxQAccount(tx)); - XRPL_ASSERT(created, "ripple::TxQ::apply : account created"); + XRPL_ASSERT(created, "xrpl::TxQ::apply : account created"); } // Modify the flags for use when coming out of the queue. // These changes _may_ cause an extra `preflight`, but as long as @@ -1520,7 +1519,7 @@ TxQ::accept(Application& app, OpenView& view) auto dropRIter = account.transactions.rbegin(); XRPL_ASSERT( dropRIter->second.account == candidateIter->account, - "ripple::TxQ::accept : account check"); + "xrpl::TxQ::accept : account check"); JLOG(j_.info()) << "Queue is nearly full, and transaction " @@ -1575,8 +1574,7 @@ TxQ::accept(Application& app, OpenView& view) } } XRPL_ASSERT( - byFee_.size() == startingSize, - "ripple::TxQ::accept : byFee size match"); + byFee_.size() == startingSize, "xrpl::TxQ::accept : byFee size match"); return ledgerChanged; } @@ -1695,7 +1693,7 @@ TxQ::tryDirectApply( << " to open ledger."; auto const [txnResult, didApply, metadata] = - ripple::apply(app, view, *tx, flags, j); + xrpl::apply(app, view, *tx, flags, j); JLOG(j_.trace()) << "New transaction " << transactionID << (didApply ? " applied successfully with " @@ -1737,16 +1735,16 @@ TxQ::removeFromByFee( auto deleteIter = byFee_.iterator_to((*replacedTxIter)->second); XRPL_ASSERT( deleteIter != byFee_.end(), - "ripple::TxQ::removeFromByFee : found in byFee"); + "xrpl::TxQ::removeFromByFee : found in byFee"); XRPL_ASSERT( &(*replacedTxIter)->second == &*deleteIter, - "ripple::TxQ::removeFromByFee : matching transaction"); + "xrpl::TxQ::removeFromByFee : matching transaction"); XRPL_ASSERT( deleteIter->seqProxy == tx->getSeqProxy(), - "ripple::TxQ::removeFromByFee : matching sequence"); + "xrpl::TxQ::removeFromByFee : matching sequence"); XRPL_ASSERT( deleteIter->account == (*tx)[sfAccount], - "ripple::TxQ::removeFromByFee : matching account"); + "xrpl::TxQ::removeFromByFee : matching account"); erase(deleteIter); } @@ -1958,4 +1956,4 @@ setup_TxQ(Config const& config) return setup; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/misc/detail/ValidatorKeys.cpp b/src/xrpld/app/misc/detail/ValidatorKeys.cpp index 4b1e93a444..757a18aa47 100644 --- a/src/xrpld/app/misc/detail/ValidatorKeys.cpp +++ b/src/xrpld/app/misc/detail/ValidatorKeys.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { ValidatorKeys::ValidatorKeys(Config const& config, beast::Journal j) { if (config.exists(SECTION_VALIDATOR_TOKEN) && @@ -70,4 +70,4 @@ ValidatorKeys::ValidatorKeys(Config const& config, beast::Journal j) } } } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/misc/detail/ValidatorList.cpp b/src/xrpld/app/misc/detail/ValidatorList.cpp index 566dfc06a0..db2ee980b8 100644 --- a/src/xrpld/app/misc/detail/ValidatorList.cpp +++ b/src/xrpld/app/misc/detail/ValidatorList.cpp @@ -20,7 +20,7 @@ #include #include -namespace ripple { +namespace xrpl { std::string to_string(ListDisposition disposition) @@ -181,7 +181,7 @@ ValidatorList::load( // This should be enforced by Config class XRPL_ASSERT( listThreshold_ > 0 && listThreshold_ <= publisherLists_.size(), - "ripple::ValidatorList::load : list threshold inside range"); + "xrpl::ValidatorList::load : list threshold inside range"); JLOG(j_.debug()) << "Validator list threshold set in configuration to " << listThreshold_; } @@ -293,7 +293,7 @@ ValidatorList::buildFileData( XRPL_ASSERT( pubCollection.rawVersion == 2 || pubCollection.remaining.empty(), - "ripple::ValidatorList::buildFileData : valid publisher list input"); + "xrpl::ValidatorList::buildFileData : valid publisher list input"); auto const effectiveVersion = forceVersion ? *forceVersion : pubCollection.rawVersion; @@ -395,7 +395,7 @@ ValidatorList::parseBlobs(std::uint32_t version, Json::Value const& body) info.signature = body[jss::signature].asString(); XRPL_ASSERT( result.size() == 1, - "ripple::ValidatorList::parseBlobs : single element result"); + "xrpl::ValidatorList::parseBlobs : single element result"); return result; } // Treat unknown versions as if they're the latest version. This @@ -432,7 +432,7 @@ ValidatorList::parseBlobs(std::uint32_t version, Json::Value const& body) } XRPL_ASSERT( result.size() == blobs.size(), - "ripple::ValidatorList::parseBlobs(version, Jason::Value) : " + "xrpl::ValidatorList::parseBlobs(version, Jason::Value) : " "result size matches"); return result; } @@ -466,7 +466,7 @@ ValidatorList::parseBlobs(protocol::TMValidatorListCollection const& body) } XRPL_ASSERT( result.size() == body.blobs_size(), - "ripple::ValidatorList::parseBlobs(TMValidatorList) : result size " + "xrpl::ValidatorList::parseBlobs(TMValidatorList) : result size " "match"); return result; } @@ -489,7 +489,7 @@ splitMessage( { if (begin == 0 && end == 0) end = largeMsg.blobs_size(); - XRPL_ASSERT(begin < end, "ripple::splitMessage : valid inputs"); + XRPL_ASSERT(begin < end, "xrpl::splitMessage : valid inputs"); if (end <= begin) return 0; @@ -525,7 +525,7 @@ splitMessageParts( XRPL_ASSERT( Message::totalSize(smallMsg) <= maximiumMessageSize, - "ripple::splitMessageParts : maximum message size"); + "xrpl::splitMessageParts : maximum message size"); messages.emplace_back( std::make_shared(smallMsg, protocol::mtVALIDATORLIST), @@ -575,7 +575,7 @@ buildValidatorListMessage( { XRPL_ASSERT( messages.empty(), - "ripple::buildValidatorListMessage(ValidatorBlobInfo) : empty messages " + "xrpl::buildValidatorListMessage(ValidatorBlobInfo) : empty messages " "input"); protocol::TMValidatorList msg; auto const manifest = @@ -589,7 +589,7 @@ buildValidatorListMessage( XRPL_ASSERT( Message::totalSize(msg) <= maximiumMessageSize, - "ripple::buildValidatorListMessage(ValidatorBlobInfo) : maximum " + "xrpl::buildValidatorListMessage(ValidatorBlobInfo) : maximum " "message size"); messages.emplace_back( std::make_shared(msg, protocol::mtVALIDATORLIST), @@ -611,7 +611,7 @@ buildValidatorListMessage( { XRPL_ASSERT( messages.empty(), - "ripple::buildValidatorListMessage(std::map) : empty messages input"); protocol::TMValidatorListCollection msg; auto const version = rawVersion < 2 ? 2 : rawVersion; @@ -630,7 +630,7 @@ buildValidatorListMessage( } XRPL_ASSERT( msg.blobs_size() > 0, - "ripple::buildValidatorListMessage(std::map) : minimum message blobs"); if (Message::totalSize(msg) > maxSize) { @@ -662,7 +662,7 @@ ValidatorList::buildValidatorListMessages( { XRPL_ASSERT( !blobInfos.empty(), - "ripple::ValidatorList::buildValidatorListMessages : empty messages " + "xrpl::ValidatorList::buildValidatorListMessages : empty messages " "input"); auto const& [currentSeq, currentBlob] = *blobInfos.begin(); auto numVLs = std::accumulate( @@ -748,7 +748,7 @@ ValidatorList::sendValidatorList( { XRPL_ASSERT( !messages.empty(), - "ripple::ValidatorList::sendValidatorList : non-empty messages " + "xrpl::ValidatorList::sendValidatorList : non-empty messages " "input"); // Don't send it next time. peer.setPublisherListSequence(publisherKey, newPeerSequence); @@ -767,7 +767,7 @@ ValidatorList::sendValidatorList( // thus there will only be one entry without a message XRPL_ASSERT( sent || messages.size() == 1, - "ripple::ValidatorList::sendValidatorList : sent or one message"); + "xrpl::ValidatorList::sendValidatorList : sent or one message"); if (sent) { if (messageVersion > 1) @@ -781,7 +781,7 @@ ValidatorList::sendValidatorList( { XRPL_ASSERT( numVLs == 1, - "ripple::ValidatorList::sendValidatorList : one validator " + "xrpl::ValidatorList::sendValidatorList : one validator " "list"); JLOG(j.debug()) << "Sent validator list for " << strHex(publisherKey) @@ -879,7 +879,7 @@ ValidatorList::broadcastBlobs( XRPL_ASSERT( lists.current.sequence == maxSequence || lists.remaining.count(maxSequence) == 1, - "ripple::ValidatorList::broadcastBlobs : valid sequence"); + "xrpl::ValidatorList::broadcastBlobs : valid sequence"); // Can't use overlay.foreach here because we need to modify // the peer, and foreach provides a const& for (auto& peer : overlay.getActivePeers()) @@ -1025,7 +1025,7 @@ ValidatorList::applyLists( auto next = std::next(iter); XRPL_ASSERT( next == remaining.end() || next->first > iter->first, - "ripple::ValidatorList::applyLists : next is valid"); + "xrpl::ValidatorList::applyLists : next is valid"); if (iter->first <= current.sequence || (next != remaining.end() && next->second.validFrom <= iter->second.validFrom)) @@ -1151,8 +1151,7 @@ ValidatorList::applyList( // we can only arrive here if the key used by the manifest matched one // of the loaded keys // LCOV_EXCL_START - UNREACHABLE( - "ripple::ValidatorList::applyList : invalid public key type"); + UNREACHABLE("xrpl::ValidatorList::applyList : invalid public key type"); return PublisherListStats{result}; // LCOV_EXCL_STOP } @@ -1213,7 +1212,7 @@ ValidatorList::applyList( // Done XRPL_ASSERT( publisher.sequence == sequence, - "ripple::ValidatorList::applyList : publisher sequence match"); + "xrpl::ValidatorList::applyList : publisher sequence match"); } else { @@ -1374,7 +1373,7 @@ ValidatorList::verify( auto const sig = strUnHex(signature); auto const data = base64_decode(blob); - if (!sig || !ripple::verify(*signingKey, makeSlice(data), makeSlice(*sig))) + if (!sig || !xrpl::verify(*signingKey, makeSlice(data), makeSlice(*sig))) return {ListDisposition::invalid, masterPubKey}; Json::Reader r; @@ -1508,7 +1507,7 @@ ValidatorList::removePublisherList( XRPL_ASSERT( reason != PublisherStatus::available && reason != PublisherStatus::unavailable, - "ripple::ValidatorList::removePublisherList : valid reason input"); + "xrpl::ValidatorList::removePublisherList : valid reason input"); auto const iList = publisherLists_.find(publisherKey); if (iList == publisherLists_.end()) return false; @@ -1697,7 +1696,7 @@ ValidatorList::getJson() const // Race conditions can happen, so make this check "fuzzy" XRPL_ASSERT( future.validFrom > timeKeeper_.now() + 600s, - "ripple::ValidatorList::getJson : minimum valid from"); + "xrpl::ValidatorList::getJson : minimum valid from"); } if (remaining.size()) curr[jss::remaining] = std::move(remaining); @@ -1764,7 +1763,7 @@ ValidatorList::for_each_available( continue; XRPL_ASSERT( plCollection.maxSequence != 0, - "ripple::ValidatorList::for_each_available : nonzero maxSequence"); + "xrpl::ValidatorList::for_each_available : nonzero maxSequence"); func( plCollection.rawManifest, plCollection.rawVersion, @@ -1854,7 +1853,7 @@ ValidatorList::calculateQuorum( publisherLists_.size() - listThreshold_ + 1); XRPL_ASSERT( errorThreshold > 0, - "ripple::ValidatorList::calculateQuorum : nonzero error threshold"); + "xrpl::ValidatorList::calculateQuorum : nonzero error threshold"); if (unavailable >= errorThreshold) return std::numeric_limits::max(); } @@ -1931,12 +1930,12 @@ ValidatorList::updateTrusted( { XRPL_ASSERT( std::next(iter) == next, - "ripple::ValidatorList::updateTrusted : sequential " + "xrpl::ValidatorList::updateTrusted : sequential " "remaining"); } XRPL_ASSERT( iter != remaining.end(), - "ripple::ValidatorList::updateTrusted : non-end of " + "xrpl::ValidatorList::updateTrusted : non-end of " "remaining"); // Rotate the pending list in to current @@ -1945,7 +1944,7 @@ ValidatorList::updateTrusted( auto& current = collection.current; XRPL_ASSERT( candidate.validFrom <= closeTime, - "ripple::ValidatorList::updateTrusted : maximum time"); + "xrpl::ValidatorList::updateTrusted : maximum time"); auto const oldList = current.list; current = std::move(candidate); @@ -1953,7 +1952,7 @@ ValidatorList::updateTrusted( collection.status = PublisherStatus::available; XRPL_ASSERT( current.sequence == sequence, - "ripple::ValidatorList::updateTrusted : sequence match"); + "xrpl::ValidatorList::updateTrusted : sequence match"); // If the list is expired, remove the validators so they don't // get processed in. The expiration check below will do the rest // of the work @@ -2012,7 +2011,7 @@ ValidatorList::updateTrusted( { XRPL_ASSERT( kit->second >= listThreshold_, - "ripple::ValidatorList::updateTrusted : count meets threshold"); + "xrpl::ValidatorList::updateTrusted : count meets threshold"); ++it; } } @@ -2039,7 +2038,7 @@ ValidatorList::updateTrusted( validatorManifests_.getSigningKey(k); XRPL_ASSERT( signingKey, - "ripple::ValidatorList::updateTrusted : found signing key"); + "xrpl::ValidatorList::updateTrusted : found signing key"); trustedSigningKeys_.insert(*signingKey); } } @@ -2153,4 +2152,4 @@ ValidatorList::negativeUNLFilter( return ret; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/misc/detail/ValidatorSite.cpp b/src/xrpld/app/misc/detail/ValidatorSite.cpp index 74481e9a6b..a76980ac02 100644 --- a/src/xrpld/app/misc/detail/ValidatorSite.cpp +++ b/src/xrpld/app/misc/detail/ValidatorSite.cpp @@ -10,7 +10,7 @@ #include -namespace ripple { +namespace xrpl { auto constexpr default_refresh_interval = std::chrono::minutes{5}; auto constexpr error_retry_interval = std::chrono::seconds{30}; @@ -394,7 +394,7 @@ ValidatorSite::parseJsonResponse( auto const manifest = body[jss::manifest].asString(); XRPL_ASSERT( version == body[jss::version].asUInt(), - "ripple::ValidatorSite::parseJsonResponse : version match"); + "xrpl::ValidatorSite::parseJsonResponse : version match"); auto const& uri = sites_[siteIdx].activeResource->uri; auto const hash = sha512Half(manifest, blobs, version); auto const applyResult = app_.validators().applyListsAndBroadcast( @@ -571,7 +571,7 @@ ValidatorSite::onSiteFetch( processRedirect(res, siteIdx, lock_sites); XRPL_ASSERT( newLocation, - "ripple::ValidatorSite::onSiteFetch : non-null " + "xrpl::ValidatorSite::onSiteFetch : non-null " "validator"); // for perm redirects, also update our starting URI if (res.result() == status::moved_permanently || @@ -684,4 +684,4 @@ ValidatorSite::getJson() const } return jrr; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/misc/detail/Work.h b/src/xrpld/app/misc/detail/Work.h index 6855c68827..4d1547c4fb 100644 --- a/src/xrpld/app/misc/detail/Work.h +++ b/src/xrpld/app/misc/detail/Work.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { @@ -25,6 +25,6 @@ public: } // namespace detail -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/misc/detail/WorkBase.h b/src/xrpld/app/misc/detail/WorkBase.h index 03cd2398f5..6c46749f6d 100644 --- a/src/xrpld/app/misc/detail/WorkBase.h +++ b/src/xrpld/app/misc/detail/WorkBase.h @@ -13,7 +13,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { @@ -260,7 +260,7 @@ WorkBase::onResponse(error_code const& ec) return fail(ec); close(); - XRPL_ASSERT(cb_, "ripple::detail::WorkBase::onResponse : callback is set"); + XRPL_ASSERT(cb_, "xrpl::detail::WorkBase::onResponse : callback is set"); cb_(ec, lastEndpoint_, std::move(res_)); cb_ = nullptr; } @@ -281,6 +281,6 @@ WorkBase::close() } // namespace detail -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/misc/detail/WorkFile.h b/src/xrpld/app/misc/detail/WorkFile.h index 32dfca2b49..ac926ede1f 100644 --- a/src/xrpld/app/misc/detail/WorkFile.h +++ b/src/xrpld/app/misc/detail/WorkFile.h @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { @@ -78,7 +78,7 @@ WorkFile::run() error_code ec; auto const fileContents = getFileContents(ec, path_, megabytes(1)); - XRPL_ASSERT(cb_, "ripple::detail::WorkFile::run : callback is set"); + XRPL_ASSERT(cb_, "xrpl::detail::WorkFile::run : callback is set"); cb_(ec, fileContents); cb_ = nullptr; } @@ -91,6 +91,6 @@ WorkFile::cancel() } // namespace detail -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/misc/detail/WorkPlain.h b/src/xrpld/app/misc/detail/WorkPlain.h index 13ed9c7f1d..23bae20006 100644 --- a/src/xrpld/app/misc/detail/WorkPlain.h +++ b/src/xrpld/app/misc/detail/WorkPlain.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace detail { @@ -60,6 +60,6 @@ WorkPlain::onConnect(error_code const& ec) } // namespace detail -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/misc/detail/WorkSSL.cpp b/src/xrpld/app/misc/detail/WorkSSL.cpp index 6bd576cb18..6ccc83f595 100644 --- a/src/xrpld/app/misc/detail/WorkSSL.cpp +++ b/src/xrpld/app/misc/detail/WorkSSL.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { namespace detail { WorkSSL::WorkSSL( @@ -56,4 +56,4 @@ WorkSSL::onHandshake(error_code const& ec) } // namespace detail -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/misc/detail/WorkSSL.h b/src/xrpld/app/misc/detail/WorkSSL.h index 5d17e6979f..7dd1a94c9e 100644 --- a/src/xrpld/app/misc/detail/WorkSSL.h +++ b/src/xrpld/app/misc/detail/WorkSSL.h @@ -12,7 +12,7 @@ #include -namespace ripple { +namespace xrpl { namespace detail { @@ -57,6 +57,6 @@ private: } // namespace detail -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/paths/AMMContext.h b/src/xrpld/app/paths/AMMContext.h index b84634c6dc..a272ba291e 100644 --- a/src/xrpld/app/paths/AMMContext.h +++ b/src/xrpld/app/paths/AMMContext.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { /** Maintains AMM info per overall payment engine execution and * individual iteration. @@ -95,6 +95,6 @@ public: } }; -} // namespace ripple +} // namespace xrpl #endif // XRPL_APP_PATHS_AMMCONTEXT_H_INCLUDED diff --git a/src/xrpld/app/paths/AMMLiquidity.h b/src/xrpld/app/paths/AMMLiquidity.h index 48388b378e..b5b865d80e 100644 --- a/src/xrpld/app/paths/AMMLiquidity.h +++ b/src/xrpld/app/paths/AMMLiquidity.h @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { template class AMMOffer; @@ -131,6 +131,6 @@ private: maxOffer(TAmounts const& balances, Rules const& rules) const; }; -} // namespace ripple +} // namespace xrpl #endif // XRPL_APP_TX_AMMLIQUIDITY_H_INCLUDED diff --git a/src/xrpld/app/paths/AMMOffer.h b/src/xrpld/app/paths/AMMOffer.h index d669e60d99..07defc16b1 100644 --- a/src/xrpld/app/paths/AMMOffer.h +++ b/src/xrpld/app/paths/AMMOffer.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { template class AMMLiquidity; @@ -127,6 +127,6 @@ public: checkInvariant(TAmounts const& consumed, beast::Journal j) const; }; -} // namespace ripple +} // namespace xrpl #endif // XRPL_APP_AMMOFFER_H_INCLUDED diff --git a/src/xrpld/app/paths/AccountCurrencies.cpp b/src/xrpld/app/paths/AccountCurrencies.cpp index 900ca04904..fbb9c63cd8 100644 --- a/src/xrpld/app/paths/AccountCurrencies.cpp +++ b/src/xrpld/app/paths/AccountCurrencies.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { hash_set accountSourceCurrencies( @@ -66,4 +66,4 @@ accountDestCurrencies( return currencies; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/paths/AccountCurrencies.h b/src/xrpld/app/paths/AccountCurrencies.h index 39e4f8931f..de46a13808 100644 --- a/src/xrpld/app/paths/AccountCurrencies.h +++ b/src/xrpld/app/paths/AccountCurrencies.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { hash_set accountDestCurrencies( @@ -19,6 +19,6 @@ accountSourceCurrencies( std::shared_ptr const& lrLedger, bool includeXRP); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/paths/Credit.cpp b/src/xrpld/app/paths/Credit.cpp index 8895e681dc..09798cef90 100644 --- a/src/xrpld/app/paths/Credit.cpp +++ b/src/xrpld/app/paths/Credit.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { STAmount creditLimit( @@ -25,10 +25,10 @@ creditLimit( XRPL_ASSERT( result.getIssuer() == account, - "ripple::creditLimit : result issuer match"); + "xrpl::creditLimit : result issuer match"); XRPL_ASSERT( result.getCurrency() == currency, - "ripple::creditLimit : result currency match"); + "xrpl::creditLimit : result currency match"); return result; } @@ -63,11 +63,11 @@ creditBalance( XRPL_ASSERT( result.getIssuer() == account, - "ripple::creditBalance : result issuer match"); + "xrpl::creditBalance : result issuer match"); XRPL_ASSERT( result.getCurrency() == currency, - "ripple::creditBalance : result currency match"); + "xrpl::creditBalance : result currency match"); return result; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/paths/Credit.h b/src/xrpld/app/paths/Credit.h index 69594cf843..5bdcd70e74 100644 --- a/src/xrpld/app/paths/Credit.h +++ b/src/xrpld/app/paths/Credit.h @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Calculate the maximum amount of IOUs that an account can hold @param ledger the ledger to check against. @@ -45,6 +45,6 @@ creditBalance( Currency const& currency); /** @} */ -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/paths/Flow.cpp b/src/xrpld/app/paths/Flow.cpp index c9e16497e3..a102e44854 100644 --- a/src/xrpld/app/paths/Flow.cpp +++ b/src/xrpld/app/paths/Flow.cpp @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { template static auto @@ -172,7 +172,7 @@ flow( flowDebugInfo)); } - XRPL_ASSERT(!srcIsXRP && !dstIsXRP, "ripple::flow : neither is XRP"); + XRPL_ASSERT(!srcIsXRP && !dstIsXRP, "xrpl::flow : neither is XRP"); return finishFlow( sb, srcIssue, @@ -190,4 +190,4 @@ flow( flowDebugInfo)); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/paths/Flow.h b/src/xrpld/app/paths/Flow.h index ca1e538e3a..5fafe294db 100644 --- a/src/xrpld/app/paths/Flow.h +++ b/src/xrpld/app/paths/Flow.h @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { namespace path { namespace detail { @@ -51,6 +51,6 @@ flow( beast::Journal j, path::detail::FlowDebugInfo* flowDebugInfo = nullptr); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/paths/PathRequest.cpp b/src/xrpld/app/paths/PathRequest.cpp index 5ab7766e30..422e5fe444 100644 --- a/src/xrpld/app/paths/PathRequest.cpp +++ b/src/xrpld/app/paths/PathRequest.cpp @@ -18,7 +18,7 @@ #include #include -namespace ripple { +namespace xrpl { PathRequest::PathRequest( Application& app, @@ -139,8 +139,7 @@ PathRequest::updateComplete() { std::lock_guard sl(mIndexLock); - XRPL_ASSERT( - mInProgress, "ripple::PathRequest::updateComplete : in progress"); + XRPL_ASSERT(mInProgress, "xrpl::PathRequest::updateComplete : in progress"); mInProgress = false; if (fCompletion) @@ -762,4 +761,4 @@ PathRequest::getSubscriber() const return wpSubscriber.lock(); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/paths/PathRequest.h b/src/xrpld/app/paths/PathRequest.h index b71635cc7f..3d5564c069 100644 --- a/src/xrpld/app/paths/PathRequest.h +++ b/src/xrpld/app/paths/PathRequest.h @@ -15,7 +15,7 @@ #include #include -namespace ripple { +namespace xrpl { // A pathfinding request submitted by a client // The request issuer must maintain a strong pointer @@ -158,6 +158,6 @@ private: static unsigned int const max_paths_ = 4; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/paths/PathRequests.cpp b/src/xrpld/app/paths/PathRequests.cpp index d489dafcea..ba8e1a0643 100644 --- a/src/xrpld/app/paths/PathRequests.cpp +++ b/src/xrpld/app/paths/PathRequests.cpp @@ -10,7 +10,7 @@ #include -namespace ripple { +namespace xrpl { /** Get the current RippleLineCache, updating it if necessary. Get the correct ledger to use. @@ -300,4 +300,4 @@ PathRequests::doLegacyPathRequest( return std::move(jvRes); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/paths/PathRequests.h b/src/xrpld/app/paths/PathRequests.h index 544ff2fec0..5c97bafa8a 100644 --- a/src/xrpld/app/paths/PathRequests.h +++ b/src/xrpld/app/paths/PathRequests.h @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { class PathRequests { @@ -100,6 +100,6 @@ private: std::recursive_mutex mutable mLock; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/paths/Pathfinder.cpp b/src/xrpld/app/paths/Pathfinder.cpp index 2debdc76b2..24a24dcf16 100644 --- a/src/xrpld/app/paths/Pathfinder.cpp +++ b/src/xrpld/app/paths/Pathfinder.cpp @@ -45,7 +45,7 @@ same path request (particularly if the search depth may change). */ -namespace ripple { +namespace xrpl { namespace { @@ -174,7 +174,7 @@ Pathfinder::Pathfinder( { XRPL_ASSERT( !uSrcIssuer || isXRP(uSrcCurrency) == isXRP(uSrcIssuer.value()), - "ripple::Pathfinder::Pathfinder : valid inputs"); + "xrpl::Pathfinder::Pathfinder : valid inputs"); } bool @@ -568,7 +568,7 @@ Pathfinder::getBestPaths( XRPL_ASSERT( fullLiquidityPath.empty(), - "ripple::Pathfinder::getBestPaths : first empty path result"); + "xrpl::Pathfinder::getBestPaths : first empty path result"); bool const issuerIsSender = isXRP(mSrcCurrency) || (srcIssuer == mSrcAccount); @@ -630,7 +630,7 @@ Pathfinder::getBestPaths( if (path.empty()) { // LCOV_EXCL_START - UNREACHABLE("ripple::Pathfinder::getBestPaths : path not found"); + UNREACHABLE("xrpl::Pathfinder::getBestPaths : path not found"); continue; // LCOV_EXCL_STOP } @@ -676,7 +676,7 @@ Pathfinder::getBestPaths( { XRPL_ASSERT( fullLiquidityPath.empty(), - "ripple::Pathfinder::getBestPaths : second empty path result"); + "xrpl::Pathfinder::getBestPaths : second empty path result"); JLOG(j_.info()) << "Paths could not send " << remaining << " of " << mDstAmount; } @@ -827,7 +827,7 @@ Pathfinder::addPathsForType( // Source must always be at the start, so pathsOut has to be empty. XRPL_ASSERT( pathsOut.empty(), - "ripple::Pathfinder::addPathsForType : empty paths"); + "xrpl::Pathfinder::addPathsForType : empty paths"); pathsOut.push_back(STPath()); break; @@ -1280,7 +1280,7 @@ void fillPaths(Pathfinder::PaymentType type, PathCostList const& costs) { auto& list = mPathTable[type]; - XRPL_ASSERT(list.empty(), "ripple::fillPaths : empty paths"); + XRPL_ASSERT(list.empty(), "xrpl::fillPaths : empty paths"); for (auto& cost : costs) list.push_back({cost.cost, makePath(cost.path)}); } @@ -1359,4 +1359,4 @@ Pathfinder::initPathTable() }); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/paths/Pathfinder.h b/src/xrpld/app/paths/Pathfinder.h index d019a8307e..705743f29f 100644 --- a/src/xrpld/app/paths/Pathfinder.h +++ b/src/xrpld/app/paths/Pathfinder.h @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Calculates payment paths. @@ -219,6 +219,6 @@ private: static std::uint32_t const afAC_LAST = 0x080; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/paths/RippleCalc.cpp b/src/xrpld/app/paths/RippleCalc.cpp index ac30932f11..ae73372ab5 100644 --- a/src/xrpld/app/paths/RippleCalc.cpp +++ b/src/xrpld/app/paths/RippleCalc.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace path { RippleCalc::Output @@ -117,4 +117,4 @@ RippleCalc::rippleCalculate( } } // namespace path -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/paths/RippleCalc.h b/src/xrpld/app/paths/RippleCalc.h index 1480a02bb7..0ef2641e36 100644 --- a/src/xrpld/app/paths/RippleCalc.h +++ b/src/xrpld/app/paths/RippleCalc.h @@ -8,7 +8,7 @@ #include -namespace ripple { +namespace xrpl { class Config; namespace path { @@ -107,6 +107,6 @@ public: }; } // namespace path -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/paths/RippleLineCache.cpp b/src/xrpld/app/paths/RippleLineCache.cpp index 8e35b771fd..0de2a039d1 100644 --- a/src/xrpld/app/paths/RippleLineCache.cpp +++ b/src/xrpld/app/paths/RippleLineCache.cpp @@ -1,7 +1,7 @@ #include #include -namespace ripple { +namespace xrpl { RippleLineCache::RippleLineCache( std::shared_ptr const& ledger, @@ -61,7 +61,7 @@ RippleLineCache::getRippleLines( // for either value of outgoing. XRPL_ASSERT( size <= totalLineCount_, - "ripple::RippleLineCache::getRippleLines : maximum lines"); + "xrpl::RippleLineCache::getRippleLines : maximum lines"); totalLineCount_ -= size; lines_.erase(otheriter); } @@ -83,7 +83,7 @@ RippleLineCache::getRippleLines( { XRPL_ASSERT( it->second == nullptr, - "ripple::RippleLineCache::getRippleLines : null lines"); + "xrpl::RippleLineCache::getRippleLines : null lines"); auto lines = PathFindTrustLine::getItems(accountID, *ledger_, direction); if (lines.size()) @@ -96,7 +96,7 @@ RippleLineCache::getRippleLines( XRPL_ASSERT( !it->second || (it->second->size() > 0), - "ripple::RippleLineCache::getRippleLines : null or nonempty lines"); + "xrpl::RippleLineCache::getRippleLines : null or nonempty lines"); auto const size = it->second ? it->second->size() : 0; JLOG(journal_.trace()) << "getRippleLines for ledger " << ledger_->info().seq << " found " << size @@ -111,4 +111,4 @@ RippleLineCache::getRippleLines( return it->second; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/paths/RippleLineCache.h b/src/xrpld/app/paths/RippleLineCache.h index 00614f08c2..c2763ca2b4 100644 --- a/src/xrpld/app/paths/RippleLineCache.h +++ b/src/xrpld/app/paths/RippleLineCache.h @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { // Used by Pathfinder class RippleLineCache final : public CountedObject @@ -46,7 +46,7 @@ public: private: std::mutex mLock; - ripple::hardened_hash<> hasher_; + xrpl::hardened_hash<> hasher_; std::shared_ptr ledger_; beast::Journal journal_; @@ -108,6 +108,6 @@ private: std::size_t totalLineCount_ = 0; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/paths/TrustLine.cpp b/src/xrpld/app/paths/TrustLine.cpp index 45c17bb893..b6ce9d74b0 100644 --- a/src/xrpld/app/paths/TrustLine.cpp +++ b/src/xrpld/app/paths/TrustLine.cpp @@ -4,7 +4,7 @@ #include -namespace ripple { +namespace xrpl { TrustLineBase::TrustLineBase( std::shared_ptr const& sle, @@ -103,4 +103,4 @@ RPCTrustLine::getItems(AccountID const& accountID, ReadView const& view) return detail::getTrustLineItems(accountID, view); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/paths/TrustLine.h b/src/xrpld/app/paths/TrustLine.h index 8b944d84b1..a0a58c2bde 100644 --- a/src/xrpld/app/paths/TrustLine.h +++ b/src/xrpld/app/paths/TrustLine.h @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Describes how an account was found in a path, and how to find the next set of paths. "Outgoing" is defined as the source account, or an account found via a @@ -227,6 +227,6 @@ private: Rate highQualityOut_; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/paths/detail/AMMLiquidity.cpp b/src/xrpld/app/paths/detail/AMMLiquidity.cpp index 84a039bfc6..2042467923 100644 --- a/src/xrpld/app/paths/detail/AMMLiquidity.cpp +++ b/src/xrpld/app/paths/detail/AMMLiquidity.cpp @@ -1,7 +1,7 @@ #include #include -namespace ripple { +namespace xrpl { template AMMLiquidity::AMMLiquidity( @@ -60,7 +60,7 @@ AMMLiquidity::generateFibSeqOffer( XRPL_ASSERT( !ammContext_.maxItersReached(), - "ripple::AMMLiquidity::generateFibSeqOffer : maximum iterations"); + "xrpl::AMMLiquidity::generateFibSeqOffer : maximum iterations"); cur.out = toAmount( getIssue(balances.out), @@ -245,4 +245,4 @@ template class AMMLiquidity; template class AMMLiquidity; template class AMMLiquidity; -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/paths/detail/AMMOffer.cpp b/src/xrpld/app/paths/detail/AMMOffer.cpp index 42592ee9c9..a58eafbdbf 100644 --- a/src/xrpld/app/paths/detail/AMMOffer.cpp +++ b/src/xrpld/app/paths/detail/AMMOffer.cpp @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { template AMMOffer::AMMOffer( @@ -155,4 +155,4 @@ template class AMMOffer; template class AMMOffer; template class AMMOffer; -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/paths/detail/AmountSpec.h b/src/xrpld/app/paths/detail/AmountSpec.h index 09ebea9c8a..5249bd30e0 100644 --- a/src/xrpld/app/paths/detail/AmountSpec.h +++ b/src/xrpld/app/paths/detail/AmountSpec.h @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { struct AmountSpec { @@ -107,7 +107,7 @@ inline IOUAmount& get(EitherAmount& amt) { XRPL_ASSERT( - !amt.native, "ripple::get(EitherAmount&) : is not XRP"); + !amt.native, "xrpl::get(EitherAmount&) : is not XRP"); return amt.iou; } @@ -115,7 +115,7 @@ template <> inline XRPAmount& get(EitherAmount& amt) { - XRPL_ASSERT(amt.native, "ripple::get(EitherAmount&) : is XRP"); + XRPL_ASSERT(amt.native, "xrpl::get(EitherAmount&) : is XRP"); return amt.xrp; } @@ -132,8 +132,7 @@ inline IOUAmount const& get(EitherAmount const& amt) { XRPL_ASSERT( - !amt.native, - "ripple::get(EitherAmount const&) : is not XRP"); + !amt.native, "xrpl::get(EitherAmount const&) : is not XRP"); return amt.iou; } @@ -142,7 +141,7 @@ inline XRPAmount const& get(EitherAmount const& amt) { XRPL_ASSERT( - amt.native, "ripple::get(EitherAmount const&) : is XRP"); + amt.native, "xrpl::get(EitherAmount const&) : is XRP"); return amt.xrp; } @@ -151,7 +150,7 @@ toAmountSpec(STAmount const& amt) { XRPL_ASSERT( amt.mantissa() < std::numeric_limits::max(), - "ripple::toAmountSpec(STAmount const&) : maximum mantissa"); + "xrpl::toAmountSpec(STAmount const&) : maximum mantissa"); bool const isNeg = amt.negative(); std::int64_t const sMant = isNeg ? -std::int64_t(amt.mantissa()) : amt.mantissa(); @@ -188,7 +187,7 @@ toAmountSpec(EitherAmount const& ea, std::optional const& c) r.currency = c; XRPL_ASSERT( ea.native == r.native, - "ripple::toAmountSpec(EitherAmount const&&, std::optional) : " + "xrpl::toAmountSpec(EitherAmount const&&, std::optional) : " "matching native"); if (r.native) { @@ -201,6 +200,6 @@ toAmountSpec(EitherAmount const& ea, std::optional const& c) return r; } -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/paths/detail/BookStep.cpp b/src/xrpld/app/paths/detail/BookStep.cpp index 6144f8adfa..baef42a492 100644 --- a/src/xrpld/app/paths/detail/BookStep.cpp +++ b/src/xrpld/app/paths/detail/BookStep.cpp @@ -20,7 +20,7 @@ #include #include -namespace ripple { +namespace xrpl { template class BookStep : public StepImp> @@ -356,7 +356,7 @@ private: // It's really a programming error if the quality is missing. XRPL_ASSERT( limitQuality, - "ripple::BookOfferCrossingStep::getQuality : nonzero quality"); + "xrpl::BookOfferCrossingStep::getQuality : nonzero quality"); if (!limitQuality) Throw(tefINTERNAL, "Offer requires quality."); return *limitQuality; @@ -1079,7 +1079,7 @@ BookStep::revImp( // LCOV_EXCL_START JLOG(j_.error()) << "BookStep remainingOut < 0 " << to_string(remainingOut); - UNREACHABLE("ripple::BookStep::revImp : remaining less than zero"); + UNREACHABLE("xrpl::BookStep::revImp : remaining less than zero"); cache_.emplace(beast::zero, beast::zero); return {beast::zero, beast::zero}; // LCOV_EXCL_STOP @@ -1103,7 +1103,7 @@ BookStep::fwdImp( boost::container::flat_set& ofrsToRm, TIn const& in) { - XRPL_ASSERT(cache_, "ripple::BookStep::fwdImp : cache is set"); + XRPL_ASSERT(cache_, "xrpl::BookStep::fwdImp : cache is set"); TAmounts result(beast::zero, beast::zero); @@ -1122,8 +1122,7 @@ BookStep::fwdImp( TOut const& ownerGives, std::uint32_t transferRateIn, std::uint32_t transferRateOut) mutable -> bool { - XRPL_ASSERT( - cache_, "ripple::BookStep::fwdImp::eachOffer : cache is set"); + XRPL_ASSERT(cache_, "xrpl::BookStep::fwdImp::eachOffer : cache is set"); if (remainingIn <= beast::zero) return false; @@ -1243,7 +1242,7 @@ BookStep::fwdImp( // something went very wrong JLOG(j_.error()) << "BookStep remainingIn < 0 " << to_string(remainingIn); - UNREACHABLE("ripple::BookStep::fwdImp : remaining less than zero"); + UNREACHABLE("xrpl::BookStep::fwdImp : remaining less than zero"); cache_.emplace(beast::zero, beast::zero); return {beast::zero, beast::zero}; // LCOV_EXCL_STOP @@ -1365,7 +1364,7 @@ namespace test { template static bool -equalHelper(Step const& step, ripple::Book const& book) +equalHelper(Step const& step, xrpl::Book const& book) { if (auto bs = dynamic_cast const*>(&step)) return book == bs->book(); @@ -1373,14 +1372,14 @@ equalHelper(Step const& step, ripple::Book const& book) } bool -bookStepEqual(Step const& step, ripple::Book const& book) +bookStepEqual(Step const& step, xrpl::Book const& book) { bool const inXRP = isXRP(book.in.currency); bool const outXRP = isXRP(book.out.currency); if (inXRP && outXRP) { // LCOV_EXCL_START - UNREACHABLE("ripple::test::bookStepEqual : no XRP to XRP book step"); + UNREACHABLE("xrpl::test::bookStepEqual : no XRP to XRP book step"); return false; // no such thing as xrp/xrp book step // LCOV_EXCL_STOP } @@ -1449,4 +1448,4 @@ make_BookStepXI(StrandContext const& ctx, Issue const& out) return make_BookStepHelper(ctx, xrpIssue(), out); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/paths/detail/DirectStep.cpp b/src/xrpld/app/paths/detail/DirectStep.cpp index 2af467c820..5f9d0c86e7 100644 --- a/src/xrpld/app/paths/detail/DirectStep.cpp +++ b/src/xrpld/app/paths/detail/DirectStep.cpp @@ -13,7 +13,7 @@ #include #include -namespace ripple { +namespace xrpl { template class DirectStepI : public StepImp> @@ -499,7 +499,7 @@ DirectStepI::revImp( qualities(sb, srcDebtDir, StrandDirection::reverse); XRPL_ASSERT( static_cast(this)->verifyDstQualityIn(dstQIn), - "ripple::DirectStepI : valid destination quality"); + "xrpl::DirectStepI : valid destination quality"); Issue const srcToDstIss(currency_, redeems(srcDebtDir) ? dst_ : src_); @@ -618,7 +618,7 @@ DirectStepI::fwdImp( boost::container::flat_set& /*ofrsToRm*/, IOUAmount const& in) { - XRPL_ASSERT(cache_, "ripple::DirectStepI::fwdImp : cache is set"); + XRPL_ASSERT(cache_, "xrpl::DirectStepI::fwdImp : cache is set"); auto const [maxSrcToDst, srcDebtDir] = static_cast(this)->maxFlow(sb, cache_->srcToDst); @@ -705,7 +705,7 @@ DirectStepI::validFwd( auto const savCache = *cache_; - XRPL_ASSERT(!in.native, "ripple::DirectStepI::validFwd : input is not XRP"); + XRPL_ASSERT(!in.native, "xrpl::DirectStepI::validFwd : input is not XRP"); auto const [maxSrcToDst, srcDebtDir] = static_cast(this)->maxFlow(sb, cache_->srcToDst); @@ -772,7 +772,7 @@ DirectStepI::qualitiesSrcIssues( XRPL_ASSERT( static_cast(this)->verifyPrevStepDebtDirection( prevStepDebtDirection), - "ripple::DirectStepI::qualitiesSrcIssues : will prevStepDebtDirection " + "xrpl::DirectStepI::qualitiesSrcIssues : will prevStepDebtDirection " "issue"); std::uint32_t const srcQOut = redeems(prevStepDebtDirection) @@ -896,7 +896,7 @@ DirectStepI::check(StrandContext const& ctx) const { // LCOV_EXCL_START UNREACHABLE( - "ripple::DirectStepI::check : prev seen book without a " + "xrpl::DirectStepI::check : prev seen book without a " "prev step"); return temBAD_PATH_LOOP; // LCOV_EXCL_STOP @@ -975,4 +975,4 @@ make_DirectStepI( return {tesSUCCESS, std::move(r)}; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/paths/detail/FlatSets.h b/src/xrpld/app/paths/detail/FlatSets.h index 9438f71532..cb02a09d9a 100644 --- a/src/xrpld/app/paths/detail/FlatSets.h +++ b/src/xrpld/app/paths/detail/FlatSets.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { /** Given two flat sets dst and src, compute dst = dst union src @@ -25,6 +25,6 @@ SetUnion( boost::container::ordered_unique_range_t{}, src.begin(), src.end()); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/paths/detail/FlowDebugInfo.h b/src/xrpld/app/paths/detail/FlowDebugInfo.h index 1addb5acbd..6c0f0e8e00 100644 --- a/src/xrpld/app/paths/detail/FlowDebugInfo.h +++ b/src/xrpld/app/paths/detail/FlowDebugInfo.h @@ -13,7 +13,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace path { namespace detail { // Track performance information of a single payment @@ -73,7 +73,7 @@ struct FlowDebugInfo { XRPL_ASSERT( !liquiditySrcIn.empty(), - "ripple::path::detail::FlowDebugInfo::pushLiquiditySrc : " + "xrpl::path::detail::FlowDebugInfo::pushLiquiditySrc : " "non-empty liquidity source"); liquiditySrcIn.back().push_back(eIn); liquiditySrcOut.back().push_back(eOut); @@ -109,7 +109,7 @@ struct FlowDebugInfo { // LCOV_EXCL_START UNREACHABLE( - "ripple::path::detail::FlowDebugInfo::duration : timepoint not " + "xrpl::path::detail::FlowDebugInfo::duration : timepoint not " "found"); return std::chrono::duration(0); // LCOV_EXCL_STOP @@ -222,7 +222,7 @@ struct FlowDebugInfo std::vector const& amts, char delim = ';') { auto get_val = [](EitherAmount const& a) -> std::string { - return ripple::to_string(a.xrp); + return xrpl::to_string(a.xrp); }; write_list(amts, get_val, delim); }; @@ -230,7 +230,7 @@ struct FlowDebugInfo std::vector const& amts, char delim = ';') { auto get_val = [](EitherAmount const& a) -> std::string { - return ripple::to_string(a.iou); + return xrpl::to_string(a.iou); }; write_list(amts, get_val, delim); }; @@ -361,5 +361,5 @@ balanceDiffsToString(std::optional const& bd) } // namespace detail } // namespace path -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/paths/detail/PathfinderUtils.h b/src/xrpld/app/paths/detail/PathfinderUtils.h index 42cc6f832f..5571cd4732 100644 --- a/src/xrpld/app/paths/detail/PathfinderUtils.h +++ b/src/xrpld/app/paths/detail/PathfinderUtils.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { inline STAmount largestAmount(STAmount const& amt) @@ -29,6 +29,6 @@ convertAllCheck(STAmount const& a) return a == largestAmount(a); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/paths/detail/PaySteps.cpp b/src/xrpld/app/paths/detail/PaySteps.cpp index 8e189806fb..97d1dad4fa 100644 --- a/src/xrpld/app/paths/detail/PaySteps.cpp +++ b/src/xrpld/app/paths/detail/PaySteps.cpp @@ -8,7 +8,7 @@ #include -namespace ripple { +namespace xrpl { // Check equal with tolerance bool @@ -80,7 +80,7 @@ toStep( // should already be taken care of JLOG(j.error()) << "Found offer/account payment step. Aborting payment strand."; - UNREACHABLE("ripple::toStep : offer/account payment payment strand"); + UNREACHABLE("xrpl::toStep : offer/account payment payment strand"); return {temBAD_PATH, std::unique_ptr{}}; // LCOV_EXCL_STOP } @@ -88,7 +88,7 @@ toStep( XRPL_ASSERT( (e2->getNodeType() & STPathElement::typeCurrency) || (e2->getNodeType() & STPathElement::typeIssuer), - "ripple::toStep : currency or issuer"); + "xrpl::toStep : currency or issuer"); auto const outCurrency = e2->getNodeType() & STPathElement::typeCurrency ? e2->getCurrency() : curIssue.currency; @@ -102,7 +102,7 @@ toStep( return {temBAD_PATH, std::unique_ptr{}}; } - XRPL_ASSERT(e2->isOffer(), "ripple::toStep : is offer"); + XRPL_ASSERT(e2->isOffer(), "xrpl::toStep : is offer"); if (isXRP(outCurrency)) return make_BookStepIX(ctx, curIssue); @@ -376,7 +376,7 @@ toStrand( { // Should never happen // LCOV_EXCL_START - UNREACHABLE("ripple::toStrand : offer currency mismatch"); + UNREACHABLE("xrpl::toStrand : offer currency mismatch"); return {temBAD_PATH, Strand{}}; // LCOV_EXCL_STOP } @@ -444,7 +444,7 @@ toStrand( { // LCOV_EXCL_START JLOG(j.warn()) << "Flow check strand failed"; - UNREACHABLE("ripple::toStrand : invalid strand"); + UNREACHABLE("xrpl::toStrand : invalid strand"); return {temBAD_PATH, Strand{}}; // LCOV_EXCL_STOP } @@ -627,4 +627,4 @@ isDirectXrpToXrp(Strand const& strand); template bool isDirectXrpToXrp(Strand const& strand); -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/paths/detail/StepChecks.h b/src/xrpld/app/paths/detail/StepChecks.h index 7ba1e40d16..969aec2541 100644 --- a/src/xrpld/app/paths/detail/StepChecks.h +++ b/src/xrpld/app/paths/detail/StepChecks.h @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { inline TER checkFreeze( @@ -17,7 +17,7 @@ checkFreeze( AccountID const& dst, Currency const& currency) { - XRPL_ASSERT(src != dst, "ripple::checkFreeze : unequal input accounts"); + XRPL_ASSERT(src != dst, "xrpl::checkFreeze : unequal input accounts"); // check freeze if (auto sle = view.read(keylet::account(dst))) @@ -93,6 +93,6 @@ checkNoRipple( return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/paths/detail/Steps.h b/src/xrpld/app/paths/detail/Steps.h index 6bdb30dd22..63254c228e 100644 --- a/src/xrpld/app/paths/detail/Steps.h +++ b/src/xrpld/app/paths/detail/Steps.h @@ -14,7 +14,7 @@ #include -namespace ripple { +namespace xrpl { class PaymentSandbox; class ReadView; class ApplyView; @@ -579,7 +579,7 @@ bool xrpEndpointStepEqual(Step const& step, AccountID const& acc); bool -bookStepEqual(Step const& step, ripple::Book const& book); +bookStepEqual(Step const& step, xrpl::Book const& book); } // namespace test std::pair> @@ -606,6 +606,6 @@ bool isDirectXrpToXrp(Strand const& strand); /// @endcond -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/paths/detail/StrandFlow.h b/src/xrpld/app/paths/detail/StrandFlow.h index c9a4619717..1a00c84fb6 100644 --- a/src/xrpld/app/paths/detail/StrandFlow.h +++ b/src/xrpld/app/paths/detail/StrandFlow.h @@ -21,7 +21,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Result of flow() execution of a single Strand. */ template @@ -154,7 +154,7 @@ flow( << to_string(get(r.first)) << " maxIn: " << to_string(*maxIn); UNREACHABLE( - "ripple::flow : first step re-executing the " + "xrpl::flow : first step re-executing the " "limiting step failed"); return Result{strand, std::move(ofrsToRm)}; // LCOV_EXCL_STOP @@ -194,7 +194,7 @@ flow( JLOG(j.fatal()) << "Re-executed limiting step failed"; #endif UNREACHABLE( - "ripple::flow : limiting step re-executing the " + "xrpl::flow : limiting step re-executing the " "limiting step failed"); return Result{strand, std::move(ofrsToRm)}; // LCOV_EXCL_STOP @@ -232,7 +232,7 @@ flow( JLOG(j.fatal()) << "Re-executed forward pass failed"; #endif UNREACHABLE( - "ripple::flow : non-limiting step re-executing the " + "xrpl::flow : non-limiting step re-executing the " "forward pass failed"); return Result{strand, std::move(ofrsToRm)}; // LCOV_EXCL_STOP @@ -487,7 +487,7 @@ public: if (i >= cur_.size()) { // LCOV_EXCL_START - UNREACHABLE("ripple::ActiveStrands::get : input out of range"); + UNREACHABLE("xrpl::ActiveStrands::get : input out of range"); return nullptr; // LCOV_EXCL_STOP } @@ -698,7 +698,7 @@ flow( XRPL_ASSERT( f.out <= remainingOut && f.sandbox && (!remainingIn || f.in <= *remainingIn), - "ripple::flow : remaining constraints"); + "xrpl::flow : remaining constraints"); Quality const q(f.out, f.in); @@ -721,7 +721,7 @@ flow( if (baseView.rules().enabled(featureFlowSortStrands)) { - XRPL_ASSERT(!best, "ripple::flow : best is unset"); + XRPL_ASSERT(!best, "xrpl::flow : best is unset"); if (!f.inactive) activeStrands.push(strand); best.emplace(f.in, f.out, std::move(*f.sandbox), *strand, q); @@ -835,7 +835,7 @@ flow( // running debug builds of rippled. While this issue still needs to // be resolved, the assert is causing more harm than good at this // point. - // UNREACHABLE("ripple::flow : rounding error"); + // UNREACHABLE("xrpl::flow : rounding error"); return {tefEXCEPTION, std::move(ofrsToRmOnFail)}; } @@ -872,7 +872,7 @@ flow( // Handles both cases 1. and 2. // fixFillOrKill amendment: // Handles 2. 1. is handled above and falls through for tfSell. - XRPL_ASSERT(remainingIn, "ripple::flow : nonzero remainingIn"); + XRPL_ASSERT(remainingIn, "xrpl::flow : nonzero remainingIn"); if (remainingIn && *remainingIn != beast::zero) return { tecPATH_PARTIAL, @@ -884,6 +884,6 @@ flow( return {actualIn, actualOut, std::move(sb), std::move(ofrsToRmOnFail)}; } -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/paths/detail/XRPEndpointStep.cpp b/src/xrpld/app/paths/detail/XRPEndpointStep.cpp index fb51a68fcc..83271321be 100644 --- a/src/xrpld/app/paths/detail/XRPEndpointStep.cpp +++ b/src/xrpld/app/paths/detail/XRPEndpointStep.cpp @@ -14,7 +14,7 @@ #include -namespace ripple { +namespace xrpl { template class XRPEndpointStep @@ -106,7 +106,7 @@ protected: XRPAmount xrpLiquidImpl(ReadView& sb, std::int32_t reserveReduction) const { - return ripple::xrpLiquid(sb, acc_, reserveReduction, j_); + return xrpl::xrpLiquid(sb, acc_, reserveReduction, j_); } std::string @@ -263,7 +263,7 @@ XRPEndpointStep::fwdImp( boost::container::flat_set& ofrsToRm, XRPAmount const& in) { - XRPL_ASSERT(cache_, "ripple::XRPEndpointStep::fwdImp : cache is set"); + XRPL_ASSERT(cache_, "xrpl::XRPEndpointStep::fwdImp : cache is set"); auto const balance = static_cast(this)->xrpLiquid(sb); auto const result = isLast_ ? in : std::min(balance, in); @@ -291,7 +291,7 @@ XRPEndpointStep::validFwd( return {false, EitherAmount(XRPAmount(beast::zero))}; } - XRPL_ASSERT(in.native, "ripple::XRPEndpointStep::validFwd : input is XRP"); + XRPL_ASSERT(in.native, "xrpl::XRPEndpointStep::validFwd : input is XRP"); auto const& xrpIn = in.xrp; auto const balance = static_cast(this)->xrpLiquid(sb); @@ -396,4 +396,4 @@ make_XRPEndpointStep(StrandContext const& ctx, AccountID const& acc) return {tesSUCCESS, std::move(r)}; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/rdb/PeerFinder.h b/src/xrpld/app/rdb/PeerFinder.h index e5e3195b2f..6c1b2779a6 100644 --- a/src/xrpld/app/rdb/PeerFinder.h +++ b/src/xrpld/app/rdb/PeerFinder.h @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { /** * @brief initPeerFinderDB Opens a session with the peer finder database. @@ -52,6 +52,6 @@ savePeerFinderDB( soci::session& session, std::vector const& v); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/rdb/RelationalDatabase.h b/src/xrpld/app/rdb/RelationalDatabase.h index 570bce2b95..a9e8b6d704 100644 --- a/src/xrpld/app/rdb/RelationalDatabase.h +++ b/src/xrpld/app/rdb/RelationalDatabase.h @@ -13,7 +13,7 @@ #include #include -namespace ripple { +namespace xrpl { struct LedgerHashPair { @@ -218,7 +218,7 @@ rangeCheckedCast(C c) { // This should never happen // LCOV_EXCL_START - UNREACHABLE("ripple::rangeCheckedCast : domain error"); + UNREACHABLE("xrpl::rangeCheckedCast : domain error"); JLOG(debugLog().error()) << "rangeCheckedCast domain error:" << " value = " << c << " min = " << std::numeric_limits::lowest() @@ -229,6 +229,6 @@ rangeCheckedCast(C c) return static_cast(c); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/rdb/State.h b/src/xrpld/app/rdb/State.h index 54e1f8219a..e8c14fdd29 100644 --- a/src/xrpld/app/rdb/State.h +++ b/src/xrpld/app/rdb/State.h @@ -9,7 +9,7 @@ #include -namespace ripple { +namespace xrpl { struct SavedState { @@ -74,6 +74,6 @@ setSavedState(soci::session& session, SavedState const& state); void setLastRotated(soci::session& session, LedgerIndex seq); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/rdb/Vacuum.h b/src/xrpld/app/rdb/Vacuum.h index 40c84796d2..d7ca5f8bce 100644 --- a/src/xrpld/app/rdb/Vacuum.h +++ b/src/xrpld/app/rdb/Vacuum.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { /** * @brief doVacuumDB Creates, initialises, and performs cleanup on a database. @@ -14,6 +14,6 @@ namespace ripple { bool doVacuumDB(DatabaseCon::Setup const& setup, beast::Journal j); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/rdb/Wallet.h b/src/xrpld/app/rdb/Wallet.h index c1a17b39dd..961b12d7ef 100644 --- a/src/xrpld/app/rdb/Wallet.h +++ b/src/xrpld/app/rdb/Wallet.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { /** * @brief makeWalletDB Opens the wallet database and returns it. @@ -158,6 +158,6 @@ voteAmendment( std::string const& name, AmendmentVote vote); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/rdb/backend/SQLiteDatabase.h b/src/xrpld/app/rdb/backend/SQLiteDatabase.h index 4ebcb4390e..3bf8124378 100644 --- a/src/xrpld/app/rdb/backend/SQLiteDatabase.h +++ b/src/xrpld/app/rdb/backend/SQLiteDatabase.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class SQLiteDatabase : public RelationalDatabase { @@ -289,6 +289,6 @@ public: closeTransactionDB() = 0; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/rdb/backend/detail/Node.cpp b/src/xrpld/app/rdb/backend/detail/Node.cpp index ed8c5c06aa..36eb7a4f9f 100644 --- a/src/xrpld/app/rdb/backend/detail/Node.cpp +++ b/src/xrpld/app/rdb/backend/detail/Node.cpp @@ -16,7 +16,7 @@ #include -namespace ripple { +namespace xrpl { namespace detail { /** @@ -41,7 +41,7 @@ to_string(TableType type) return "AccountTransactions"; // LCOV_EXCL_START default: - UNREACHABLE("ripple::detail::to_string : invalid TableType"); + UNREACHABLE("xrpl::detail::to_string : invalid TableType"); return "Unknown"; // LCOV_EXCL_STOP } @@ -187,7 +187,7 @@ saveValidatedLedger( { // LCOV_EXCL_START JLOG(j.fatal()) << "AH is zero: " << getJson({*ledger, {}}); - UNREACHABLE("ripple::detail::saveValidatedLedger : zero account hash"); + UNREACHABLE("xrpl::detail::saveValidatedLedger : zero account hash"); // LCOV_EXCL_STOP } @@ -199,13 +199,13 @@ saveValidatedLedger( JLOG(j.fatal()) << "saveAcceptedLedger: seq=" << seq << ", current=" << current; UNREACHABLE( - "ripple::detail::saveValidatedLedger : mismatched account hash"); + "xrpl::detail::saveValidatedLedger : mismatched account hash"); // LCOV_EXCL_STOP } XRPL_ASSERT( ledger->info().txHash == ledger->txMap().getHash().as_uint256(), - "ripple::detail::saveValidatedLedger : transaction hash match"); + "xrpl::detail::saveValidatedLedger : transaction hash match"); // Save the ledger header in the hashed object store { @@ -1345,4 +1345,4 @@ dbHasSpace(soci::session& session, Config const& config, beast::Journal j) } } // namespace detail -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/rdb/backend/detail/Node.h b/src/xrpld/app/rdb/backend/detail/Node.h index 412631571e..71c240eed6 100644 --- a/src/xrpld/app/rdb/backend/detail/Node.h +++ b/src/xrpld/app/rdb/backend/detail/Node.h @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace detail { /* Need to change TableTypeCount if TableType is modified. */ @@ -436,6 +436,6 @@ bool dbHasSpace(soci::session& session, Config const& config, beast::Journal j); } // namespace detail -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/rdb/backend/detail/SQLiteDatabase.cpp b/src/xrpld/app/rdb/backend/detail/SQLiteDatabase.cpp index 4934205bfd..b415dd89b3 100644 --- a/src/xrpld/app/rdb/backend/detail/SQLiteDatabase.cpp +++ b/src/xrpld/app/rdb/backend/detail/SQLiteDatabase.cpp @@ -8,7 +8,7 @@ #include -namespace ripple { +namespace xrpl { class SQLiteDatabaseImp final : public SQLiteDatabase { @@ -790,7 +790,7 @@ SQLiteDatabaseImp::getKBUsedAll() { if (existsLedger()) { - return ripple::getKBUsedAll(lgrdb_->getSession()); + return xrpl::getKBUsedAll(lgrdb_->getSession()); } return 0; @@ -801,7 +801,7 @@ SQLiteDatabaseImp::getKBUsedLedger() { if (existsLedger()) { - return ripple::getKBUsedDB(lgrdb_->getSession()); + return xrpl::getKBUsedDB(lgrdb_->getSession()); } return 0; @@ -815,7 +815,7 @@ SQLiteDatabaseImp::getKBUsedTransaction() if (existsTransaction()) { - return ripple::getKBUsedDB(txdb_->getSession()); + return xrpl::getKBUsedDB(txdb_->getSession()); } return 0; @@ -839,4 +839,4 @@ getSQLiteDatabase(Application& app, Config const& config, JobQueue& jobQueue) return std::make_unique(app, config, jobQueue); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/rdb/detail/PeerFinder.cpp b/src/xrpld/app/rdb/detail/PeerFinder.cpp index 7ac0a941e2..0c4b5d355c 100644 --- a/src/xrpld/app/rdb/detail/PeerFinder.cpp +++ b/src/xrpld/app/rdb/detail/PeerFinder.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { void initPeerFinderDB( @@ -249,4 +249,4 @@ savePeerFinderDB( tr.commit(); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/rdb/detail/RelationalDatabase.cpp b/src/xrpld/app/rdb/detail/RelationalDatabase.cpp index a01f0583f6..37ee2a7703 100644 --- a/src/xrpld/app/rdb/detail/RelationalDatabase.cpp +++ b/src/xrpld/app/rdb/detail/RelationalDatabase.cpp @@ -2,7 +2,7 @@ #include #include -namespace ripple { +namespace xrpl { extern std::unique_ptr getSQLiteDatabase(Application& app, Config const& config, JobQueue& jobQueue); @@ -42,4 +42,4 @@ RelationalDatabase::init( return std::unique_ptr(); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/rdb/detail/State.cpp b/src/xrpld/app/rdb/detail/State.cpp index d731c98b40..984c8824f2 100644 --- a/src/xrpld/app/rdb/detail/State.cpp +++ b/src/xrpld/app/rdb/detail/State.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { void initStateDB( @@ -108,4 +108,4 @@ setLastRotated(soci::session& session, LedgerIndex seq) soci::use(seq); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/rdb/detail/Vacuum.cpp b/src/xrpld/app/rdb/detail/Vacuum.cpp index 49e86ae281..8423f20992 100644 --- a/src/xrpld/app/rdb/detail/Vacuum.cpp +++ b/src/xrpld/app/rdb/detail/Vacuum.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { bool doVacuumDB(DatabaseCon::Setup const& setup, beast::Journal j) @@ -49,4 +49,4 @@ doVacuumDB(DatabaseCon::Setup const& setup, beast::Journal j) return true; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/rdb/detail/Wallet.cpp b/src/xrpld/app/rdb/detail/Wallet.cpp index 7dbaab6ef4..fc4f5ea89b 100644 --- a/src/xrpld/app/rdb/detail/Wallet.cpp +++ b/src/xrpld/app/rdb/detail/Wallet.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { std::unique_ptr makeWalletDB(DatabaseCon::Setup const& setup, beast::Journal j) @@ -284,4 +284,4 @@ voteAmendment( tr.commit(); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/apply.h b/src/xrpld/app/tx/apply.h index 2e0cd538f2..d578334c31 100644 --- a/src/xrpld/app/tx/apply.h +++ b/src/xrpld/app/tx/apply.h @@ -10,7 +10,7 @@ #include -namespace ripple { +namespace xrpl { class Application; class HashRouter; @@ -138,6 +138,6 @@ applyTransaction( ApplyFlags flags, beast::Journal journal); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/applySteps.h b/src/xrpld/app/tx/applySteps.h index 6542a8d6ec..c0c530f3ac 100644 --- a/src/xrpld/app/tx/applySteps.h +++ b/src/xrpld/app/tx/applySteps.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { class Application; class STTx; @@ -347,6 +347,6 @@ calculateDefaultBaseFee(ReadView const& view, STTx const& tx); ApplyResult doApply(PreclaimResult const& preclaimResult, Application& app, OpenView& view); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/AMMBid.cpp b/src/xrpld/app/tx/detail/AMMBid.cpp index 158f60e0e4..bea6aaff48 100644 --- a/src/xrpld/app/tx/detail/AMMBid.cpp +++ b/src/xrpld/app/tx/detail/AMMBid.cpp @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { bool AMMBid::checkExtraFeatures(PreflightContext const& ctx) @@ -173,7 +173,7 @@ applyBid( { XRPL_ASSERT( ammSle->isFieldPresent(sfAuctionSlot), - "ripple::applyBid : has auction slot"); + "xrpl::applyBid : has auction slot"); if (!ammSle->isFieldPresent(sfAuctionSlot)) return {tecINTERNAL, false}; } @@ -300,7 +300,7 @@ applyBid( { // Price the slot was purchased at. STAmount const pricePurchased = auctionSlot[sfPrice]; - XRPL_ASSERT(timeSlot, "ripple::applyBid : timeSlot is set"); + XRPL_ASSERT(timeSlot, "xrpl::applyBid : timeSlot is set"); auto const fractionUsed = (Number(*timeSlot) + 1) / AUCTION_SLOT_TIME_INTERVALS; auto const fractionRemaining = Number(1) - fractionUsed; @@ -362,4 +362,4 @@ AMMBid::doApply() return result.first; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/AMMBid.h b/src/xrpld/app/tx/detail/AMMBid.h index 25ad118e05..b402e82f9d 100644 --- a/src/xrpld/app/tx/detail/AMMBid.h +++ b/src/xrpld/app/tx/detail/AMMBid.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { /** AMMBid implements AMM bid Transactor. * This is a mechanism for an AMM instance to auction-off @@ -65,6 +65,6 @@ public: doApply() override; }; -} // namespace ripple +} // namespace xrpl #endif // XRPL_TX_AMMBID_H_INCLUDED diff --git a/src/xrpld/app/tx/detail/AMMClawback.cpp b/src/xrpld/app/tx/detail/AMMClawback.cpp index ebde91b43d..5eaed55f23 100644 --- a/src/xrpld/app/tx/detail/AMMClawback.cpp +++ b/src/xrpld/app/tx/detail/AMMClawback.cpp @@ -12,7 +12,7 @@ #include -namespace ripple { +namespace xrpl { std::uint32_t AMMClawback::getFlagsMask(PreflightContext const& ctx) @@ -321,4 +321,4 @@ AMMClawback::equalWithdrawMatchingOneAmount( ctx_.journal); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/AMMClawback.h b/src/xrpld/app/tx/detail/AMMClawback.h index b1283c9427..0615234ffa 100644 --- a/src/xrpld/app/tx/detail/AMMClawback.h +++ b/src/xrpld/app/tx/detail/AMMClawback.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class Sandbox; class AMMClawback : public Transactor { @@ -54,6 +54,6 @@ private: STAmount const& amount); }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/AMMCreate.cpp b/src/xrpld/app/tx/detail/AMMCreate.cpp index 65357ad197..3a3ce4b1e1 100644 --- a/src/xrpld/app/tx/detail/AMMCreate.cpp +++ b/src/xrpld/app/tx/detail/AMMCreate.cpp @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { bool AMMCreate::checkExtraFeatures(PreflightContext const& ctx) @@ -330,4 +330,4 @@ AMMCreate::doApply() return result.first; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/AMMCreate.h b/src/xrpld/app/tx/detail/AMMCreate.h index 5be2cc264c..da77f79c5e 100644 --- a/src/xrpld/app/tx/detail/AMMCreate.h +++ b/src/xrpld/app/tx/detail/AMMCreate.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { /** AMMCreate implements Automatic Market Maker(AMM) creation Transactor. * It creates a new AMM instance with two tokens. Any trader, or Liquidity @@ -61,6 +61,6 @@ public: doApply() override; }; -} // namespace ripple +} // namespace xrpl #endif // XRPL_TX_AMMCREATE_H_INCLUDED diff --git a/src/xrpld/app/tx/detail/AMMDelete.cpp b/src/xrpld/app/tx/detail/AMMDelete.cpp index 476b035bc0..a6cfaac586 100644 --- a/src/xrpld/app/tx/detail/AMMDelete.cpp +++ b/src/xrpld/app/tx/detail/AMMDelete.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { bool AMMDelete::checkExtraFeatures(PreflightContext const& ctx) @@ -53,4 +53,4 @@ AMMDelete::doApply() return ter; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/AMMDelete.h b/src/xrpld/app/tx/detail/AMMDelete.h index af0b33154b..a09b855c7c 100644 --- a/src/xrpld/app/tx/detail/AMMDelete.h +++ b/src/xrpld/app/tx/detail/AMMDelete.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { /** AMMDelete implements AMM delete transactor. This is a mechanism to * delete AMM in an empty state when the number of LP tokens is 0. @@ -33,6 +33,6 @@ public: doApply() override; }; -} // namespace ripple +} // namespace xrpl #endif // XRPL_TX_AMMDELETE_H_INCLUDED diff --git a/src/xrpld/app/tx/detail/AMMDeposit.cpp b/src/xrpld/app/tx/detail/AMMDeposit.cpp index 3495ef03f5..36399d4e1c 100644 --- a/src/xrpld/app/tx/detail/AMMDeposit.cpp +++ b/src/xrpld/app/tx/detail/AMMDeposit.cpp @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { bool AMMDeposit::checkExtraFeatures(PreflightContext const& ctx) @@ -448,7 +448,7 @@ AMMDeposit::applyGuts(Sandbox& sb) { XRPL_ASSERT( newLPTokenBalance > beast::zero, - "ripple::AMMDeposit::applyGuts : valid new LP token balance"); + "xrpl::AMMDeposit::applyGuts : valid new LP token balance"); ammSle->setFieldAmount(sfLPTokenBalance, newLPTokenBalance); // LP depositing into AMM empty state gets the auction slot // and the voting @@ -1008,4 +1008,4 @@ AMMDeposit::equalDepositInEmptyState( tfee); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/AMMDeposit.h b/src/xrpld/app/tx/detail/AMMDeposit.h index fa0610fcd5..7fd50c4c4d 100644 --- a/src/xrpld/app/tx/detail/AMMDeposit.h +++ b/src/xrpld/app/tx/detail/AMMDeposit.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class Sandbox; @@ -229,6 +229,6 @@ private: std::uint16_t tfee); }; -} // namespace ripple +} // namespace xrpl #endif // XRPL_TX_AMMDEPOSIT_H_INCLUDED diff --git a/src/xrpld/app/tx/detail/AMMVote.cpp b/src/xrpld/app/tx/detail/AMMVote.cpp index ea11f543dd..ca57ce1f8c 100644 --- a/src/xrpld/app/tx/detail/AMMVote.cpp +++ b/src/xrpld/app/tx/detail/AMMVote.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { bool AMMVote::checkExtraFeatures(PreflightContext const& ctx) @@ -177,7 +177,7 @@ applyVote( XRPL_ASSERT( !ctx_.view().rules().enabled(fixInnerObjTemplate) || ammSle->isFieldPresent(sfAuctionSlot), - "ripple::applyVote : has auction slot"); + "xrpl::applyVote : has auction slot"); // Update the vote entries and the trading/discounted fee. ammSle->setFieldArray(sfVoteSlots, updatedVoteSlots); @@ -224,4 +224,4 @@ AMMVote::doApply() return result.first; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/AMMVote.h b/src/xrpld/app/tx/detail/AMMVote.h index b38beb56bc..1dec046c29 100644 --- a/src/xrpld/app/tx/detail/AMMVote.h +++ b/src/xrpld/app/tx/detail/AMMVote.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { /** AMMVote implements AMM vote Transactor. * This transactor allows for the TradingFee of the AMM instance be a votable @@ -50,6 +50,6 @@ public: doApply() override; }; -} // namespace ripple +} // namespace xrpl #endif // XRPL_TX_AMMVOTE_H_INCLUDED diff --git a/src/xrpld/app/tx/detail/AMMWithdraw.cpp b/src/xrpld/app/tx/detail/AMMWithdraw.cpp index ac49298920..78da481b95 100644 --- a/src/xrpld/app/tx/detail/AMMWithdraw.cpp +++ b/src/xrpld/app/tx/detail/AMMWithdraw.cpp @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { bool AMMWithdraw::checkExtraFeatures(PreflightContext const& ctx) @@ -891,7 +891,7 @@ AMMWithdraw::equalWithdrawLimit( // LCOV_EXCL_START XRPL_ASSERT( amountWithdraw <= amount, - "ripple::AMMWithdraw::equalWithdrawLimit : maximum amountWithdraw"); + "xrpl::AMMWithdraw::equalWithdrawLimit : maximum amountWithdraw"); // LCOV_EXCL_STOP } else if (amountWithdraw > amount) @@ -1084,4 +1084,4 @@ AMMWithdraw::isWithdrawAll(STTx const& tx) return WithdrawAll::Yes; return WithdrawAll::No; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/AMMWithdraw.h b/src/xrpld/app/tx/detail/AMMWithdraw.h index 871f8e3a21..916621a5d0 100644 --- a/src/xrpld/app/tx/detail/AMMWithdraw.h +++ b/src/xrpld/app/tx/detail/AMMWithdraw.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { class Sandbox; @@ -293,6 +293,6 @@ private: isWithdrawAll(STTx const& tx); }; -} // namespace ripple +} // namespace xrpl #endif // XRPL_TX_AMMWITHDRAW_H_INCLUDED diff --git a/src/xrpld/app/tx/detail/ApplyContext.cpp b/src/xrpld/app/tx/detail/ApplyContext.cpp index 4a7f72e2e3..d364950b44 100644 --- a/src/xrpld/app/tx/detail/ApplyContext.cpp +++ b/src/xrpld/app/tx/detail/ApplyContext.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { ApplyContext::ApplyContext( Application& app_, @@ -133,7 +133,7 @@ ApplyContext::checkInvariants(TER const result, XRPAmount const fee) { XRPL_ASSERT( isTesSuccess(result) || isTecClaim(result), - "ripple::ApplyContext::checkInvariants : is tesSUCCESS or tecCLAIM"); + "xrpl::ApplyContext::checkInvariants : is tesSUCCESS or tecCLAIM"); return checkInvariantsHelper( result, @@ -141,4 +141,4 @@ ApplyContext::checkInvariants(TER const result, XRPAmount const fee) std::make_index_sequence::value>{}); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/ApplyContext.h b/src/xrpld/app/tx/detail/ApplyContext.h index e045189146..4ae2f11a85 100644 --- a/src/xrpld/app/tx/detail/ApplyContext.h +++ b/src/xrpld/app/tx/detail/ApplyContext.h @@ -11,7 +11,7 @@ #include -namespace ripple { +namespace xrpl { /** State information when applying a tx. */ class ApplyContext @@ -140,6 +140,6 @@ private: std::optional parentBatchId_; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/Batch.cpp b/src/xrpld/app/tx/detail/Batch.cpp index a2c51d6c82..bb30a64135 100644 --- a/src/xrpld/app/tx/detail/Batch.cpp +++ b/src/xrpld/app/tx/detail/Batch.cpp @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { /** * @brief Calculates the total base fee for a batch transaction. @@ -78,7 +78,7 @@ Batch::calculateBaseFee(ReadView const& view, STTx const& tx) } // LCOV_EXCL_STOP - auto const fee = ripple::calculateBaseFee(view, stx); + auto const fee = xrpl::calculateBaseFee(view, stx); // LCOV_EXCL_START if (txnFees > maxAmount - fee) { @@ -299,7 +299,7 @@ Batch::preflight(PreflightContext const& ctx) */ auto const innerAccount = stx.getAccountID(sfAccount); - if (auto const preflightResult = ripple::preflight( + if (auto const preflightResult = xrpl::preflight( ctx.app, ctx.rules, parentBatchId, stx, tapBATCH, ctx.j); preflightResult.ter != tesSUCCESS) { @@ -517,4 +517,4 @@ Batch::doApply() return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/Batch.h b/src/xrpld/app/tx/detail/Batch.h index 1b1d7614d5..58da84d2f3 100644 --- a/src/xrpld/app/tx/detail/Batch.h +++ b/src/xrpld/app/tx/detail/Batch.h @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { class Batch : public Transactor { @@ -37,6 +37,6 @@ public: doApply() override; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/BookTip.cpp b/src/xrpld/app/tx/detail/BookTip.cpp index 09a0091995..d3c8e69e01 100644 --- a/src/xrpld/app/tx/detail/BookTip.cpp +++ b/src/xrpld/app/tx/detail/BookTip.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { BookTip::BookTip(ApplyView& view, Book const& book) : view_(view) @@ -59,4 +59,4 @@ BookTip::step(beast::Journal j) return true; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/BookTip.h b/src/xrpld/app/tx/detail/BookTip.h index f6d05f1df5..51dc252835 100644 --- a/src/xrpld/app/tx/detail/BookTip.h +++ b/src/xrpld/app/tx/detail/BookTip.h @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { class Logs; @@ -61,6 +61,6 @@ public: step(beast::Journal j); }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/CancelCheck.cpp b/src/xrpld/app/tx/detail/CancelCheck.cpp index daf4955d47..b673784655 100644 --- a/src/xrpld/app/tx/detail/CancelCheck.cpp +++ b/src/xrpld/app/tx/detail/CancelCheck.cpp @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { NotTEC CancelCheck::preflight(PreflightContext const& ctx) @@ -101,4 +101,4 @@ CancelCheck::doApply() return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/CancelCheck.h b/src/xrpld/app/tx/detail/CancelCheck.h index 6f0b5a969b..4be696520d 100644 --- a/src/xrpld/app/tx/detail/CancelCheck.h +++ b/src/xrpld/app/tx/detail/CancelCheck.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class CancelCheck : public Transactor { @@ -26,6 +26,6 @@ public: using CheckCancel = CancelCheck; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/CancelOffer.cpp b/src/xrpld/app/tx/detail/CancelOffer.cpp index 149d7e2d9c..1dc9ad0bde 100644 --- a/src/xrpld/app/tx/detail/CancelOffer.cpp +++ b/src/xrpld/app/tx/detail/CancelOffer.cpp @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { NotTEC CancelOffer::preflight(PreflightContext const& ctx) @@ -61,4 +61,4 @@ CancelOffer::doApply() return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/CancelOffer.h b/src/xrpld/app/tx/detail/CancelOffer.h index 3ae6afa935..33af365c4d 100644 --- a/src/xrpld/app/tx/detail/CancelOffer.h +++ b/src/xrpld/app/tx/detail/CancelOffer.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { class CancelOffer : public Transactor { @@ -28,6 +28,6 @@ public: using OfferCancel = CancelOffer; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/CashCheck.cpp b/src/xrpld/app/tx/detail/CashCheck.cpp index a62dd51a63..956bd7b632 100644 --- a/src/xrpld/app/tx/detail/CashCheck.cpp +++ b/src/xrpld/app/tx/detail/CashCheck.cpp @@ -11,7 +11,7 @@ #include -namespace ripple { +namespace xrpl { NotTEC CashCheck::preflight(PreflightContext const& ctx) @@ -493,4 +493,4 @@ CashCheck::doApply() return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/CashCheck.h b/src/xrpld/app/tx/detail/CashCheck.h index cfa0adbe1f..f27a45a0c4 100644 --- a/src/xrpld/app/tx/detail/CashCheck.h +++ b/src/xrpld/app/tx/detail/CashCheck.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class CashCheck : public Transactor { @@ -26,6 +26,6 @@ public: using CheckCash = CashCheck; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/Change.cpp b/src/xrpld/app/tx/detail/Change.cpp index 92b0eb2bb2..1691a2e4da 100644 --- a/src/xrpld/app/tx/detail/Change.cpp +++ b/src/xrpld/app/tx/detail/Change.cpp @@ -12,7 +12,7 @@ #include -namespace ripple { +namespace xrpl { template <> NotTEC @@ -134,7 +134,7 @@ Change::doApply() return applyUNLModify(); // LCOV_EXCL_START default: - UNREACHABLE("ripple::Change::doApply : invalid transaction type"); + UNREACHABLE("xrpl::Change::doApply : invalid transaction type"); return tefFAILURE; // LCOV_EXCL_STOP } @@ -144,7 +144,7 @@ void Change::preCompute() { XRPL_ASSERT( - account_ == beast::zero, "ripple::Change::preCompute : zero account"); + account_ == beast::zero, "xrpl::Change::preCompute : zero account"); } void @@ -495,4 +495,4 @@ Change::applyUNLModify() return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/Change.h b/src/xrpld/app/tx/detail/Change.h index d71c5baeb5..cda03d9197 100644 --- a/src/xrpld/app/tx/detail/Change.h +++ b/src/xrpld/app/tx/detail/Change.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class Change : public Transactor { @@ -46,6 +46,6 @@ using EnableAmendment = Change; using SetFee = Change; using UNLModify = Change; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/Clawback.cpp b/src/xrpld/app/tx/detail/Clawback.cpp index 0d153771b5..24b1603aab 100644 --- a/src/xrpld/app/tx/detail/Clawback.cpp +++ b/src/xrpld/app/tx/detail/Clawback.cpp @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { template static NotTEC @@ -270,4 +270,4 @@ Clawback::doApply() ctx_.tx[sfAmount].asset().value()); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/Clawback.h b/src/xrpld/app/tx/detail/Clawback.h index 95ebd0e74c..8db93fcc01 100644 --- a/src/xrpld/app/tx/detail/Clawback.h +++ b/src/xrpld/app/tx/detail/Clawback.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class Clawback : public Transactor { @@ -27,6 +27,6 @@ public: doApply() override; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/CreateCheck.cpp b/src/xrpld/app/tx/detail/CreateCheck.cpp index f5a36e6ac5..b1ac1ad406 100644 --- a/src/xrpld/app/tx/detail/CreateCheck.cpp +++ b/src/xrpld/app/tx/detail/CreateCheck.cpp @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { NotTEC CreateCheck::preflight(PreflightContext const& ctx) @@ -215,4 +215,4 @@ CreateCheck::doApply() return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/CreateCheck.h b/src/xrpld/app/tx/detail/CreateCheck.h index b8b0add2f9..ac735eecb0 100644 --- a/src/xrpld/app/tx/detail/CreateCheck.h +++ b/src/xrpld/app/tx/detail/CreateCheck.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class CreateCheck : public Transactor { @@ -26,6 +26,6 @@ public: using CheckCreate = CreateCheck; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/CreateOffer.cpp b/src/xrpld/app/tx/detail/CreateOffer.cpp index 7b7219d7b7..aa9646408c 100644 --- a/src/xrpld/app/tx/detail/CreateOffer.cpp +++ b/src/xrpld/app/tx/detail/CreateOffer.cpp @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { TxConsequences CreateOffer::makeTxConsequences(PreflightContext const& ctx) { @@ -222,7 +222,7 @@ CreateOffer::checkAcceptAsset( // Only valid for custom currencies XRPL_ASSERT( !isXRP(issue.currency), - "ripple::CreateOffer::checkAcceptAsset : input is not XRP"); + "xrpl::CreateOffer::checkAcceptAsset : input is not XRP"); auto const issuerAccount = view.read(keylet::account(issue.account)); @@ -469,7 +469,7 @@ CreateOffer::flowCross( afterCross.out -= result.actualAmountOut; XRPL_ASSERT( afterCross.out >= beast::zero, - "ripple::CreateOffer::flowCross : minimum offer"); + "xrpl::CreateOffer::flowCross : minimum offer"); if (afterCross.out < beast::zero) afterCross.out.clear(); afterCross.in = mulRound( @@ -688,7 +688,7 @@ CreateOffer::applyGuts(Sandbox& sb, Sandbox& sbCancel) // or give a tec. XRPL_ASSERT( result == tesSUCCESS || isTecClaim(result), - "ripple::CreateOffer::applyGuts : result is tesSUCCESS or " + "xrpl::CreateOffer::applyGuts : result is tesSUCCESS or " "tecCLAIM"); if (auto stream = j_.trace()) @@ -709,10 +709,10 @@ CreateOffer::applyGuts(Sandbox& sb, Sandbox& sbCancel) XRPL_ASSERT( saTakerGets.issue() == place_offer.in.issue(), - "ripple::CreateOffer::applyGuts : taker gets issue match"); + "xrpl::CreateOffer::applyGuts : taker gets issue match"); XRPL_ASSERT( saTakerPays.issue() == place_offer.out.issue(), - "ripple::CreateOffer::applyGuts : taker pays issue match"); + "xrpl::CreateOffer::applyGuts : taker pays issue match"); if (takerAmount != place_offer) crossed = true; @@ -742,7 +742,7 @@ CreateOffer::applyGuts(Sandbox& sb, Sandbox& sbCancel) XRPL_ASSERT( saTakerPays > zero && saTakerGets > zero, - "ripple::CreateOffer::applyGuts : taker pays and gets positive"); + "xrpl::CreateOffer::applyGuts : taker pays and gets positive"); if (result != tesSUCCESS) { @@ -923,4 +923,4 @@ CreateOffer::doApply() return result.first; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/CreateOffer.h b/src/xrpld/app/tx/detail/CreateOffer.h index 9593b9d1ad..5aaa60c20e 100644 --- a/src/xrpld/app/tx/detail/CreateOffer.h +++ b/src/xrpld/app/tx/detail/CreateOffer.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { class PaymentSandbox; class Sandbox; @@ -78,6 +78,6 @@ private: using OfferCreate = CreateOffer; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/CreateTicket.cpp b/src/xrpld/app/tx/detail/CreateTicket.cpp index 1a49209faf..6432d1b3d5 100644 --- a/src/xrpld/app/tx/detail/CreateTicket.cpp +++ b/src/xrpld/app/tx/detail/CreateTicket.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { TxConsequences CreateTicket::makeTxConsequences(PreflightContext const& ctx) @@ -125,4 +125,4 @@ CreateTicket::doApply() return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/CreateTicket.h b/src/xrpld/app/tx/detail/CreateTicket.h index da5083c838..a41c7e2b1f 100644 --- a/src/xrpld/app/tx/detail/CreateTicket.h +++ b/src/xrpld/app/tx/detail/CreateTicket.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { class CreateTicket : public Transactor { @@ -65,6 +65,6 @@ public: using TicketCreate = CreateTicket; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/Credentials.cpp b/src/xrpld/app/tx/detail/Credentials.cpp index e16a432656..d7f825454c 100644 --- a/src/xrpld/app/tx/detail/Credentials.cpp +++ b/src/xrpld/app/tx/detail/Credentials.cpp @@ -10,7 +10,7 @@ #include -namespace ripple { +namespace xrpl { /* Credentials @@ -353,4 +353,4 @@ CredentialAccept::doApply() return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/Credentials.h b/src/xrpld/app/tx/detail/Credentials.h index 704730e6ee..6723a2f0e4 100644 --- a/src/xrpld/app/tx/detail/Credentials.h +++ b/src/xrpld/app/tx/detail/Credentials.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class CredentialCreate : public Transactor { @@ -75,6 +75,6 @@ public: doApply() override; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/DID.cpp b/src/xrpld/app/tx/detail/DID.cpp index b17d4ef1b7..e9b23a15eb 100644 --- a/src/xrpld/app/tx/detail/DID.cpp +++ b/src/xrpld/app/tx/detail/DID.cpp @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { /* DID @@ -194,4 +194,4 @@ DIDDelete::doApply() return deleteSLE(ctx_, keylet::did(account_), account_); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/DID.h b/src/xrpld/app/tx/detail/DID.h index 9e9de22f84..934a9c9e6f 100644 --- a/src/xrpld/app/tx/detail/DID.h +++ b/src/xrpld/app/tx/detail/DID.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class DIDSet : public Transactor { @@ -49,6 +49,6 @@ public: doApply() override; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/DelegateSet.cpp b/src/xrpld/app/tx/detail/DelegateSet.cpp index f8dd696fad..8c64547ae1 100644 --- a/src/xrpld/app/tx/detail/DelegateSet.cpp +++ b/src/xrpld/app/tx/detail/DelegateSet.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { NotTEC DelegateSet::preflight(PreflightContext const& ctx) @@ -129,4 +129,4 @@ DelegateSet::deleteDelegate( return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/DelegateSet.h b/src/xrpld/app/tx/detail/DelegateSet.h index 2f340efb3b..1f9bc02944 100644 --- a/src/xrpld/app/tx/detail/DelegateSet.h +++ b/src/xrpld/app/tx/detail/DelegateSet.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class DelegateSet : public Transactor { @@ -32,6 +32,6 @@ public: beast::Journal j); }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/DeleteAccount.cpp b/src/xrpld/app/tx/detail/DeleteAccount.cpp index 535ff48924..2ed6dbd262 100644 --- a/src/xrpld/app/tx/detail/DeleteAccount.cpp +++ b/src/xrpld/app/tx/detail/DeleteAccount.cpp @@ -17,7 +17,7 @@ #include #include -namespace ripple { +namespace xrpl { bool DeleteAccount::checkExtraFeatures(PreflightContext const& ctx) @@ -241,8 +241,7 @@ DeleteAccount::preclaim(PreclaimContext const& ctx) } auto sleAccount = ctx.view.read(keylet::account(account)); - XRPL_ASSERT( - sleAccount, "ripple::DeleteAccount::preclaim : non-null account"); + XRPL_ASSERT(sleAccount, "xrpl::DeleteAccount::preclaim : non-null account"); if (!sleAccount) return terNO_ACCOUNT; @@ -347,13 +346,12 @@ TER DeleteAccount::doApply() { auto src = view().peek(keylet::account(account_)); - XRPL_ASSERT( - src, "ripple::DeleteAccount::doApply : non-null source account"); + XRPL_ASSERT(src, "xrpl::DeleteAccount::doApply : non-null source account"); auto const dstID = ctx_.tx[sfDestination]; auto dst = view().peek(keylet::account(dstID)); XRPL_ASSERT( - dst, "ripple::DeleteAccount::doApply : non-null destination account"); + dst, "xrpl::DeleteAccount::doApply : non-null destination account"); if (!src || !dst) return tefBAD_LEDGER; // LCOV_EXCL_LINE @@ -384,7 +382,7 @@ DeleteAccount::doApply() // LCOV_EXCL_START UNREACHABLE( - "ripple::DeleteAccount::doApply : undeletable item not found " + "xrpl::DeleteAccount::doApply : undeletable item not found " "in preclaim"); JLOG(j_.error()) << "DeleteAccount undeletable item not " "found in preclaim."; @@ -402,7 +400,7 @@ DeleteAccount::doApply() XRPL_ASSERT( (*src)[sfBalance] == XRPAmount(0), - "ripple::DeleteAccount::doApply : source balance is zero"); + "xrpl::DeleteAccount::doApply : source balance is zero"); // If there's still an owner directory associated with the source account // delete it. @@ -423,4 +421,4 @@ DeleteAccount::doApply() return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/DeleteAccount.h b/src/xrpld/app/tx/detail/DeleteAccount.h index bfab5591a0..357f87d566 100644 --- a/src/xrpld/app/tx/detail/DeleteAccount.h +++ b/src/xrpld/app/tx/detail/DeleteAccount.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class DeleteAccount : public Transactor { @@ -32,6 +32,6 @@ public: using AccountDelete = DeleteAccount; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/DeleteOracle.cpp b/src/xrpld/app/tx/detail/DeleteOracle.cpp index d635721b86..df7b737eed 100644 --- a/src/xrpld/app/tx/detail/DeleteOracle.cpp +++ b/src/xrpld/app/tx/detail/DeleteOracle.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { NotTEC DeleteOracle::preflight(PreflightContext const& ctx) @@ -80,4 +80,4 @@ DeleteOracle::doApply() return tecINTERNAL; // LCOV_EXCL_LINE } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/DeleteOracle.h b/src/xrpld/app/tx/detail/DeleteOracle.h index a9fcd73ec2..48950cfad9 100644 --- a/src/xrpld/app/tx/detail/DeleteOracle.h +++ b/src/xrpld/app/tx/detail/DeleteOracle.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { /** Price Oracle is a system that acts as a bridge between @@ -42,6 +42,6 @@ public: using OracleDelete = DeleteOracle; -} // namespace ripple +} // namespace xrpl #endif // XRPL_TX_DELETEORACLE_H_INCLUDED diff --git a/src/xrpld/app/tx/detail/DepositPreauth.cpp b/src/xrpld/app/tx/detail/DepositPreauth.cpp index 069b356e99..057e240fff 100644 --- a/src/xrpld/app/tx/detail/DepositPreauth.cpp +++ b/src/xrpld/app/tx/detail/DepositPreauth.cpp @@ -9,7 +9,7 @@ #include -namespace ripple { +namespace xrpl { bool DepositPreauth::checkExtraFeatures(PreflightContext const& ctx) @@ -299,4 +299,4 @@ DepositPreauth::removeFromLedger( return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/DepositPreauth.h b/src/xrpld/app/tx/detail/DepositPreauth.h index 4e0102952c..003d444bf3 100644 --- a/src/xrpld/app/tx/detail/DepositPreauth.h +++ b/src/xrpld/app/tx/detail/DepositPreauth.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class DepositPreauth : public Transactor { @@ -34,6 +34,6 @@ public: beast::Journal j); }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/Escrow.cpp b/src/xrpld/app/tx/detail/Escrow.cpp index fb3e3c509e..b76ac03684 100644 --- a/src/xrpld/app/tx/detail/Escrow.cpp +++ b/src/xrpld/app/tx/detail/Escrow.cpp @@ -15,7 +15,7 @@ #include #include -namespace ripple { +namespace xrpl { // During an EscrowFinish, the transaction must specify both // a condition and a fulfillment. We track whether that @@ -141,7 +141,7 @@ EscrowCreate::preflight(PreflightContext const& ctx) if (auto const cb = ctx.tx[~sfCondition]) { - using namespace ripple::cryptoconditions; + using namespace xrpl::cryptoconditions; std::error_code ec; @@ -558,7 +558,7 @@ EscrowCreate::doApply() static bool checkCondition(Slice f, Slice c) { - using namespace ripple::cryptoconditions; + using namespace xrpl::cryptoconditions; std::error_code ec; @@ -1087,7 +1087,7 @@ EscrowFinish::doApply() return temDISABLED; // LCOV_EXCL_LINE Rate lockedRate = slep->isFieldPresent(sfTransferRate) - ? ripple::Rate(slep->getFieldU32(sfTransferRate)) + ? xrpl::Rate(slep->getFieldU32(sfTransferRate)) : parityRate; auto const issuer = amount.getIssuer(); bool const createAsset = destID == account_; @@ -1336,4 +1336,4 @@ EscrowCancel::doApply() return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/Escrow.h b/src/xrpld/app/tx/detail/Escrow.h index d2821bc45d..935fb27cd0 100644 --- a/src/xrpld/app/tx/detail/Escrow.h +++ b/src/xrpld/app/tx/detail/Escrow.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class EscrowCreate : public Transactor { @@ -78,6 +78,6 @@ public: doApply() override; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/InvariantCheck.cpp b/src/xrpld/app/tx/detail/InvariantCheck.cpp index c15f2b64a5..f08e896444 100644 --- a/src/xrpld/app/tx/detail/InvariantCheck.cpp +++ b/src/xrpld/app/tx/detail/InvariantCheck.cpp @@ -25,7 +25,7 @@ #include #include -namespace ripple { +namespace xrpl { /* assert(enforce) @@ -522,7 +522,7 @@ AccountRootsDeletedClean::finalize( // assert. XRPL_ASSERT( enforce, - "ripple::AccountRootsDeletedClean::finalize::objectExists : " + "xrpl::AccountRootsDeletedClean::finalize::objectExists : " "account deletion left no objects behind"); return true; } @@ -769,7 +769,7 @@ TransfersNotFrozen::finalize( // assert. XRPL_ASSERT( enforce, - "ripple::TransfersNotFrozen::finalize : enforce " + "xrpl::TransfersNotFrozen::finalize : enforce " "invariant."); if (enforce) { @@ -793,8 +793,7 @@ TransfersNotFrozen::isValidEntry( std::shared_ptr const& after) { // `after` can never be null, even if the trust line is deleted. - XRPL_ASSERT( - after, "ripple::TransfersNotFrozen::isValidEntry : valid after."); + XRPL_ASSERT(after, "xrpl::TransfersNotFrozen::isValidEntry : valid after."); if (!after) { return false; @@ -850,7 +849,7 @@ TransfersNotFrozen::recordBalance(Issue const& issue, BalanceChange change) { XRPL_ASSERT( change.balanceChangeSign, - "ripple::TransfersNotFrozen::recordBalance : valid trustline " + "xrpl::TransfersNotFrozen::recordBalance : valid trustline " "balance sign."); auto& changes = balanceChanges_[issue]; if (change.balanceChangeSign < 0) @@ -969,7 +968,7 @@ TransfersNotFrozen::validateFrozenState( // The comment above starting with "assert(enforce)" explains this assert. XRPL_ASSERT( enforce, - "ripple::TransfersNotFrozen::validateFrozenState : enforce " + "xrpl::TransfersNotFrozen::validateFrozenState : enforce " "invariant."); if (enforce) @@ -1060,7 +1059,7 @@ ValidNewAccountRoot::finalize( JLOG(j.fatal()) << "Invariant failed: account root created illegally"; return false; -} // namespace ripple +} // namespace xrpl //------------------------------------------------------------------------------ @@ -1543,7 +1542,7 @@ ValidMPTIssuance::finalize( // non-amendment-gated side effects. XRPL_ASSERT_PARTS( !enforceEscrowFinish, - "ripple::ValidMPTIssuance::finalize", + "xrpl::ValidMPTIssuance::finalize", "not escrow finish tx"); return true; } @@ -1758,7 +1757,7 @@ ValidPseudoAccounts::finalize( // The comment above starting with "assert(enforce)" explains this assert. XRPL_ASSERT( errors_.empty() || enforce, - "ripple::ValidPseudoAccounts::finalize : no bad " + "xrpl::ValidPseudoAccounts::finalize : no bad " "changes or enforce invariant"); if (!errors_.empty()) { @@ -2036,8 +2035,8 @@ ValidAMM::finalizeDEX(bool enforce, beast::Journal const& j) const bool ValidAMM::generalInvariant( - ripple::STTx const& tx, - ripple::ReadView const& view, + xrpl::STTx const& tx, + xrpl::ReadView const& view, ZeroAllowed zeroAllowed, beast::Journal const& j) const { @@ -2082,8 +2081,8 @@ ValidAMM::generalInvariant( bool ValidAMM::finalizeDeposit( - ripple::STTx const& tx, - ripple::ReadView const& view, + xrpl::STTx const& tx, + xrpl::ReadView const& view, bool enforce, beast::Journal const& j) const { @@ -2103,8 +2102,8 @@ ValidAMM::finalizeDeposit( bool ValidAMM::finalizeWithdraw( - ripple::STTx const& tx, - ripple::ReadView const& view, + xrpl::STTx const& tx, + xrpl::ReadView const& view, bool enforce, beast::Journal const& j) const { @@ -2209,7 +2208,7 @@ ValidVault::visitEntry( // `isDelete` indicates whether an object is being deleted or modified. XRPL_ASSERT( after != nullptr && (before != nullptr || !isDelete), - "ripple::ValidVault::visitEntry : some object is available"); + "xrpl::ValidVault::visitEntry : some object is available"); // Number balanceDelta will capture the difference (delta) between "before" // state (zero if created) and "after" state (zero if destroyed), so the @@ -2307,7 +2306,7 @@ ValidVault::finalize( "Invariant failed: vault operation succeeded without modifying " "a vault"; XRPL_ASSERT( - enforce, "ripple::ValidVault::finalize : vault noop invariant"); + enforce, "xrpl::ValidVault::finalize : vault noop invariant"); return !enforce; } @@ -2319,7 +2318,7 @@ ValidVault::finalize( "Invariant failed: vault updated by a wrong transaction type"; XRPL_ASSERT( enforce, - "ripple::ValidVault::finalize : illegal vault transaction " + "xrpl::ValidVault::finalize : illegal vault transaction " "invariant"); return !enforce; // Also not a vault operation } @@ -2329,7 +2328,7 @@ ValidVault::finalize( JLOG(j.fatal()) << // "Invariant failed: vault operation updated more than single vault"; XRPL_ASSERT( - enforce, "ripple::ValidVault::finalize : single vault invariant"); + enforce, "xrpl::ValidVault::finalize : single vault invariant"); return !enforce; // That's all we can do here } @@ -2345,7 +2344,7 @@ ValidVault::finalize( "Invariant failed: vault deleted by a wrong transaction type"; XRPL_ASSERT( enforce, - "ripple::ValidVault::finalize : illegal vault deletion " + "xrpl::ValidVault::finalize : illegal vault deletion " "invariant"); return !enforce; // That's all we can do here } @@ -2372,7 +2371,7 @@ ValidVault::finalize( "delete shares"; XRPL_ASSERT( enforce, - "ripple::ValidVault::finalize : shares deletion invariant"); + "xrpl::ValidVault::finalize : shares deletion invariant"); return !enforce; // That's all we can do here } @@ -2403,7 +2402,7 @@ ValidVault::finalize( JLOG(j.fatal()) << "Invariant failed: vault deletion succeeded without " "deleting a vault"; XRPL_ASSERT( - enforce, "ripple::ValidVault::finalize : vault deletion invariant"); + enforce, "xrpl::ValidVault::finalize : vault deletion invariant"); return !enforce; // That's all we can do here } @@ -2411,7 +2410,7 @@ ValidVault::finalize( auto const& afterVault = afterVault_[0]; XRPL_ASSERT( beforeVault_.empty() || beforeVault_[0].key == afterVault.key, - "ripple::ValidVault::finalize : single vault operation"); + "xrpl::ValidVault::finalize : single vault operation"); auto const updatedShares = [&]() -> std::optional { // At this moment we only know that a vault is being updated and there @@ -2452,8 +2451,7 @@ ValidVault::finalize( { JLOG(j.fatal()) << "Invariant failed: updated vault must have shares"; XRPL_ASSERT( - enforce, - "ripple::ValidVault::finalize : vault has shares invariant"); + enforce, "xrpl::ValidVault::finalize : vault has shares invariant"); return !enforce; // That's all we can do here } @@ -2523,7 +2521,7 @@ ValidVault::finalize( JLOG(j.fatal()) << // "Invariant failed: vault created by a wrong transaction type"; XRPL_ASSERT( - enforce, "ripple::ValidVault::finalize : vault creation invariant"); + enforce, "xrpl::ValidVault::finalize : vault creation invariant"); return !enforce; // That's all we can do here } @@ -2557,7 +2555,7 @@ ValidVault::finalize( JLOG(j.fatal()) << "Invariant failed: vault operation succeeded " "without updating shares"; XRPL_ASSERT( - enforce, "ripple::ValidVault::finalize : shares noop invariant"); + enforce, "xrpl::ValidVault::finalize : shares noop invariant"); return !enforce; // That's all we can do here } @@ -2687,7 +2685,7 @@ ValidVault::finalize( XRPL_ASSERT( !beforeVault_.empty(), - "ripple::ValidVault::finalize : set updated a vault"); + "xrpl::ValidVault::finalize : set updated a vault"); auto const& beforeVault = beforeVault_[0]; auto const vaultDeltaAssets = deltaAssets(afterVault.pseudoId); @@ -2739,7 +2737,7 @@ ValidVault::finalize( XRPL_ASSERT( !beforeVault_.empty(), - "ripple::ValidVault::finalize : deposit updated a vault"); + "xrpl::ValidVault::finalize : deposit updated a vault"); auto const& beforeVault = beforeVault_[0]; auto const vaultDeltaAssets = deltaAssets(afterVault.pseudoId); @@ -2866,7 +2864,7 @@ ValidVault::finalize( XRPL_ASSERT( !beforeVault_.empty(), - "ripple::ValidVault::finalize : withdrawal updated a " + "xrpl::ValidVault::finalize : withdrawal updated a " "vault"); auto const& beforeVault = beforeVault_[0]; @@ -2994,7 +2992,7 @@ ValidVault::finalize( XRPL_ASSERT( !beforeVault_.empty(), - "ripple::ValidVault::finalize : clawback updated a vault"); + "xrpl::ValidVault::finalize : clawback updated a vault"); auto const& beforeVault = beforeVault_[0]; if (vaultAsset.native() || @@ -3079,7 +3077,7 @@ ValidVault::finalize( default: // LCOV_EXCL_START UNREACHABLE( - "ripple::ValidVault::finalize : unknown transaction type"); + "xrpl::ValidVault::finalize : unknown transaction type"); return false; // LCOV_EXCL_STOP } @@ -3089,11 +3087,11 @@ ValidVault::finalize( { // The comment at the top of this file starting with "assert(enforce)" // explains this assert. - XRPL_ASSERT(enforce, "ripple::ValidVault::finalize : vault invariants"); + XRPL_ASSERT(enforce, "xrpl::ValidVault::finalize : vault invariants"); return !enforce; } return true; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/InvariantCheck.h b/src/xrpld/app/tx/detail/InvariantCheck.h index f9b37f03ed..a1b24eee20 100644 --- a/src/xrpld/app/tx/detail/InvariantCheck.h +++ b/src/xrpld/app/tx/detail/InvariantCheck.h @@ -13,7 +13,7 @@ #include #include -namespace ripple { +namespace xrpl { class ReadView; @@ -814,7 +814,7 @@ using InvariantChecks = std::tuple< * @return std::tuple of instances that implement the required invariant check * methods * - * @see ripple::InvariantChecker_PROTOTYPE + * @see xrpl::InvariantChecker_PROTOTYPE */ inline InvariantChecks getInvariantChecks() @@ -822,6 +822,6 @@ getInvariantChecks() return InvariantChecks{}; } -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/LedgerStateFix.cpp b/src/xrpld/app/tx/detail/LedgerStateFix.cpp index ba750152e7..43001e2fbf 100644 --- a/src/xrpld/app/tx/detail/LedgerStateFix.cpp +++ b/src/xrpld/app/tx/detail/LedgerStateFix.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { NotTEC LedgerStateFix::preflight(PreflightContext const& ctx) @@ -67,4 +67,4 @@ LedgerStateFix::doApply() return tecINTERNAL; // LCOV_EXCL_LINE } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/LedgerStateFix.h b/src/xrpld/app/tx/detail/LedgerStateFix.h index 92f6a22303..e1a7f85ecc 100644 --- a/src/xrpld/app/tx/detail/LedgerStateFix.h +++ b/src/xrpld/app/tx/detail/LedgerStateFix.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class LedgerStateFix : public Transactor { @@ -31,6 +31,6 @@ public: doApply() override; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/MPTokenAuthorize.cpp b/src/xrpld/app/tx/detail/MPTokenAuthorize.cpp index 858fd6d0d6..caf6860f0b 100644 --- a/src/xrpld/app/tx/detail/MPTokenAuthorize.cpp +++ b/src/xrpld/app/tx/detail/MPTokenAuthorize.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { std::uint32_t MPTokenAuthorize::getFlagsMask(PreflightContext const& ctx) @@ -167,4 +167,4 @@ MPTokenAuthorize::doApply() tx[~sfHolder]); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/MPTokenAuthorize.h b/src/xrpld/app/tx/detail/MPTokenAuthorize.h index 0bac2f1843..6c0ade324c 100644 --- a/src/xrpld/app/tx/detail/MPTokenAuthorize.h +++ b/src/xrpld/app/tx/detail/MPTokenAuthorize.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { struct MPTAuthorizeArgs { @@ -43,6 +43,6 @@ public: doApply() override; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/MPTokenIssuanceCreate.cpp b/src/xrpld/app/tx/detail/MPTokenIssuanceCreate.cpp index 05b1720d3d..913c7cf53c 100644 --- a/src/xrpld/app/tx/detail/MPTokenIssuanceCreate.cpp +++ b/src/xrpld/app/tx/detail/MPTokenIssuanceCreate.cpp @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { bool MPTokenIssuanceCreate::checkExtraFeatures(PreflightContext const& ctx) @@ -161,4 +161,4 @@ MPTokenIssuanceCreate::doApply() return result ? tesSUCCESS : result.error(); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/MPTokenIssuanceCreate.h b/src/xrpld/app/tx/detail/MPTokenIssuanceCreate.h index bff41c9180..5b5268265c 100644 --- a/src/xrpld/app/tx/detail/MPTokenIssuanceCreate.h +++ b/src/xrpld/app/tx/detail/MPTokenIssuanceCreate.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { struct MPTCreateArgs { @@ -47,6 +47,6 @@ public: create(ApplyView& view, beast::Journal journal, MPTCreateArgs const& args); }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/MPTokenIssuanceDestroy.cpp b/src/xrpld/app/tx/detail/MPTokenIssuanceDestroy.cpp index 5b20a5a4b3..58b3cbea4f 100644 --- a/src/xrpld/app/tx/detail/MPTokenIssuanceDestroy.cpp +++ b/src/xrpld/app/tx/detail/MPTokenIssuanceDestroy.cpp @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { std::uint32_t MPTokenIssuanceDestroy::getFlagsMask(PreflightContext const& ctx) @@ -60,4 +60,4 @@ MPTokenIssuanceDestroy::doApply() return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/MPTokenIssuanceDestroy.h b/src/xrpld/app/tx/detail/MPTokenIssuanceDestroy.h index a764ecc652..5f59c9b1bd 100644 --- a/src/xrpld/app/tx/detail/MPTokenIssuanceDestroy.h +++ b/src/xrpld/app/tx/detail/MPTokenIssuanceDestroy.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class MPTokenIssuanceDestroy : public Transactor { @@ -27,6 +27,6 @@ public: doApply() override; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/MPTokenIssuanceSet.cpp b/src/xrpld/app/tx/detail/MPTokenIssuanceSet.cpp index d46a7a2add..578e5f6564 100644 --- a/src/xrpld/app/tx/detail/MPTokenIssuanceSet.cpp +++ b/src/xrpld/app/tx/detail/MPTokenIssuanceSet.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { bool MPTokenIssuanceSet::checkExtraFeatures(PreflightContext const& ctx) @@ -337,4 +337,4 @@ MPTokenIssuanceSet::doApply() return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/MPTokenIssuanceSet.h b/src/xrpld/app/tx/detail/MPTokenIssuanceSet.h index bc5d390f97..a687a37b47 100644 --- a/src/xrpld/app/tx/detail/MPTokenIssuanceSet.h +++ b/src/xrpld/app/tx/detail/MPTokenIssuanceSet.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class MPTokenIssuanceSet : public Transactor { @@ -33,6 +33,6 @@ public: doApply() override; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/NFTokenAcceptOffer.cpp b/src/xrpld/app/tx/detail/NFTokenAcceptOffer.cpp index d2f51fa254..dc50b58eff 100644 --- a/src/xrpld/app/tx/detail/NFTokenAcceptOffer.cpp +++ b/src/xrpld/app/tx/detail/NFTokenAcceptOffer.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { std::uint32_t NFTokenAcceptOffer::getFlagsMask(PreflightContext const& ctx) @@ -591,4 +591,4 @@ NFTokenAcceptOffer::doApply() return tecINTERNAL; // LCOV_EXCL_LINE } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/NFTokenAcceptOffer.h b/src/xrpld/app/tx/detail/NFTokenAcceptOffer.h index 4bc429fcfc..83cd71b734 100644 --- a/src/xrpld/app/tx/detail/NFTokenAcceptOffer.h +++ b/src/xrpld/app/tx/detail/NFTokenAcceptOffer.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class NFTokenAcceptOffer : public Transactor { @@ -45,6 +45,6 @@ public: doApply() override; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/NFTokenBurn.cpp b/src/xrpld/app/tx/detail/NFTokenBurn.cpp index d6b9f8be39..d9fe710efe 100644 --- a/src/xrpld/app/tx/detail/NFTokenBurn.cpp +++ b/src/xrpld/app/tx/detail/NFTokenBurn.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { NotTEC NFTokenBurn::preflight(PreflightContext const& ctx) @@ -113,4 +113,4 @@ NFTokenBurn::doApply() return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/NFTokenBurn.h b/src/xrpld/app/tx/detail/NFTokenBurn.h index 5a3e530c8c..5425f0902d 100644 --- a/src/xrpld/app/tx/detail/NFTokenBurn.h +++ b/src/xrpld/app/tx/detail/NFTokenBurn.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class NFTokenBurn : public Transactor { @@ -24,6 +24,6 @@ public: doApply() override; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/NFTokenCancelOffer.cpp b/src/xrpld/app/tx/detail/NFTokenCancelOffer.cpp index 45b93b64d6..94512b5e66 100644 --- a/src/xrpld/app/tx/detail/NFTokenCancelOffer.cpp +++ b/src/xrpld/app/tx/detail/NFTokenCancelOffer.cpp @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { std::uint32_t NFTokenCancelOffer::getFlagsMask(PreflightContext const& ctx) @@ -93,4 +93,4 @@ NFTokenCancelOffer::doApply() return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/NFTokenCancelOffer.h b/src/xrpld/app/tx/detail/NFTokenCancelOffer.h index 98444e21d8..13a6ecc065 100644 --- a/src/xrpld/app/tx/detail/NFTokenCancelOffer.h +++ b/src/xrpld/app/tx/detail/NFTokenCancelOffer.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class NFTokenCancelOffer : public Transactor { @@ -27,6 +27,6 @@ public: doApply() override; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/NFTokenCreateOffer.cpp b/src/xrpld/app/tx/detail/NFTokenCreateOffer.cpp index 3b8758f25d..00e69ccc9f 100644 --- a/src/xrpld/app/tx/detail/NFTokenCreateOffer.cpp +++ b/src/xrpld/app/tx/detail/NFTokenCreateOffer.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { std::uint32_t NFTokenCreateOffer::getFlagsMask(PreflightContext const& ctx) @@ -82,4 +82,4 @@ NFTokenCreateOffer::doApply() ctx_.tx.getFlags()); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/NFTokenCreateOffer.h b/src/xrpld/app/tx/detail/NFTokenCreateOffer.h index 4dd1ff93f1..704b253924 100644 --- a/src/xrpld/app/tx/detail/NFTokenCreateOffer.h +++ b/src/xrpld/app/tx/detail/NFTokenCreateOffer.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class NFTokenCreateOffer : public Transactor { @@ -27,6 +27,6 @@ public: doApply() override; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/NFTokenMint.cpp b/src/xrpld/app/tx/detail/NFTokenMint.cpp index 2463c73b73..16bfb01f3f 100644 --- a/src/xrpld/app/tx/detail/NFTokenMint.cpp +++ b/src/xrpld/app/tx/detail/NFTokenMint.cpp @@ -11,7 +11,7 @@ #include -namespace ripple { +namespace xrpl { static std::uint16_t extractNFTokenFlagsFromTxFlags(std::uint32_t txFlags) @@ -154,7 +154,7 @@ NFTokenMint::createNFTokenID( ptr += sizeof(tokenSeq); XRPL_ASSERT( std::distance(buf.data(), ptr) == buf.size(), - "ripple::NFTokenMint::createNFTokenID : data size matches the buffer"); + "xrpl::NFTokenMint::createNFTokenID : data size matches the buffer"); return uint256::fromVoid(buf.data()); } @@ -343,4 +343,4 @@ NFTokenMint::doApply() return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/NFTokenMint.h b/src/xrpld/app/tx/detail/NFTokenMint.h index a4b8fb6fa3..a3b43b8269 100644 --- a/src/xrpld/app/tx/detail/NFTokenMint.h +++ b/src/xrpld/app/tx/detail/NFTokenMint.h @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { class NFTokenMint : public Transactor { @@ -42,6 +42,6 @@ public: std::uint32_t tokenSeq); }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/NFTokenModify.cpp b/src/xrpld/app/tx/detail/NFTokenModify.cpp index 44e26e1f15..725f89e1ba 100644 --- a/src/xrpld/app/tx/detail/NFTokenModify.cpp +++ b/src/xrpld/app/tx/detail/NFTokenModify.cpp @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { bool NFTokenModify::checkExtraFeatures(PreflightContext const& ctx) @@ -65,4 +65,4 @@ NFTokenModify::doApply() return nft::changeTokenURI(view(), owner, nftokenID, ctx_.tx[~sfURI]); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/NFTokenModify.h b/src/xrpld/app/tx/detail/NFTokenModify.h index 32521beab4..18cc1616d3 100644 --- a/src/xrpld/app/tx/detail/NFTokenModify.h +++ b/src/xrpld/app/tx/detail/NFTokenModify.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class NFTokenModify : public Transactor { @@ -27,6 +27,6 @@ public: doApply() override; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/NFTokenUtils.cpp b/src/xrpld/app/tx/detail/NFTokenUtils.cpp index 9c5765e3d6..d85bd1d4f2 100644 --- a/src/xrpld/app/tx/detail/NFTokenUtils.cpp +++ b/src/xrpld/app/tx/detail/NFTokenUtils.cpp @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace nft { @@ -175,7 +175,7 @@ getPageForToken( auto np = std::make_shared(keylet::nftpage(base, tokenIDForNewPage)); XRPL_ASSERT( np->key() > base.key, - "ripple::nft::getPageForToken : valid NFT page index"); + "xrpl::nft::getPageForToken : valid NFT page index"); np->setFieldArray(sfNFTokens, narr); np->setFieldH256(sfNextPageMin, cp->key()); @@ -228,7 +228,7 @@ changeTokenURI( ApplyView& view, AccountID const& owner, uint256 const& nftokenID, - std::optional const& uri) + std::optional const& uri) { std::shared_ptr const page = locatePage(view, owner, nftokenID); @@ -262,7 +262,7 @@ insertToken(ApplyView& view, AccountID owner, STObject&& nft) { XRPL_ASSERT( nft.isFieldPresent(sfNFTokenID), - "ripple::nft::insertToken : has NFT token"); + "xrpl::nft::insertToken : has NFT token"); // First, we need to locate the page the NFT belongs to, creating it // if necessary. This operation may fail if it is impossible to insert @@ -804,7 +804,7 @@ repairNFTokenDirectoryLinks(ApplyView& view, AccountID const& owner) XRPL_ASSERT( nextPage, - "ripple::nft::repairNFTokenDirectoryLinks : next page is available"); + "xrpl::nft::repairNFTokenDirectoryLinks : next page is available"); if (nextPage->isFieldPresent(sfNextPageMin)) { didRepair = true; @@ -913,7 +913,7 @@ tokenOfferCreatePreclaim( { auto const root = view.read(keylet::account(nftIssuer)); XRPL_ASSERT( - root, "ripple::nft::tokenOfferCreatePreclaim : non-null account"); + root, "xrpl::nft::tokenOfferCreatePreclaim : non-null account"); if (auto minter = (*root)[~sfNFTokenMinter]; minter != acctID) return tefNFTOKEN_IS_NOT_TRANSFERABLE; @@ -1084,14 +1084,14 @@ checkTrustlineAuthorized( // Only valid for custom currencies XRPL_ASSERT( !isXRP(issue.currency), - "ripple::nft::checkTrustlineAuthorized : valid to check."); + "xrpl::nft::checkTrustlineAuthorized : valid to check."); if (view.rules().enabled(fixEnforceNFTokenTrustlineV2)) { auto const issuerAccount = view.read(keylet::account(issue.account)); if (!issuerAccount) { - JLOG(j.debug()) << "ripple::nft::checkTrustlineAuthorized: can't " + JLOG(j.debug()) << "xrpl::nft::checkTrustlineAuthorized: can't " "receive IOUs from non-existent issuer: " << to_string(issue.account); @@ -1140,14 +1140,14 @@ checkTrustlineDeepFrozen( // Only valid for custom currencies XRPL_ASSERT( !isXRP(issue.currency), - "ripple::nft::checkTrustlineDeepFrozen : valid to check."); + "xrpl::nft::checkTrustlineDeepFrozen : valid to check."); if (view.rules().enabled(featureDeepFreeze)) { auto const issuerAccount = view.read(keylet::account(issue.account)); if (!issuerAccount) { - JLOG(j.debug()) << "ripple::nft::checkTrustlineDeepFrozen: can't " + JLOG(j.debug()) << "xrpl::nft::checkTrustlineDeepFrozen: can't " "receive IOUs from non-existent issuer: " << to_string(issue.account); @@ -1185,4 +1185,4 @@ checkTrustlineDeepFrozen( } } // namespace nft -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/NFTokenUtils.h b/src/xrpld/app/tx/detail/NFTokenUtils.h index 0294724b51..640f12f9d2 100644 --- a/src/xrpld/app/tx/detail/NFTokenUtils.h +++ b/src/xrpld/app/tx/detail/NFTokenUtils.h @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace nft { @@ -91,7 +91,7 @@ changeTokenURI( ApplyView& view, AccountID const& owner, uint256 const& nftokenID, - std::optional const& uri); + std::optional const& uri); /** Preflight checks shared by NFTokenCreateOffer and NFTokenMint */ NotTEC @@ -149,6 +149,6 @@ checkTrustlineDeepFrozen( } // namespace nft -} // namespace ripple +} // namespace xrpl #endif // XRPL_TX_IMPL_DETAILS_NFTOKENUTILS_H_INCLUDED diff --git a/src/xrpld/app/tx/detail/Offer.h b/src/xrpld/app/tx/detail/Offer.h index 64bc3f4cbf..b04049b657 100644 --- a/src/xrpld/app/tx/detail/Offer.h +++ b/src/xrpld/app/tx/detail/Offer.h @@ -11,7 +11,7 @@ #include -namespace ripple { +namespace xrpl { template class TOfferBase @@ -208,7 +208,7 @@ TOffer::setFieldAmounts() { // LCOV_EXCL_START #ifdef _MSC_VER - UNREACHABLE("ripple::TOffer::setFieldAmounts : must be specialized"); + UNREACHABLE("xrpl::TOffer::setFieldAmounts : must be specialized"); #else static_assert(sizeof(TOut) == -1, "Must be specialized"); #endif @@ -319,6 +319,6 @@ operator<<(std::ostream& os, TOffer const& offer) return os << offer.id(); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/OfferStream.cpp b/src/xrpld/app/tx/detail/OfferStream.cpp index 93a26f71da..49e45976eb 100644 --- a/src/xrpld/app/tx/detail/OfferStream.cpp +++ b/src/xrpld/app/tx/detail/OfferStream.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace { bool @@ -37,7 +37,7 @@ TOfferStreamBase::TOfferStreamBase( , counter_(counter) { XRPL_ASSERT( - validBook_, "ripple::TOfferStreamBase::TOfferStreamBase : valid book"); + validBook_, "xrpl::TOfferStreamBase::TOfferStreamBase : valid book"); } // Handle the case where a directory item with no corresponding ledger entry @@ -403,4 +403,4 @@ template class TOfferStreamBase; template class TOfferStreamBase; template class TOfferStreamBase; template class TOfferStreamBase; -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/OfferStream.h b/src/xrpld/app/tx/detail/OfferStream.h index 3969cfb48f..cab5f1384d 100644 --- a/src/xrpld/app/tx/detail/OfferStream.h +++ b/src/xrpld/app/tx/detail/OfferStream.h @@ -11,7 +11,7 @@ #include -namespace ripple { +namespace xrpl { template class TOfferStreamBase @@ -174,6 +174,6 @@ public: return permToRemove_; } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/PayChan.cpp b/src/xrpld/app/tx/detail/PayChan.cpp index 27b8380f5f..8350cc0573 100644 --- a/src/xrpld/app/tx/detail/PayChan.cpp +++ b/src/xrpld/app/tx/detail/PayChan.cpp @@ -13,7 +13,7 @@ #include #include -namespace ripple { +namespace xrpl { /* PaymentChannel @@ -137,7 +137,7 @@ closeChannel( XRPL_ASSERT( (*slep)[sfAmount] >= (*slep)[sfBalance], - "ripple::closeChannel : minimum channel amount"); + "xrpl::closeChannel : minimum channel amount"); (*sle)[sfBalance] = (*sle)[sfBalance] + (*slep)[sfAmount] - (*slep)[sfBalance]; adjustOwnerCount(view, sle, -1, j); @@ -546,7 +546,7 @@ PayChanClaim::doApply() XRPAmount const reqDelta = reqBalance - chanBalance; XRPL_ASSERT( reqDelta >= beast::zero, - "ripple::PayChanClaim::doApply : minimum balance delta"); + "xrpl::PayChanClaim::doApply : minimum balance delta"); (*sled)[sfBalance] = (*sled)[sfBalance] + reqDelta; ctx_.view().update(sled); ctx_.view().update(slep); @@ -581,4 +581,4 @@ PayChanClaim::doApply() return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/PayChan.h b/src/xrpld/app/tx/detail/PayChan.h index a68cae49f4..f42e9549b3 100644 --- a/src/xrpld/app/tx/detail/PayChan.h +++ b/src/xrpld/app/tx/detail/PayChan.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class PayChanCreate : public Transactor { @@ -81,6 +81,6 @@ public: using PaymentChannelClaim = PayChanClaim; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/Payment.cpp b/src/xrpld/app/tx/detail/Payment.cpp index 305d54438e..a6f343fa61 100644 --- a/src/xrpld/app/tx/detail/Payment.cpp +++ b/src/xrpld/app/tx/detail/Payment.cpp @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { TxConsequences Payment::makeTxConsequences(PreflightContext const& ctx) @@ -588,7 +588,7 @@ Payment::doApply() return res; } - XRPL_ASSERT(dstAmount.native(), "ripple::Payment::doApply : amount is XRP"); + XRPL_ASSERT(dstAmount.native(), "xrpl::Payment::doApply : amount is XRP"); // Direct XRP payment. @@ -681,4 +681,4 @@ Payment::doApply() return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/Payment.h b/src/xrpld/app/tx/detail/Payment.h index f41326ecf6..30c9a9e326 100644 --- a/src/xrpld/app/tx/detail/Payment.h +++ b/src/xrpld/app/tx/detail/Payment.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class Payment : public Transactor { @@ -42,6 +42,6 @@ public: doApply() override; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/PermissionedDomainDelete.cpp b/src/xrpld/app/tx/detail/PermissionedDomainDelete.cpp index 08bf778065..6301d6f892 100644 --- a/src/xrpld/app/tx/detail/PermissionedDomainDelete.cpp +++ b/src/xrpld/app/tx/detail/PermissionedDomainDelete.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { NotTEC PermissionedDomainDelete::preflight(PreflightContext const& ctx) @@ -26,7 +26,7 @@ PermissionedDomainDelete::preclaim(PreclaimContext const& ctx) XRPL_ASSERT( sleDomain->isFieldPresent(sfOwner) && ctx.tx.isFieldPresent(sfAccount), - "ripple::PermissionedDomainDelete::preclaim : required fields present"); + "xrpl::PermissionedDomainDelete::preclaim : required fields present"); if (sleDomain->getAccountID(sfOwner) != ctx.tx.getAccountID(sfAccount)) return tecNO_PERMISSION; @@ -39,7 +39,7 @@ PermissionedDomainDelete::doApply() { XRPL_ASSERT( ctx_.tx.isFieldPresent(sfDomainID), - "ripple::PermissionedDomainDelete::doApply : required field present"); + "xrpl::PermissionedDomainDelete::doApply : required field present"); auto const slePd = view().peek({ltPERMISSIONED_DOMAIN, ctx_.tx.at(sfDomainID)}); @@ -57,11 +57,11 @@ PermissionedDomainDelete::doApply() auto const ownerSle = view().peek(keylet::account(account_)); XRPL_ASSERT( ownerSle && ownerSle->getFieldU32(sfOwnerCount) > 0, - "ripple::PermissionedDomainDelete::doApply : nonzero owner count"); + "xrpl::PermissionedDomainDelete::doApply : nonzero owner count"); adjustOwnerCount(view(), ownerSle, -1, ctx_.journal); view().erase(slePd); return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/PermissionedDomainDelete.h b/src/xrpld/app/tx/detail/PermissionedDomainDelete.h index 7ea0681279..3ae10a739f 100644 --- a/src/xrpld/app/tx/detail/PermissionedDomainDelete.h +++ b/src/xrpld/app/tx/detail/PermissionedDomainDelete.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class PermissionedDomainDelete : public Transactor { @@ -25,6 +25,6 @@ public: doApply() override; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/PermissionedDomainSet.cpp b/src/xrpld/app/tx/detail/PermissionedDomainSet.cpp index d73d9f7322..3417f1fb0a 100644 --- a/src/xrpld/app/tx/detail/PermissionedDomainSet.cpp +++ b/src/xrpld/app/tx/detail/PermissionedDomainSet.cpp @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { bool PermissionedDomainSet::checkExtraFeatures(PreflightContext const& ctx) @@ -123,4 +123,4 @@ PermissionedDomainSet::doApply() return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/PermissionedDomainSet.h b/src/xrpld/app/tx/detail/PermissionedDomainSet.h index 6df3448e10..fde06232a5 100644 --- a/src/xrpld/app/tx/detail/PermissionedDomainSet.h +++ b/src/xrpld/app/tx/detail/PermissionedDomainSet.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class PermissionedDomainSet : public Transactor { @@ -28,6 +28,6 @@ public: doApply() override; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/SetAccount.cpp b/src/xrpld/app/tx/detail/SetAccount.cpp index ee55bb5e4b..b8813781c6 100644 --- a/src/xrpld/app/tx/detail/SetAccount.cpp +++ b/src/xrpld/app/tx/detail/SetAccount.cpp @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { TxConsequences SetAccount::makeTxConsequences(PreflightContext const& ctx) @@ -653,4 +653,4 @@ SetAccount::doApply() return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/SetAccount.h b/src/xrpld/app/tx/detail/SetAccount.h index 4c310b7fd1..fb8b4a0ccd 100644 --- a/src/xrpld/app/tx/detail/SetAccount.h +++ b/src/xrpld/app/tx/detail/SetAccount.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { class SetAccount : public Transactor { @@ -37,6 +37,6 @@ public: using AccountSet = SetAccount; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/SetOracle.cpp b/src/xrpld/app/tx/detail/SetOracle.cpp index cecb623d82..03b507fa8f 100644 --- a/src/xrpld/app/tx/detail/SetOracle.cpp +++ b/src/xrpld/app/tx/detail/SetOracle.cpp @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { static inline std::pair tokenPairKey(STObject const& pair) @@ -310,4 +310,4 @@ SetOracle::doApply() return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/SetOracle.h b/src/xrpld/app/tx/detail/SetOracle.h index 5b69d80214..c1c9a3d3fb 100644 --- a/src/xrpld/app/tx/detail/SetOracle.h +++ b/src/xrpld/app/tx/detail/SetOracle.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { /** Price Oracle is a system that acts as a bridge between @@ -35,6 +35,6 @@ public: using OracleSet = SetOracle; -} // namespace ripple +} // namespace xrpl #endif // XRPL_TX_SETORACLE_H_INCLUDED diff --git a/src/xrpld/app/tx/detail/SetRegularKey.cpp b/src/xrpld/app/tx/detail/SetRegularKey.cpp index 2e8f01b355..ff1dbdf769 100644 --- a/src/xrpld/app/tx/detail/SetRegularKey.cpp +++ b/src/xrpld/app/tx/detail/SetRegularKey.cpp @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { XRPAmount SetRegularKey::calculateBaseFee(ReadView const& view, STTx const& tx) @@ -70,4 +70,4 @@ SetRegularKey::doApply() return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/SetRegularKey.h b/src/xrpld/app/tx/detail/SetRegularKey.h index 97754af63c..735ac522fd 100644 --- a/src/xrpld/app/tx/detail/SetRegularKey.h +++ b/src/xrpld/app/tx/detail/SetRegularKey.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class SetRegularKey : public Transactor { @@ -24,6 +24,6 @@ public: doApply() override; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/SetSignerList.cpp b/src/xrpld/app/tx/detail/SetSignerList.cpp index a5409da700..0977125cc2 100644 --- a/src/xrpld/app/tx/detail/SetSignerList.cpp +++ b/src/xrpld/app/tx/detail/SetSignerList.cpp @@ -13,7 +13,7 @@ #include #include -namespace ripple { +namespace xrpl { // We're prepared for there to be multiple signer lists in the future, // but we don't need them yet. So for the time being we're manually @@ -116,7 +116,7 @@ SetSignerList::doApply() break; } // LCOV_EXCL_START - UNREACHABLE("ripple::SetSignerList::doApply : invalid operation"); + UNREACHABLE("xrpl::SetSignerList::doApply : invalid operation"); return temMALFORMED; // LCOV_EXCL_STOP } @@ -128,10 +128,10 @@ SetSignerList::preCompute() auto result = determineOperation(ctx_.tx, view().flags(), j_); XRPL_ASSERT( std::get<0>(result) == tesSUCCESS, - "ripple::SetSignerList::preCompute : result is tesSUCCESS"); + "xrpl::SetSignerList::preCompute : result is tesSUCCESS"); XRPL_ASSERT( std::get<3>(result) != unknown, - "ripple::SetSignerList::preCompute : result is known operation"); + "xrpl::SetSignerList::preCompute : result is known operation"); quorum_ = std::get<1>(result); signers_ = std::get<2>(result); @@ -166,10 +166,10 @@ signerCountBasedOwnerCountDelta(std::size_t entryCount, Rules const& rules) // We've got a lot of room to grow. XRPL_ASSERT( entryCount >= STTx::minMultiSigners, - "ripple::signerCountBasedOwnerCountDelta : minimum signers"); + "xrpl::signerCountBasedOwnerCountDelta : minimum signers"); XRPL_ASSERT( entryCount <= STTx::maxMultiSigners(&rules), - "ripple::signerCountBasedOwnerCountDelta : maximum signers"); + "xrpl::signerCountBasedOwnerCountDelta : maximum signers"); return 2 + static_cast(entryCount); } @@ -261,7 +261,7 @@ SetSignerList::validateQuorumAndSignerEntries( // Make sure there are no duplicate signers. XRPL_ASSERT( std::is_sorted(signers.begin(), signers.end()), - "ripple::SetSignerList::validateQuorumAndSignerEntries : sorted " + "xrpl::SetSignerList::validateQuorumAndSignerEntries : sorted " "signers"); if (std::adjacent_find(signers.begin(), signers.end()) != signers.end()) { @@ -438,4 +438,4 @@ SetSignerList::writeSignersToSLE( ledgerEntry->setFieldArray(sfSignerEntries, toLedger); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/SetSignerList.h b/src/xrpld/app/tx/detail/SetSignerList.h index 2ee9b4806a..f6f63d2b7d 100644 --- a/src/xrpld/app/tx/detail/SetSignerList.h +++ b/src/xrpld/app/tx/detail/SetSignerList.h @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { /** See the README.md for an overview of the SetSignerList transaction that @@ -79,6 +79,6 @@ private: using SignerListSet = SetSignerList; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/SetTrust.cpp b/src/xrpld/app/tx/detail/SetTrust.cpp index 2b10b94374..17e31d2e6b 100644 --- a/src/xrpld/app/tx/detail/SetTrust.cpp +++ b/src/xrpld/app/tx/detail/SetTrust.cpp @@ -24,21 +24,19 @@ computeFreezeFlags( { if (bSetFreeze && !bClearFreeze && !bNoFreeze) { - uFlags |= (bHigh ? ripple::lsfHighFreeze : ripple::lsfLowFreeze); + uFlags |= (bHigh ? xrpl::lsfHighFreeze : xrpl::lsfLowFreeze); } else if (bClearFreeze && !bSetFreeze) { - uFlags &= ~(bHigh ? ripple::lsfHighFreeze : ripple::lsfLowFreeze); + uFlags &= ~(bHigh ? xrpl::lsfHighFreeze : xrpl::lsfLowFreeze); } if (bSetDeepFreeze && !bClearDeepFreeze && !bNoFreeze) { - uFlags |= - (bHigh ? ripple::lsfHighDeepFreeze : ripple::lsfLowDeepFreeze); + uFlags |= (bHigh ? xrpl::lsfHighDeepFreeze : xrpl::lsfLowDeepFreeze); } else if (bClearDeepFreeze && !bSetDeepFreeze) { - uFlags &= - ~(bHigh ? ripple::lsfHighDeepFreeze : ripple::lsfLowDeepFreeze); + uFlags &= ~(bHigh ? xrpl::lsfHighDeepFreeze : xrpl::lsfLowDeepFreeze); } return uFlags; @@ -46,7 +44,7 @@ computeFreezeFlags( } // namespace -namespace ripple { +namespace xrpl { std::uint32_t SetTrust::getFlagsMask(PreflightContext const& ctx) @@ -727,4 +725,4 @@ SetTrust::doApply() return terResult; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/SetTrust.h b/src/xrpld/app/tx/detail/SetTrust.h index 5ae3f2ea23..b5776c6d33 100644 --- a/src/xrpld/app/tx/detail/SetTrust.h +++ b/src/xrpld/app/tx/detail/SetTrust.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { class SetTrust : public Transactor { @@ -34,6 +34,6 @@ public: using TrustSet = SetTrust; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/SignerEntries.cpp b/src/xrpld/app/tx/detail/SignerEntries.cpp index 3d551eb30a..54007a7e4c 100644 --- a/src/xrpld/app/tx/detail/SignerEntries.cpp +++ b/src/xrpld/app/tx/detail/SignerEntries.cpp @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { Expected, NotTEC> SignerEntries::deserialize( @@ -48,4 +48,4 @@ SignerEntries::deserialize( return accountVec; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/SignerEntries.h b/src/xrpld/app/tx/detail/SignerEntries.h index f7a7823069..0a66fd33f5 100644 --- a/src/xrpld/app/tx/detail/SignerEntries.h +++ b/src/xrpld/app/tx/detail/SignerEntries.h @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { // Forward declarations class STObject; @@ -69,6 +69,6 @@ public: std::string_view annotation); }; -} // namespace ripple +} // namespace xrpl #endif // XRPL_TX_IMPL_SIGNER_ENTRIES_H_INCLUDED diff --git a/src/xrpld/app/tx/detail/Transactor.cpp b/src/xrpld/app/tx/detail/Transactor.cpp index 288ae4c85d..6831ec28bc 100644 --- a/src/xrpld/app/tx/detail/Transactor.cpp +++ b/src/xrpld/app/tx/detail/Transactor.cpp @@ -18,7 +18,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Performs early sanity checks on the txid */ NotTEC @@ -304,7 +304,7 @@ Transactor::calculateOwnerReserveFee(ReadView const& view, STTx const& tx) // condition. XRPL_ASSERT( view.fees().increment > view.fees().base * 100, - "ripple::Transactor::calculateOwnerReserveFee : Owner reserve is " + "xrpl::Transactor::calculateOwnerReserveFee : Owner reserve is " "reasonable"); return view.fees().increment; } @@ -525,7 +525,7 @@ TER Transactor::consumeSeqProxy(SLE::pointer const& sleAccount) { XRPL_ASSERT( - sleAccount, "ripple::Transactor::consumeSeqProxy : non-null account"); + sleAccount, "xrpl::Transactor::consumeSeqProxy : non-null account"); SeqProxy const seqProx = ctx_.tx.getSeqProxy(); if (seqProx.isSeq()) { @@ -607,7 +607,7 @@ Transactor::preCompute() { XRPL_ASSERT( account_ != beast::zero, - "ripple::Transactor::preCompute : nonzero account"); + "xrpl::Transactor::preCompute : nonzero account"); } TER @@ -623,7 +623,7 @@ Transactor::apply() // that allow zero account. XRPL_ASSERT( sle != nullptr || account_ == beast::zero, - "ripple::Transactor::apply : non-null SLE or zero account"); + "xrpl::Transactor::apply : non-null SLE or zero account"); if (sle) { @@ -685,7 +685,7 @@ Transactor::checkSign( // Check Single Sign XRPL_ASSERT( - !pkSigner.empty(), "ripple::Transactor::checkSign : non-empty signer"); + !pkSigner.empty(), "xrpl::Transactor::checkSign : non-empty signer"); if (!publicKeyType(makeSlice(pkSigner))) { @@ -814,10 +814,10 @@ Transactor::checkMultiSign( // presence and defaulted value of the SignerListID field will enable that. XRPL_ASSERT( sleAccountSigners->isFieldPresent(sfSignerListID), - "ripple::Transactor::checkMultiSign : has signer list ID"); + "xrpl::Transactor::checkMultiSign : has signer list ID"); XRPL_ASSERT( sleAccountSigners->getFieldU32(sfSignerListID) == 0, - "ripple::Transactor::checkMultiSign : signer list ID is 0"); + "xrpl::Transactor::checkMultiSign : signer list ID is 0"); auto accountSigners = SignerEntries::deserialize(*sleAccountSigners, j, "ledger"); @@ -873,7 +873,7 @@ Transactor::checkMultiSign( XRPL_ASSERT( (flags & tapDRY_RUN) || !spk.empty(), - "ripple::Transactor::checkMultiSign : non-empty signer or " + "xrpl::Transactor::checkMultiSign : non-empty signer or " "simulation"); AccountID const signingAcctIDFromPubKey = spk.empty() ? txSignerAcctID @@ -1072,7 +1072,7 @@ Transactor::reset(XRPAmount fee) // balance should have already been checked in checkFee / preFlight. XRPL_ASSERT( balance != beast::zero && (!view().open() || balance >= fee), - "ripple::Transactor::reset : valid balance"); + "xrpl::Transactor::reset : valid balance"); // We retry/reject the transaction if the account balance is zero or // we're applying against an open ledger and the balance is less than @@ -1089,7 +1089,7 @@ Transactor::reset(XRPAmount fee) payerSle->setFieldAmount(sfBalance, balance - fee); TER const ter{consumeSeqProxy(txnAcct)}; XRPL_ASSERT( - isTesSuccess(ter), "ripple::Transactor::reset : result is tesSUCCESS"); + isTesSuccess(ter), "xrpl::Transactor::reset : result is tesSUCCESS"); if (isTesSuccess(ter)) { @@ -1134,7 +1134,7 @@ Transactor::operator()() JLOG(j_.info()) << to_string(ctx_.tx.getJson(JsonOptions::none)); JLOG(j_.fatal()) << s2.getJson(JsonOptions::none); UNREACHABLE( - "ripple::Transactor::operator() : transaction serdes mismatch"); + "xrpl::Transactor::operator() : transaction serdes mismatch"); // LCOV_EXCL_STOP } } @@ -1154,7 +1154,7 @@ Transactor::operator()() // and it can't be passed in from a preclaim. XRPL_ASSERT( result != temUNKNOWN, - "ripple::Transactor::operator() : result is not temUNKNOWN"); + "xrpl::Transactor::operator() : result is not temUNKNOWN"); if (auto stream = j_.trace()) stream << "preclaim result: " << transToken(result); @@ -1211,7 +1211,7 @@ Transactor::operator()() { XRPL_ASSERT( before && after, - "ripple::Transactor::operator()::visit : non-null SLE " + "xrpl::Transactor::operator()::visit : non-null SLE " "inputs"); if (doOffers && before && after && (before->getType() == ltOFFER) && @@ -1331,4 +1331,4 @@ Transactor::operator()() return {result, applied, metadata}; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/Transactor.h b/src/xrpld/app/tx/detail/Transactor.h index 2195ef0a85..681b6266ab 100644 --- a/src/xrpld/app/tx/detail/Transactor.h +++ b/src/xrpld/app/tx/detail/Transactor.h @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { /** State information when preflighting a tx. */ struct PreflightContext @@ -247,7 +247,7 @@ protected: @param app The application hosting the server @param baseFee The base fee of a candidate transaction - @see ripple::calculateBaseFee + @see xrpl::calculateBaseFee @param fees Fee settings from the current ledger @param flags Transaction processing fees */ @@ -421,6 +421,6 @@ Transactor::validNumericRange( return validNumericRange(value, max.value(), min.value()); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/VaultClawback.cpp b/src/xrpld/app/tx/detail/VaultClawback.cpp index 7c56ca1d60..cc7dec993a 100644 --- a/src/xrpld/app/tx/detail/VaultClawback.cpp +++ b/src/xrpld/app/tx/detail/VaultClawback.cpp @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { NotTEC VaultClawback::preflight(PreflightContext const& ctx) @@ -144,14 +144,14 @@ VaultClawback::doApply() }(); XRPL_ASSERT( amount.asset() == vaultAsset, - "ripple::VaultClawback::doApply : matching asset"); + "xrpl::VaultClawback::doApply : matching asset"); auto assetsAvailable = vault->at(sfAssetsAvailable); auto assetsTotal = vault->at(sfAssetsTotal); [[maybe_unused]] auto const lossUnrealized = vault->at(sfLossUnrealized); XRPL_ASSERT( lossUnrealized <= (assetsTotal - assetsAvailable), - "ripple::VaultClawback::doApply : loss and assets do balance"); + "xrpl::VaultClawback::doApply : loss and assets do balance"); AccountID holder = tx[sfHolder]; MPTIssue const share{mptIssuanceID}; @@ -311,4 +311,4 @@ VaultClawback::doApply() return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/VaultClawback.h b/src/xrpld/app/tx/detail/VaultClawback.h index 888ecf59bf..80a5f73ad0 100644 --- a/src/xrpld/app/tx/detail/VaultClawback.h +++ b/src/xrpld/app/tx/detail/VaultClawback.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class VaultClawback : public Transactor { @@ -24,6 +24,6 @@ public: doApply() override; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/VaultCreate.cpp b/src/xrpld/app/tx/detail/VaultCreate.cpp index 8acb40ad41..5c1440ce03 100644 --- a/src/xrpld/app/tx/detail/VaultCreate.cpp +++ b/src/xrpld/app/tx/detail/VaultCreate.cpp @@ -14,7 +14,7 @@ #include #include -namespace ripple { +namespace xrpl { bool VaultCreate::checkExtraFeatures(PreflightContext const& ctx) @@ -236,4 +236,4 @@ VaultCreate::doApply() return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/VaultCreate.h b/src/xrpld/app/tx/detail/VaultCreate.h index b83dc190ac..06faed5914 100644 --- a/src/xrpld/app/tx/detail/VaultCreate.h +++ b/src/xrpld/app/tx/detail/VaultCreate.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class VaultCreate : public Transactor { @@ -33,6 +33,6 @@ public: doApply() override; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/VaultDelete.cpp b/src/xrpld/app/tx/detail/VaultDelete.cpp index 93ab973e35..9581d9d9a2 100644 --- a/src/xrpld/app/tx/detail/VaultDelete.cpp +++ b/src/xrpld/app/tx/detail/VaultDelete.cpp @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { NotTEC VaultDelete::preflight(PreflightContext const& ctx) @@ -178,4 +178,4 @@ VaultDelete::doApply() return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/VaultDelete.h b/src/xrpld/app/tx/detail/VaultDelete.h index 1144ebcc36..e7c71b408c 100644 --- a/src/xrpld/app/tx/detail/VaultDelete.h +++ b/src/xrpld/app/tx/detail/VaultDelete.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class VaultDelete : public Transactor { @@ -24,6 +24,6 @@ public: doApply() override; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/VaultDeposit.cpp b/src/xrpld/app/tx/detail/VaultDeposit.cpp index 3e5ae741e3..71ddc87b3b 100644 --- a/src/xrpld/app/tx/detail/VaultDeposit.cpp +++ b/src/xrpld/app/tx/detail/VaultDeposit.cpp @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { NotTEC VaultDeposit::preflight(PreflightContext const& ctx) @@ -201,7 +201,7 @@ VaultDeposit::doApply() // This follows from the reverse of the outer enclosing if condition XRPL_ASSERT( account_ == vault->at(sfOwner), - "ripple::VaultDeposit::doApply : account is owner"); + "xrpl::VaultDeposit::doApply : account is owner"); if (auto const err = authorizeMPToken( view(), mPriorBalance, // priorBalance @@ -258,7 +258,7 @@ VaultDeposit::doApply() XRPL_ASSERT( sharesCreated.asset() != assetsDeposited.asset(), - "ripple::VaultDeposit::doApply : assets are not shares"); + "xrpl::VaultDeposit::doApply : assets are not shares"); vault->at(sfAssetsTotal) += assetsDeposited; vault->at(sfAssetsAvailable) += assetsDeposited; @@ -309,4 +309,4 @@ VaultDeposit::doApply() return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/VaultDeposit.h b/src/xrpld/app/tx/detail/VaultDeposit.h index 7d725fe6fe..1fd62b95ff 100644 --- a/src/xrpld/app/tx/detail/VaultDeposit.h +++ b/src/xrpld/app/tx/detail/VaultDeposit.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class VaultDeposit : public Transactor { @@ -24,6 +24,6 @@ public: doApply() override; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/VaultSet.cpp b/src/xrpld/app/tx/detail/VaultSet.cpp index 38ab6296ef..7f7b4e9688 100644 --- a/src/xrpld/app/tx/detail/VaultSet.cpp +++ b/src/xrpld/app/tx/detail/VaultSet.cpp @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { bool VaultSet::checkExtraFeatures(PreflightContext const& ctx) @@ -172,4 +172,4 @@ VaultSet::doApply() return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/VaultSet.h b/src/xrpld/app/tx/detail/VaultSet.h index 0db0e0fd13..bfa38e5284 100644 --- a/src/xrpld/app/tx/detail/VaultSet.h +++ b/src/xrpld/app/tx/detail/VaultSet.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class VaultSet : public Transactor { @@ -27,6 +27,6 @@ public: doApply() override; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/VaultWithdraw.cpp b/src/xrpld/app/tx/detail/VaultWithdraw.cpp index 8cd3f5cd97..cc56ec43fe 100644 --- a/src/xrpld/app/tx/detail/VaultWithdraw.cpp +++ b/src/xrpld/app/tx/detail/VaultWithdraw.cpp @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { NotTEC VaultWithdraw::preflight(PreflightContext const& ctx) @@ -218,7 +218,7 @@ VaultWithdraw::doApply() [[maybe_unused]] auto const lossUnrealized = vault->at(sfLossUnrealized); XRPL_ASSERT( lossUnrealized <= (assetsTotal - assetsAvailable), - "ripple::VaultWithdraw::doApply : loss and assets do balance"); + "xrpl::VaultWithdraw::doApply : loss and assets do balance"); // The vault must have enough assets on hand. The vault may hold assets // that it has already pledged. That is why we look at AssetAvailable @@ -313,4 +313,4 @@ VaultWithdraw::doApply() return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/VaultWithdraw.h b/src/xrpld/app/tx/detail/VaultWithdraw.h index 4a6ee3b548..33463831e5 100644 --- a/src/xrpld/app/tx/detail/VaultWithdraw.h +++ b/src/xrpld/app/tx/detail/VaultWithdraw.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class VaultWithdraw : public Transactor { @@ -24,6 +24,6 @@ public: doApply() override; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/XChainBridge.cpp b/src/xrpld/app/tx/detail/XChainBridge.cpp index 554d4a8436..b3ac2455d8 100644 --- a/src/xrpld/app/tx/detail/XChainBridge.cpp +++ b/src/xrpld/app/tx/detail/XChainBridge.cpp @@ -27,7 +27,7 @@ #include #include -namespace ripple { +namespace xrpl { /* Bridges connect two independent ledgers: a "locking chain" and an "issuing @@ -206,8 +206,8 @@ claimHelper( { // LCOV_EXCL_START UNREACHABLE( - "ripple::claimHelper : invalid inputs"); // should have already - // been checked + "xrpl::claimHelper : invalid inputs"); // should have already + // been checked continue; // LCOV_EXCL_STOP } @@ -423,7 +423,7 @@ transferHelper( if (amt.native()) { auto const sleSrc = psb.peek(keylet::account(src)); - XRPL_ASSERT(sleSrc, "ripple::transferHelper : non-null source account"); + XRPL_ASSERT(sleSrc, "xrpl::transferHelper : non-null source account"); if (!sleSrc) return tecINTERNAL; // LCOV_EXCL_LINE @@ -2241,4 +2241,4 @@ XChainCreateAccountCommit::doApply() return tesSUCCESS; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/XChainBridge.h b/src/xrpld/app/tx/detail/XChainBridge.h index 8636f4f30e..db1026ebb4 100644 --- a/src/xrpld/app/tx/detail/XChainBridge.h +++ b/src/xrpld/app/tx/detail/XChainBridge.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { constexpr size_t xbridgeMaxAccountCreateClaims = 128; @@ -239,6 +239,6 @@ using XChainAccountCreateCommit = XChainCreateAccountCommit; //------------------------------------------------------------------------------ -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/app/tx/detail/apply.cpp b/src/xrpld/app/tx/detail/apply.cpp index e9709c20f5..c84ab49acb 100644 --- a/src/xrpld/app/tx/detail/apply.cpp +++ b/src/xrpld/app/tx/detail/apply.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { // These are the same flags defined as HashRouterFlags::PRIVATE1-4 in // HashRouter.h @@ -273,4 +273,4 @@ applyTransaction( } } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/app/tx/detail/applySteps.cpp b/src/xrpld/app/tx/detail/applySteps.cpp index 81a930f562..7f0d971fdc 100644 --- a/src/xrpld/app/tx/detail/applySteps.cpp +++ b/src/xrpld/app/tx/detail/applySteps.cpp @@ -18,7 +18,7 @@ #include -namespace ripple { +namespace xrpl { namespace { @@ -113,7 +113,7 @@ invoke_preflight(PreflightContext const& ctx) // LCOV_EXCL_START JLOG(ctx.j.fatal()) << "Unknown transaction type in preflight: " << e.txnType; - UNREACHABLE("ripple::invoke_preflight : unknown transaction type"); + UNREACHABLE("xrpl::invoke_preflight : unknown transaction type"); return {temUNKNOWN, TxConsequences{temUNKNOWN}}; // LCOV_EXCL_STOP } @@ -177,7 +177,7 @@ invoke_preclaim(PreclaimContext const& ctx) // LCOV_EXCL_START JLOG(ctx.j.fatal()) << "Unknown transaction type in preclaim: " << e.txnType; - UNREACHABLE("ripple::invoke_preclaim : unknown transaction type"); + UNREACHABLE("xrpl::invoke_preclaim : unknown transaction type"); return temUNKNOWN; // LCOV_EXCL_STOP } @@ -211,8 +211,7 @@ invoke_calculateBaseFee(ReadView const& view, STTx const& tx) catch (UnknownTxnType const& e) { // LCOV_EXCL_START - UNREACHABLE( - "ripple::invoke_calculateBaseFee : unknown transaction type"); + UNREACHABLE("xrpl::invoke_calculateBaseFee : unknown transaction type"); return XRPAmount{0}; // LCOV_EXCL_STOP } @@ -227,7 +226,7 @@ TxConsequences::TxConsequences(NotTEC pfresult) { XRPL_ASSERT( !isTesSuccess(pfresult), - "ripple::TxConsequences::TxConsequences : is not tesSUCCESS"); + "xrpl::TxConsequences::TxConsequences : is not tesSUCCESS"); } TxConsequences::TxConsequences(STTx const& tx) @@ -275,7 +274,7 @@ invoke_apply(ApplyContext& ctx) // LCOV_EXCL_START JLOG(ctx.journal.fatal()) << "Unknown transaction type in apply: " << e.txnType; - UNREACHABLE("ripple::invoke_apply : unknown transaction type"); + UNREACHABLE("xrpl::invoke_apply : unknown transaction type"); return {temUNKNOWN, false}; // LCOV_EXCL_STOP } @@ -426,4 +425,4 @@ doApply(PreclaimResult const& preclaimResult, Application& app, OpenView& view) } } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/conditions/Condition.h b/src/xrpld/conditions/Condition.h index ff83f69afe..52a6bcd9bb 100644 --- a/src/xrpld/conditions/Condition.h +++ b/src/xrpld/conditions/Condition.h @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace cryptoconditions { enum class Type : std::uint8_t { @@ -94,6 +94,6 @@ operator!=(Condition const& lhs, Condition const& rhs) } // namespace cryptoconditions -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/conditions/Fulfillment.h b/src/xrpld/conditions/Fulfillment.h index 13144288d9..970aed121c 100644 --- a/src/xrpld/conditions/Fulfillment.h +++ b/src/xrpld/conditions/Fulfillment.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace cryptoconditions { struct Fulfillment @@ -122,6 +122,6 @@ bool validate(Fulfillment const& f, Condition const& c); } // namespace cryptoconditions -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/conditions/detail/Condition.cpp b/src/xrpld/conditions/detail/Condition.cpp index b6ba60e6d5..ebf61dd245 100644 --- a/src/xrpld/conditions/detail/Condition.cpp +++ b/src/xrpld/conditions/detail/Condition.cpp @@ -2,7 +2,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace cryptoconditions { namespace detail { @@ -212,4 +212,4 @@ Condition::deserialize(Slice s, std::error_code& ec) } } // namespace cryptoconditions -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/conditions/detail/Fulfillment.cpp b/src/xrpld/conditions/detail/Fulfillment.cpp index e8c5928fcf..9ecaa44ab8 100644 --- a/src/xrpld/conditions/detail/Fulfillment.cpp +++ b/src/xrpld/conditions/detail/Fulfillment.cpp @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace cryptoconditions { bool @@ -130,4 +130,4 @@ Fulfillment::deserialize(Slice s, std::error_code& ec) } } // namespace cryptoconditions -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/conditions/detail/PreimageSha256.h b/src/xrpld/conditions/detail/PreimageSha256.h index 62043f5a45..642a7afdc0 100644 --- a/src/xrpld/conditions/detail/PreimageSha256.h +++ b/src/xrpld/conditions/detail/PreimageSha256.h @@ -11,7 +11,7 @@ #include -namespace ripple { +namespace xrpl { namespace cryptoconditions { class PreimageSha256 final : public Fulfillment @@ -130,6 +130,6 @@ public: }; } // namespace cryptoconditions -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/conditions/detail/error.cpp b/src/xrpld/conditions/detail/error.cpp index fbcd70d009..a74aa79e3f 100644 --- a/src/xrpld/conditions/detail/error.cpp +++ b/src/xrpld/conditions/detail/error.cpp @@ -4,7 +4,7 @@ #include -namespace ripple { +namespace xrpl { namespace cryptoconditions { namespace detail { @@ -116,4 +116,4 @@ make_error_code(error ev) } } // namespace cryptoconditions -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/conditions/detail/error.h b/src/xrpld/conditions/detail/error.h index bd1f2413f3..65584e974a 100644 --- a/src/xrpld/conditions/detail/error.h +++ b/src/xrpld/conditions/detail/error.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace cryptoconditions { enum class error { @@ -30,12 +30,12 @@ std::error_code make_error_code(error ev); } // namespace cryptoconditions -} // namespace ripple +} // namespace xrpl namespace std { template <> -struct is_error_code_enum +struct is_error_code_enum { explicit is_error_code_enum() = default; diff --git a/src/xrpld/conditions/detail/utils.h b/src/xrpld/conditions/detail/utils.h index b03b393e43..b07b7b29e0 100644 --- a/src/xrpld/conditions/detail/utils.h +++ b/src/xrpld/conditions/detail/utils.h @@ -10,7 +10,7 @@ #include -namespace ripple { +namespace xrpl { namespace cryptoconditions { // A collection of functions to decode binary blobs @@ -208,6 +208,6 @@ parseInteger(Slice& s, std::size_t count, std::error_code& ec) } // namespace der } // namespace cryptoconditions -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/consensus/Consensus.cpp b/src/xrpld/consensus/Consensus.cpp index 8a0bec236e..b71a36d538 100644 --- a/src/xrpld/consensus/Consensus.cpp +++ b/src/xrpld/consensus/Consensus.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { bool shouldCloseLedger( @@ -250,4 +250,4 @@ checkConsensus( return ConsensusState::No; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/consensus/Consensus.h b/src/xrpld/consensus/Consensus.h index d1aed31870..01d4dfaedf 100644 --- a/src/xrpld/consensus/Consensus.h +++ b/src/xrpld/consensus/Consensus.h @@ -18,7 +18,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Determines whether the current ledger should close at this time. @@ -897,7 +897,7 @@ Consensus::gotTxSet( // so this txSet must differ XRPL_ASSERT( id != result_->position.position(), - "ripple::Consensus::gotTxSet : updated transaction set"); + "xrpl::Consensus::gotTxSet : updated transaction set"); bool any = false; for (auto const& [nodeId, peerPos] : currPeerPositions_) { @@ -1047,7 +1047,7 @@ Consensus::handleWrongLedger( CLOG(clog) << "handleWrongLedger. "; XRPL_ASSERT( lgrId != prevLedgerID_ || previousLedger_.id() != lgrId, - "ripple::Consensus::handleWrongLedger : have wrong ledger"); + "xrpl::Consensus::handleWrongLedger : have wrong ledger"); // Stop proposing because we are out of sync leaveConsensus(clog); @@ -1349,7 +1349,7 @@ Consensus::phaseEstablish( { CLOG(clog) << "phaseEstablish. "; // can only establish consensus if we already took a stance - XRPL_ASSERT(result_, "ripple::Consensus::phaseEstablish : result is set"); + XRPL_ASSERT(result_, "xrpl::Consensus::phaseEstablish : result is set"); ++peerUnchangedCounter_; ++establishCounter_; @@ -1415,7 +1415,7 @@ void Consensus::closeLedger(std::unique_ptr const& clog) { // We should not be closing if we already have a position - XRPL_ASSERT(!result_, "ripple::Consensus::closeLedger : result is not set"); + XRPL_ASSERT(!result_, "xrpl::Consensus::closeLedger : result is not set"); phase_ = ConsensusPhase::establish; JLOG(j_.debug()) << "transitioned to ConsensusPhase::establish"; @@ -1474,8 +1474,7 @@ Consensus::updateOurPositions( std::unique_ptr const& clog) { // We must have a position if we are updating it - XRPL_ASSERT( - result_, "ripple::Consensus::updateOurPositions : result is set"); + XRPL_ASSERT(result_, "xrpl::Consensus::updateOurPositions : result is set"); ConsensusParms const& parms = adaptor_.parms(); // Compute a cutoff time @@ -1664,7 +1663,7 @@ Consensus::haveConsensus( std::unique_ptr const& clog) { // Must have a stance if we are checking for consensus - XRPL_ASSERT(result_, "ripple::Consensus::haveConsensus : has result"); + XRPL_ASSERT(result_, "xrpl::Consensus::haveConsensus : has result"); // CHECKME: should possibly count unacquired TX sets as disagreeing int agree = 0, disagree = 0; @@ -1804,7 +1803,7 @@ Consensus::createDisputes( std::unique_ptr const& clog) { // Cannot create disputes without our stance - XRPL_ASSERT(result_, "ripple::Consensus::createDisputes : result is set"); + XRPL_ASSERT(result_, "xrpl::Consensus::createDisputes : result is set"); // Only create disputes if this is a new set auto const emplaced = result_->compares.emplace(o.id()).second; @@ -1835,7 +1834,7 @@ Consensus::createDisputes( XRPL_ASSERT( (inThisSet && result_->txns.find(txId) && !o.find(txId)) || (!inThisSet && !result_->txns.find(txId) && o.find(txId)), - "ripple::Consensus::createDisputes : has disputed transactions"); + "xrpl::Consensus::createDisputes : has disputed transactions"); Tx_t tx = inThisSet ? result_->txns.find(txId) : o.find(txId); auto txID = tx.id(); @@ -1873,7 +1872,7 @@ void Consensus::updateDisputes(NodeID_t const& node, TxSet_t const& other) { // Cannot updateDisputes without our stance - XRPL_ASSERT(result_, "ripple::Consensus::updateDisputes : result is set"); + XRPL_ASSERT(result_, "xrpl::Consensus::updateDisputes : result is set"); // Ensure we have created disputes against this set if we haven't seen // it before @@ -1895,6 +1894,6 @@ Consensus::asCloseTime(NetClock::time_point raw) const return roundCloseTime(raw, closeResolution_); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/consensus/ConsensusParms.h b/src/xrpld/consensus/ConsensusParms.h index 8015c2547b..bd1d866082 100644 --- a/src/xrpld/consensus/ConsensusParms.h +++ b/src/xrpld/consensus/ConsensusParms.h @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Consensus algorithm parameters @@ -170,7 +170,7 @@ getNeededWeight( // See if enough time has passed to move on to the next. XRPL_ASSERT( nextCutoff.consensusTime >= currentCutoff.consensusTime, - "ripple::getNeededWeight : next state valid"); + "xrpl::getNeededWeight : next state valid"); if (percentTime >= nextCutoff.consensusTime) { return {nextCutoff.consensusPct, currentCutoff.next}; @@ -179,5 +179,5 @@ getNeededWeight( return {currentCutoff.consensusPct, {}}; } -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/consensus/ConsensusProposal.h b/src/xrpld/consensus/ConsensusProposal.h index 344f87f0db..eadf3565f2 100644 --- a/src/xrpld/consensus/ConsensusProposal.h +++ b/src/xrpld/consensus/ConsensusProposal.h @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Represents a proposed position taken during a round of consensus. During consensus, peers seek agreement on a set of transactions to @@ -262,5 +262,5 @@ operator==( a.prevLedger() == b.prevLedger() && a.position() == b.position() && a.closeTime() == b.closeTime() && a.seenTime() == b.seenTime(); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/consensus/ConsensusTypes.h b/src/xrpld/consensus/ConsensusTypes.h index b2712f17e7..43fb4021b1 100644 --- a/src/xrpld/consensus/ConsensusTypes.h +++ b/src/xrpld/consensus/ConsensusTypes.h @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Represents how a node currently participates in Consensus. @@ -200,7 +200,7 @@ struct ConsensusResult { XRPL_ASSERT( txns.id() == position.position(), - "ripple::ConsensusResult : valid inputs"); + "xrpl::ConsensusResult : valid inputs"); } //! The set of transactions consensus agrees go in the ledger @@ -225,6 +225,6 @@ struct ConsensusResult // The number of peers proposing during the round std::size_t proposers = 0; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/consensus/DisputedTx.h b/src/xrpld/consensus/DisputedTx.h index ce15b4b7f3..f4b841c795 100644 --- a/src/xrpld/consensus/DisputedTx.h +++ b/src/xrpld/consensus/DisputedTx.h @@ -9,7 +9,7 @@ #include -namespace ripple { +namespace xrpl { /** A transaction discovered to be in dispute during consensus. @@ -341,6 +341,6 @@ DisputedTx::getJson() const return ret; } -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/consensus/LedgerTiming.h b/src/xrpld/consensus/LedgerTiming.h index 869cf1980e..5d6348ffb6 100644 --- a/src/xrpld/consensus/LedgerTiming.h +++ b/src/xrpld/consensus/LedgerTiming.h @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { /** Possible ledger close time resolutions. @@ -149,5 +149,5 @@ effCloseTime( roundCloseTime(closeTime, resolution), (priorCloseTime + 1s)); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/consensus/LedgerTrie.h b/src/xrpld/consensus/LedgerTrie.h index 0f23a8ffc3..b8382c555f 100644 --- a/src/xrpld/consensus/LedgerTrie.h +++ b/src/xrpld/consensus/LedgerTrie.h @@ -13,7 +13,7 @@ #include #include -namespace ripple { +namespace xrpl { /** The tip of a span of ledger ancestry */ @@ -45,7 +45,7 @@ public: ID ancestor(Seq const& s) const { - XRPL_ASSERT(s <= seq, "ripple::SpanTip::ancestor : valid input"); + XRPL_ASSERT(s <= seq, "xrpl::SpanTip::ancestor : valid input"); return ledger[s]; } @@ -72,7 +72,7 @@ public: { // Require default ledger to be genesis seq XRPL_ASSERT( - ledger_.seq() == start_, "ripple::Span::Span : ledger is genesis"); + ledger_.seq() == start_, "xrpl::Span::Span : ledger is genesis"); } Span(Ledger ledger) @@ -141,7 +141,7 @@ private: : start_{start}, end_{end}, ledger_{l} { // Spans cannot be empty - XRPL_ASSERT(start < end, "ripple::Span::Span : non-empty span input"); + XRPL_ASSERT(start < end, "xrpl::Span::Span : non-empty span input"); } Seq @@ -214,7 +214,7 @@ struct Node [child](std::unique_ptr const& curr) { return curr.get() == child; }); - XRPL_ASSERT(it != children.end(), "ripple::Node::erase : valid input"); + XRPL_ASSERT(it != children.end(), "xrpl::Node::erase : valid input"); std::swap(*it, children.back()); children.pop_back(); } @@ -355,7 +355,7 @@ class LedgerTrie Node* curr = root.get(); // Root is always defined and is in common with all ledgers - XRPL_ASSERT(curr, "ripple::LedgerTrie::find : non-null root"); + XRPL_ASSERT(curr, "xrpl::LedgerTrie::find : non-null root"); Seq pos = curr->span.diff(ledger); bool done = false; @@ -436,7 +436,7 @@ public: auto const [loc, diffSeq] = find(ledger); // There is always a place to insert - XRPL_ASSERT(loc, "ripple::LedgerTrie::insert : valid input ledger"); + XRPL_ASSERT(loc, "xrpl::LedgerTrie::insert : valid input ledger"); // Node from which to start incrementing branchSupport Node* incNode = loc; @@ -473,12 +473,12 @@ public: newNode->children = std::move(loc->children); XRPL_ASSERT( loc->children.empty(), - "ripple::LedgerTrie::insert : moved-from children"); + "xrpl::LedgerTrie::insert : moved-from children"); for (std::unique_ptr& child : newNode->children) child->parent = newNode.get(); // Loc truncates to prefix and newNode is its child - XRPL_ASSERT(prefix, "ripple::LedgerTrie::insert : prefix is set"); + XRPL_ASSERT(prefix, "xrpl::LedgerTrie::insert : prefix is set"); loc->span = *prefix; newNode->parent = loc; loc->children.emplace_back(std::move(newNode)); @@ -533,7 +533,7 @@ public: auto const it = seqSupport.find(ledger.seq()); XRPL_ASSERT( it != seqSupport.end() && it->second >= count, - "ripple::LedgerTrie::remove : valid input ledger"); + "xrpl::LedgerTrie::remove : valid input ledger"); it->second -= count; if (it->second == 0) seqSupport.erase(it->first); @@ -830,5 +830,5 @@ public: } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/consensus/Validations.h b/src/xrpld/consensus/Validations.h index 830d05f188..15b33c89c4 100644 --- a/src/xrpld/consensus/Validations.h +++ b/src/xrpld/consensus/Validations.h @@ -16,7 +16,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Timing parameters to control validation staleness and expiration. @@ -418,7 +418,7 @@ private: { XRPL_ASSERT( val.trusted(), - "ripple::Validations::updateTrie : trusted input validation"); + "xrpl::Validations::updateTrie : trusted input validation"); // Clear any prior acquiring ledger for this node if (prior) @@ -698,7 +698,7 @@ public: { std::lock_guard lock{mutex_}; XRPL_ASSERT( - low < high, "ripple::Validations::setSeqToKeep : valid inputs"); + low < high, "xrpl::Validations::setSeqToKeep : valid inputs"); toKeep_ = {low, high}; } @@ -1156,5 +1156,5 @@ public: } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/core/ClosureCounter.h b/src/xrpld/core/ClosureCounter.h index 6050e32618..d2be76fa8c 100644 --- a/src/xrpld/core/ClosureCounter.h +++ b/src/xrpld/core/ClosureCounter.h @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { /** * The role of a `ClosureCounter` is to assist in shutdown by letting callers @@ -202,6 +202,6 @@ public: } }; -} // namespace ripple +} // namespace xrpl #endif // XRPL_CORE_CLOSURE_COUNTER_H_INCLUDED diff --git a/src/xrpld/core/Config.h b/src/xrpld/core/Config.h index f48f2765e3..cfd260787c 100644 --- a/src/xrpld/core/Config.h +++ b/src/xrpld/core/Config.h @@ -16,7 +16,7 @@ #include #include -namespace ripple { +namespace xrpl { class Rules; @@ -362,6 +362,6 @@ public: FeeSetup setup_FeeVote(Section const& section); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/core/ConfigSections.h b/src/xrpld/core/ConfigSections.h index 554362edd6..6f8a13a145 100644 --- a/src/xrpld/core/ConfigSections.h +++ b/src/xrpld/core/ConfigSections.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { // VFALCO DEPRECATED in favor of the BasicConfig interface struct ConfigSection @@ -78,6 +78,6 @@ struct ConfigSection #define SECTION_VETO_AMENDMENTS "veto_amendments" #define SECTION_WORKERS "workers" -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/core/Coro.ipp b/src/xrpld/core/Coro.ipp index 8e14e88592..9f73d80647 100644 --- a/src/xrpld/core/Coro.ipp +++ b/src/xrpld/core/Coro.ipp @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { template JobQueue::Coro::Coro( @@ -34,7 +34,7 @@ JobQueue::Coro::Coro( inline JobQueue::Coro::~Coro() { #ifndef NDEBUG - XRPL_ASSERT(finished_, "ripple::JobQueue::Coro::~Coro : is finished"); + XRPL_ASSERT(finished_, "xrpl::JobQueue::Coro::~Coro : is finished"); #endif } @@ -85,8 +85,7 @@ JobQueue::Coro::resume() detail::getLocalValues().reset(&lvs_); std::lock_guard lock(mutex_); XRPL_ASSERT( - static_cast(coro_), - "ripple::JobQueue::Coro::resume : is runnable"); + static_cast(coro_), "xrpl::JobQueue::Coro::resume : is runnable"); coro_(); detail::getLocalValues().release(); detail::getLocalValues().reset(saved); @@ -129,6 +128,6 @@ JobQueue::Coro::join() cv_.wait(lk, [this]() { return running_ == false; }); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/core/DatabaseCon.h b/src/xrpld/core/DatabaseCon.h index 84d2c375e0..120f150bb3 100644 --- a/src/xrpld/core/DatabaseCon.h +++ b/src/xrpld/core/DatabaseCon.h @@ -16,7 +16,7 @@ namespace soci { class session; } -namespace ripple { +namespace xrpl { class LockedSociSession { @@ -82,7 +82,7 @@ public: { XRPL_ASSERT( !useGlobalPragma || globalPragma, - "ripple::DatabaseCon::Setup::commonPragma : consistent global " + "xrpl::DatabaseCon::Setup::commonPragma : consistent global " "pragma"); return useGlobalPragma && globalPragma ? globalPragma.get() : nullptr; @@ -241,6 +241,6 @@ setup_DatabaseCon( Config const& c, std::optional j = std::nullopt); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/core/Job.h b/src/xrpld/core/Job.h index ac6278b3c8..a7005c3125 100644 --- a/src/xrpld/core/Job.h +++ b/src/xrpld/core/Job.h @@ -8,7 +8,7 @@ #include -namespace ripple { +namespace xrpl { // Note that this queue should only be used for CPU-bound jobs // It is primarily intended for signature checking @@ -132,6 +132,6 @@ private: using JobCounter = ClosureCounter; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/core/JobQueue.h b/src/xrpld/core/JobQueue.h index c5d36cd993..39a5fb0cd2 100644 --- a/src/xrpld/core/JobQueue.h +++ b/src/xrpld/core/JobQueue.h @@ -13,7 +13,7 @@ #include -namespace ripple { +namespace xrpl { namespace perf { class PerfLog; @@ -383,11 +383,11 @@ private: lock is released which only happens after the coroutine completes. */ -} // namespace ripple +} // namespace xrpl #include -namespace ripple { +namespace xrpl { template std::shared_ptr @@ -409,6 +409,6 @@ JobQueue::postCoro(JobType t, std::string const& name, F&& f) return coro; } -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/core/JobTypeData.h b/src/xrpld/core/JobTypeData.h index 337adcb0da..f92e5688fb 100644 --- a/src/xrpld/core/JobTypeData.h +++ b/src/xrpld/core/JobTypeData.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { struct JobTypeData { @@ -84,6 +84,6 @@ public: } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/core/JobTypeInfo.h b/src/xrpld/core/JobTypeInfo.h index a58d5316a8..ea614e1990 100644 --- a/src/xrpld/core/JobTypeInfo.h +++ b/src/xrpld/core/JobTypeInfo.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { /** Holds all the 'static' information about a job, which does not change */ class JobTypeInfo @@ -78,6 +78,6 @@ public: } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/core/JobTypes.h b/src/xrpld/core/JobTypes.h index bb5a8baf9c..b6778a6645 100644 --- a/src/xrpld/core/JobTypes.h +++ b/src/xrpld/core/JobTypes.h @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { class JobTypes { @@ -35,7 +35,7 @@ private: std::chrono::milliseconds peakLatency) { XRPL_ASSERT( m_map.find(jt) == m_map.end(), - "ripple::JobTypes::JobTypes::add : unique job type input"); + "xrpl::JobTypes::JobTypes::add : unique job type input"); [[maybe_unused]] auto const inserted = m_map @@ -48,7 +48,7 @@ private: XRPL_ASSERT( inserted == true, - "ripple::JobTypes::JobTypes::add : input is inserted"); + "xrpl::JobTypes::JobTypes::add : input is inserted"); }; // clang-format off @@ -122,7 +122,7 @@ public: get(JobType jt) const { Map::const_iterator const iter(m_map.find(jt)); - XRPL_ASSERT(iter != m_map.end(), "ripple::JobTypes::get : valid input"); + XRPL_ASSERT(iter != m_map.end(), "xrpl::JobTypes::get : valid input"); if (iter != m_map.end()) return iter->second; @@ -170,6 +170,6 @@ public: Map m_map; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/core/LoadEvent.h b/src/xrpld/core/LoadEvent.h index b6cd0ab500..8422fe883e 100644 --- a/src/xrpld/core/LoadEvent.h +++ b/src/xrpld/core/LoadEvent.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { class LoadMonitor; @@ -65,6 +65,6 @@ private: std::chrono::steady_clock::duration timeRunning_; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/core/LoadMonitor.h b/src/xrpld/core/LoadMonitor.h index a9ed66e0fe..4cecfcc7cb 100644 --- a/src/xrpld/core/LoadMonitor.h +++ b/src/xrpld/core/LoadMonitor.h @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { // Monitors load levels and response times @@ -68,6 +68,6 @@ private: beast::Journal const j_; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/core/SociDB.h b/src/xrpld/core/SociDB.h index bf209d79f7..3d37cbc121 100644 --- a/src/xrpld/core/SociDB.h +++ b/src/xrpld/core/SociDB.h @@ -29,7 +29,7 @@ namespace sqlite_api { struct sqlite3; } -namespace ripple { +namespace xrpl { class BasicConfig; @@ -122,7 +122,7 @@ makeCheckpointer( JobQueue&, Logs&); -} // namespace ripple +} // namespace xrpl #if defined(__clang__) #pragma clang diagnostic pop diff --git a/src/xrpld/core/TimeKeeper.h b/src/xrpld/core/TimeKeeper.h index f5c14a67fd..67b389bf94 100644 --- a/src/xrpld/core/TimeKeeper.h +++ b/src/xrpld/core/TimeKeeper.h @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { /** Manages various times used by the server. */ class TimeKeeper : public beast::abstract_clock @@ -97,6 +97,6 @@ public: } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/core/detail/Config.cpp b/src/xrpld/core/detail/Config.cpp index 6a49416a45..e6c61e1471 100644 --- a/src/xrpld/core/detail/Config.cpp +++ b/src/xrpld/core/detail/Config.cpp @@ -26,7 +26,7 @@ #if BOOST_OS_WINDOWS #include -namespace ripple { +namespace xrpl { namespace detail { [[nodiscard]] std::uint64_t @@ -39,13 +39,13 @@ getMemorySize() } } // namespace detail -} // namespace ripple +} // namespace xrpl #endif #if BOOST_OS_LINUX #include -namespace ripple { +namespace xrpl { namespace detail { [[nodiscard]] std::uint64_t @@ -58,7 +58,7 @@ getMemorySize() } } // namespace detail -} // namespace ripple +} // namespace xrpl #endif @@ -66,7 +66,7 @@ getMemorySize() #include #include -namespace ripple { +namespace xrpl { namespace detail { [[nodiscard]] std::uint64_t @@ -83,10 +83,10 @@ getMemorySize() } } // namespace detail -} // namespace ripple +} // namespace xrpl #endif -namespace ripple { +namespace xrpl { // clang-format off // The configurable node sizes are "tiny", "small", "medium", "large", "huge" @@ -250,7 +250,7 @@ void Config::setupControl(bool bQuiet, bool bSilent, bool bStandalone) { XRPL_ASSERT( - NODE_SIZE == 0, "ripple::Config::setupControl : node size not set"); + NODE_SIZE == 0, "xrpl::Config::setupControl : node size not set"); QUIET = bQuiet || bSilent; SILENT = bSilent; @@ -273,7 +273,7 @@ Config::setupControl(bool bQuiet, bool bSilent, bool bStandalone) XRPL_ASSERT( ns != threshold.second.end(), - "ripple::Config::setupControl : valid node size"); + "xrpl::Config::setupControl : valid node size"); if (ns != threshold.second.end()) NODE_SIZE = std::distance(threshold.second.begin(), ns); @@ -285,7 +285,7 @@ Config::setupControl(bool bQuiet, bool bSilent, bool bStandalone) } XRPL_ASSERT( - NODE_SIZE <= 4, "ripple::Config::setupControl : node size is set"); + NODE_SIZE <= 4, "xrpl::Config::setupControl : node size is set"); } void @@ -1099,10 +1099,9 @@ Config::getValueFor(SizedItem item, std::optional node) const auto const index = static_cast>(item); XRPL_ASSERT( index < sizedItems.size(), - "ripple::Config::getValueFor : valid index input"); + "xrpl::Config::getValueFor : valid index input"); XRPL_ASSERT( - !node || *node <= 4, - "ripple::Config::getValueFor : unset or valid node"); + !node || *node <= 4, "xrpl::Config::getValueFor : unset or valid node"); return sizedItems.at(index).second.at(node.value_or(NODE_SIZE)); } @@ -1126,4 +1125,4 @@ setup_FeeVote(Section const& section) return setup; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/core/detail/DatabaseCon.cpp b/src/xrpld/core/detail/DatabaseCon.cpp index efff0d8192..35eaf31898 100644 --- a/src/xrpld/core/detail/DatabaseCon.cpp +++ b/src/xrpld/core/detail/DatabaseCon.cpp @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { class CheckpointersCollection { @@ -215,7 +215,7 @@ setup_DatabaseCon(Config const& c, std::optional j) } XRPL_ASSERT( result->size() == 3, - "ripple::setup_DatabaseCon::globalPragma : result size is 3"); + "xrpl::setup_DatabaseCon::globalPragma : result size is 3"); return result; }(); } @@ -265,4 +265,4 @@ DatabaseCon::setupCheckpointing(JobQueue* q, Logs& l) checkpointer_ = checkpointers.create(session_, *q, l); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/core/detail/Job.cpp b/src/xrpld/core/detail/Job.cpp index e1e85d34eb..c06727270d 100644 --- a/src/xrpld/core/detail/Job.cpp +++ b/src/xrpld/core/detail/Job.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { Job::Job() : mType(jtINVALID), mJobIndex(0) { @@ -101,4 +101,4 @@ Job::operator<=(Job const& j) const return mJobIndex <= j.mJobIndex; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/core/detail/JobQueue.cpp b/src/xrpld/core/detail/JobQueue.cpp index ff5c2211ef..4f91170319 100644 --- a/src/xrpld/core/detail/JobQueue.cpp +++ b/src/xrpld/core/detail/JobQueue.cpp @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { JobQueue::JobQueue( int threadCount, @@ -39,8 +39,7 @@ JobQueue::JobQueue( std::forward_as_tuple(jt.type()), std::forward_as_tuple(jt, m_collector, logs))); XRPL_ASSERT( - result.second == true, - "ripple::JobQueue::JobQueue : jobs added"); + result.second == true, "xrpl::JobQueue::JobQueue : jobs added"); (void)result.second; } } @@ -67,12 +66,12 @@ JobQueue::addRefCountedJob( { XRPL_ASSERT( type != jtINVALID, - "ripple::JobQueue::addRefCountedJob : valid input job type"); + "xrpl::JobQueue::addRefCountedJob : valid input job type"); auto iter(m_jobData.find(type)); XRPL_ASSERT( iter != m_jobData.end(), - "ripple::JobQueue::addRefCountedJob : job type found in jobs"); + "xrpl::JobQueue::addRefCountedJob : job type found in jobs"); if (iter == m_jobData.end()) return false; @@ -85,7 +84,7 @@ JobQueue::addRefCountedJob( XRPL_ASSERT( (type >= jtCLIENT && type <= jtCLIENT_WEBSOCKET) || m_workers.getNumberOfThreads() > 0, - "ripple::JobQueue::addRefCountedJob : threads available or job " + "xrpl::JobQueue::addRefCountedJob : threads available or job " "requires no threads"); { @@ -97,10 +96,10 @@ JobQueue::addRefCountedJob( JobType const type(job.getType()); XRPL_ASSERT( type != jtINVALID, - "ripple::JobQueue::addRefCountedJob : has valid job type"); + "xrpl::JobQueue::addRefCountedJob : has valid job type"); XRPL_ASSERT( m_jobSet.find(job) != m_jobSet.end(), - "ripple::JobQueue::addRefCountedJob : job found"); + "xrpl::JobQueue::addRefCountedJob : job found"); perfLog_.jobQueue(type); JobTypeData& data(getJobTypeData(type)); @@ -162,7 +161,7 @@ JobQueue::makeLoadEvent(JobType t, std::string const& name) JobDataMap::iterator iter(m_jobData.find(t)); XRPL_ASSERT( iter != m_jobData.end(), - "ripple::JobQueue::makeLoadEvent : valid job type input"); + "xrpl::JobQueue::makeLoadEvent : valid job type input"); if (iter == m_jobData.end()) return {}; @@ -179,7 +178,7 @@ JobQueue::addLoadEvents(JobType t, int count, std::chrono::milliseconds elapsed) JobDataMap::iterator iter(m_jobData.find(t)); XRPL_ASSERT( iter != m_jobData.end(), - "ripple::JobQueue::addLoadEvents : valid job type input"); + "xrpl::JobQueue::addLoadEvents : valid job type input"); iter->second.load().addSamples(count, elapsed); } @@ -206,7 +205,7 @@ JobQueue::getJson(int c) for (auto& x : m_jobData) { XRPL_ASSERT( - x.first != jtINVALID, "ripple::JobQueue::getJson : valid job type"); + x.first != jtINVALID, "xrpl::JobQueue::getJson : valid job type"); if (x.first == jtGENERIC) continue; @@ -263,7 +262,7 @@ JobQueue::getJobTypeData(JobType type) JobDataMap::iterator c(m_jobData.find(type)); XRPL_ASSERT( c != m_jobData.end(), - "ripple::JobQueue::getJobTypeData : valid job type input"); + "xrpl::JobQueue::getJobTypeData : valid job type input"); // NIKB: This is ugly and I hate it. We must remove jtINVALID completely // and use something sane. @@ -290,11 +289,11 @@ JobQueue::stop() lock, [this] { return m_processCount == 0 && m_jobSet.empty(); }); XRPL_ASSERT( m_processCount == 0, - "ripple::JobQueue::stop : all processes completed"); + "xrpl::JobQueue::stop : all processes completed"); XRPL_ASSERT( - m_jobSet.empty(), "ripple::JobQueue::stop : all jobs completed"); + m_jobSet.empty(), "xrpl::JobQueue::stop : all jobs completed"); XRPL_ASSERT( - nSuspend_ == 0, "ripple::JobQueue::stop : no coros suspended"); + nSuspend_ == 0, "xrpl::JobQueue::stop : no coros suspended"); stopped_ = true; } } @@ -309,26 +308,26 @@ void JobQueue::getNextJob(Job& job) { XRPL_ASSERT( - !m_jobSet.empty(), "ripple::JobQueue::getNextJob : non-empty jobs"); + !m_jobSet.empty(), "xrpl::JobQueue::getNextJob : non-empty jobs"); std::set::const_iterator iter; for (iter = m_jobSet.begin(); iter != m_jobSet.end(); ++iter) { JobType const type = iter->getType(); XRPL_ASSERT( - type != jtINVALID, "ripple::JobQueue::getNextJob : valid job type"); + type != jtINVALID, "xrpl::JobQueue::getNextJob : valid job type"); JobTypeData& data(getJobTypeData(type)); XRPL_ASSERT( data.running <= getJobLimit(type), - "ripple::JobQueue::getNextJob : maximum jobs running"); + "xrpl::JobQueue::getNextJob : maximum jobs running"); // Run this job if we're running below the limit. if (data.running < getJobLimit(data.type())) { XRPL_ASSERT( data.waiting > 0, - "ripple::JobQueue::getNextJob : positive data waiting"); + "xrpl::JobQueue::getNextJob : positive data waiting"); --data.waiting; ++data.running; break; @@ -336,8 +335,7 @@ JobQueue::getNextJob(Job& job) } XRPL_ASSERT( - iter != m_jobSet.end(), - "ripple::JobQueue::getNextJob : found next job"); + iter != m_jobSet.end(), "xrpl::JobQueue::getNextJob : found next job"); job = *iter; m_jobSet.erase(iter); } @@ -346,8 +344,7 @@ void JobQueue::finishJob(JobType type) { XRPL_ASSERT( - type != jtINVALID, - "ripple::JobQueue::finishJob : valid input job type"); + type != jtINVALID, "xrpl::JobQueue::finishJob : valid input job type"); JobTypeData& data = getJobTypeData(type); @@ -356,7 +353,7 @@ JobQueue::finishJob(JobType type) { XRPL_ASSERT( data.running + data.waiting >= getJobLimit(type), - "ripple::JobQueue::finishJob : job limit"); + "xrpl::JobQueue::finishJob : job limit"); --data.deferred; m_workers.addTask(); @@ -423,10 +420,9 @@ JobQueue::getJobLimit(JobType type) { JobTypeInfo const& j(JobTypes::instance().get(type)); XRPL_ASSERT( - j.type() != jtINVALID, - "ripple::JobQueue::getJobLimit : valid job type"); + j.type() != jtINVALID, "xrpl::JobQueue::getJobLimit : valid job type"); return j.limit(); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/core/detail/LoadEvent.cpp b/src/xrpld/core/detail/LoadEvent.cpp index 878bb92d11..1a18782dfe 100644 --- a/src/xrpld/core/detail/LoadEvent.cpp +++ b/src/xrpld/core/detail/LoadEvent.cpp @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { LoadEvent::LoadEvent( LoadMonitor& monitor, @@ -64,7 +64,7 @@ LoadEvent::start() void LoadEvent::stop() { - XRPL_ASSERT(running_, "ripple::LoadEvent::stop : is running"); + XRPL_ASSERT(running_, "xrpl::LoadEvent::stop : is running"); auto const now = std::chrono::steady_clock::now(); @@ -75,4 +75,4 @@ LoadEvent::stop() monitor_.addLoadSample(*this); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/core/detail/LoadMonitor.cpp b/src/xrpld/core/detail/LoadMonitor.cpp index 5a03ab607b..11eba76aa1 100644 --- a/src/xrpld/core/detail/LoadMonitor.cpp +++ b/src/xrpld/core/detail/LoadMonitor.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { /* @@ -183,4 +183,4 @@ LoadMonitor::getStats() return stats; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/core/detail/SociDB.cpp b/src/xrpld/core/detail/SociDB.cpp index 65294acc4c..a90e59beed 100644 --- a/src/xrpld/core/detail/SociDB.cpp +++ b/src/xrpld/core/detail/SociDB.cpp @@ -16,7 +16,7 @@ #include -namespace ripple { +namespace xrpl { static auto checkpointPageCount = 1000; @@ -206,7 +206,7 @@ public: { if (auto p = session_.lock()) { - return {ripple::getConnection(*p), p}; + return {xrpl::getConnection(*p), p}; } return {nullptr, std::shared_ptr{}}; } @@ -324,7 +324,7 @@ makeCheckpointer( id, std::move(session), queue, logs); } -} // namespace ripple +} // namespace xrpl #if defined(__clang__) #pragma clang diagnostic pop diff --git a/src/xrpld/core/detail/Workers.cpp b/src/xrpld/core/detail/Workers.cpp index 29328533ae..0358c7dd4d 100644 --- a/src/xrpld/core/detail/Workers.cpp +++ b/src/xrpld/core/detail/Workers.cpp @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { Workers::Workers( Callback& callback, @@ -103,7 +103,7 @@ Workers::stop() XRPL_ASSERT( numberOfCurrentlyRunningTasks() == 0, - "ripple::Workers::stop : zero running tasks"); + "xrpl::Workers::stop : zero running tasks"); } void @@ -261,4 +261,4 @@ Workers::Worker::run() } while (!shouldExit); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/core/detail/Workers.h b/src/xrpld/core/detail/Workers.h index f6fe9226fc..0a1a2fe270 100644 --- a/src/xrpld/core/detail/Workers.h +++ b/src/xrpld/core/detail/Workers.h @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace perf { class PerfLog; @@ -215,6 +215,6 @@ private: m_paused; // holds just paused workers }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/core/detail/semaphore.h b/src/xrpld/core/detail/semaphore.h index 8b784e3685..4249b3b860 100644 --- a/src/xrpld/core/detail/semaphore.h +++ b/src/xrpld/core/detail/semaphore.h @@ -1,6 +1,6 @@ /** * - * TODO: Remove ripple::basic_semaphore (and this file) and use + * TODO: Remove xrpl::basic_semaphore (and this file) and use * std::counting_semaphore. * * Background: @@ -32,7 +32,7 @@ #include #include -namespace ripple { +namespace xrpl { template class basic_semaphore @@ -87,6 +87,6 @@ public: using semaphore = basic_semaphore; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/overlay/Cluster.h b/src/xrpld/overlay/Cluster.h index ff0a1a97f5..30627f90ae 100644 --- a/src/xrpld/overlay/Cluster.h +++ b/src/xrpld/overlay/Cluster.h @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { class Cluster { @@ -94,6 +94,6 @@ public: load(Section const& nodes); }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/overlay/ClusterNode.h b/src/xrpld/overlay/ClusterNode.h index a21f7a3870..03c294c736 100644 --- a/src/xrpld/overlay/ClusterNode.h +++ b/src/xrpld/overlay/ClusterNode.h @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { class ClusterNode { @@ -54,6 +54,6 @@ private: NetClock::time_point mReportTime = {}; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/overlay/Compression.h b/src/xrpld/overlay/Compression.h index b13b009dcf..8f9b1e2a14 100644 --- a/src/xrpld/overlay/Compression.h +++ b/src/xrpld/overlay/Compression.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace compression { @@ -37,7 +37,7 @@ decompress( try { if (algorithm == Algorithm::LZ4) - return ripple::compression_algorithms::lz4Decompress( + return xrpl::compression_algorithms::lz4Decompress( in, inSize, decompressed, decompressedSize); else { @@ -46,7 +46,7 @@ decompress( << "decompress: invalid compression algorithm " << static_cast(algorithm); UNREACHABLE( - "ripple::compression::decompress : invalid compression " + "xrpl::compression::decompress : invalid compression " "algorithm"); // LCOV_EXCL_STOP } @@ -77,7 +77,7 @@ compress( try { if (algorithm == Algorithm::LZ4) - return ripple::compression_algorithms::lz4Compress( + return xrpl::compression_algorithms::lz4Compress( in, inSize, std::forward(bf)); else { @@ -85,7 +85,7 @@ compress( JLOG(debugLog().warn()) << "compress: invalid compression algorithm" << static_cast(algorithm); UNREACHABLE( - "ripple::compression::compress : invalid compression " + "xrpl::compression::compress : invalid compression " "algorithm"); // LCOV_EXCL_STOP } @@ -97,6 +97,6 @@ compress( } } // namespace compression -} // namespace ripple +} // namespace xrpl #endif // XRPL_COMPRESSION_H_INCLUDED diff --git a/src/xrpld/overlay/Message.h b/src/xrpld/overlay/Message.h index afa15657f0..f2b021840d 100644 --- a/src/xrpld/overlay/Message.h +++ b/src/xrpld/overlay/Message.h @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { constexpr std::size_t maximiumMessageSize = megabytes(64); @@ -117,6 +117,6 @@ private: getType(std::uint8_t const* in) const; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/overlay/Overlay.h b/src/xrpld/overlay/Overlay.h index 6eaf14b8df..c30d0f5205 100644 --- a/src/xrpld/overlay/Overlay.h +++ b/src/xrpld/overlay/Overlay.h @@ -23,7 +23,7 @@ class context; } // namespace asio } // namespace boost -namespace ripple { +namespace xrpl { /** Manages the set of connected peers. */ class Overlay : public beast::PropertyStream::Source @@ -215,6 +215,6 @@ public: txMetrics() const = 0; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/overlay/Peer.h b/src/xrpld/overlay/Peer.h index abe18d48dc..35feb05271 100644 --- a/src/xrpld/overlay/Peer.h +++ b/src/xrpld/overlay/Peer.h @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace Resource { class Charge; @@ -119,6 +119,6 @@ public: txReduceRelayEnabled() const = 0; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/overlay/PeerReservationTable.h b/src/xrpld/overlay/PeerReservationTable.h index 1cabbb56f9..9ddf79aca9 100644 --- a/src/xrpld/overlay/PeerReservationTable.h +++ b/src/xrpld/overlay/PeerReservationTable.h @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { class DatabaseCon; @@ -97,6 +97,6 @@ private: std::unordered_set, KeyEqual> table_; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/overlay/PeerSet.h b/src/xrpld/overlay/PeerSet.h index f90d1670f4..850ba21c53 100644 --- a/src/xrpld/overlay/PeerSet.h +++ b/src/xrpld/overlay/PeerSet.h @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Supports data retrieval by managing a set of peers. @@ -73,6 +73,6 @@ make_PeerSetBuilder(Application& app); std::unique_ptr make_DummyPeerSet(Application& app); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/overlay/ReduceRelayCommon.h b/src/xrpld/overlay/ReduceRelayCommon.h index 207a279cd6..990e4b51d2 100644 --- a/src/xrpld/overlay/ReduceRelayCommon.h +++ b/src/xrpld/overlay/ReduceRelayCommon.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { // Blog post explaining the rationale behind reduction of flooding gossip // protocol: @@ -41,6 +41,6 @@ static constexpr std::size_t MAX_TX_QUEUE_SIZE = 10000; } // namespace reduce_relay -} // namespace ripple +} // namespace xrpl #endif // XRPL_REDUCERELAYCOMMON_H_INCLUDED diff --git a/src/xrpld/overlay/Slot.h b/src/xrpld/overlay/Slot.h index 388323d3c0..9e717fef9c 100644 --- a/src/xrpld/overlay/Slot.h +++ b/src/xrpld/overlay/Slot.h @@ -20,7 +20,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace reduce_relay { @@ -374,7 +374,7 @@ Slot::update( XRPL_ASSERT( peers_.size() >= maxSelectedPeers_, - "ripple::reduce_relay::Slot::update : minimum peers"); + "xrpl::reduce_relay::Slot::update : minimum peers"); // squelch peers which are not selected and // not already squelched @@ -417,7 +417,7 @@ Slot::getSquelchDuration(std::size_t npeers) JLOG(journal_.warn()) << "getSquelchDuration: unexpected squelch duration " << npeers; } - return seconds{ripple::rand_int(MIN_UNSQUELCH_EXPIRE / 1s, m / 1s)}; + return seconds{xrpl::rand_int(MIN_UNSQUELCH_EXPIRE / 1s, m / 1s)}; } template @@ -821,6 +821,6 @@ Slots::deleteIdlePeers() } // namespace reduce_relay -} // namespace ripple +} // namespace xrpl #endif // XRPL_OVERLAY_SLOT_H_INCLUDED diff --git a/src/xrpld/overlay/Squelch.h b/src/xrpld/overlay/Squelch.h index d935087fbc..486cb0073c 100644 --- a/src/xrpld/overlay/Squelch.h +++ b/src/xrpld/overlay/Squelch.h @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace reduce_relay { @@ -105,6 +105,6 @@ Squelch::expireSquelch(PublicKey const& validator) } // namespace reduce_relay -} // namespace ripple +} // namespace xrpl #endif // XRPL_SQUELCH_H diff --git a/src/xrpld/overlay/detail/Cluster.cpp b/src/xrpld/overlay/detail/Cluster.cpp index f4505116b1..606699b841 100644 --- a/src/xrpld/overlay/detail/Cluster.cpp +++ b/src/xrpld/overlay/detail/Cluster.cpp @@ -9,7 +9,7 @@ #include -namespace ripple { +namespace xrpl { Cluster::Cluster(beast::Journal j) : j_(j) { @@ -114,4 +114,4 @@ Cluster::load(Section const& nodes) return true; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/overlay/detail/ConnectAttempt.cpp b/src/xrpld/overlay/detail/ConnectAttempt.cpp index 57565b5c19..bd18d96442 100644 --- a/src/xrpld/overlay/detail/ConnectAttempt.cpp +++ b/src/xrpld/overlay/detail/ConnectAttempt.cpp @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { ConnectAttempt::ConnectAttempt( Application& app, @@ -92,7 +92,7 @@ ConnectAttempt::shutdown() { XRPL_ASSERT( strand_.running_in_this_thread(), - "ripple::ConnectAttempt::shutdown: strand in this thread"); + "xrpl::ConnectAttempt::shutdown: strand in this thread"); if (!socket_.is_open()) return; @@ -108,7 +108,7 @@ ConnectAttempt::tryAsyncShutdown() { XRPL_ASSERT( strand_.running_in_this_thread(), - "ripple::ConnectAttempt::tryAsyncShutdown : strand in this thread"); + "xrpl::ConnectAttempt::tryAsyncShutdown : strand in this thread"); if (!shutdown_ || currentStep_ == ConnectionStep::ShutdownStarted) return; @@ -165,7 +165,7 @@ ConnectAttempt::close() { XRPL_ASSERT( strand_.running_in_this_thread(), - "ripple::ConnectAttempt::close : strand in this thread"); + "xrpl::ConnectAttempt::close : strand in this thread"); if (!socket_.is_open()) return; @@ -619,4 +619,4 @@ ConnectAttempt::processResponse() } } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/overlay/detail/ConnectAttempt.h b/src/xrpld/overlay/detail/ConnectAttempt.h index 6f0a151383..69053f3bc1 100644 --- a/src/xrpld/overlay/detail/ConnectAttempt.h +++ b/src/xrpld/overlay/detail/ConnectAttempt.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { /** * @class ConnectAttempt @@ -273,6 +273,6 @@ private: } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/overlay/detail/Handshake.cpp b/src/xrpld/overlay/detail/Handshake.cpp index 469dab6d9a..b4f4f368f4 100644 --- a/src/xrpld/overlay/detail/Handshake.cpp +++ b/src/xrpld/overlay/detail/Handshake.cpp @@ -14,7 +14,7 @@ // VFALCO Shouldn't we have to include the OpenSSL // headers or something for SSL_get_finished? -namespace ripple { +namespace xrpl { std::optional getFeatureValue( @@ -158,7 +158,7 @@ makeSharedValue(stream_type& ssl, beast::Journal journal) void buildHandshake( boost::beast::http::fields& h, - ripple::uint256 const& sharedValue, + xrpl::uint256 const& sharedValue, std::optional networkID, beast::IP::Address public_ip, beast::IP::Address remote_ip, @@ -207,7 +207,7 @@ buildHandshake( PublicKey verifyHandshake( boost::beast::http::fields const& headers, - ripple::uint256 const& sharedValue, + xrpl::uint256 const& sharedValue, std::optional networkID, beast::IP::Address public_ip, beast::IP::Address remote, @@ -402,4 +402,4 @@ makeResponse( return resp; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/overlay/detail/Handshake.h b/src/xrpld/overlay/detail/Handshake.h index 52777d2bd8..95eb18394d 100644 --- a/src/xrpld/overlay/detail/Handshake.h +++ b/src/xrpld/overlay/detail/Handshake.h @@ -17,7 +17,7 @@ #include #include -namespace ripple { +namespace xrpl { using socket_type = boost::beast::tcp_stream; using stream_type = boost::beast::ssl_stream; @@ -233,6 +233,6 @@ makeFeaturesResponseHeader( bool txReduceRelayEnabled, bool vpReduceRelayEnabled); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/overlay/detail/Message.cpp b/src/xrpld/overlay/detail/Message.cpp index b4cd4262aa..eb7b88894a 100644 --- a/src/xrpld/overlay/detail/Message.cpp +++ b/src/xrpld/overlay/detail/Message.cpp @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { Message::Message( ::google::protobuf::Message const& message, @@ -12,12 +12,12 @@ Message::Message( : category_(TrafficCount::categorize(message, type, false)) , validatorKey_(validator) { - using namespace ripple::compression; + using namespace xrpl::compression; auto const messageBytes = messageSize(message); XRPL_ASSERT( - messageBytes, "ripple::Message::Message : non-empty message input"); + messageBytes, "xrpl::Message::Message : non-empty message input"); buffer_.resize(headerBytes + messageBytes); @@ -28,7 +28,7 @@ Message::Message( XRPL_ASSERT( getBufferSize() == totalSize(message), - "ripple::Message::Message : message size matches the buffer"); + "xrpl::Message::Message : message size matches the buffer"); } // static @@ -52,7 +52,7 @@ Message::totalSize(::google::protobuf::Message const& message) void Message::compress() { - using namespace ripple::compression; + using namespace xrpl::compression; auto const messageBytes = buffer_.size() - headerBytes; auto type = getType(buffer_.data()); @@ -92,7 +92,7 @@ Message::compress() { auto payload = static_cast(buffer_.data() + headerBytes); - auto compressedSize = ripple::compression::compress( + auto compressedSize = xrpl::compression::compress( payload, messageBytes, [&](std::size_t inSize) { // size of required compressed buffer @@ -208,4 +208,4 @@ Message::getType(std::uint8_t const* in) const return type; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/overlay/detail/OverlayImpl.cpp b/src/xrpld/overlay/detail/OverlayImpl.cpp index d2a994fa8e..e5f77021d7 100644 --- a/src/xrpld/overlay/detail/OverlayImpl.cpp +++ b/src/xrpld/overlay/detail/OverlayImpl.cpp @@ -24,7 +24,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace CrawlOptions { enum { @@ -285,7 +285,7 @@ OverlayImpl::onHandoff( auto const result = m_peers.emplace(peer->slot(), peer); XRPL_ASSERT( result.second, - "ripple::OverlayImpl::onHandoff : peer is inserted"); + "xrpl::OverlayImpl::onHandoff : peer is inserted"); (void)result.second; } list_.emplace(peer.get(), peer); @@ -378,7 +378,7 @@ OverlayImpl::makeErrorResponse( void OverlayImpl::connect(beast::IP::Endpoint const& remote_endpoint) { - XRPL_ASSERT(work_, "ripple::OverlayImpl::connect : work is set"); + XRPL_ASSERT(work_, "xrpl::OverlayImpl::connect : work is set"); auto usage = resourceManager().newOutboundEndpoint(remote_endpoint); if (usage.disconnect(journal_)) @@ -425,8 +425,7 @@ OverlayImpl::add_active(std::shared_ptr const& peer) { auto const result = m_peers.emplace(peer->slot(), peer); XRPL_ASSERT( - result.second, - "ripple::OverlayImpl::add_active : peer is inserted"); + result.second, "xrpl::OverlayImpl::add_active : peer is inserted"); (void)result.second; } @@ -437,7 +436,7 @@ OverlayImpl::add_active(std::shared_ptr const& peer) std::make_tuple(peer)); XRPL_ASSERT( result.second, - "ripple::OverlayImpl::add_active : peer ID is inserted"); + "xrpl::OverlayImpl::add_active : peer ID is inserted"); (void)result.second; } @@ -457,7 +456,7 @@ OverlayImpl::remove(std::shared_ptr const& slot) std::lock_guard lock(mutex_); auto const iter = m_peers.find(slot); XRPL_ASSERT( - iter != m_peers.end(), "ripple::OverlayImpl::remove : valid input"); + iter != m_peers.end(), "xrpl::OverlayImpl::remove : valid input"); m_peers.erase(iter); } @@ -598,15 +597,14 @@ OverlayImpl::activate(std::shared_ptr const& peer) std::make_tuple(peer->id()), std::make_tuple(peer))); XRPL_ASSERT( - result.second, - "ripple::OverlayImpl::activate : peer ID is inserted"); + result.second, "xrpl::OverlayImpl::activate : peer ID is inserted"); (void)result.second; } JLOG(journal.debug()) << "activated"; // We just accepted this peer so we have non-zero active peers - XRPL_ASSERT(size(), "ripple::OverlayImpl::activate : nonzero peers"); + XRPL_ASSERT(size(), "xrpl::OverlayImpl::activate : nonzero peers"); } void @@ -647,7 +645,7 @@ OverlayImpl::onManifests( mo = deserializeManifest(serialized); XRPL_ASSERT( mo, - "ripple::OverlayImpl::onManifests : manifest " + "xrpl::OverlayImpl::onManifests : manifest " "deserialization succeeded"); app_.getOPs().pubManifest(*mo); @@ -1603,4 +1601,4 @@ make_Overlay( collector); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/overlay/detail/OverlayImpl.h b/src/xrpld/overlay/detail/OverlayImpl.h index 765d2f38eb..732ddccf69 100644 --- a/src/xrpld/overlay/detail/OverlayImpl.h +++ b/src/xrpld/overlay/detail/OverlayImpl.h @@ -35,7 +35,7 @@ #include #include -namespace ripple { +namespace xrpl { class PeerImp; class BasicConfig; @@ -595,7 +595,7 @@ private: std::lock_guard lock(m_statsMutex); XRPL_ASSERT( counts.size() == m_stats.trafficGauges.size(), - "ripple::OverlayImpl::collect_metrics : counts size do match"); + "xrpl::OverlayImpl::collect_metrics : counts size do match"); for (auto const& [key, value] : counts) { @@ -607,7 +607,7 @@ private: XRPL_ASSERT( gauge.name == value.name, - "ripple::OverlayImpl::collect_metrics : gauge and counter " + "xrpl::OverlayImpl::collect_metrics : gauge and counter " "match"); gauge.bytesIn = value.bytesIn; @@ -620,6 +620,6 @@ private: } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/overlay/detail/PeerImp.cpp b/src/xrpld/overlay/detail/PeerImp.cpp index b85536c6f1..52c4a874c8 100644 --- a/src/xrpld/overlay/detail/PeerImp.cpp +++ b/src/xrpld/overlay/detail/PeerImp.cpp @@ -33,7 +33,7 @@ using namespace std::chrono_literals; -namespace ripple { +namespace xrpl { namespace { /** The threshold above which we treat a peer connection as high latency */ @@ -562,7 +562,7 @@ PeerImp::fail(std::string const& name, error_code ec) { XRPL_ASSERT( strand_.running_in_this_thread(), - "ripple::PeerImp::fail : strand in this thread"); + "xrpl::PeerImp::fail : strand in this thread"); if (!socket_.is_open()) return; @@ -601,7 +601,7 @@ PeerImp::tryAsyncShutdown() { XRPL_ASSERT( strand_.running_in_this_thread(), - "ripple::PeerImp::tryAsyncShutdown : strand in this thread"); + "xrpl::PeerImp::tryAsyncShutdown : strand in this thread"); if (!shutdown_ || shutdownStarted_) return; @@ -625,7 +625,7 @@ PeerImp::shutdown() { XRPL_ASSERT( strand_.running_in_this_thread(), - "ripple::PeerImp::shutdown: strand in this thread"); + "xrpl::PeerImp::shutdown: strand in this thread"); if (!socket_.is_open() || shutdown_) return; @@ -668,7 +668,7 @@ PeerImp::close() { XRPL_ASSERT( strand_.running_in_this_thread(), - "ripple::PeerImp::close : strand in this thread"); + "xrpl::PeerImp::close : strand in this thread"); if (!socket_.is_open()) return; @@ -723,7 +723,7 @@ PeerImp::onTimer(error_code const& ec) { XRPL_ASSERT( strand_.running_in_this_thread(), - "ripple::PeerImp::onTimer : strand in this thread"); + "xrpl::PeerImp::onTimer : strand in this thread"); if (!socket_.is_open()) return; @@ -804,7 +804,7 @@ PeerImp::doAccept() { XRPL_ASSERT( read_buffer_.size() == 0, - "ripple::PeerImp::doAccept : empty read buffer"); + "xrpl::PeerImp::doAccept : empty read buffer"); JLOG(journal_.debug()) << "doAccept"; @@ -933,7 +933,7 @@ PeerImp::onReadMessage(error_code ec, std::size_t bytes_transferred) { XRPL_ASSERT( strand_.running_in_this_thread(), - "ripple::PeerImp::onReadMessage : strand in this thread"); + "xrpl::PeerImp::onReadMessage : strand in this thread"); readPending_ = false; @@ -1005,7 +1005,7 @@ PeerImp::onReadMessage(error_code ec, std::size_t bytes_transferred) readPending_ = true; XRPL_ASSERT( - !shutdownStarted_, "ripple::PeerImp::onReadMessage : shutdown started"); + !shutdownStarted_, "xrpl::PeerImp::onReadMessage : shutdown started"); // Timeout on writes only stream_.async_read_some( @@ -1024,7 +1024,7 @@ PeerImp::onWriteMessage(error_code ec, std::size_t bytes_transferred) { XRPL_ASSERT( strand_.running_in_this_thread(), - "ripple::PeerImp::onWriteMessage : strand in this thread"); + "xrpl::PeerImp::onWriteMessage : strand in this thread"); writePending_ = false; @@ -1051,7 +1051,7 @@ PeerImp::onWriteMessage(error_code ec, std::size_t bytes_transferred) XRPL_ASSERT( !send_queue_.empty(), - "ripple::PeerImp::onWriteMessage : non-empty send buffer"); + "xrpl::PeerImp::onWriteMessage : non-empty send buffer"); send_queue_.pop(); if (shutdown_) @@ -1062,7 +1062,7 @@ PeerImp::onWriteMessage(error_code ec, std::size_t bytes_transferred) writePending_ = true; XRPL_ASSERT( !shutdownStarted_, - "ripple::PeerImp::onWriteMessage : shutdown started"); + "xrpl::PeerImp::onWriteMessage : shutdown started"); // Timeout on writes only return boost::asio::async_write( @@ -1343,7 +1343,7 @@ PeerImp::handleTransaction( { XRPL_ASSERT( eraseTxQueue != batch, - ("ripple::PeerImp::handleTransaction : valid inputs")); + ("xrpl::PeerImp::handleTransaction : valid inputs")); if (tracking_.load() == Tracking::diverged) return; @@ -2171,7 +2171,7 @@ PeerImp::onValidatorListMessage( XRPL_ASSERT( applyResult.publisherKey, - "ripple::PeerImp::onValidatorListMessage : publisher key is " + "xrpl::PeerImp::onValidatorListMessage : publisher key is " "set"); auto const& pubKey = *applyResult.publisherKey; #ifndef NDEBUG @@ -2180,7 +2180,7 @@ PeerImp::onValidatorListMessage( { XRPL_ASSERT( iter->second < applyResult.sequence, - "ripple::PeerImp::onValidatorListMessage : lower sequence"); + "xrpl::PeerImp::onValidatorListMessage : lower sequence"); } #endif publisherListSequences_[pubKey] = applyResult.sequence; @@ -2193,12 +2193,12 @@ PeerImp::onValidatorListMessage( std::lock_guard sl(recentLock_); XRPL_ASSERT( applyResult.sequence && applyResult.publisherKey, - "ripple::PeerImp::onValidatorListMessage : nonzero sequence " + "xrpl::PeerImp::onValidatorListMessage : nonzero sequence " "and set publisher key"); XRPL_ASSERT( publisherListSequences_[*applyResult.publisherKey] <= applyResult.sequence, - "ripple::PeerImp::onValidatorListMessage : maximum sequence"); + "xrpl::PeerImp::onValidatorListMessage : maximum sequence"); } #endif // !NDEBUG @@ -2211,7 +2211,7 @@ PeerImp::onValidatorListMessage( // LCOV_EXCL_START default: UNREACHABLE( - "ripple::PeerImp::onValidatorListMessage : invalid best list " + "xrpl::PeerImp::onValidatorListMessage : invalid best list " "disposition"); // LCOV_EXCL_STOP } @@ -2257,7 +2257,7 @@ PeerImp::onValidatorListMessage( // LCOV_EXCL_START default: UNREACHABLE( - "ripple::PeerImp::onValidatorListMessage : invalid worst list " + "xrpl::PeerImp::onValidatorListMessage : invalid worst list " "disposition"); // LCOV_EXCL_STOP } @@ -2312,7 +2312,7 @@ PeerImp::onValidatorListMessage( // LCOV_EXCL_START default: UNREACHABLE( - "ripple::PeerImp::onValidatorListMessage : invalid list " + "xrpl::PeerImp::onValidatorListMessage : invalid list " "disposition"); // LCOV_EXCL_STOP } @@ -2956,7 +2956,7 @@ PeerImp::checkTransaction( auto tx = std::make_shared(stx, reason, app_); XRPL_ASSERT( tx->getStatus() == NEW, - "ripple::PeerImp::checkTransaction Transaction created " + "xrpl::PeerImp::checkTransaction Transaction created " "correctly"); if (tx->getStatus() == NEW) { @@ -3059,7 +3059,7 @@ PeerImp::checkPropose( JLOG(p_journal_.trace()) << "Checking " << (isTrusted ? "trusted" : "UNTRUSTED") << " proposal"; - XRPL_ASSERT(packet, "ripple::PeerImp::checkPropose : non-null packet"); + XRPL_ASSERT(packet, "xrpl::PeerImp::checkPropose : non-null packet"); if (!cluster() && !peerPos.checkSign()) { @@ -3625,4 +3625,4 @@ PeerImp::Metrics::total_bytes() const return totalBytes_; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/overlay/detail/PeerImp.h b/src/xrpld/overlay/detail/PeerImp.h index 78f3e46509..565c3f9d0f 100644 --- a/src/xrpld/overlay/detail/PeerImp.h +++ b/src/xrpld/overlay/detail/PeerImp.h @@ -26,7 +26,7 @@ #include #include -namespace ripple { +namespace xrpl { struct ValidatorBlobInfo; class SHAMap; @@ -202,7 +202,7 @@ private: { XRPL_ASSERT( f >= fee, - "ripple::PeerImp::ChargeWithContext::update : fee increases"); + "xrpl::PeerImp::ChargeWithContext::update : fee increases"); fee = f; if (!context.empty()) { @@ -903,6 +903,6 @@ PeerImp::sendEndpoints(FwdIt first, FwdIt last) send(std::make_shared(tm, protocol::mtENDPOINTS)); } -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/overlay/detail/PeerReservationTable.cpp b/src/xrpld/overlay/detail/PeerReservationTable.cpp index 27cf749ab1..1e3452ca17 100644 --- a/src/xrpld/overlay/detail/PeerReservationTable.cpp +++ b/src/xrpld/overlay/detail/PeerReservationTable.cpp @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { auto PeerReservation::toJson() const -> Json::Value @@ -111,4 +111,4 @@ PeerReservationTable::erase(PublicKey const& nodeId) return previous; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/overlay/detail/PeerSet.cpp b/src/xrpld/overlay/detail/PeerSet.cpp index ecf1164b2c..7dac13f275 100644 --- a/src/xrpld/overlay/detail/PeerSet.cpp +++ b/src/xrpld/overlay/detail/PeerSet.cpp @@ -3,7 +3,7 @@ #include #include -namespace ripple { +namespace xrpl { class PeerSetImpl : public PeerSet { @@ -28,7 +28,7 @@ public: private: // Used in this class for access to boost::asio::io_context and - // ripple::Overlay. + // xrpl::Overlay. Application& app_; beast::Journal journal_; @@ -170,4 +170,4 @@ make_DummyPeerSet(Application& app) return std::make_unique(app); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/overlay/detail/ProtocolMessage.h b/src/xrpld/overlay/detail/ProtocolMessage.h index 0eaa4ca720..1a35deb6f0 100644 --- a/src/xrpld/overlay/detail/ProtocolMessage.h +++ b/src/xrpld/overlay/detail/ProtocolMessage.h @@ -16,7 +16,7 @@ #include #include -namespace ripple { +namespace xrpl { inline protocol::MessageType protocolMessageType(protocol::TMGetLedger const&) @@ -152,13 +152,13 @@ parseMessageHeader( BufferSequence const& bufs, std::size_t size) { - using namespace ripple::compression; + using namespace xrpl::compression; MessageHeader hdr; auto iter = buffersBegin(bufs); XRPL_ASSERT( iter != buffersEnd(bufs), - "ripple::detail::parseMessageHeader : non-empty buffer"); + "xrpl::detail::parseMessageHeader : non-empty buffer"); // Check valid header compressed message: // - 4 bits are the compression algorithm, 1st bit is always set to 1 @@ -256,7 +256,7 @@ parseMessageContent(MessageHeader const& header, Buffers const& buffers) std::vector payload; payload.resize(header.uncompressed_size); - auto const payloadSize = ripple::compression::decompress( + auto const payloadSize = xrpl::compression::decompress( stream, header.payload_wire_size, payload.data(), @@ -285,7 +285,7 @@ invoke(MessageHeader const& header, Buffers const& buffers, Handler& handler) if (!m) return false; - using namespace ripple::compression; + using namespace xrpl::compression; handler.onMessageBegin( header.message_type, m, @@ -465,6 +465,6 @@ invokeProtocolMessage( return result; } -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/overlay/detail/ProtocolVersion.cpp b/src/xrpld/overlay/detail/ProtocolVersion.cpp index 4a5c3d10b3..a99e38e8ea 100644 --- a/src/xrpld/overlay/detail/ProtocolVersion.cpp +++ b/src/xrpld/overlay/detail/ProtocolVersion.cpp @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { /** The list of protocol versions we speak and we prefer to use. @@ -164,4 +164,4 @@ isProtocolSupported(ProtocolVersion const& v) v); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/overlay/detail/ProtocolVersion.h b/src/xrpld/overlay/detail/ProtocolVersion.h index 02b8720563..ff49c89f1a 100644 --- a/src/xrpld/overlay/detail/ProtocolVersion.h +++ b/src/xrpld/overlay/detail/ProtocolVersion.h @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Represents a particular version of the peer-to-peer protocol. @@ -58,6 +58,6 @@ supportedProtocolVersions(); bool isProtocolSupported(ProtocolVersion const& v); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/overlay/detail/TrafficCount.cpp b/src/xrpld/overlay/detail/TrafficCount.cpp index 03b83d29de..6fb397ea71 100644 --- a/src/xrpld/overlay/detail/TrafficCount.cpp +++ b/src/xrpld/overlay/detail/TrafficCount.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { std::unordered_map const type_lookup = { @@ -127,4 +127,4 @@ TrafficCount::categorize( return TrafficCount::category::unknown; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/overlay/detail/TrafficCount.h b/src/xrpld/overlay/detail/TrafficCount.h index c6d10ee286..7d005c22d0 100644 --- a/src/xrpld/overlay/detail/TrafficCount.h +++ b/src/xrpld/overlay/detail/TrafficCount.h @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { /** TrafficCount is used to count ingress and egress wire bytes and number of @@ -196,7 +196,7 @@ public: { XRPL_ASSERT( cat <= category::unknown, - "ripple::TrafficCount::addCount : valid category input"); + "xrpl::TrafficCount::addCount : valid category input"); auto it = counts_.find(cat); @@ -355,5 +355,5 @@ protected: }; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/overlay/detail/Tuning.h b/src/xrpld/overlay/detail/Tuning.h index c78ac20572..c18d17c359 100644 --- a/src/xrpld/overlay/detail/Tuning.h +++ b/src/xrpld/overlay/detail/Tuning.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace Tuning { @@ -47,6 +47,6 @@ std::size_t constexpr readBufferBytes = 16384; } // namespace Tuning -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/overlay/detail/TxMetrics.cpp b/src/xrpld/overlay/detail/TxMetrics.cpp index 088137c58d..10f14183a3 100644 --- a/src/xrpld/overlay/detail/TxMetrics.cpp +++ b/src/xrpld/overlay/detail/TxMetrics.cpp @@ -4,7 +4,7 @@ #include -namespace ripple { +namespace xrpl { namespace metrics { @@ -130,4 +130,4 @@ TxMetrics::json() const } // namespace metrics -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/overlay/detail/TxMetrics.h b/src/xrpld/overlay/detail/TxMetrics.h index 2db755466c..3c34aaf9f9 100644 --- a/src/xrpld/overlay/detail/TxMetrics.h +++ b/src/xrpld/overlay/detail/TxMetrics.h @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace metrics { @@ -117,6 +117,6 @@ struct TxMetrics } // namespace metrics -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/overlay/detail/ZeroCopyStream.h b/src/xrpld/overlay/detail/ZeroCopyStream.h index 2f5279a6fe..2373ea16d0 100644 --- a/src/xrpld/overlay/detail/ZeroCopyStream.h +++ b/src/xrpld/overlay/detail/ZeroCopyStream.h @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { /** Implements ZeroCopyInputStream around a buffer sequence. @tparam Buffers A type meeting the requirements of ConstBufferSequence. @@ -188,13 +188,13 @@ void ZeroCopyOutputStream::BackUp(int count) { XRPL_ASSERT( - count <= commit_, "ripple::ZeroCopyOutputStream::BackUp : valid input"); + count <= commit_, "xrpl::ZeroCopyOutputStream::BackUp : valid input"); auto const n = commit_ - count; streambuf_.commit(n); count_ += n; commit_ = 0; } -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/overlay/make_Overlay.h b/src/xrpld/overlay/make_Overlay.h index 9bf867fba6..6c37c1c825 100644 --- a/src/xrpld/overlay/make_Overlay.h +++ b/src/xrpld/overlay/make_Overlay.h @@ -8,7 +8,7 @@ #include -namespace ripple { +namespace xrpl { Overlay::Setup setup_Overlay(BasicConfig const& config); @@ -25,6 +25,6 @@ make_Overlay( BasicConfig const& config, beast::insight::Collector::ptr const& collector); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/overlay/predicates.h b/src/xrpld/overlay/predicates.h index 36d0cf28b1..6683d8007f 100644 --- a/src/xrpld/overlay/predicates.h +++ b/src/xrpld/overlay/predicates.h @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { /** Sends a message to all peers */ struct send_always @@ -156,6 +156,6 @@ struct peer_in_set } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/peerfinder/PeerfinderManager.h b/src/xrpld/peerfinder/PeerfinderManager.h index bde9645efd..7a25edcce5 100644 --- a/src/xrpld/peerfinder/PeerfinderManager.h +++ b/src/xrpld/peerfinder/PeerfinderManager.h @@ -11,7 +11,7 @@ #include -namespace ripple { +namespace xrpl { namespace PeerFinder { using clock_type = beast::abstract_clock; @@ -86,7 +86,7 @@ struct Config */ static Config makeConfig( - ripple::Config const& config, + xrpl::Config const& config, std::uint16_t port, bool validationPublicKey, int ipLimit); @@ -303,6 +303,6 @@ public: }; } // namespace PeerFinder -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/peerfinder/Slot.h b/src/xrpld/peerfinder/Slot.h index 6a8515fc29..1d5d58884a 100644 --- a/src/xrpld/peerfinder/Slot.h +++ b/src/xrpld/peerfinder/Slot.h @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { namespace PeerFinder { /** Properties and state associated with a peer to peer overlay connection. */ @@ -60,6 +60,6 @@ public: }; } // namespace PeerFinder -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/peerfinder/detail/Bootcache.cpp b/src/xrpld/peerfinder/detail/Bootcache.cpp index 3d11ee74ee..4505c02872 100644 --- a/src/xrpld/peerfinder/detail/Bootcache.cpp +++ b/src/xrpld/peerfinder/detail/Bootcache.cpp @@ -4,7 +4,7 @@ #include -namespace ripple { +namespace xrpl { namespace PeerFinder { Bootcache::Bootcache(Store& store, clock_type& clock, beast::Journal journal) @@ -270,4 +270,4 @@ Bootcache::flagForUpdate() } } // namespace PeerFinder -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/peerfinder/detail/Bootcache.h b/src/xrpld/peerfinder/detail/Bootcache.h index b0646a21d5..42867907c1 100644 --- a/src/xrpld/peerfinder/detail/Bootcache.h +++ b/src/xrpld/peerfinder/detail/Bootcache.h @@ -13,7 +13,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace PeerFinder { /** Stores IP addresses useful for gaining initial connections. @@ -68,8 +68,8 @@ private: using left_t = boost::bimaps::unordered_set_of< beast::IP::Endpoint, boost::hash, - ripple::equal_to>; - using right_t = boost::bimaps::multiset_of>; + xrpl::equal_to>; + using right_t = boost::bimaps::multiset_of>; using map_type = boost::bimap; using value_type = map_type::value_type; @@ -176,6 +176,6 @@ private: }; } // namespace PeerFinder -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/peerfinder/detail/Checker.h b/src/xrpld/peerfinder/detail/Checker.h index d8a3d667e4..277ce8c74d 100644 --- a/src/xrpld/peerfinder/detail/Checker.h +++ b/src/xrpld/peerfinder/detail/Checker.h @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace PeerFinder { /** Tests remote listening sockets to make sure they are connectible. */ @@ -210,6 +210,6 @@ Checker::remove(basic_async_op& op) } } // namespace PeerFinder -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/peerfinder/detail/Counts.h b/src/xrpld/peerfinder/detail/Counts.h index ec4b068802..7bb17278cc 100644 --- a/src/xrpld/peerfinder/detail/Counts.h +++ b/src/xrpld/peerfinder/detail/Counts.h @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { namespace PeerFinder { /** Manages the count of available connections for the various slots. */ @@ -53,7 +53,7 @@ public: // Must be handshaked and in the right state XRPL_ASSERT( s.state() == Slot::connected || s.state() == Slot::accept, - "ripple::PeerFinder::Counts::can_activate : valid input state"); + "xrpl::PeerFinder::Counts::can_activate : valid input state"); if (s.fixed() || s.reserved()) return true; @@ -246,7 +246,7 @@ private: case Slot::accept: XRPL_ASSERT( s.inbound(), - "ripple::PeerFinder::Counts::adjust : input is inbound"); + "xrpl::PeerFinder::Counts::adjust : input is inbound"); m_acceptCount += n; break; @@ -254,7 +254,7 @@ private: case Slot::connected: XRPL_ASSERT( !s.inbound(), - "ripple::PeerFinder::Counts::adjust : input is not " + "xrpl::PeerFinder::Counts::adjust : input is not " "inbound"); m_attempts += n; break; @@ -279,7 +279,7 @@ private: // LCOV_EXCL_START default: UNREACHABLE( - "ripple::PeerFinder::Counts::adjust : invalid input state"); + "xrpl::PeerFinder::Counts::adjust : invalid input state"); break; // LCOV_EXCL_STOP }; @@ -322,6 +322,6 @@ private: }; } // namespace PeerFinder -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/peerfinder/detail/Endpoint.cpp b/src/xrpld/peerfinder/detail/Endpoint.cpp index 5ae3839cb5..46f4f28b88 100644 --- a/src/xrpld/peerfinder/detail/Endpoint.cpp +++ b/src/xrpld/peerfinder/detail/Endpoint.cpp @@ -1,7 +1,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace PeerFinder { Endpoint::Endpoint(beast::IP::Endpoint const& ep, std::uint32_t hops_) @@ -10,4 +10,4 @@ Endpoint::Endpoint(beast::IP::Endpoint const& ep, std::uint32_t hops_) } } // namespace PeerFinder -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/peerfinder/detail/Fixed.h b/src/xrpld/peerfinder/detail/Fixed.h index c238c34477..4c89bc598e 100644 --- a/src/xrpld/peerfinder/detail/Fixed.h +++ b/src/xrpld/peerfinder/detail/Fixed.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace PeerFinder { /** Metadata for a Fixed slot. */ @@ -47,6 +47,6 @@ private: }; } // namespace PeerFinder -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/peerfinder/detail/Handouts.h b/src/xrpld/peerfinder/detail/Handouts.h index e88376d0d6..60789ae7ab 100644 --- a/src/xrpld/peerfinder/detail/Handouts.h +++ b/src/xrpld/peerfinder/detail/Handouts.h @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace PeerFinder { namespace detail { @@ -25,7 +25,7 @@ handout_one(Target& t, HopContainer& h) { XRPL_ASSERT( !t.full(), - "ripple::PeerFinder::detail::handout_one : target is not full"); + "xrpl::PeerFinder::detail::handout_one : target is not full"); for (auto it = h.begin(); it != h.end(); ++it) { auto const& e = *it; @@ -340,6 +340,6 @@ ConnectHandouts::try_insert(beast::IP::Endpoint const& endpoint) } } // namespace PeerFinder -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/peerfinder/detail/Livecache.h b/src/xrpld/peerfinder/detail/Livecache.h index 2664d2cbf3..0927593ed1 100644 --- a/src/xrpld/peerfinder/detail/Livecache.h +++ b/src/xrpld/peerfinder/detail/Livecache.h @@ -15,7 +15,7 @@ #include -namespace ripple { +namespace xrpl { namespace PeerFinder { template @@ -417,7 +417,7 @@ Livecache::insert(Endpoint const& ep) // XRPL_ASSERT( ep.hops <= (Tuning::maxHops + 1), - "ripple::PeerFinder::Livecache::insert : maximum input hops"); + "xrpl::PeerFinder::Livecache::insert : maximum input hops"); auto result = m_cache.emplace(ep.address, ep); Element& e(result.first->second); if (result.second) @@ -517,7 +517,7 @@ Livecache::hops_t::insert(Element& e) { XRPL_ASSERT( e.endpoint.hops <= Tuning::maxHops + 1, - "ripple::PeerFinder::Livecache::hops_t::insert : maximum input hops"); + "xrpl::PeerFinder::Livecache::hops_t::insert : maximum input hops"); // This has security implications without a shuffle m_lists[e.endpoint.hops].push_front(e); ++m_hist[e.endpoint.hops]; @@ -529,7 +529,7 @@ Livecache::hops_t::reinsert(Element& e, std::uint32_t numHops) { XRPL_ASSERT( numHops <= Tuning::maxHops + 1, - "ripple::PeerFinder::Livecache::hops_t::reinsert : maximum hops input"); + "xrpl::PeerFinder::Livecache::hops_t::reinsert : maximum hops input"); auto& list = m_lists[e.endpoint.hops]; list.erase(list.iterator_to(e)); @@ -551,6 +551,6 @@ Livecache::hops_t::remove(Element& e) } } // namespace PeerFinder -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/peerfinder/detail/Logic.h b/src/xrpld/peerfinder/detail/Logic.h index a4ec77fd96..50026cc886 100644 --- a/src/xrpld/peerfinder/detail/Logic.h +++ b/src/xrpld/peerfinder/detail/Logic.h @@ -24,7 +24,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace PeerFinder { /** The Logic for maintaining the list of Slot addresses. @@ -288,7 +288,7 @@ public: // Remote address must not already exist XRPL_ASSERT( result.second, - "ripple::PeerFinder::Logic::new_inbound_slot : remote endpoint " + "xrpl::PeerFinder::Logic::new_inbound_slot : remote endpoint " "inserted"); // Add to the connected address list connectedAddresses_.emplace(remote_endpoint.address()); @@ -326,7 +326,7 @@ public: // Remote address must not already exist XRPL_ASSERT( result.second, - "ripple::PeerFinder::Logic::new_outbound_slot : remote endpoint " + "xrpl::PeerFinder::Logic::new_outbound_slot : remote endpoint " "inserted"); // Add to the connected address list @@ -353,7 +353,7 @@ public: // The object must exist in our table XRPL_ASSERT( slots_.find(slot->remote_endpoint()) != slots_.end(), - "ripple::PeerFinder::Logic::onConnected : valid slot input"); + "xrpl::PeerFinder::Logic::onConnected : valid slot input"); // Assign the local endpoint now that it's known slot->local_endpoint(local_endpoint); @@ -364,7 +364,7 @@ public: { XRPL_ASSERT( iter->second->local_endpoint() == slot->remote_endpoint(), - "ripple::PeerFinder::Logic::onConnected : local and remote " + "xrpl::PeerFinder::Logic::onConnected : local and remote " "endpoints do match"); JLOG(journal.warn()) << "Logic dropping as self connect"; return false; @@ -393,11 +393,11 @@ public: // The object must exist in our table XRPL_ASSERT( slots_.find(slot->remote_endpoint()) != slots_.end(), - "ripple::PeerFinder::Logic::activate : valid slot input"); + "xrpl::PeerFinder::Logic::activate : valid slot input"); // Must be accepted or connected XRPL_ASSERT( slot->state() == Slot::accept || slot->state() == Slot::connected, - "ripple::PeerFinder::Logic::activate : valid slot state"); + "xrpl::PeerFinder::Logic::activate : valid slot state"); // Check for duplicate connection by key if (keys_.find(key) != keys_.end()) @@ -427,7 +427,7 @@ public: // Public key must not already exist XRPL_ASSERT( inserted, - "ripple::PeerFinder::Logic::activate : public key inserted"); + "xrpl::PeerFinder::Logic::activate : public key inserted"); } // Change state and update counts @@ -792,12 +792,12 @@ public: // The object must exist in our table XRPL_ASSERT( slots_.find(slot->remote_endpoint()) != slots_.end(), - "ripple::PeerFinder::Logic::on_endpoints : valid slot input"); + "xrpl::PeerFinder::Logic::on_endpoints : valid slot input"); // Must be handshaked! XRPL_ASSERT( slot->state() == Slot::active, - "ripple::PeerFinder::Logic::on_endpoints : valid slot state"); + "xrpl::PeerFinder::Logic::on_endpoints : valid slot state"); clock_type::time_point const now(m_clock.now()); @@ -811,7 +811,7 @@ public: { XRPL_ASSERT( ep.hops, - "ripple::PeerFinder::Logic::on_endpoints : nonzero hops"); + "xrpl::PeerFinder::Logic::on_endpoints : nonzero hops"); slot->recent.insert(ep.address, ep.hops); @@ -964,7 +964,7 @@ public: // LCOV_EXCL_START default: UNREACHABLE( - "ripple::PeerFinder::Logic::on_closed : invalid slot " + "xrpl::PeerFinder::Logic::on_closed : invalid slot " "state"); break; // LCOV_EXCL_STOP @@ -1264,6 +1264,6 @@ Logic::onRedirects( } } // namespace PeerFinder -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/peerfinder/detail/PeerfinderConfig.cpp b/src/xrpld/peerfinder/detail/PeerfinderConfig.cpp index 44e4f64197..726c18fdc0 100644 --- a/src/xrpld/peerfinder/detail/PeerfinderConfig.cpp +++ b/src/xrpld/peerfinder/detail/PeerfinderConfig.cpp @@ -1,7 +1,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace PeerFinder { Config::Config() @@ -68,7 +68,7 @@ Config::onWrite(beast::PropertyStream::Map& map) Config Config::makeConfig( - ripple::Config const& cfg, + xrpl::Config const& cfg, std::uint16_t port, bool validationPublicKey, int ipLimit) @@ -129,4 +129,4 @@ Config::makeConfig( } } // namespace PeerFinder -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/peerfinder/detail/PeerfinderManager.cpp b/src/xrpld/peerfinder/detail/PeerfinderManager.cpp index 05a9a89362..17faf35351 100644 --- a/src/xrpld/peerfinder/detail/PeerfinderManager.cpp +++ b/src/xrpld/peerfinder/detail/PeerfinderManager.cpp @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace PeerFinder { class ManagerImp : public Manager @@ -266,4 +266,4 @@ make_Manager( } } // namespace PeerFinder -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/peerfinder/detail/SlotImp.cpp b/src/xrpld/peerfinder/detail/SlotImp.cpp index be08bcff7c..ac2ae25d46 100644 --- a/src/xrpld/peerfinder/detail/SlotImp.cpp +++ b/src/xrpld/peerfinder/detail/SlotImp.cpp @@ -2,7 +2,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace PeerFinder { SlotImp::SlotImp( @@ -47,29 +47,29 @@ SlotImp::state(State state_) // Must go through activate() to set active state XRPL_ASSERT( state_ != active, - "ripple::PeerFinder::SlotImp::state : input state is not active"); + "xrpl::PeerFinder::SlotImp::state : input state is not active"); // The state must be different XRPL_ASSERT( state_ != m_state, - "ripple::PeerFinder::SlotImp::state : input state is different from " + "xrpl::PeerFinder::SlotImp::state : input state is different from " "current"); // You can't transition into the initial states XRPL_ASSERT( state_ != accept && state_ != connect, - "ripple::PeerFinder::SlotImp::state : input state is not an initial"); + "xrpl::PeerFinder::SlotImp::state : input state is not an initial"); // Can only become connected from outbound connect state XRPL_ASSERT( state_ != connected || (!m_inbound && m_state == connect), - "ripple::PeerFinder::SlotImp::state : input state is not connected an " + "xrpl::PeerFinder::SlotImp::state : input state is not connected an " "invalid state"); // Can't gracefully close on an outbound connection attempt XRPL_ASSERT( state_ != closing || m_state != connect, - "ripple::PeerFinder::SlotImp::state : input state is not closing an " + "xrpl::PeerFinder::SlotImp::state : input state is not closing an " "invalid state"); m_state = state_; @@ -81,7 +81,7 @@ SlotImp::activate(clock_type::time_point const& now) // Can only become active from the accept or connected state XRPL_ASSERT( m_state == accept || m_state == connected, - "ripple::PeerFinder::SlotImp::activate : valid state"); + "xrpl::PeerFinder::SlotImp::activate : valid state"); m_state = active; whenAcceptEndpoints = now; @@ -131,4 +131,4 @@ SlotImp::recent_t::expire() } } // namespace PeerFinder -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/peerfinder/detail/SlotImp.h b/src/xrpld/peerfinder/detail/SlotImp.h index 2badd9a2ef..8589f0b7f6 100644 --- a/src/xrpld/peerfinder/detail/SlotImp.h +++ b/src/xrpld/peerfinder/detail/SlotImp.h @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace PeerFinder { class SlotImp : public Slot @@ -195,6 +195,6 @@ public: }; } // namespace PeerFinder -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/peerfinder/detail/Source.h b/src/xrpld/peerfinder/detail/Source.h index b6971790b3..1fe33e053a 100644 --- a/src/xrpld/peerfinder/detail/Source.h +++ b/src/xrpld/peerfinder/detail/Source.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace PeerFinder { /** A static or dynamic source of peer addresses. @@ -45,6 +45,6 @@ public: }; } // namespace PeerFinder -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/peerfinder/detail/SourceStrings.cpp b/src/xrpld/peerfinder/detail/SourceStrings.cpp index 0c7431917a..772ec2d485 100644 --- a/src/xrpld/peerfinder/detail/SourceStrings.cpp +++ b/src/xrpld/peerfinder/detail/SourceStrings.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { namespace PeerFinder { class SourceStringsImp : public SourceStrings @@ -49,4 +49,4 @@ SourceStrings::New(std::string const& name, Strings const& strings) } } // namespace PeerFinder -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/peerfinder/detail/SourceStrings.h b/src/xrpld/peerfinder/detail/SourceStrings.h index cbd03ed352..2babe1d616 100644 --- a/src/xrpld/peerfinder/detail/SourceStrings.h +++ b/src/xrpld/peerfinder/detail/SourceStrings.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { namespace PeerFinder { /** Provides addresses from a static set of strings. */ @@ -21,6 +21,6 @@ public: }; } // namespace PeerFinder -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/peerfinder/detail/Store.h b/src/xrpld/peerfinder/detail/Store.h index 738462c9c3..d3b283eabf 100644 --- a/src/xrpld/peerfinder/detail/Store.h +++ b/src/xrpld/peerfinder/detail/Store.h @@ -1,7 +1,7 @@ #ifndef XRPL_PEERFINDER_STORE_H_INCLUDED #define XRPL_PEERFINDER_STORE_H_INCLUDED -namespace ripple { +namespace xrpl { namespace PeerFinder { /** Abstract persistence for PeerFinder data. */ @@ -30,6 +30,6 @@ public: }; } // namespace PeerFinder -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/peerfinder/detail/StoreSqdb.h b/src/xrpld/peerfinder/detail/StoreSqdb.h index 1d87545522..074428c0bc 100644 --- a/src/xrpld/peerfinder/detail/StoreSqdb.h +++ b/src/xrpld/peerfinder/detail/StoreSqdb.h @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace PeerFinder { /** Database persistence for PeerFinder using SQLite */ @@ -89,6 +89,6 @@ private: }; } // namespace PeerFinder -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/peerfinder/detail/Tuning.h b/src/xrpld/peerfinder/detail/Tuning.h index 856a11a9fe..ba9cf9e615 100644 --- a/src/xrpld/peerfinder/detail/Tuning.h +++ b/src/xrpld/peerfinder/detail/Tuning.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace PeerFinder { /** Heuristically tuned constants. */ @@ -116,6 +116,6 @@ std::chrono::seconds constexpr recentAttemptDuration(60); /** @} */ } // namespace PeerFinder -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/peerfinder/make_Manager.h b/src/xrpld/peerfinder/make_Manager.h index e4bd571261..a86e6d4ccb 100644 --- a/src/xrpld/peerfinder/make_Manager.h +++ b/src/xrpld/peerfinder/make_Manager.h @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { namespace PeerFinder { /** Create a new Manager. */ @@ -20,6 +20,6 @@ make_Manager( beast::insight::Collector::ptr const& collector); } // namespace PeerFinder -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/perflog/PerfLog.h b/src/xrpld/perflog/PerfLog.h index f6c3d3b9ac..23a87df1b1 100644 --- a/src/xrpld/perflog/PerfLog.h +++ b/src/xrpld/perflog/PerfLog.h @@ -18,7 +18,7 @@ namespace beast { class Journal; } -namespace ripple { +namespace xrpl { class Application; namespace perf { @@ -188,6 +188,6 @@ measureDurationAndLog( } } // namespace perf -} // namespace ripple +} // namespace xrpl #endif // XRPL_BASICS_PERFLOG_H diff --git a/src/xrpld/perflog/detail/PerfLogImp.cpp b/src/xrpld/perflog/detail/PerfLogImp.cpp index 170da708eb..f556789324 100644 --- a/src/xrpld/perflog/detail/PerfLogImp.cpp +++ b/src/xrpld/perflog/detail/PerfLogImp.cpp @@ -18,7 +18,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace perf { PerfLogImp::Counters::Counters( @@ -36,7 +36,7 @@ PerfLogImp::Counters::Counters( // Ensure that no other function populates this entry. // LCOV_EXCL_START UNREACHABLE( - "ripple::perf::PerfLogImp::Counters::Counters : failed to " + "xrpl::perf::PerfLogImp::Counters::Counters : failed to " "insert label"); // LCOV_EXCL_STOP } @@ -53,7 +53,7 @@ PerfLogImp::Counters::Counters( // Ensure that no other function populates this entry. // LCOV_EXCL_START UNREACHABLE( - "ripple::perf::PerfLogImp::Counters::Counters : failed to " + "xrpl::perf::PerfLogImp::Counters::Counters : failed to " "insert job type"); // LCOV_EXCL_STOP } @@ -315,7 +315,7 @@ PerfLogImp::rpcStart(std::string const& method, std::uint64_t const requestId) if (counter == counters_.rpc_.end()) { // LCOV_EXCL_START - UNREACHABLE("ripple::perf::PerfLogImp::rpcStart : valid method input"); + UNREACHABLE("xrpl::perf::PerfLogImp::rpcStart : valid method input"); return; // LCOV_EXCL_STOP } @@ -339,7 +339,7 @@ PerfLogImp::rpcEnd( if (counter == counters_.rpc_.end()) { // LCOV_EXCL_START - UNREACHABLE("ripple::perf::PerfLogImp::rpcEnd : valid method input"); + UNREACHABLE("xrpl::perf::PerfLogImp::rpcEnd : valid method input"); return; // LCOV_EXCL_STOP } @@ -356,7 +356,7 @@ PerfLogImp::rpcEnd( { // LCOV_EXCL_START UNREACHABLE( - "ripple::perf::PerfLogImp::rpcEnd : valid requestId input"); + "xrpl::perf::PerfLogImp::rpcEnd : valid requestId input"); // LCOV_EXCL_STOP } } @@ -376,8 +376,7 @@ PerfLogImp::jobQueue(JobType const type) if (counter == counters_.jq_.end()) { // LCOV_EXCL_START - UNREACHABLE( - "ripple::perf::PerfLogImp::jobQueue : valid job type input"); + UNREACHABLE("xrpl::perf::PerfLogImp::jobQueue : valid job type input"); return; // LCOV_EXCL_STOP } @@ -396,8 +395,7 @@ PerfLogImp::jobStart( if (counter == counters_.jq_.end()) { // LCOV_EXCL_START - UNREACHABLE( - "ripple::perf::PerfLogImp::jobStart : valid job type input"); + UNREACHABLE("xrpl::perf::PerfLogImp::jobStart : valid job type input"); return; // LCOV_EXCL_STOP } @@ -419,8 +417,7 @@ PerfLogImp::jobFinish(JobType const type, microseconds dur, int instance) if (counter == counters_.jq_.end()) { // LCOV_EXCL_START - UNREACHABLE( - "ripple::perf::PerfLogImp::jobFinish : valid job type input"); + UNREACHABLE("xrpl::perf::PerfLogImp::jobFinish : valid job type input"); return; // LCOV_EXCL_STOP } @@ -511,4 +508,4 @@ make_PerfLog( } } // namespace perf -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/perflog/detail/PerfLogImp.h b/src/xrpld/perflog/detail/PerfLogImp.h index ec4c87c29d..611f01ffae 100644 --- a/src/xrpld/perflog/detail/PerfLogImp.h +++ b/src/xrpld/perflog/detail/PerfLogImp.h @@ -17,7 +17,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace perf { /** A box coupling data with a mutex for locking access to it. */ @@ -103,7 +103,7 @@ class PerfLogImp : public PerfLog Application& app_; beast::Journal const j_; std::function const signalStop_; - Counters counters_{ripple::RPC::getHandlerNames(), JobTypes::instance()}; + Counters counters_{xrpl::RPC::getHandlerNames(), JobTypes::instance()}; std::ofstream logFile_; std::thread thread_; std::mutex mutex_; @@ -185,6 +185,6 @@ public: }; } // namespace perf -} // namespace ripple +} // namespace xrpl #endif // XRPL_BASICS_PERFLOGIMP_H diff --git a/src/xrpld/rpc/BookChanges.h b/src/xrpld/rpc/BookChanges.h index 58e8c25dc1..77f1a570d4 100644 --- a/src/xrpld/rpc/BookChanges.h +++ b/src/xrpld/rpc/BookChanges.h @@ -14,7 +14,7 @@ namespace Json { class Value; } -namespace ripple { +namespace xrpl { class ReadView; class Transaction; @@ -205,6 +205,6 @@ computeBookChanges(std::shared_ptr const& lpAccepted) } } // namespace RPC -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/rpc/CTID.h b/src/xrpld/rpc/CTID.h index 0fbd15601e..b7f25894ee 100644 --- a/src/xrpld/rpc/CTID.h +++ b/src/xrpld/rpc/CTID.h @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace RPC { @@ -113,6 +113,6 @@ decodeCTID(T const ctid) noexcept } } // namespace RPC -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/rpc/Context.h b/src/xrpld/rpc/Context.h index 0e15da3a39..1f53303c26 100644 --- a/src/xrpld/rpc/Context.h +++ b/src/xrpld/rpc/Context.h @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { class Application; class NetworkOPs; @@ -53,6 +53,6 @@ struct GRPCContext : public Context }; } // namespace RPC -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/rpc/DeliveredAmount.h b/src/xrpld/rpc/DeliveredAmount.h index 25af5c084e..fbd2545963 100644 --- a/src/xrpld/rpc/DeliveredAmount.h +++ b/src/xrpld/rpc/DeliveredAmount.h @@ -11,7 +11,7 @@ namespace Json { class Value; } -namespace ripple { +namespace xrpl { class ReadView; class Transaction; @@ -62,6 +62,6 @@ getDeliveredAmount( /** @} */ } // namespace RPC -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/rpc/GRPCHandlers.h b/src/xrpld/rpc/GRPCHandlers.h index e9bce3ccbf..f3e8d74f9d 100644 --- a/src/xrpld/rpc/GRPCHandlers.h +++ b/src/xrpld/rpc/GRPCHandlers.h @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { /* * These handlers are for gRPC. They each take in a protobuf message that is @@ -32,6 +32,6 @@ std::pair doLedgerDiffGrpc( RPC::GRPCContext& context); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/rpc/InfoSub.h b/src/xrpld/rpc/InfoSub.h index f3affd40ae..97ff266364 100644 --- a/src/xrpld/rpc/InfoSub.h +++ b/src/xrpld/rpc/InfoSub.h @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { // Operations that clients may wish to perform against the network // Master operational handler, server sequencer, network tracker @@ -237,6 +237,6 @@ private: } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/rpc/MPTokenIssuanceID.h b/src/xrpld/rpc/MPTokenIssuanceID.h index ad96c2b78b..85f44e79b8 100644 --- a/src/xrpld/rpc/MPTokenIssuanceID.h +++ b/src/xrpld/rpc/MPTokenIssuanceID.h @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace RPC { @@ -37,6 +37,6 @@ insertMPTokenIssuanceID( /** @} */ } // namespace RPC -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/rpc/Output.h b/src/xrpld/rpc/Output.h index 0b0d62bbf9..431cbb6bbf 100644 --- a/src/xrpld/rpc/Output.h +++ b/src/xrpld/rpc/Output.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace RPC { using Output = std::function; @@ -15,6 +15,6 @@ stringOutput(std::string& s) } } // namespace RPC -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/rpc/README.md b/src/xrpld/rpc/README.md index 5bb9655a76..749f3d0ed1 100644 --- a/src/xrpld/rpc/README.md +++ b/src/xrpld/rpc/README.md @@ -15,7 +15,7 @@ For this purpose, the rippled RPC handler allows _suspension with continuation_ ## The classes. -Suspension with continuation uses four `std::function`s in the `ripple::RPC` +Suspension with continuation uses four `std::function`s in the `xrpl::RPC` namespace: using Callback = std::function ; diff --git a/src/xrpld/rpc/RPCCall.h b/src/xrpld/rpc/RPCCall.h index b27e60c8ea..2ee9e33cf3 100644 --- a/src/xrpld/rpc/RPCCall.h +++ b/src/xrpld/rpc/RPCCall.h @@ -13,7 +13,7 @@ #include #include -namespace ripple { +namespace xrpl { // This a trusted interface, the user is expected to provide valid input to // perform valid requests. Error catching and reporting is not a requirement of @@ -66,6 +66,6 @@ rpcClient( unsigned int apiVersion, std::unordered_map const& headers = {}); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/rpc/RPCHandler.h b/src/xrpld/rpc/RPCHandler.h index c6f4dfc6bd..0b91528605 100644 --- a/src/xrpld/rpc/RPCHandler.h +++ b/src/xrpld/rpc/RPCHandler.h @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace RPC { struct JsonContext; @@ -17,6 +17,6 @@ Role roleRequired(unsigned int version, bool betaEnabled, std::string const& method); } // namespace RPC -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/rpc/RPCSub.h b/src/xrpld/rpc/RPCSub.h index db96ae79ee..2f8155f3fd 100644 --- a/src/xrpld/rpc/RPCSub.h +++ b/src/xrpld/rpc/RPCSub.h @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { /** Subscription object for JSON RPC. */ class RPCSub : public InfoSub @@ -32,6 +32,6 @@ make_RPCSub( std::string const& strPassword, Logs& logs); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/rpc/Request.h b/src/xrpld/rpc/Request.h index ceab2944d7..c7b2cedef0 100644 --- a/src/xrpld/rpc/Request.h +++ b/src/xrpld/rpc/Request.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { class Application; @@ -51,6 +51,6 @@ private: }; } // namespace RPC -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/rpc/Role.h b/src/xrpld/rpc/Role.h index 6967474f17..04b288600a 100644 --- a/src/xrpld/rpc/Role.h +++ b/src/xrpld/rpc/Role.h @@ -14,7 +14,7 @@ #include #include -namespace ripple { +namespace xrpl { /** Indicates the level of administrative permission to grant. * IDENTIFIED role has unlimited resources but cannot perform some @@ -70,6 +70,6 @@ ipAllowed( std::string_view forwardedFor(http_request_type const& request); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/rpc/ServerHandler.h b/src/xrpld/rpc/ServerHandler.h index c499411366..0d389e6a62 100644 --- a/src/xrpld/rpc/ServerHandler.h +++ b/src/xrpld/rpc/ServerHandler.h @@ -20,7 +20,7 @@ #include #include -namespace ripple { +namespace xrpl { inline bool operator<(Port const& lhs, Port const& rhs) @@ -210,6 +210,6 @@ make_ServerHandler( Resource::Manager&, CollectorManager& cm); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/rpc/Status.h b/src/xrpld/rpc/Status.h index 2ff804f17c..f4ffcae9b2 100644 --- a/src/xrpld/rpc/Status.h +++ b/src/xrpld/rpc/Status.h @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace RPC { /** Status represents the results of an operation that might fail. @@ -77,7 +77,7 @@ public: toTER() const { XRPL_ASSERT( - type_ == Type::TER, "ripple::RPC::Status::toTER : type is TER"); + type_ == Type::TER, "xrpl::RPC::Status::toTER : type is TER"); return TER::fromInt(code_); } @@ -88,7 +88,7 @@ public: { XRPL_ASSERT( type_ == Type::error_code_i, - "ripple::RPC::Status::toTER : type is error code"); + "xrpl::RPC::Status::toTER : type is error code"); return error_code_i(code_); } @@ -139,6 +139,6 @@ private: }; } // namespace RPC -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/rpc/detail/DeliveredAmount.cpp b/src/xrpld/rpc/detail/DeliveredAmount.cpp index 2191d2b338..29def5ea98 100644 --- a/src/xrpld/rpc/detail/DeliveredAmount.cpp +++ b/src/xrpld/rpc/detail/DeliveredAmount.cpp @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace RPC { /* @@ -186,4 +186,4 @@ insertDeliveredAmount( } } // namespace RPC -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/detail/Handler.cpp b/src/xrpld/rpc/detail/Handler.cpp index eade16517f..8917f62fbd 100644 --- a/src/xrpld/rpc/detail/Handler.cpp +++ b/src/xrpld/rpc/detail/Handler.cpp @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { namespace RPC { namespace { @@ -21,7 +21,7 @@ byRef(Function const& f) if (result.type() != Json::objectValue) { // LCOV_EXCL_START - UNREACHABLE("ripple::RPC::byRef : result is object"); + UNREACHABLE("xrpl::RPC::byRef : result is object"); result = RPC::makeObjectValue(result); // LCOV_EXCL_STOP } @@ -37,7 +37,7 @@ handle(JsonContext& context, Object& object) XRPL_ASSERT( context.apiVersion >= HandlerImpl::minApiVer && context.apiVersion <= HandlerImpl::maxApiVer, - "ripple::RPC::handle : valid API version"); + "xrpl::RPC::handle : valid API version"); HandlerImpl handler(context); auto status = handler.check(); @@ -193,10 +193,10 @@ private: { XRPL_ASSERT( minVer <= maxVer, - "ripple::RPC::HandlerTable : valid API version range"); + "xrpl::RPC::HandlerTable : valid API version range"); XRPL_ASSERT( maxVer <= RPC::apiMaximumValidVersion, - "ripple::RPC::HandlerTable : valid max API version"); + "xrpl::RPC::HandlerTable : valid max API version"); return std::any_of( range.first, @@ -304,4 +304,4 @@ getHandlerNames() } } // namespace RPC -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/detail/Handler.h b/src/xrpld/rpc/detail/Handler.h index 8d67fa2565..e3c661f915 100644 --- a/src/xrpld/rpc/detail/Handler.h +++ b/src/xrpld/rpc/detail/Handler.h @@ -12,7 +12,7 @@ namespace Json { class Object; } -namespace ripple { +namespace xrpl { namespace RPC { // Under what condition can we call this RPC? @@ -120,6 +120,6 @@ conditionMet(Condition condition_required, T& context) } } // namespace RPC -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/rpc/detail/InfoSub.cpp b/src/xrpld/rpc/detail/InfoSub.cpp index 14696292f8..a0869b9d96 100644 --- a/src/xrpld/rpc/detail/InfoSub.cpp +++ b/src/xrpld/rpc/detail/InfoSub.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { // This is the primary interface into the "client" portion of the program. // Code that wants to do normal operations on the network such as @@ -126,8 +126,8 @@ unsigned int InfoSub::getApiVersion() const noexcept { XRPL_ASSERT( - apiVersion_ > 0, "ripple::InfoSub::getApiVersion : valid API version"); + apiVersion_ > 0, "xrpl::InfoSub::getApiVersion : valid API version"); return apiVersion_; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/detail/LegacyPathFind.cpp b/src/xrpld/rpc/detail/LegacyPathFind.cpp index 7bf4758e37..b9817a78b5 100644 --- a/src/xrpld/rpc/detail/LegacyPathFind.cpp +++ b/src/xrpld/rpc/detail/LegacyPathFind.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace RPC { LegacyPathFind::LegacyPathFind(bool isAdmin, Application& app) : m_isOk(false) @@ -49,4 +49,4 @@ LegacyPathFind::~LegacyPathFind() std::atomic LegacyPathFind::inProgress(0); } // namespace RPC -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/detail/LegacyPathFind.h b/src/xrpld/rpc/detail/LegacyPathFind.h index 40fc11aee8..d175e7c532 100644 --- a/src/xrpld/rpc/detail/LegacyPathFind.h +++ b/src/xrpld/rpc/detail/LegacyPathFind.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class Application; @@ -28,6 +28,6 @@ private: }; } // namespace RPC -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/rpc/detail/MPTokenIssuanceID.cpp b/src/xrpld/rpc/detail/MPTokenIssuanceID.cpp index 440b783316..3c7f2c5fc3 100644 --- a/src/xrpld/rpc/detail/MPTokenIssuanceID.cpp +++ b/src/xrpld/rpc/detail/MPTokenIssuanceID.cpp @@ -1,6 +1,6 @@ #include -namespace ripple { +namespace xrpl { namespace RPC { @@ -56,4 +56,4 @@ insertMPTokenIssuanceID( } } // namespace RPC -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/detail/RPCCall.cpp b/src/xrpld/rpc/detail/RPCCall.cpp index 915f951749..4aec820fa0 100644 --- a/src/xrpld/rpc/detail/RPCCall.cpp +++ b/src/xrpld/rpc/detail/RPCCall.cpp @@ -28,7 +28,7 @@ #include #include -namespace ripple { +namespace xrpl { class RPCParser; @@ -102,7 +102,7 @@ private: jvParseCurrencyIssuer(std::string const& strCurrencyIssuer) { // Matches a sequence of 3 characters from - // `ripple::detail::isoCharSet` (the currency), + // `xrpl::detail::isoCharSet` (the currency), // optionally followed by a forward slash and some other characters // (the issuer). // https://www.boost.org/doc/libs/1_82_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html @@ -140,7 +140,7 @@ private: std::string const& strPk, TokenType type = TokenType::AccountPublic) { - if (parseBase58(type, strPk)) + if (parseBase58(type, strPk)) return true; auto pkHex = strUnHex(strPk); @@ -1017,7 +1017,7 @@ private: // Parameter count should have already been verified. XRPL_ASSERT( jvParams.size() == 2, - "ripple::RPCParser::parseTransactionEntry : valid parameter count"); + "xrpl::RPCParser::parseTransactionEntry : valid parameter count"); std::string const txHash = jvParams[0u].asString(); if (txHash.length() != 64) @@ -1500,7 +1500,7 @@ rpcClient( } else { - ripple::ServerHandler::Setup setup; + xrpl::ServerHandler::Setup setup; try { setup = setup_ServerHandler( @@ -1704,4 +1704,4 @@ fromNetwork( } // namespace RPCCall -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/detail/RPCHandler.cpp b/src/xrpld/rpc/detail/RPCHandler.cpp index c712430f92..9ab108bd23 100644 --- a/src/xrpld/rpc/detail/RPCHandler.cpp +++ b/src/xrpld/rpc/detail/RPCHandler.cpp @@ -22,7 +22,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace RPC { namespace { @@ -250,4 +250,4 @@ roleRequired(unsigned int version, bool betaEnabled, std::string const& method) } } // namespace RPC -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/detail/RPCHelpers.cpp b/src/xrpld/rpc/detail/RPCHelpers.cpp index 8d30d6e20e..788004544d 100644 --- a/src/xrpld/rpc/detail/RPCHelpers.cpp +++ b/src/xrpld/rpc/detail/RPCHelpers.cpp @@ -18,7 +18,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace RPC { std::optional @@ -528,7 +528,7 @@ getLedger(T& ledger, LedgerShortcut shortcut, Context& context) } XRPL_ASSERT( - !ledger->open(), "ripple::RPC::getLedger : validated is not open"); + !ledger->open(), "xrpl::RPC::getLedger : validated is not open"); } else { @@ -536,13 +536,13 @@ getLedger(T& ledger, LedgerShortcut shortcut, Context& context) { ledger = context.ledgerMaster.getCurrentLedger(); XRPL_ASSERT( - ledger->open(), "ripple::RPC::getLedger : current is open"); + ledger->open(), "xrpl::RPC::getLedger : current is open"); } else if (shortcut == LedgerShortcut::CLOSED) { ledger = context.ledgerMaster.getClosedLedger(); XRPL_ASSERT( - !ledger->open(), "ripple::RPC::getLedger : closed is not open"); + !ledger->open(), "xrpl::RPC::getLedger : closed is not open"); } else { @@ -944,7 +944,7 @@ chooseLedgerEntryType(Json::Value const& params) rpcINVALID_PARAMS, "Invalid field 'type', not string."}; XRPL_ASSERT( result.first.type() == RPC::Status::Type::error_code_i, - "ripple::RPC::chooseLedgerEntryType : first valid result type"); + "xrpl::RPC::chooseLedgerEntryType : first valid result type"); return result; } @@ -963,7 +963,7 @@ chooseLedgerEntryType(Json::Value const& params) RPC::Status{rpcINVALID_PARAMS, "Invalid field 'type'."}; XRPL_ASSERT( result.first.type() == RPC::Status::Type::error_code_i, - "ripple::RPC::chooseLedgerEntryType : second valid result " + "xrpl::RPC::chooseLedgerEntryType : second valid result " "type"); return result; } @@ -1071,8 +1071,7 @@ getLedgerByContext(RPC::JsonContext& context) auto const refIndex = getCandidateLedger(ledgerIndex); auto refHash = hashOfSeq(*ledger, refIndex, j); XRPL_ASSERT( - refHash, - "ripple::RPC::getLedgerByContext : nonzero ledger hash"); + refHash, "xrpl::RPC::getLedgerByContext : nonzero ledger hash"); ledger = ledgerMaster.getLedgerByHash(*refHash); if (!ledger) @@ -1107,8 +1106,7 @@ getLedgerByContext(RPC::JsonContext& context) neededHash = hashOfSeq(*ledger, ledgerIndex, j); } XRPL_ASSERT( - neededHash, - "ripple::RPC::getLedgerByContext : nonzero needed hash"); + neededHash, "xrpl::RPC::getLedgerByContext : nonzero needed hash"); ledgerHash = neededHash ? *neededHash : beast::zero; // kludge } @@ -1132,4 +1130,4 @@ getLedgerByContext(RPC::JsonContext& context) } } // namespace RPC -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/detail/RPCHelpers.h b/src/xrpld/rpc/detail/RPCHelpers.h index 843e54f6bd..c13d9b05de 100644 --- a/src/xrpld/rpc/detail/RPCHelpers.h +++ b/src/xrpld/rpc/detail/RPCHelpers.h @@ -19,7 +19,7 @@ namespace Json { class Value; } -namespace ripple { +namespace xrpl { class ReadView; class Transaction; @@ -195,7 +195,7 @@ setVersion(Object& parent, unsigned int apiVersion, bool betaEnabled) { XRPL_ASSERT( apiVersion != apiInvalidVersion, - "ripple::RPC::setVersion : input is valid"); + "xrpl::RPC::setVersion : input is valid"); auto&& object = addObject(parent, jss::version); if (apiVersion == apiVersionIfUnspecified) { @@ -253,6 +253,6 @@ keypairForSignature( } // namespace RPC -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/rpc/detail/RPCSub.cpp b/src/xrpld/rpc/detail/RPCSub.cpp index 9477eab231..5d008e4ee6 100644 --- a/src/xrpld/rpc/detail/RPCSub.cpp +++ b/src/xrpld/rpc/detail/RPCSub.cpp @@ -8,7 +8,7 @@ #include -namespace ripple { +namespace xrpl { // Subscription object for JSON-RPC class RPCSubImp : public RPCSub @@ -205,4 +205,4 @@ make_RPCSub( logs); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/detail/Role.cpp b/src/xrpld/rpc/detail/Role.cpp index 95549068a0..28d00245a5 100644 --- a/src/xrpld/rpc/detail/Role.cpp +++ b/src/xrpld/rpc/detail/Role.cpp @@ -5,14 +5,14 @@ #include -namespace ripple { +namespace xrpl { bool passwordUnrequiredOrSentCorrect(Port const& port, Json::Value const& params) { XRPL_ASSERT( !(port.admin_nets_v4.empty() && port.admin_nets_v6.empty()), - "ripple::passwordUnrequiredOrSentCorrect : non-empty admin nets"); + "xrpl::passwordUnrequiredOrSentCorrect : non-empty admin nets"); bool const passwordRequired = (!port.admin_user.empty() || !port.admin_password.empty()); @@ -292,4 +292,4 @@ forwardedFor(http_request_type const& request) return {}; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/detail/ServerHandler.cpp b/src/xrpld/rpc/detail/ServerHandler.cpp index 4210418148..b0fe6fcd7b 100644 --- a/src/xrpld/rpc/detail/ServerHandler.cpp +++ b/src/xrpld/rpc/detail/ServerHandler.cpp @@ -32,7 +32,7 @@ #include #include -namespace ripple { +namespace xrpl { static bool isStatusRequest(http_request_type const& request) @@ -1267,4 +1267,4 @@ make_ServerHandler( cm); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/detail/Status.cpp b/src/xrpld/rpc/detail/Status.cpp index 3b5aded8b2..ce3082f0fa 100644 --- a/src/xrpld/rpc/detail/Status.cpp +++ b/src/xrpld/rpc/detail/Status.cpp @@ -2,7 +2,7 @@ #include -namespace ripple { +namespace xrpl { namespace RPC { std::string @@ -19,7 +19,7 @@ Status::codeString() const std::string s1, s2; [[maybe_unused]] auto const success = transResultInfo(toTER(), s1, s2); - XRPL_ASSERT(success, "ripple::RPC::codeString : valid TER result"); + XRPL_ASSERT(success, "xrpl::RPC::codeString : valid TER result"); return s1 + ": " + s2; } @@ -33,7 +33,7 @@ Status::codeString() const } // LCOV_EXCL_START - UNREACHABLE("ripple::RPC::codeString : invalid type"); + UNREACHABLE("xrpl::RPC::codeString : invalid type"); return ""; // LCOV_EXCL_STOP } @@ -80,4 +80,4 @@ Status::toString() const } } // namespace RPC -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/detail/TransactionSign.cpp b/src/xrpld/rpc/detail/TransactionSign.cpp index 2308280597..677124ea78 100644 --- a/src/xrpld/rpc/detail/TransactionSign.cpp +++ b/src/xrpld/rpc/detail/TransactionSign.cpp @@ -24,7 +24,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace RPC { namespace detail { @@ -654,7 +654,7 @@ transactionPreProcessImpl( { Serializer s = buildMultiSigningData(*stTx, signingArgs.getSigner()); - auto multisig = ripple::sign(pk, sk, s.slice()); + auto multisig = xrpl::sign(pk, sk, s.slice()); signingArgs.moveMultiSignature(std::move(multisig)); } @@ -1202,7 +1202,7 @@ transactionSignFor( XRPL_ASSERT( signForParams.validMultiSign(), - "ripple::RPC::transactionSignFor : valid multi-signature"); + "xrpl::RPC::transactionSignFor : valid multi-signature"); { std::shared_ptr account_state = @@ -1448,4 +1448,4 @@ transactionSubmitMultiSigned( } } // namespace RPC -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/detail/TransactionSign.h b/src/xrpld/rpc/detail/TransactionSign.h index ba14ad0cdc..181737ad28 100644 --- a/src/xrpld/rpc/detail/TransactionSign.h +++ b/src/xrpld/rpc/detail/TransactionSign.h @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { // Forward declarations class Application; @@ -126,6 +126,6 @@ transactionSubmitMultiSigned( ProcessTransactionFn const& processTransaction); } // namespace RPC -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/rpc/detail/Tuning.h b/src/xrpld/rpc/detail/Tuning.h index 902ba2ecf0..5837146b02 100644 --- a/src/xrpld/rpc/detail/Tuning.h +++ b/src/xrpld/rpc/detail/Tuning.h @@ -1,7 +1,7 @@ #ifndef XRPL_RPC_TUNING_H_INCLUDED #define XRPL_RPC_TUNING_H_INCLUDED -namespace ripple { +namespace xrpl { namespace RPC { /** Tuned constants. */ @@ -71,6 +71,6 @@ static int constexpr max_auto_src_cur = 88; /** @} */ } // namespace RPC -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/rpc/detail/WSInfoSub.h b/src/xrpld/rpc/detail/WSInfoSub.h index 707f81fb19..91dc47fa2b 100644 --- a/src/xrpld/rpc/detail/WSInfoSub.h +++ b/src/xrpld/rpc/detail/WSInfoSub.h @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { class WSInfoSub : public InfoSub { @@ -65,6 +65,6 @@ public: } }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/rpc/handlers/AMMInfo.cpp b/src/xrpld/rpc/handlers/AMMInfo.cpp index 01e9f0cd16..e28e2b7846 100644 --- a/src/xrpld/rpc/handlers/AMMInfo.cpp +++ b/src/xrpld/rpc/handlers/AMMInfo.cpp @@ -10,7 +10,7 @@ #include -namespace ripple { +namespace xrpl { std::optional getAccount(Json::Value const& v, Json::Value& result) @@ -133,12 +133,12 @@ doAMMInfo(RPC::JsonContext& context) XRPL_ASSERT( (issue1.has_value() == issue2.has_value()) && (issue1.has_value() != ammID.has_value()), - "ripple::doAMMInfo : issue1 and issue2 do match"); + "xrpl::doAMMInfo : issue1 and issue2 do match"); auto const ammKeylet = [&]() { if (issue1 && issue2) return keylet::amm(*issue1, *issue2); - XRPL_ASSERT(ammID, "ripple::doAMMInfo::ammKeylet : ammID is set"); + XRPL_ASSERT(ammID, "xrpl::doAMMInfo::ammKeylet : ammID is set"); return keylet::amm(*ammID); }(); auto const amm = ledger->read(ammKeylet); @@ -200,7 +200,7 @@ doAMMInfo(RPC::JsonContext& context) XRPL_ASSERT( !ledger->rules().enabled(fixInnerObjTemplate) || amm->isFieldPresent(sfAuctionSlot), - "ripple::doAMMInfo : auction slot is set"); + "xrpl::doAMMInfo : auction slot is set"); if (amm->isFieldPresent(sfAuctionSlot)) { auto const& auctionSlot = @@ -251,4 +251,4 @@ doAMMInfo(RPC::JsonContext& context) return result; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/AccountChannels.cpp b/src/xrpld/rpc/handlers/AccountChannels.cpp index e1f86630c5..4977b3b67b 100644 --- a/src/xrpld/rpc/handlers/AccountChannels.cpp +++ b/src/xrpld/rpc/handlers/AccountChannels.cpp @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { void addChannel(Json::Value& jsonLines, SLE const& line) @@ -148,7 +148,7 @@ doAccountChannels(RPC::JsonContext& context) if (!sleCur) { // LCOV_EXCL_START - UNREACHABLE("ripple::doAccountChannels : null SLE"); + UNREACHABLE("xrpl::doAccountChannels : null SLE"); return false; // LCOV_EXCL_STOP } @@ -193,4 +193,4 @@ doAccountChannels(RPC::JsonContext& context) return result; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/AccountCurrenciesHandler.cpp b/src/xrpld/rpc/handlers/AccountCurrenciesHandler.cpp index ca165e7592..664e120b69 100644 --- a/src/xrpld/rpc/handlers/AccountCurrenciesHandler.cpp +++ b/src/xrpld/rpc/handlers/AccountCurrenciesHandler.cpp @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { Json::Value doAccountCurrencies(RPC::JsonContext& context) @@ -76,4 +76,4 @@ doAccountCurrencies(RPC::JsonContext& context) return result; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/AccountInfo.cpp b/src/xrpld/rpc/handlers/AccountInfo.cpp index 8c07f20581..6ce3325542 100644 --- a/src/xrpld/rpc/handlers/AccountInfo.cpp +++ b/src/xrpld/rpc/handlers/AccountInfo.cpp @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { // { // account: , @@ -273,4 +273,4 @@ doAccountInfo(RPC::JsonContext& context) return result; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/AccountLines.cpp b/src/xrpld/rpc/handlers/AccountLines.cpp index 22ca1bc2f9..70437d1ae4 100644 --- a/src/xrpld/rpc/handlers/AccountLines.cpp +++ b/src/xrpld/rpc/handlers/AccountLines.cpp @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { void addLine(Json::Value& jsonLines, RPCTrustLine const& line) @@ -172,7 +172,7 @@ doAccountLines(RPC::JsonContext& context) if (!sleCur) { // LCOV_EXCL_START - UNREACHABLE("ripple::doAccountLines : null SLE"); + UNREACHABLE("xrpl::doAccountLines : null SLE"); return false; // LCOV_EXCL_STOP } @@ -239,4 +239,4 @@ doAccountLines(RPC::JsonContext& context) return result; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/AccountObjects.cpp b/src/xrpld/rpc/handlers/AccountObjects.cpp index f68ab5dfae..b50d290630 100644 --- a/src/xrpld/rpc/handlers/AccountObjects.cpp +++ b/src/xrpld/rpc/handlers/AccountObjects.cpp @@ -14,7 +14,7 @@ #include -namespace ripple { +namespace xrpl { /** General RPC command that can retrieve objects in the account root. { @@ -280,4 +280,4 @@ doAccountObjects(RPC::JsonContext& context) return result; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/AccountOffers.cpp b/src/xrpld/rpc/handlers/AccountOffers.cpp index acba153554..ee1a0e98b3 100644 --- a/src/xrpld/rpc/handlers/AccountOffers.cpp +++ b/src/xrpld/rpc/handlers/AccountOffers.cpp @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { void appendOfferJson(std::shared_ptr const& offer, Json::Value& offers) @@ -124,7 +124,7 @@ doAccountOffers(RPC::JsonContext& context) if (!sle) { // LCOV_EXCL_START - UNREACHABLE("ripple::doAccountOffers : null SLE"); + UNREACHABLE("xrpl::doAccountOffers : null SLE"); return false; // LCOV_EXCL_STOP } @@ -163,4 +163,4 @@ doAccountOffers(RPC::JsonContext& context) return result; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/AccountTx.cpp b/src/xrpld/rpc/handlers/AccountTx.cpp index b3f1ec65ef..672cf61c09 100644 --- a/src/xrpld/rpc/handlers/AccountTx.cpp +++ b/src/xrpld/rpc/handlers/AccountTx.cpp @@ -19,7 +19,7 @@ #include #include -namespace ripple { +namespace xrpl { using TxnsData = RelationalDatabase::AccountTxs; using TxnsDataBinary = RelationalDatabase::MetaTxsList; @@ -288,8 +288,7 @@ populateJsonResponse( if (auto txnsData = std::get_if(&result.transactions)) { XRPL_ASSERT( - !args.binary, - "ripple::populateJsonResponse : binary is not set"); + !args.binary, "xrpl::populateJsonResponse : binary is not set"); for (auto const& [txn, txnMeta] : *txnsData) { @@ -339,7 +338,7 @@ populateJsonResponse( { // LCOV_EXCL_START UNREACHABLE( - "ripple::populateJsonResponse : missing " + "xrpl::populateJsonResponse : missing " "transaction medatata"); // LCOV_EXCL_STOP } @@ -349,7 +348,7 @@ populateJsonResponse( else { XRPL_ASSERT( - args.binary, "ripple::populateJsonResponse : binary is set"); + args.binary, "xrpl::populateJsonResponse : binary is set"); for (auto const& binaryData : std::get(result.transactions)) @@ -465,4 +464,4 @@ doAccountTxJson(RPC::JsonContext& context) return populateJsonResponse(res, args, context); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/BlackList.cpp b/src/xrpld/rpc/handlers/BlackList.cpp index 859eb1fbce..102041b8d0 100644 --- a/src/xrpld/rpc/handlers/BlackList.cpp +++ b/src/xrpld/rpc/handlers/BlackList.cpp @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { Json::Value doBlackList(RPC::JsonContext& context) @@ -16,4 +16,4 @@ doBlackList(RPC::JsonContext& context) return rm.getJson(); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/BookOffers.cpp b/src/xrpld/rpc/handlers/BookOffers.cpp index d0544460d1..470534983a 100644 --- a/src/xrpld/rpc/handlers/BookOffers.cpp +++ b/src/xrpld/rpc/handlers/BookOffers.cpp @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { Json::Value doBookOffers(RPC::JsonContext& context) @@ -211,4 +211,4 @@ doBookChanges(RPC::JsonContext& context) return RPC::computeBookChanges(ledger); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/CanDelete.cpp b/src/xrpld/rpc/handlers/CanDelete.cpp index c950b7a23d..a2523e68b5 100644 --- a/src/xrpld/rpc/handlers/CanDelete.cpp +++ b/src/xrpld/rpc/handlers/CanDelete.cpp @@ -9,7 +9,7 @@ #include -namespace ripple { +namespace xrpl { // can_delete [||now|always|never] Json::Value @@ -79,4 +79,4 @@ doCanDelete(RPC::JsonContext& context) return ret; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/Connect.cpp b/src/xrpld/rpc/handlers/Connect.cpp index 2c6d67c3f0..2cd3b70149 100644 --- a/src/xrpld/rpc/handlers/Connect.cpp +++ b/src/xrpld/rpc/handlers/Connect.cpp @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { // { // ip: , @@ -51,4 +51,4 @@ doConnect(RPC::JsonContext& context) " port: " + std::to_string(iPort)); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/ConsensusInfo.cpp b/src/xrpld/rpc/handlers/ConsensusInfo.cpp index 8459cc6520..386ff99458 100644 --- a/src/xrpld/rpc/handlers/ConsensusInfo.cpp +++ b/src/xrpld/rpc/handlers/ConsensusInfo.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { Json::Value doConsensusInfo(RPC::JsonContext& context) @@ -17,4 +17,4 @@ doConsensusInfo(RPC::JsonContext& context) return ret; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/DepositAuthorized.cpp b/src/xrpld/rpc/handlers/DepositAuthorized.cpp index 7490dbea94..2b4ee22e01 100644 --- a/src/xrpld/rpc/handlers/DepositAuthorized.cpp +++ b/src/xrpld/rpc/handlers/DepositAuthorized.cpp @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { // { // source_account : @@ -182,4 +182,4 @@ doDepositAuthorized(RPC::JsonContext& context) return result; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/DoManifest.cpp b/src/xrpld/rpc/handlers/DoManifest.cpp index eabdc51d56..5928947e21 100644 --- a/src/xrpld/rpc/handlers/DoManifest.cpp +++ b/src/xrpld/rpc/handlers/DoManifest.cpp @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { Json::Value doManifest(RPC::JsonContext& context) { @@ -56,4 +56,4 @@ doManifest(RPC::JsonContext& context) ret[jss::details] = details; return ret; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/Feature1.cpp b/src/xrpld/rpc/handlers/Feature1.cpp index f452f562c2..dc1ccaee6c 100644 --- a/src/xrpld/rpc/handlers/Feature1.cpp +++ b/src/xrpld/rpc/handlers/Feature1.cpp @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { // { // feature : @@ -78,4 +78,4 @@ doFeature(RPC::JsonContext& context) return jvReply; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/Fee1.cpp b/src/xrpld/rpc/handlers/Fee1.cpp index 8349c67875..49a36261f4 100644 --- a/src/xrpld/rpc/handlers/Fee1.cpp +++ b/src/xrpld/rpc/handlers/Fee1.cpp @@ -6,7 +6,7 @@ #include -namespace ripple { +namespace xrpl { Json::Value doFee(RPC::JsonContext& context) { @@ -15,10 +15,10 @@ doFee(RPC::JsonContext& context) return result; // LCOV_EXCL_START - UNREACHABLE("ripple::doFee : invalid result type"); + UNREACHABLE("xrpl::doFee : invalid result type"); RPC::inject_error(rpcINTERNAL, context.params); return context.params; // LCOV_EXCL_STOP } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/FetchInfo.cpp b/src/xrpld/rpc/handlers/FetchInfo.cpp index 9e3f61495b..0c251fe9d6 100644 --- a/src/xrpld/rpc/handlers/FetchInfo.cpp +++ b/src/xrpld/rpc/handlers/FetchInfo.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { Json::Value doFetchInfo(RPC::JsonContext& context) @@ -24,4 +24,4 @@ doFetchInfo(RPC::JsonContext& context) return ret; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/GatewayBalances.cpp b/src/xrpld/rpc/handlers/GatewayBalances.cpp index 3e614c2a24..9e334d71ba 100644 --- a/src/xrpld/rpc/handlers/GatewayBalances.cpp +++ b/src/xrpld/rpc/handlers/GatewayBalances.cpp @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { // Query: // 1) Specify ledger to query. @@ -271,4 +271,4 @@ doGatewayBalances(RPC::JsonContext& context) return result; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/GetAggregatePrice.cpp b/src/xrpld/rpc/handlers/GetAggregatePrice.cpp index a1121e260b..7982d4ff70 100644 --- a/src/xrpld/rpc/handlers/GetAggregatePrice.cpp +++ b/src/xrpld/rpc/handlers/GetAggregatePrice.cpp @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { using namespace boost::bimaps; // sorted descending by lastUpdateTime, ascending by AssetPrice @@ -361,4 +361,4 @@ doGetAggregatePrice(RPC::JsonContext& context) return result; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/GetCounts.cpp b/src/xrpld/rpc/handlers/GetCounts.cpp index 17b2c8565b..ad158a57a5 100644 --- a/src/xrpld/rpc/handlers/GetCounts.cpp +++ b/src/xrpld/rpc/handlers/GetCounts.cpp @@ -12,7 +12,7 @@ #include #include -namespace ripple { +namespace xrpl { static void textTime( @@ -126,4 +126,4 @@ doGetCounts(RPC::JsonContext& context) return getCountsJson(context.app, minCount); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/GetCounts.h b/src/xrpld/rpc/handlers/GetCounts.h index aed024ca1a..0d544a4f11 100644 --- a/src/xrpld/rpc/handlers/GetCounts.h +++ b/src/xrpld/rpc/handlers/GetCounts.h @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { Json::Value getCountsJson(Application& app, int minObjectCount); diff --git a/src/xrpld/rpc/handlers/Handlers.h b/src/xrpld/rpc/handlers/Handlers.h index 6f4abfd421..773186237b 100644 --- a/src/xrpld/rpc/handlers/Handlers.h +++ b/src/xrpld/rpc/handlers/Handlers.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { Json::Value doAccountCurrencies(RPC::JsonContext&); @@ -149,6 +149,6 @@ Json::Value doValidatorInfo(RPC::JsonContext&); Json::Value doVaultInfo(RPC::JsonContext&); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/rpc/handlers/LedgerAccept.cpp b/src/xrpld/rpc/handlers/LedgerAccept.cpp index 6221b2f7fc..8938e3f152 100644 --- a/src/xrpld/rpc/handlers/LedgerAccept.cpp +++ b/src/xrpld/rpc/handlers/LedgerAccept.cpp @@ -9,7 +9,7 @@ #include -namespace ripple { +namespace xrpl { Json::Value doLedgerAccept(RPC::JsonContext& context) @@ -31,4 +31,4 @@ doLedgerAccept(RPC::JsonContext& context) return jvResult; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/LedgerCleanerHandler.cpp b/src/xrpld/rpc/handlers/LedgerCleanerHandler.cpp index 5926bfed8f..408cd16023 100644 --- a/src/xrpld/rpc/handlers/LedgerCleanerHandler.cpp +++ b/src/xrpld/rpc/handlers/LedgerCleanerHandler.cpp @@ -5,7 +5,7 @@ #include -namespace ripple { +namespace xrpl { Json::Value doLedgerCleaner(RPC::JsonContext& context) @@ -14,4 +14,4 @@ doLedgerCleaner(RPC::JsonContext& context) return RPC::makeObjectValue("Cleaner configured"); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/LedgerClosed.cpp b/src/xrpld/rpc/handlers/LedgerClosed.cpp index d7911f6b5b..733601cd6a 100644 --- a/src/xrpld/rpc/handlers/LedgerClosed.cpp +++ b/src/xrpld/rpc/handlers/LedgerClosed.cpp @@ -5,13 +5,13 @@ #include #include -namespace ripple { +namespace xrpl { Json::Value doLedgerClosed(RPC::JsonContext& context) { auto ledger = context.ledgerMaster.getClosedLedger(); - XRPL_ASSERT(ledger, "ripple::doLedgerClosed : non-null closed ledger"); + XRPL_ASSERT(ledger, "xrpl::doLedgerClosed : non-null closed ledger"); Json::Value jvResult; jvResult[jss::ledger_index] = ledger->info().seq; @@ -20,4 +20,4 @@ doLedgerClosed(RPC::JsonContext& context) return jvResult; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/LedgerCurrent.cpp b/src/xrpld/rpc/handlers/LedgerCurrent.cpp index 84e9820ac5..21b72147c6 100644 --- a/src/xrpld/rpc/handlers/LedgerCurrent.cpp +++ b/src/xrpld/rpc/handlers/LedgerCurrent.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { Json::Value doLedgerCurrent(RPC::JsonContext& context) @@ -16,4 +16,4 @@ doLedgerCurrent(RPC::JsonContext& context) return jvResult; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/LedgerData.cpp b/src/xrpld/rpc/handlers/LedgerData.cpp index d5f27a138e..10d16a309f 100644 --- a/src/xrpld/rpc/handlers/LedgerData.cpp +++ b/src/xrpld/rpc/handlers/LedgerData.cpp @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { // Get state nodes from a ledger // Inputs: @@ -191,4 +191,4 @@ doLedgerDataGrpc( return {response, status}; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/LedgerDiff.cpp b/src/xrpld/rpc/handlers/LedgerDiff.cpp index d713f43bfd..1a37abd67e 100644 --- a/src/xrpld/rpc/handlers/LedgerDiff.cpp +++ b/src/xrpld/rpc/handlers/LedgerDiff.cpp @@ -1,7 +1,7 @@ #include #include -namespace ripple { +namespace xrpl { std::pair doLedgerDiffGrpc( RPC::GRPCContext& context) @@ -75,7 +75,7 @@ doLedgerDiffGrpc( { XRPL_ASSERT( inDesired->size() > 0, - "ripple::doLedgerDiffGrpc : non-empty desired"); + "xrpl::doLedgerDiffGrpc : non-empty desired"); diff->set_key(k.data(), k.size()); if (request.include_blobs()) { @@ -86,4 +86,4 @@ doLedgerDiffGrpc( return {response, status}; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/LedgerEntry.cpp b/src/xrpld/rpc/handlers/LedgerEntry.cpp index 78655f1c9f..abfd9ac796 100644 --- a/src/xrpld/rpc/handlers/LedgerEntry.cpp +++ b/src/xrpld/rpc/handlers/LedgerEntry.cpp @@ -18,7 +18,7 @@ #include -namespace ripple { +namespace xrpl { static Expected parseObjectID( @@ -864,4 +864,4 @@ doLedgerEntryGrpc( *(response.mutable_ledger()) = request.ledger(); return {response, status}; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/LedgerEntryHelpers.h b/src/xrpld/rpc/handlers/LedgerEntryHelpers.h index d83b7e2896..0a4453c063 100644 --- a/src/xrpld/rpc/handlers/LedgerEntryHelpers.h +++ b/src/xrpld/rpc/handlers/LedgerEntryHelpers.h @@ -12,7 +12,7 @@ #include -namespace ripple { +namespace xrpl { namespace LedgerEntryHelpers { @@ -277,4 +277,4 @@ parseBridgeFields(Json::Value const& params) } // namespace LedgerEntryHelpers -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/LedgerHandler.cpp b/src/xrpld/rpc/handlers/LedgerHandler.cpp index 42b5c31875..691f650548 100644 --- a/src/xrpld/rpc/handlers/LedgerHandler.cpp +++ b/src/xrpld/rpc/handlers/LedgerHandler.cpp @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace RPC { LedgerHandler::LedgerHandler(JsonContext& context) : context_(context) @@ -113,7 +113,7 @@ doLedgerGrpc(RPC::GRPCContext& context) for (auto& i : ledger->txs) { XRPL_ASSERT( - i.first, "ripple::doLedgerGrpc : non-null transaction"); + i.first, "xrpl::doLedgerGrpc : non-null transaction"); if (request.expand()) { auto txn = response.mutable_transactions_list() @@ -191,7 +191,7 @@ doLedgerGrpc(RPC::GRPCContext& context) { XRPL_ASSERT( inDesired->size() > 0, - "ripple::doLedgerGrpc : non-empty desired"); + "xrpl::doLedgerGrpc : non-empty desired"); obj->set_data(inDesired->data(), inDesired->size()); } if (inBase && inDesired) @@ -297,4 +297,4 @@ doLedgerGrpc(RPC::GRPCContext& context) return {response, status}; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/LedgerHandler.h b/src/xrpld/rpc/handlers/LedgerHandler.h index 1b9b7986c0..3966ab261a 100644 --- a/src/xrpld/rpc/handlers/LedgerHandler.h +++ b/src/xrpld/rpc/handlers/LedgerHandler.h @@ -18,7 +18,7 @@ namespace Json { class Object; } -namespace ripple { +namespace xrpl { namespace RPC { struct JsonContext; @@ -103,6 +103,6 @@ LedgerHandler::writeResult(Object& value) } } // namespace RPC -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/rpc/handlers/LedgerHeader.cpp b/src/xrpld/rpc/handlers/LedgerHeader.cpp index 193ca355d3..35fd4dc980 100644 --- a/src/xrpld/rpc/handlers/LedgerHeader.cpp +++ b/src/xrpld/rpc/handlers/LedgerHeader.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { // { // ledger_hash : @@ -31,4 +31,4 @@ doLedgerHeader(RPC::JsonContext& context) return jvResult; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/LedgerRequest.cpp b/src/xrpld/rpc/handlers/LedgerRequest.cpp index ea3208605f..bf323863cb 100644 --- a/src/xrpld/rpc/handlers/LedgerRequest.cpp +++ b/src/xrpld/rpc/handlers/LedgerRequest.cpp @@ -7,7 +7,7 @@ #include -namespace ripple { +namespace xrpl { // { // ledger_hash : @@ -29,4 +29,4 @@ doLedgerRequest(RPC::JsonContext& context) return jvResult; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/LogLevel.cpp b/src/xrpld/rpc/handlers/LogLevel.cpp index cf5a1d2573..373db55fa0 100644 --- a/src/xrpld/rpc/handlers/LogLevel.cpp +++ b/src/xrpld/rpc/handlers/LogLevel.cpp @@ -9,7 +9,7 @@ #include -namespace ripple { +namespace xrpl { Json::Value doLogLevel(RPC::JsonContext& context) @@ -64,4 +64,4 @@ doLogLevel(RPC::JsonContext& context) return rpcError(rpcINVALID_PARAMS); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/LogRotate.cpp b/src/xrpld/rpc/handlers/LogRotate.cpp index 379d694c0f..e37744f404 100644 --- a/src/xrpld/rpc/handlers/LogRotate.cpp +++ b/src/xrpld/rpc/handlers/LogRotate.cpp @@ -4,7 +4,7 @@ #include -namespace ripple { +namespace xrpl { Json::Value doLogRotate(RPC::JsonContext& context) @@ -13,4 +13,4 @@ doLogRotate(RPC::JsonContext& context) return RPC::makeObjectValue(context.app.logs().rotate()); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/NFTOffers.cpp b/src/xrpld/rpc/handlers/NFTOffers.cpp index 6d11ff5b0a..33757f9964 100644 --- a/src/xrpld/rpc/handlers/NFTOffers.cpp +++ b/src/xrpld/rpc/handlers/NFTOffers.cpp @@ -10,7 +10,7 @@ #include #include -namespace ripple { +namespace xrpl { static void appendNftOfferJson( @@ -156,4 +156,4 @@ doNFTBuyOffers(RPC::JsonContext& context) return enumerateNFTOffers(context, nftId, keylet::nft_buys(nftId)); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/NoRippleCheck.cpp b/src/xrpld/rpc/handlers/NoRippleCheck.cpp index e5c1170969..08db03a08c 100644 --- a/src/xrpld/rpc/handlers/NoRippleCheck.cpp +++ b/src/xrpld/rpc/handlers/NoRippleCheck.cpp @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { static void fillTransaction( @@ -184,4 +184,4 @@ doNoRippleCheck(RPC::JsonContext& context) return result; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/OwnerInfo.cpp b/src/xrpld/rpc/handlers/OwnerInfo.cpp index 8f43bfcc99..37a4ceb60d 100644 --- a/src/xrpld/rpc/handlers/OwnerInfo.cpp +++ b/src/xrpld/rpc/handlers/OwnerInfo.cpp @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { // { // 'ident' : , @@ -40,4 +40,4 @@ doOwnerInfo(RPC::JsonContext& context) return ret; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/PathFind.cpp b/src/xrpld/rpc/handlers/PathFind.cpp index 430212fe46..55575b5513 100644 --- a/src/xrpld/rpc/handlers/PathFind.cpp +++ b/src/xrpld/rpc/handlers/PathFind.cpp @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { Json::Value doPathFind(RPC::JsonContext& context) @@ -63,4 +63,4 @@ doPathFind(RPC::JsonContext& context) return rpcError(rpcINVALID_PARAMS); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/PayChanClaim.cpp b/src/xrpld/rpc/handlers/PayChanClaim.cpp index dd36a873f0..f0113ddabb 100644 --- a/src/xrpld/rpc/handlers/PayChanClaim.cpp +++ b/src/xrpld/rpc/handlers/PayChanClaim.cpp @@ -11,7 +11,7 @@ #include -namespace ripple { +namespace xrpl { // { // secret_key: @@ -45,7 +45,7 @@ doChannelAuthorize(RPC::JsonContext& context) XRPL_ASSERT( keyPair || RPC::contains_error(result), - "ripple::doChannelAuthorize : valid keyPair or an error"); + "xrpl::doChannelAuthorize : valid keyPair or an error"); if (!keyPair || RPC::contains_error(result)) return result; @@ -142,4 +142,4 @@ doChannelVerify(RPC::JsonContext& context) return result; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/Peers.cpp b/src/xrpld/rpc/handlers/Peers.cpp index ba9f459b41..5a34f4b557 100644 --- a/src/xrpld/rpc/handlers/Peers.cpp +++ b/src/xrpld/rpc/handlers/Peers.cpp @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { Json::Value doPeers(RPC::JsonContext& context) @@ -63,4 +63,4 @@ doPeers(RPC::JsonContext& context) return jvResult; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/Ping.cpp b/src/xrpld/rpc/handlers/Ping.cpp index 459f743e86..cc3c558cd9 100644 --- a/src/xrpld/rpc/handlers/Ping.cpp +++ b/src/xrpld/rpc/handlers/Ping.cpp @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace RPC { struct JsonContext; @@ -41,4 +41,4 @@ doPing(RPC::JsonContext& context) return ret; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/Print.cpp b/src/xrpld/rpc/handlers/Print.cpp index 2c3b886797..6ea1f355aa 100644 --- a/src/xrpld/rpc/handlers/Print.cpp +++ b/src/xrpld/rpc/handlers/Print.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { Json::Value doPrint(RPC::JsonContext& context) @@ -24,4 +24,4 @@ doPrint(RPC::JsonContext& context) return stream.top(); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/Random.cpp b/src/xrpld/rpc/handlers/Random.cpp index 7156e20f59..2fb8abf3c9 100644 --- a/src/xrpld/rpc/handlers/Random.cpp +++ b/src/xrpld/rpc/handlers/Random.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { namespace RPC { struct JsonContext; @@ -36,4 +36,4 @@ doRandom(RPC::JsonContext& context) } } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/Reservations.cpp b/src/xrpld/rpc/handlers/Reservations.cpp index 2c7ec2d8c9..195a5be453 100644 --- a/src/xrpld/rpc/handlers/Reservations.cpp +++ b/src/xrpld/rpc/handlers/Reservations.cpp @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { Json::Value doPeerReservationsAdd(RPC::JsonContext& context) @@ -108,4 +108,4 @@ doPeerReservationsList(RPC::JsonContext& context) return result; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/RipplePathFind.cpp b/src/xrpld/rpc/handlers/RipplePathFind.cpp index 1cfea8dd5c..509b35b6c2 100644 --- a/src/xrpld/rpc/handlers/RipplePathFind.cpp +++ b/src/xrpld/rpc/handlers/RipplePathFind.cpp @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { // This interface is deprecated. Json::Value @@ -155,4 +155,4 @@ doRipplePathFind(RPC::JsonContext& context) return result; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/ServerDefinitions.cpp b/src/xrpld/rpc/handlers/ServerDefinitions.cpp index a25716066e..9fce4d5a5b 100644 --- a/src/xrpld/rpc/handlers/ServerDefinitions.cpp +++ b/src/xrpld/rpc/handlers/ServerDefinitions.cpp @@ -14,7 +14,7 @@ #include -namespace ripple { +namespace xrpl { namespace detail { @@ -214,7 +214,7 @@ ServerDefinitions::ServerDefinitions() : defs_{Json::objectValue} defs_[jss::FIELDS][i++] = a; } - for (auto const& [code, f] : ripple::SField::getKnownCodeToField()) + for (auto const& [code, f] : xrpl::SField::getKnownCodeToField()) { if (f->fieldName == "") continue; @@ -268,7 +268,7 @@ ServerDefinitions::ServerDefinitions() : defs_{Json::objectValue} // generate hash { std::string const out = Json::FastWriter().write(defs_); - defsHash_ = ripple::sha512Half(ripple::Slice{out.data(), out.size()}); + defsHash_ = xrpl::sha512Half(xrpl::Slice{out.data(), out.size()}); defs_[jss::hash] = to_string(defsHash_); } } @@ -298,4 +298,4 @@ doServerDefinitions(RPC::JsonContext& context) return defs.get(); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/ServerInfo.cpp b/src/xrpld/rpc/handlers/ServerInfo.cpp index c13ebfe788..c7bd7f271d 100644 --- a/src/xrpld/rpc/handlers/ServerInfo.cpp +++ b/src/xrpld/rpc/handlers/ServerInfo.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { Json::Value doServerInfo(RPC::JsonContext& context) @@ -22,4 +22,4 @@ doServerInfo(RPC::JsonContext& context) return ret; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/ServerState.cpp b/src/xrpld/rpc/handlers/ServerState.cpp index 7769b32f71..4ec08540fb 100644 --- a/src/xrpld/rpc/handlers/ServerState.cpp +++ b/src/xrpld/rpc/handlers/ServerState.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { Json::Value doServerState(RPC::JsonContext& context) @@ -21,4 +21,4 @@ doServerState(RPC::JsonContext& context) return ret; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/SignFor.cpp b/src/xrpld/rpc/handlers/SignFor.cpp index 5750e20245..7926dd7c8e 100644 --- a/src/xrpld/rpc/handlers/SignFor.cpp +++ b/src/xrpld/rpc/handlers/SignFor.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { // { // tx_json: , @@ -40,4 +40,4 @@ doSignFor(RPC::JsonContext& context) return ret; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/SignHandler.cpp b/src/xrpld/rpc/handlers/SignHandler.cpp index 5a6a5a2947..cab957d8c7 100644 --- a/src/xrpld/rpc/handlers/SignHandler.cpp +++ b/src/xrpld/rpc/handlers/SignHandler.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { // { // tx_json: , @@ -41,4 +41,4 @@ doSign(RPC::JsonContext& context) return ret; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/Simulate.cpp b/src/xrpld/rpc/handlers/Simulate.cpp index 42cdd66a69..09d9688ad0 100644 --- a/src/xrpld/rpc/handlers/Simulate.cpp +++ b/src/xrpld/rpc/handlers/Simulate.cpp @@ -16,7 +16,7 @@ #include #include -namespace ripple { +namespace xrpl { static Expected getAutofillSequence(Json::Value const& tx_json, RPC::JsonContext& context) @@ -369,4 +369,4 @@ doSimulate(RPC::JsonContext& context) // LCOV_EXCL_STOP } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/Stop.cpp b/src/xrpld/rpc/handlers/Stop.cpp index 33221d601d..d2f1cd7a80 100644 --- a/src/xrpld/rpc/handlers/Stop.cpp +++ b/src/xrpld/rpc/handlers/Stop.cpp @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace RPC { struct JsonContext; @@ -16,4 +16,4 @@ doStop(RPC::JsonContext& context) return RPC::makeObjectValue(systemName() + " server stopping"); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/Submit.cpp b/src/xrpld/rpc/handlers/Submit.cpp index 5cce61a1a6..e3888187ae 100644 --- a/src/xrpld/rpc/handlers/Submit.cpp +++ b/src/xrpld/rpc/handlers/Submit.cpp @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { static NetworkOPs::FailHard getFailHard(RPC::JsonContext const& context) @@ -173,4 +173,4 @@ doSubmit(RPC::JsonContext& context) } } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/SubmitMultiSigned.cpp b/src/xrpld/rpc/handlers/SubmitMultiSigned.cpp index 614ba4abbf..52213e174a 100644 --- a/src/xrpld/rpc/handlers/SubmitMultiSigned.cpp +++ b/src/xrpld/rpc/handlers/SubmitMultiSigned.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { // { // SigningAccounts , @@ -28,4 +28,4 @@ doSubmitMultiSigned(RPC::JsonContext& context) RPC::getProcessTxnFn(context.netOps)); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/Subscribe.cpp b/src/xrpld/rpc/handlers/Subscribe.cpp index ab4f20d8ce..018268defb 100644 --- a/src/xrpld/rpc/handlers/Subscribe.cpp +++ b/src/xrpld/rpc/handlers/Subscribe.cpp @@ -13,7 +13,7 @@ #include #include -namespace ripple { +namespace xrpl { Json::Value doSubscribe(RPC::JsonContext& context) @@ -367,4 +367,4 @@ doSubscribe(RPC::JsonContext& context) return jvResult; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/TransactionEntry.cpp b/src/xrpld/rpc/handlers/TransactionEntry.cpp index 5dd8d685e1..13f44eb658 100644 --- a/src/xrpld/rpc/handlers/TransactionEntry.cpp +++ b/src/xrpld/rpc/handlers/TransactionEntry.cpp @@ -6,7 +6,7 @@ #include #include -namespace ripple { +namespace xrpl { // { // ledger_hash : , @@ -95,4 +95,4 @@ doTransactionEntry(RPC::JsonContext& context) return jvResult; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/Tx.cpp b/src/xrpld/rpc/handlers/Tx.cpp index 34a71fe925..a19a68741c 100644 --- a/src/xrpld/rpc/handlers/Tx.cpp +++ b/src/xrpld/rpc/handlers/Tx.cpp @@ -19,7 +19,7 @@ #include -namespace ripple { +namespace xrpl { static bool isValidated(LedgerMaster& ledgerMaster, std::uint32_t seq, uint256 const& hash) @@ -237,7 +237,7 @@ populateJsonResponse( if (auto blob = std::get_if(&result.meta)) { XRPL_ASSERT( - args.binary, "ripple::populateJsonResponse : binary is set"); + args.binary, "xrpl::populateJsonResponse : binary is set"); auto json_meta = (context.apiVersion > 1 ? jss::meta_blob : jss::meta); response[json_meta] = strHex(makeSlice(*blob)); @@ -328,4 +328,4 @@ doTxJson(RPC::JsonContext& context) return populateJsonResponse(res, args, context); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/TxHistory.cpp b/src/xrpld/rpc/handlers/TxHistory.cpp index 9c8c2faece..a210f61c54 100644 --- a/src/xrpld/rpc/handlers/TxHistory.cpp +++ b/src/xrpld/rpc/handlers/TxHistory.cpp @@ -11,7 +11,7 @@ #include #include -namespace ripple { +namespace xrpl { // { // start: @@ -49,4 +49,4 @@ doTxHistory(RPC::JsonContext& context) return obj; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/TxReduceRelay.cpp b/src/xrpld/rpc/handlers/TxReduceRelay.cpp index e2ef4c5b18..d269ef448e 100644 --- a/src/xrpld/rpc/handlers/TxReduceRelay.cpp +++ b/src/xrpld/rpc/handlers/TxReduceRelay.cpp @@ -4,7 +4,7 @@ #include -namespace ripple { +namespace xrpl { Json::Value doTxReduceRelay(RPC::JsonContext& context) @@ -12,4 +12,4 @@ doTxReduceRelay(RPC::JsonContext& context) return context.app.overlay().txMetrics(); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/UnlList.cpp b/src/xrpld/rpc/handlers/UnlList.cpp index 6a23daab58..8c28373a05 100644 --- a/src/xrpld/rpc/handlers/UnlList.cpp +++ b/src/xrpld/rpc/handlers/UnlList.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { Json::Value doUnlList(RPC::JsonContext& context) @@ -26,4 +26,4 @@ doUnlList(RPC::JsonContext& context) return obj; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/Unsubscribe.cpp b/src/xrpld/rpc/handlers/Unsubscribe.cpp index f84ae00cfc..bc192510bf 100644 --- a/src/xrpld/rpc/handlers/Unsubscribe.cpp +++ b/src/xrpld/rpc/handlers/Unsubscribe.cpp @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { Json::Value doUnsubscribe(RPC::JsonContext& context) @@ -244,4 +244,4 @@ doUnsubscribe(RPC::JsonContext& context) return jvResult; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/ValidationCreate.cpp b/src/xrpld/rpc/handlers/ValidationCreate.cpp index fc7be5777c..c4bdf1b3de 100644 --- a/src/xrpld/rpc/handlers/ValidationCreate.cpp +++ b/src/xrpld/rpc/handlers/ValidationCreate.cpp @@ -5,7 +5,7 @@ #include #include -namespace ripple { +namespace xrpl { static std::optional validationSeed(Json::Value const& params) @@ -47,4 +47,4 @@ doValidationCreate(RPC::JsonContext& context) return obj; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/ValidatorInfo.cpp b/src/xrpld/rpc/handlers/ValidatorInfo.cpp index ba2f963851..20d07df866 100644 --- a/src/xrpld/rpc/handlers/ValidatorInfo.cpp +++ b/src/xrpld/rpc/handlers/ValidatorInfo.cpp @@ -9,7 +9,7 @@ #include #include -namespace ripple { +namespace xrpl { Json::Value doValidatorInfo(RPC::JsonContext& context) { @@ -43,4 +43,4 @@ doValidatorInfo(RPC::JsonContext& context) return ret; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/ValidatorListSites.cpp b/src/xrpld/rpc/handlers/ValidatorListSites.cpp index 22644d65e3..7acaa27168 100644 --- a/src/xrpld/rpc/handlers/ValidatorListSites.cpp +++ b/src/xrpld/rpc/handlers/ValidatorListSites.cpp @@ -4,7 +4,7 @@ #include -namespace ripple { +namespace xrpl { Json::Value doValidatorListSites(RPC::JsonContext& context) @@ -12,4 +12,4 @@ doValidatorListSites(RPC::JsonContext& context) return context.app.validatorSites().getJson(); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/Validators.cpp b/src/xrpld/rpc/handlers/Validators.cpp index 67d1c60e3a..a83a6fe4b0 100644 --- a/src/xrpld/rpc/handlers/Validators.cpp +++ b/src/xrpld/rpc/handlers/Validators.cpp @@ -4,7 +4,7 @@ #include -namespace ripple { +namespace xrpl { Json::Value doValidators(RPC::JsonContext& context) @@ -12,4 +12,4 @@ doValidators(RPC::JsonContext& context) return context.app.validators().getJson(); } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/VaultInfo.cpp b/src/xrpld/rpc/handlers/VaultInfo.cpp index 3e8226352a..88b944dab7 100644 --- a/src/xrpld/rpc/handlers/VaultInfo.cpp +++ b/src/xrpld/rpc/handlers/VaultInfo.cpp @@ -8,7 +8,7 @@ #include #include -namespace ripple { +namespace xrpl { static std::optional parseVault(Json::Value const& params, Json::Value& jvResult) @@ -92,4 +92,4 @@ doVaultInfo(RPC::JsonContext& context) return jvResult; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/Version.h b/src/xrpld/rpc/handlers/Version.h index 794f9a1cf7..d9e4feb16d 100644 --- a/src/xrpld/rpc/handlers/Version.h +++ b/src/xrpld/rpc/handlers/Version.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { namespace RPC { class VersionHandler @@ -43,6 +43,6 @@ private: }; } // namespace RPC -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/rpc/handlers/WalletPropose.cpp b/src/xrpld/rpc/handlers/WalletPropose.cpp index 575bb84322..c245d5546d 100644 --- a/src/xrpld/rpc/handlers/WalletPropose.cpp +++ b/src/xrpld/rpc/handlers/WalletPropose.cpp @@ -14,7 +14,7 @@ #include #include -namespace ripple { +namespace xrpl { double estimate_entropy(std::string const& input) @@ -158,4 +158,4 @@ walletPropose(Json::Value const& params) return obj; } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/rpc/handlers/WalletPropose.h b/src/xrpld/rpc/handlers/WalletPropose.h index e041b6608f..42c7973055 100644 --- a/src/xrpld/rpc/handlers/WalletPropose.h +++ b/src/xrpld/rpc/handlers/WalletPropose.h @@ -3,11 +3,11 @@ #include -namespace ripple { +namespace xrpl { Json::Value walletPropose(Json::Value const& params); -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/rpc/json_body.h b/src/xrpld/rpc/json_body.h index 4dd9142c09..af20ec17ac 100644 --- a/src/xrpld/rpc/json_body.h +++ b/src/xrpld/rpc/json_body.h @@ -7,7 +7,7 @@ #include #include -namespace ripple { +namespace xrpl { /// Body that holds JSON struct json_body @@ -91,6 +91,6 @@ struct json_body }; }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/src/xrpld/shamap/NodeFamily.cpp b/src/xrpld/shamap/NodeFamily.cpp index b9cca65d36..d43ab1d648 100644 --- a/src/xrpld/shamap/NodeFamily.cpp +++ b/src/xrpld/shamap/NodeFamily.cpp @@ -4,7 +4,7 @@ #include #include -namespace ripple { +namespace xrpl { NodeFamily::NodeFamily(Application& app, CollectorManager& cm) : app_(app) @@ -87,4 +87,4 @@ NodeFamily::acquire(uint256 const& hash, std::uint32_t seq) } } -} // namespace ripple +} // namespace xrpl diff --git a/src/xrpld/shamap/NodeFamily.h b/src/xrpld/shamap/NodeFamily.h index f8bb278ac9..14c2ebb093 100644 --- a/src/xrpld/shamap/NodeFamily.h +++ b/src/xrpld/shamap/NodeFamily.h @@ -3,7 +3,7 @@ #include -namespace ripple { +namespace xrpl { class Application; @@ -83,6 +83,6 @@ private: acquire(uint256 const& hash, std::uint32_t seq); }; -} // namespace ripple +} // namespace xrpl #endif diff --git a/tests/conan/src/example.cpp b/tests/conan/src/example.cpp index 41dcd62462..acfb253a7d 100644 --- a/tests/conan/src/example.cpp +++ b/tests/conan/src/example.cpp @@ -5,6 +5,6 @@ int main(int argc, char const** argv) { - std::printf("%s\n", ripple::BuildInfo::getVersionString().c_str()); + std::printf("%s\n", xrpl::BuildInfo::getVersionString().c_str()); return 0; }