diff --git a/.config/cspell.config.yaml b/.config/cspell.config.yaml new file mode 100644 index 00000000000..9620c395b89 --- /dev/null +++ b/.config/cspell.config.yaml @@ -0,0 +1,154 @@ +ignorePaths: + - external/** + - build/** + # TODO: go through test files too + # For a first cut, just ignore everything in src/test + - src/test/** + - src/libxrpl/crypto + - CMakeUserPresets.json +language: en +dictionaries: + - cpp +ignoreRegExpList: + - /r[1-9A-HJ-NP-Za-km-z]{25,34}/g + - /RIPPLE_[A-Z_]+_H_INCLUDED+/g + - /RIPPLE_[A-Z_]+_H+/g + - /boost::[a-z:]+/g + - /std::[a-z:]+/g + - /sle[a-z]{1,3}/g + - /[a-z]{1,3}obj/g + - /lib[a-z]+/g + - /https?:\/\/[^\s"'<>]+/g +ignoreWords: + - nudb + - rippled + - xrpl + - rippletest + - levelization + - distro + - xrplf + - libpb + - protos + - protobuf + - jemalloc + - keylet + - keylets + - insuf + - clawback + - vfalco + - funclets + - shamap + - rocksdb + - noripple + - mptoken + - mptokens + - nftoken + - nftokens + - mptid + - mptokenid + - nftid + - nftokenid + - permissioned + - variadics + - jlog + - daria + - checkme + - xchain + - insuff + - preauth + - preauthorization + - preauthorize + - libxrpl + - legleux + - sle + - sles + - txs + - tx + - txid + - txids + - txjson + - txn + - txns + - deserializaton + - ledgerhash + - ledgerindex + - wptr + - replayer + - cowid + - xrpld + - conanrun + - bindir + - ters + - RIPD + - USDB + - RLUSD + - ters + - AMMID + - takerpays + - takergets + - autobridged + - autobridge + - autobridging + - mptissuance + - preclaim + - finalizers + - LOCALGOOD + - SIGGOOD + - compr + - shamapitem + - ptrs + - Merkle + - nullptr + - ctid + - nftoffer + - ledgerentry + - hotwallet + - coldwallet + - venv + - pyenv + - gcov + - inequation + - levelized + - vinnie + - falco + - fmtdur + - ifndef + - nunl + - sidechain + - nftpage + - cryptocondition + - cryptoconditions + - preauthorizes + - coro + - unshareable + - chrono + - sttx + - stobj + - queuable + - multisigned + - multisign + - multisig + - nikb + - rngfill + - paychan + - perminute + - ious + - iou + - stpath + - stpathset + - amt + - amts + - xxhasher + - bookdir + - ripplerpc + - mptflags + - mptbalance + - permdex + - ostr + - soci + - unshares + - lseq + - secp + - superpeer + - superpeers + - nftokenpages diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3bd60b76d0a..9acf263c978 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -50,6 +50,20 @@ repos: entry: check-merge-conflict --assume-in-merge language: system types: [text] + - repo: https://github.com/streetsidesoftware/cspell-cli + rev: v9.2.0 + hooks: + - id: cspell # Spell check changed files + - id: cspell # Spell check the commit message + name: check commit message spelling + args: + - --no-must-find-files + - --no-progress + - --no-summary + - --files + - .git/COMMIT_EDITMSG + stages: [commit-msg] + always_run: true # This might not be necessary. - repo: local hooks: - id: prettier diff --git a/docs/0001-negative-unl/negativeUNLSqDiagram.puml b/docs/0001-negative-unl/negativeUNLSqDiagram.puml index 9f37d439036..4616308f492 100644 --- a/docs/0001-negative-unl/negativeUNLSqDiagram.puml +++ b/docs/0001-negative-unl/negativeUNLSqDiagram.puml @@ -43,7 +43,7 @@ alt phase == OPEN alt sqn%256==0 CA -[#green]> RM: getValidations CA -[#green]> CA: create UNLModify Tx - hnote over CA#lightgreen: use validatations of the last 256 ledgers\nto figure out UNLModify Tx candidates.\nIf any, create UNLModify Tx, and add to TxSet. + hnote over CA#lightgreen: use validations of the last 256 ledgers\nto figure out UNLModify Tx candidates.\nIf any, create UNLModify Tx, and add to TxSet. end CA -> GC GC -> CA: propose diff --git a/include/xrpl/beast/unit_test/runner.h b/include/xrpl/beast/unit_test/runner.h index 977cc45035a..38bec785d05 100644 --- a/include/xrpl/beast/unit_test/runner.h +++ b/include/xrpl/beast/unit_test/runner.h @@ -42,7 +42,7 @@ class runner The argument string is available to suites and allows for customization of the test. Each suite - defines its own syntax for the argumnet string. + defines its own syntax for the argument string. The same argument is passed to all suites. */ void diff --git a/include/xrpl/json/json_reader.h b/include/xrpl/json/json_reader.h index 81866819a59..4ea57d4ba5e 100644 --- a/include/xrpl/json/json_reader.h +++ b/include/xrpl/json/json_reader.h @@ -87,7 +87,7 @@ class Reader * error occurred during parsing. */ std::string - getFormatedErrorMessages() const; + getFormattedErrorMessages() const; static constexpr unsigned nest_limit{25}; diff --git a/include/xrpl/protocol/Indexes.h b/include/xrpl/protocol/Indexes.h index 3e3f2843c15..f91c019f062 100644 --- a/include/xrpl/protocol/Indexes.h +++ b/include/xrpl/protocol/Indexes.h @@ -37,7 +37,7 @@ namespace ripple { class SeqProxy; -/** Keylet computation funclets. +/** Keylet computation functions. Entries in the ledger are located using 256-bit locators. The locators are calculated using a wide range of parameters specific to the entry whose diff --git a/include/xrpl/protocol/Permissions.h b/include/xrpl/protocol/Permissions.h index 67f3eea8d72..d3e68d7ac29 100644 --- a/include/xrpl/protocol/Permissions.h +++ b/include/xrpl/protocol/Permissions.h @@ -46,14 +46,14 @@ enum GranularPermissionType : std::uint32_t { #pragma pop_macro("PERMISSION") }; -enum Delegation { delegatable, notDelegatable }; +enum Delegation { delegable, notDelegatable }; class Permission { private: Permission(); - std::unordered_map delegatableTx_; + std::unordered_map delegableTx_; std::unordered_map granularPermissionMap_; diff --git a/include/xrpl/protocol/TxFormats.h b/include/xrpl/protocol/TxFormats.h index 70b721a3d7d..ec1b4839cf2 100644 --- a/include/xrpl/protocol/TxFormats.h +++ b/include/xrpl/protocol/TxFormats.h @@ -59,7 +59,7 @@ enum TxType : std::uint16_t #pragma push_macro("TRANSACTION") #undef TRANSACTION -#define TRANSACTION(tag, value, name, delegatable, fields) tag = value, +#define TRANSACTION(tag, value, name, delegable, fields) tag = value, #include diff --git a/include/xrpl/protocol/detail/ledger_entries.macro b/include/xrpl/protocol/detail/ledger_entries.macro index 967fb37b945..c6eb86f6c5d 100644 --- a/include/xrpl/protocol/detail/ledger_entries.macro +++ b/include/xrpl/protocol/detail/ledger_entries.macro @@ -254,7 +254,7 @@ LEDGER_ENTRY(ltOFFER, 0x006f, Offer, offer, ({ {sfAdditionalBooks, soeOPTIONAL}, })) -/** A ledger object which describes a deposit preauthorization. +/** A ledger object which describes a deposit pre-authorization. \sa keylet::depositPreauth */ diff --git a/include/xrpl/protocol/detail/transactions.macro b/include/xrpl/protocol/detail/transactions.macro index 89e9a16df5e..2e2f09296f7 100644 --- a/include/xrpl/protocol/detail/transactions.macro +++ b/include/xrpl/protocol/detail/transactions.macro @@ -22,14 +22,14 @@ #endif /** - * TRANSACTION(tag, value, name, delegatable, fields) + * TRANSACTION(tag, value, name, delegable, fields) * * You must define a transactor class in the `ripple` namespace named `name`, * and include its header in `src/xrpld/app/tx/detail/applySteps.cpp`. */ /** This transaction type executes a payment. */ -TRANSACTION(ttPAYMENT, 0, Payment, Delegation::delegatable, ({ +TRANSACTION(ttPAYMENT, 0, Payment, Delegation::delegable, ({ {sfDestination, soeREQUIRED}, {sfAmount, soeREQUIRED, soeMPTSupported}, {sfSendMax, soeOPTIONAL, soeMPTSupported}, @@ -42,7 +42,7 @@ TRANSACTION(ttPAYMENT, 0, Payment, Delegation::delegatable, ({ })) /** This transaction type creates an escrow object. */ -TRANSACTION(ttESCROW_CREATE, 1, EscrowCreate, Delegation::delegatable, ({ +TRANSACTION(ttESCROW_CREATE, 1, EscrowCreate, Delegation::delegable, ({ {sfDestination, soeREQUIRED}, {sfAmount, soeREQUIRED, soeMPTSupported}, {sfCondition, soeOPTIONAL}, @@ -52,7 +52,7 @@ TRANSACTION(ttESCROW_CREATE, 1, EscrowCreate, Delegation::delegatable, ({ })) /** This transaction type completes an existing escrow. */ -TRANSACTION(ttESCROW_FINISH, 2, EscrowFinish, Delegation::delegatable, ({ +TRANSACTION(ttESCROW_FINISH, 2, EscrowFinish, Delegation::delegable, ({ {sfOwner, soeREQUIRED}, {sfOfferSequence, soeREQUIRED}, {sfFulfillment, soeOPTIONAL}, @@ -76,7 +76,7 @@ TRANSACTION(ttACCOUNT_SET, 3, AccountSet, Delegation::notDelegatable, ({ })) /** This transaction type cancels an existing escrow. */ -TRANSACTION(ttESCROW_CANCEL, 4, EscrowCancel, Delegation::delegatable, ({ +TRANSACTION(ttESCROW_CANCEL, 4, EscrowCancel, Delegation::delegable, ({ {sfOwner, soeREQUIRED}, {sfOfferSequence, soeREQUIRED}, })) @@ -89,7 +89,7 @@ TRANSACTION(ttREGULAR_KEY_SET, 5, SetRegularKey, Delegation::notDelegatable, ({ // 6 deprecated /** This transaction type creates an offer to trade one asset for another. */ -TRANSACTION(ttOFFER_CREATE, 7, OfferCreate, Delegation::delegatable, ({ +TRANSACTION(ttOFFER_CREATE, 7, OfferCreate, Delegation::delegable, ({ {sfTakerPays, soeREQUIRED}, {sfTakerGets, soeREQUIRED}, {sfExpiration, soeOPTIONAL}, @@ -98,14 +98,14 @@ TRANSACTION(ttOFFER_CREATE, 7, OfferCreate, Delegation::delegatable, ({ })) /** This transaction type cancels existing offers to trade one asset for another. */ -TRANSACTION(ttOFFER_CANCEL, 8, OfferCancel, Delegation::delegatable, ({ +TRANSACTION(ttOFFER_CANCEL, 8, OfferCancel, Delegation::delegable, ({ {sfOfferSequence, soeREQUIRED}, })) // 9 deprecated /** This transaction type creates a new set of tickets. */ -TRANSACTION(ttTICKET_CREATE, 10, TicketCreate, Delegation::delegatable, ({ +TRANSACTION(ttTICKET_CREATE, 10, TicketCreate, Delegation::delegable, ({ {sfTicketCount, soeREQUIRED}, })) @@ -120,7 +120,7 @@ TRANSACTION(ttSIGNER_LIST_SET, 12, SignerListSet, Delegation::notDelegatable, ({ })) /** This transaction type creates a new unidirectional XRP payment channel. */ -TRANSACTION(ttPAYCHAN_CREATE, 13, PaymentChannelCreate, Delegation::delegatable, ({ +TRANSACTION(ttPAYCHAN_CREATE, 13, PaymentChannelCreate, Delegation::delegable, ({ {sfDestination, soeREQUIRED}, {sfAmount, soeREQUIRED}, {sfSettleDelay, soeREQUIRED}, @@ -130,14 +130,14 @@ TRANSACTION(ttPAYCHAN_CREATE, 13, PaymentChannelCreate, Delegation::delegatable, })) /** This transaction type funds an existing unidirectional XRP payment channel. */ -TRANSACTION(ttPAYCHAN_FUND, 14, PaymentChannelFund, Delegation::delegatable, ({ +TRANSACTION(ttPAYCHAN_FUND, 14, PaymentChannelFund, Delegation::delegable, ({ {sfChannel, soeREQUIRED}, {sfAmount, soeREQUIRED}, {sfExpiration, soeOPTIONAL}, })) /** This transaction type submits a claim against an existing unidirectional payment channel. */ -TRANSACTION(ttPAYCHAN_CLAIM, 15, PaymentChannelClaim, Delegation::delegatable, ({ +TRANSACTION(ttPAYCHAN_CLAIM, 15, PaymentChannelClaim, Delegation::delegable, ({ {sfChannel, soeREQUIRED}, {sfAmount, soeOPTIONAL}, {sfBalance, soeOPTIONAL}, @@ -147,7 +147,7 @@ TRANSACTION(ttPAYCHAN_CLAIM, 15, PaymentChannelClaim, Delegation::delegatable, ( })) /** This transaction type creates a new check. */ -TRANSACTION(ttCHECK_CREATE, 16, CheckCreate, Delegation::delegatable, ({ +TRANSACTION(ttCHECK_CREATE, 16, CheckCreate, Delegation::delegable, ({ {sfDestination, soeREQUIRED}, {sfSendMax, soeREQUIRED}, {sfExpiration, soeOPTIONAL}, @@ -156,19 +156,19 @@ TRANSACTION(ttCHECK_CREATE, 16, CheckCreate, Delegation::delegatable, ({ })) /** This transaction type cashes an existing check. */ -TRANSACTION(ttCHECK_CASH, 17, CheckCash, Delegation::delegatable, ({ +TRANSACTION(ttCHECK_CASH, 17, CheckCash, Delegation::delegable, ({ {sfCheckID, soeREQUIRED}, {sfAmount, soeOPTIONAL}, {sfDeliverMin, soeOPTIONAL}, })) /** This transaction type cancels an existing check. */ -TRANSACTION(ttCHECK_CANCEL, 18, CheckCancel, Delegation::delegatable, ({ +TRANSACTION(ttCHECK_CANCEL, 18, CheckCancel, Delegation::delegable, ({ {sfCheckID, soeREQUIRED}, })) /** This transaction type grants or revokes authorization to transfer funds. */ -TRANSACTION(ttDEPOSIT_PREAUTH, 19, DepositPreauth, Delegation::delegatable, ({ +TRANSACTION(ttDEPOSIT_PREAUTH, 19, DepositPreauth, Delegation::delegable, ({ {sfAuthorize, soeOPTIONAL}, {sfUnauthorize, soeOPTIONAL}, {sfAuthorizeCredentials, soeOPTIONAL}, @@ -176,7 +176,7 @@ TRANSACTION(ttDEPOSIT_PREAUTH, 19, DepositPreauth, Delegation::delegatable, ({ })) /** This transaction type modifies a trustline between two accounts. */ -TRANSACTION(ttTRUST_SET, 20, TrustSet, Delegation::delegatable, ({ +TRANSACTION(ttTRUST_SET, 20, TrustSet, Delegation::delegable, ({ {sfLimitAmount, soeOPTIONAL}, {sfQualityIn, soeOPTIONAL}, {sfQualityOut, soeOPTIONAL}, @@ -192,7 +192,7 @@ TRANSACTION(ttACCOUNT_DELETE, 21, AccountDelete, Delegation::notDelegatable, ({ // 22 reserved /** This transaction mints a new NFT. */ -TRANSACTION(ttNFTOKEN_MINT, 25, NFTokenMint, Delegation::delegatable, ({ +TRANSACTION(ttNFTOKEN_MINT, 25, NFTokenMint, Delegation::delegable, ({ {sfNFTokenTaxon, soeREQUIRED}, {sfTransferFee, soeOPTIONAL}, {sfIssuer, soeOPTIONAL}, @@ -203,13 +203,13 @@ TRANSACTION(ttNFTOKEN_MINT, 25, NFTokenMint, Delegation::delegatable, ({ })) /** This transaction burns (i.e. destroys) an existing NFT. */ -TRANSACTION(ttNFTOKEN_BURN, 26, NFTokenBurn, Delegation::delegatable, ({ +TRANSACTION(ttNFTOKEN_BURN, 26, NFTokenBurn, Delegation::delegable, ({ {sfNFTokenID, soeREQUIRED}, {sfOwner, soeOPTIONAL}, })) /** This transaction creates a new offer to buy or sell an NFT. */ -TRANSACTION(ttNFTOKEN_CREATE_OFFER, 27, NFTokenCreateOffer, Delegation::delegatable, ({ +TRANSACTION(ttNFTOKEN_CREATE_OFFER, 27, NFTokenCreateOffer, Delegation::delegable, ({ {sfNFTokenID, soeREQUIRED}, {sfAmount, soeREQUIRED}, {sfDestination, soeOPTIONAL}, @@ -218,25 +218,25 @@ TRANSACTION(ttNFTOKEN_CREATE_OFFER, 27, NFTokenCreateOffer, Delegation::delegata })) /** This transaction cancels an existing offer to buy or sell an existing NFT. */ -TRANSACTION(ttNFTOKEN_CANCEL_OFFER, 28, NFTokenCancelOffer, Delegation::delegatable, ({ +TRANSACTION(ttNFTOKEN_CANCEL_OFFER, 28, NFTokenCancelOffer, Delegation::delegable, ({ {sfNFTokenOffers, soeREQUIRED}, })) /** This transaction accepts an existing offer to buy or sell an existing NFT. */ -TRANSACTION(ttNFTOKEN_ACCEPT_OFFER, 29, NFTokenAcceptOffer, Delegation::delegatable, ({ +TRANSACTION(ttNFTOKEN_ACCEPT_OFFER, 29, NFTokenAcceptOffer, Delegation::delegable, ({ {sfNFTokenBuyOffer, soeOPTIONAL}, {sfNFTokenSellOffer, soeOPTIONAL}, {sfNFTokenBrokerFee, soeOPTIONAL}, })) /** This transaction claws back issued tokens. */ -TRANSACTION(ttCLAWBACK, 30, Clawback, Delegation::delegatable, ({ +TRANSACTION(ttCLAWBACK, 30, Clawback, Delegation::delegable, ({ {sfAmount, soeREQUIRED, soeMPTSupported}, {sfHolder, soeOPTIONAL}, })) /** This transaction claws back tokens from an AMM pool. */ -TRANSACTION(ttAMM_CLAWBACK, 31, AMMClawback, Delegation::delegatable, ({ +TRANSACTION(ttAMM_CLAWBACK, 31, AMMClawback, Delegation::delegable, ({ {sfHolder, soeREQUIRED}, {sfAsset, soeREQUIRED}, {sfAsset2, soeREQUIRED}, @@ -244,14 +244,14 @@ TRANSACTION(ttAMM_CLAWBACK, 31, AMMClawback, Delegation::delegatable, ({ })) /** This transaction type creates an AMM instance */ -TRANSACTION(ttAMM_CREATE, 35, AMMCreate, Delegation::delegatable, ({ +TRANSACTION(ttAMM_CREATE, 35, AMMCreate, Delegation::delegable, ({ {sfAmount, soeREQUIRED}, {sfAmount2, soeREQUIRED}, {sfTradingFee, soeREQUIRED}, })) /** This transaction type deposits into an AMM instance */ -TRANSACTION(ttAMM_DEPOSIT, 36, AMMDeposit, Delegation::delegatable, ({ +TRANSACTION(ttAMM_DEPOSIT, 36, AMMDeposit, Delegation::delegable, ({ {sfAsset, soeREQUIRED}, {sfAsset2, soeREQUIRED}, {sfAmount, soeOPTIONAL}, @@ -262,7 +262,7 @@ TRANSACTION(ttAMM_DEPOSIT, 36, AMMDeposit, Delegation::delegatable, ({ })) /** This transaction type withdraws from an AMM instance */ -TRANSACTION(ttAMM_WITHDRAW, 37, AMMWithdraw, Delegation::delegatable, ({ +TRANSACTION(ttAMM_WITHDRAW, 37, AMMWithdraw, Delegation::delegable, ({ {sfAsset, soeREQUIRED}, {sfAsset2, soeREQUIRED}, {sfAmount, soeOPTIONAL}, @@ -272,14 +272,14 @@ TRANSACTION(ttAMM_WITHDRAW, 37, AMMWithdraw, Delegation::delegatable, ({ })) /** This transaction type votes for the trading fee */ -TRANSACTION(ttAMM_VOTE, 38, AMMVote, Delegation::delegatable, ({ +TRANSACTION(ttAMM_VOTE, 38, AMMVote, Delegation::delegable, ({ {sfAsset, soeREQUIRED}, {sfAsset2, soeREQUIRED}, {sfTradingFee, soeREQUIRED}, })) /** This transaction type bids for the auction slot */ -TRANSACTION(ttAMM_BID, 39, AMMBid, Delegation::delegatable, ({ +TRANSACTION(ttAMM_BID, 39, AMMBid, Delegation::delegable, ({ {sfAsset, soeREQUIRED}, {sfAsset2, soeREQUIRED}, {sfBidMin, soeOPTIONAL}, @@ -288,28 +288,28 @@ TRANSACTION(ttAMM_BID, 39, AMMBid, Delegation::delegatable, ({ })) /** This transaction type deletes AMM in the empty state */ -TRANSACTION(ttAMM_DELETE, 40, AMMDelete, Delegation::delegatable, ({ +TRANSACTION(ttAMM_DELETE, 40, AMMDelete, Delegation::delegable, ({ {sfAsset, soeREQUIRED}, {sfAsset2, soeREQUIRED}, })) -/** This transactions creates a crosschain sequence number */ -TRANSACTION(ttXCHAIN_CREATE_CLAIM_ID, 41, XChainCreateClaimID, Delegation::delegatable, ({ +/** This transactions creates a cross-chain sequence number */ +TRANSACTION(ttXCHAIN_CREATE_CLAIM_ID, 41, XChainCreateClaimID, Delegation::delegable, ({ {sfXChainBridge, soeREQUIRED}, {sfSignatureReward, soeREQUIRED}, {sfOtherChainSource, soeREQUIRED}, })) -/** This transactions initiates a crosschain transaction */ -TRANSACTION(ttXCHAIN_COMMIT, 42, XChainCommit, Delegation::delegatable, ({ +/** This transactions initiates a cross-chain transaction */ +TRANSACTION(ttXCHAIN_COMMIT, 42, XChainCommit, Delegation::delegable, ({ {sfXChainBridge, soeREQUIRED}, {sfXChainClaimID, soeREQUIRED}, {sfAmount, soeREQUIRED}, {sfOtherChainDestination, soeOPTIONAL}, })) -/** This transaction completes a crosschain transaction */ -TRANSACTION(ttXCHAIN_CLAIM, 43, XChainClaim, Delegation::delegatable, ({ +/** This transaction completes a cross-chain transaction */ +TRANSACTION(ttXCHAIN_CLAIM, 43, XChainClaim, Delegation::delegable, ({ {sfXChainBridge, soeREQUIRED}, {sfXChainClaimID, soeREQUIRED}, {sfDestination, soeREQUIRED}, @@ -317,8 +317,8 @@ TRANSACTION(ttXCHAIN_CLAIM, 43, XChainClaim, Delegation::delegatable, ({ {sfAmount, soeREQUIRED}, })) -/** This transaction initiates a crosschain account create transaction */ -TRANSACTION(ttXCHAIN_ACCOUNT_CREATE_COMMIT, 44, XChainAccountCreateCommit, Delegation::delegatable, ({ +/** This transaction initiates a cross-chain account create transaction */ +TRANSACTION(ttXCHAIN_ACCOUNT_CREATE_COMMIT, 44, XChainAccountCreateCommit, Delegation::delegable, ({ {sfXChainBridge, soeREQUIRED}, {sfDestination, soeREQUIRED}, {sfAmount, soeREQUIRED}, @@ -326,7 +326,7 @@ TRANSACTION(ttXCHAIN_ACCOUNT_CREATE_COMMIT, 44, XChainAccountCreateCommit, Deleg })) /** This transaction adds an attestation to a claim */ -TRANSACTION(ttXCHAIN_ADD_CLAIM_ATTESTATION, 45, XChainAddClaimAttestation, Delegation::delegatable, ({ +TRANSACTION(ttXCHAIN_ADD_CLAIM_ATTESTATION, 45, XChainAddClaimAttestation, Delegation::delegable, ({ {sfXChainBridge, soeREQUIRED}, {sfAttestationSignerAccount, soeREQUIRED}, @@ -342,7 +342,7 @@ TRANSACTION(ttXCHAIN_ADD_CLAIM_ATTESTATION, 45, XChainAddClaimAttestation, Deleg })) /** This transaction adds an attestation to an account */ -TRANSACTION(ttXCHAIN_ADD_ACCOUNT_CREATE_ATTESTATION, 46, XChainAddAccountCreateAttestation, Delegation::delegatable, ({ +TRANSACTION(ttXCHAIN_ADD_ACCOUNT_CREATE_ATTESTATION, 46, XChainAddAccountCreateAttestation, Delegation::delegable, ({ {sfXChainBridge, soeREQUIRED}, {sfAttestationSignerAccount, soeREQUIRED}, @@ -359,31 +359,31 @@ TRANSACTION(ttXCHAIN_ADD_ACCOUNT_CREATE_ATTESTATION, 46, XChainAddAccountCreateA })) /** This transaction modifies a sidechain */ -TRANSACTION(ttXCHAIN_MODIFY_BRIDGE, 47, XChainModifyBridge, Delegation::delegatable, ({ +TRANSACTION(ttXCHAIN_MODIFY_BRIDGE, 47, XChainModifyBridge, Delegation::delegable, ({ {sfXChainBridge, soeREQUIRED}, {sfSignatureReward, soeOPTIONAL}, {sfMinAccountCreateAmount, soeOPTIONAL}, })) /** This transactions creates a sidechain */ -TRANSACTION(ttXCHAIN_CREATE_BRIDGE, 48, XChainCreateBridge, Delegation::delegatable, ({ +TRANSACTION(ttXCHAIN_CREATE_BRIDGE, 48, XChainCreateBridge, Delegation::delegable, ({ {sfXChainBridge, soeREQUIRED}, {sfSignatureReward, soeREQUIRED}, {sfMinAccountCreateAmount, soeOPTIONAL}, })) /** This transaction type creates or updates a DID */ -TRANSACTION(ttDID_SET, 49, DIDSet, Delegation::delegatable, ({ +TRANSACTION(ttDID_SET, 49, DIDSet, Delegation::delegable, ({ {sfDIDDocument, soeOPTIONAL}, {sfURI, soeOPTIONAL}, {sfData, soeOPTIONAL}, })) /** This transaction type deletes a DID */ -TRANSACTION(ttDID_DELETE, 50, DIDDelete, Delegation::delegatable, ({})) +TRANSACTION(ttDID_DELETE, 50, DIDDelete, Delegation::delegable, ({})) /** This transaction type creates an Oracle instance */ -TRANSACTION(ttORACLE_SET, 51, OracleSet, Delegation::delegatable, ({ +TRANSACTION(ttORACLE_SET, 51, OracleSet, Delegation::delegable, ({ {sfOracleDocumentID, soeREQUIRED}, {sfProvider, soeOPTIONAL}, {sfURI, soeOPTIONAL}, @@ -393,18 +393,18 @@ TRANSACTION(ttORACLE_SET, 51, OracleSet, Delegation::delegatable, ({ })) /** This transaction type deletes an Oracle instance */ -TRANSACTION(ttORACLE_DELETE, 52, OracleDelete, Delegation::delegatable, ({ +TRANSACTION(ttORACLE_DELETE, 52, OracleDelete, Delegation::delegable, ({ {sfOracleDocumentID, soeREQUIRED}, })) /** This transaction type fixes a problem in the ledger state */ -TRANSACTION(ttLEDGER_STATE_FIX, 53, LedgerStateFix, Delegation::delegatable, ({ +TRANSACTION(ttLEDGER_STATE_FIX, 53, LedgerStateFix, Delegation::delegable, ({ {sfLedgerFixType, soeREQUIRED}, {sfOwner, soeOPTIONAL}, })) /** This transaction type creates a MPTokensIssuance instance */ -TRANSACTION(ttMPTOKEN_ISSUANCE_CREATE, 54, MPTokenIssuanceCreate, Delegation::delegatable, ({ +TRANSACTION(ttMPTOKEN_ISSUANCE_CREATE, 54, MPTokenIssuanceCreate, Delegation::delegable, ({ {sfAssetScale, soeOPTIONAL}, {sfTransferFee, soeOPTIONAL}, {sfMaximumAmount, soeOPTIONAL}, @@ -413,25 +413,25 @@ TRANSACTION(ttMPTOKEN_ISSUANCE_CREATE, 54, MPTokenIssuanceCreate, Delegation::de })) /** This transaction type destroys a MPTokensIssuance instance */ -TRANSACTION(ttMPTOKEN_ISSUANCE_DESTROY, 55, MPTokenIssuanceDestroy, Delegation::delegatable, ({ +TRANSACTION(ttMPTOKEN_ISSUANCE_DESTROY, 55, MPTokenIssuanceDestroy, Delegation::delegable, ({ {sfMPTokenIssuanceID, soeREQUIRED}, })) /** This transaction type sets flags on a MPTokensIssuance or MPToken instance */ -TRANSACTION(ttMPTOKEN_ISSUANCE_SET, 56, MPTokenIssuanceSet, Delegation::delegatable, ({ +TRANSACTION(ttMPTOKEN_ISSUANCE_SET, 56, MPTokenIssuanceSet, Delegation::delegable, ({ {sfMPTokenIssuanceID, soeREQUIRED}, {sfHolder, soeOPTIONAL}, {sfDomainID, soeOPTIONAL}, })) /** This transaction type authorizes a MPToken instance */ -TRANSACTION(ttMPTOKEN_AUTHORIZE, 57, MPTokenAuthorize, Delegation::delegatable, ({ +TRANSACTION(ttMPTOKEN_AUTHORIZE, 57, MPTokenAuthorize, Delegation::delegable, ({ {sfMPTokenIssuanceID, soeREQUIRED}, {sfHolder, soeOPTIONAL}, })) /** This transaction type create an Credential instance */ -TRANSACTION(ttCREDENTIAL_CREATE, 58, CredentialCreate, Delegation::delegatable, ({ +TRANSACTION(ttCREDENTIAL_CREATE, 58, CredentialCreate, Delegation::delegable, ({ {sfSubject, soeREQUIRED}, {sfCredentialType, soeREQUIRED}, {sfExpiration, soeOPTIONAL}, @@ -439,33 +439,33 @@ TRANSACTION(ttCREDENTIAL_CREATE, 58, CredentialCreate, Delegation::delegatable, })) /** This transaction type accept an Credential object */ -TRANSACTION(ttCREDENTIAL_ACCEPT, 59, CredentialAccept, Delegation::delegatable, ({ +TRANSACTION(ttCREDENTIAL_ACCEPT, 59, CredentialAccept, Delegation::delegable, ({ {sfIssuer, soeREQUIRED}, {sfCredentialType, soeREQUIRED}, })) /** This transaction type delete an Credential object */ -TRANSACTION(ttCREDENTIAL_DELETE, 60, CredentialDelete, Delegation::delegatable, ({ +TRANSACTION(ttCREDENTIAL_DELETE, 60, CredentialDelete, Delegation::delegable, ({ {sfSubject, soeOPTIONAL}, {sfIssuer, soeOPTIONAL}, {sfCredentialType, soeREQUIRED}, })) /** This transaction type modify a NFToken */ -TRANSACTION(ttNFTOKEN_MODIFY, 61, NFTokenModify, Delegation::delegatable, ({ +TRANSACTION(ttNFTOKEN_MODIFY, 61, NFTokenModify, Delegation::delegable, ({ {sfNFTokenID, soeREQUIRED}, {sfOwner, soeOPTIONAL}, {sfURI, soeOPTIONAL}, })) /** This transaction type creates or modifies a Permissioned Domain */ -TRANSACTION(ttPERMISSIONED_DOMAIN_SET, 62, PermissionedDomainSet, Delegation::delegatable, ({ +TRANSACTION(ttPERMISSIONED_DOMAIN_SET, 62, PermissionedDomainSet, Delegation::delegable, ({ {sfDomainID, soeOPTIONAL}, {sfAcceptedCredentials, soeREQUIRED}, })) /** This transaction type deletes a Permissioned Domain */ -TRANSACTION(ttPERMISSIONED_DOMAIN_DELETE, 63, PermissionedDomainDelete, Delegation::delegatable, ({ +TRANSACTION(ttPERMISSIONED_DOMAIN_DELETE, 63, PermissionedDomainDelete, Delegation::delegable, ({ {sfDomainID, soeREQUIRED}, })) @@ -476,7 +476,7 @@ TRANSACTION(ttDELEGATE_SET, 64, DelegateSet, Delegation::notDelegatable, ({ })) /** This transaction creates a single asset vault. */ -TRANSACTION(ttVAULT_CREATE, 65, VaultCreate, Delegation::delegatable, ({ +TRANSACTION(ttVAULT_CREATE, 65, VaultCreate, Delegation::delegable, ({ {sfAsset, soeREQUIRED, soeMPTSupported}, {sfAssetsMaximum, soeOPTIONAL}, {sfMPTokenMetadata, soeOPTIONAL}, @@ -486,7 +486,7 @@ TRANSACTION(ttVAULT_CREATE, 65, VaultCreate, Delegation::delegatable, ({ })) /** This transaction updates a single asset vault. */ -TRANSACTION(ttVAULT_SET, 66, VaultSet, Delegation::delegatable, ({ +TRANSACTION(ttVAULT_SET, 66, VaultSet, Delegation::delegable, ({ {sfVaultID, soeREQUIRED}, {sfAssetsMaximum, soeOPTIONAL}, {sfDomainID, soeOPTIONAL}, @@ -494,18 +494,18 @@ TRANSACTION(ttVAULT_SET, 66, VaultSet, Delegation::delegatable, ({ })) /** This transaction deletes a single asset vault. */ -TRANSACTION(ttVAULT_DELETE, 67, VaultDelete, Delegation::delegatable, ({ +TRANSACTION(ttVAULT_DELETE, 67, VaultDelete, Delegation::delegable, ({ {sfVaultID, soeREQUIRED}, })) /** This transaction trades assets for shares with a vault. */ -TRANSACTION(ttVAULT_DEPOSIT, 68, VaultDeposit, Delegation::delegatable, ({ +TRANSACTION(ttVAULT_DEPOSIT, 68, VaultDeposit, Delegation::delegable, ({ {sfVaultID, soeREQUIRED}, {sfAmount, soeREQUIRED, soeMPTSupported}, })) /** This transaction trades shares for assets with a vault. */ -TRANSACTION(ttVAULT_WITHDRAW, 69, VaultWithdraw, Delegation::delegatable, ({ +TRANSACTION(ttVAULT_WITHDRAW, 69, VaultWithdraw, Delegation::delegable, ({ {sfVaultID, soeREQUIRED}, {sfAmount, soeREQUIRED, soeMPTSupported}, {sfDestination, soeOPTIONAL}, @@ -513,7 +513,7 @@ TRANSACTION(ttVAULT_WITHDRAW, 69, VaultWithdraw, Delegation::delegatable, ({ })) /** This transaction claws back tokens from a vault. */ -TRANSACTION(ttVAULT_CLAWBACK, 70, VaultClawback, Delegation::delegatable, ({ +TRANSACTION(ttVAULT_CLAWBACK, 70, VaultClawback, Delegation::delegable, ({ {sfVaultID, soeREQUIRED}, {sfHolder, soeREQUIRED}, {sfAmount, soeOPTIONAL, soeMPTSupported}, diff --git a/include/xrpl/protocol/jss.h b/include/xrpl/protocol/jss.h index 67a045fa58d..f2c7f6061b6 100644 --- a/include/xrpl/protocol/jss.h +++ b/include/xrpl/protocol/jss.h @@ -706,7 +706,7 @@ JSS(write_load); // out: GetCounts #pragma push_macro("TRANSACTION") #undef TRANSACTION -#define TRANSACTION(tag, value, name, delegatable, fields) JSS(name); +#define TRANSACTION(tag, value, name, delegable, fields) JSS(name); #include diff --git a/src/libxrpl/basics/BasicConfig.cpp b/src/libxrpl/basics/BasicConfig.cpp index 7d6f09b391c..e18a4cc8cc8 100644 --- a/src/libxrpl/basics/BasicConfig.cpp +++ b/src/libxrpl/basics/BasicConfig.cpp @@ -49,7 +49,7 @@ Section::append(std::vector const& lines) // '=' static boost::regex const re1( "^" // start of line - "(?:\\s*)" // whitespace (optonal) + "(?:\\s*)" // whitespace (optional) "([a-zA-Z][_a-zA-Z0-9]*)" // "(?:\\s*)" // whitespace (optional) "(?:=)" // '=' diff --git a/src/libxrpl/json/json_reader.cpp b/src/libxrpl/json/json_reader.cpp index 9bad898beed..a0831946a0f 100644 --- a/src/libxrpl/json/json_reader.cpp +++ b/src/libxrpl/json/json_reader.cpp @@ -931,7 +931,7 @@ Reader::getLocationLineAndColumn(Location location) const } std::string -Reader::getFormatedErrorMessages() const +Reader::getFormattedErrorMessages() const { std::string formattedMessage; @@ -960,7 +960,7 @@ operator>>(std::istream& sin, Value& root) // XRPL_ASSERT(ok, "Json::operator>>() : parse succeeded"); if (!ok) - ripple::Throw(reader.getFormatedErrorMessages()); + ripple::Throw(reader.getFormattedErrorMessages()); return sin; } diff --git a/src/libxrpl/net/RegisterSSLCerts.cpp b/src/libxrpl/net/RegisterSSLCerts.cpp index cd5bd631aab..dd50f263aea 100644 --- a/src/libxrpl/net/RegisterSSLCerts.cpp +++ b/src/libxrpl/net/RegisterSSLCerts.cpp @@ -68,11 +68,11 @@ registerSSLCerts( return; } - auto warn = [&](std::string const& mesg) { + auto warn = [&](std::string const& msg) { // Buffer based on asio recommended size char buf[256]; ::ERR_error_string_n(ec.value(), buf, sizeof(buf)); - JLOG(j.warn()) << mesg << " " << buf; + JLOG(j.warn()) << msg << " " << buf; ::ERR_clear_error(); }; diff --git a/src/libxrpl/protocol/Permissions.cpp b/src/libxrpl/protocol/Permissions.cpp index ca8cb26f36a..9ece2f3073b 100644 --- a/src/libxrpl/protocol/Permissions.cpp +++ b/src/libxrpl/protocol/Permissions.cpp @@ -25,11 +25,11 @@ namespace ripple { Permission::Permission() { - delegatableTx_ = { + delegableTx_ = { #pragma push_macro("TRANSACTION") #undef TRANSACTION -#define TRANSACTION(tag, value, name, delegatable, fields) {value, delegatable}, +#define TRANSACTION(tag, value, name, delegable, fields) {value, delegable}, #include @@ -126,8 +126,8 @@ Permission::isDelegatable(std::uint32_t const& permissionValue) const // granular permissions are always allowed to be delegated return true; - auto const it = delegatableTx_.find(permissionValue - 1); - if (it != delegatableTx_.end() && it->second == Delegation::notDelegatable) + auto const it = delegableTx_.find(permissionValue - 1); + if (it != delegableTx_.end() && it->second == Delegation::notDelegatable) return false; return true; diff --git a/src/libxrpl/protocol/TxFormats.cpp b/src/libxrpl/protocol/TxFormats.cpp index 5edffeb6660..b713baa303a 100644 --- a/src/libxrpl/protocol/TxFormats.cpp +++ b/src/libxrpl/protocol/TxFormats.cpp @@ -55,7 +55,7 @@ TxFormats::TxFormats() #undef TRANSACTION #define UNWRAP(...) __VA_ARGS__ -#define TRANSACTION(tag, value, name, delegatable, fields) \ +#define TRANSACTION(tag, value, name, delegable, fields) \ add(jss::name, tag, UNWRAP fields, commonFields); #include diff --git a/src/test/app/AMMExtended_test.cpp b/src/test/app/AMMExtended_test.cpp index 893e9e4f753..233332b3615 100644 --- a/src/test/app/AMMExtended_test.cpp +++ b/src/test/app/AMMExtended_test.cpp @@ -2958,29 +2958,29 @@ struct AMMExtended_test : public jtx::AMMTest fund(env, gw, {alice, bob, carol}, XRP(10'000)); env.trust(USD(100), alice, bob, carol); env(pay(alice, bob, USD(10)), - delivermin(USD(10)), + deliver_min(USD(10)), ter(temBAD_AMOUNT)); env(pay(alice, bob, USD(10)), - delivermin(USD(-5)), + deliver_min(USD(-5)), txflags(tfPartialPayment), ter(temBAD_AMOUNT)); env(pay(alice, bob, USD(10)), - delivermin(XRP(5)), + deliver_min(XRP(5)), txflags(tfPartialPayment), ter(temBAD_AMOUNT)); env(pay(alice, bob, USD(10)), - delivermin(Account(carol)["USD"](5)), + deliver_min(Account(carol)["USD"](5)), txflags(tfPartialPayment), ter(temBAD_AMOUNT)); env(pay(alice, bob, USD(10)), - delivermin(USD(15)), + deliver_min(USD(15)), txflags(tfPartialPayment), ter(temBAD_AMOUNT)); env(pay(gw, carol, USD(50))); AMM ammCarol(env, carol, XRP(10), USD(15)); env(pay(alice, bob, USD(10)), paths(XRP), - delivermin(USD(7)), + deliver_min(USD(7)), txflags(tfPartialPayment), sendmax(XRP(5)), ter(tecPATH_PARTIAL)); @@ -2998,7 +2998,7 @@ struct AMMExtended_test : public jtx::AMMTest AMM ammBob(env, bob, XRP(1'000), USD(1'100)); env(pay(alice, alice, USD(10'000)), paths(XRP), - delivermin(USD(100)), + deliver_min(USD(100)), txflags(tfPartialPayment), sendmax(XRP(100))); env.require(balance(alice, USD(100))); @@ -3012,13 +3012,13 @@ struct AMMExtended_test : public jtx::AMMTest AMM ammBob(env, bob, XRP(5'500), USD(1'200)); env(pay(alice, carol, USD(10'000)), paths(XRP), - delivermin(USD(200)), + deliver_min(USD(200)), txflags(tfPartialPayment), sendmax(XRP(1'000)), ter(tecPATH_PARTIAL)); env(pay(alice, carol, USD(10'000)), paths(XRP), - delivermin(USD(200)), + deliver_min(USD(200)), txflags(tfPartialPayment), sendmax(XRP(1'100))); BEAST_EXPECT( @@ -3041,7 +3041,7 @@ struct AMMExtended_test : public jtx::AMMTest { env(pay(alice, carol, USD(10'000)), paths(XRP), - delivermin(USD(200)), + deliver_min(USD(200)), txflags(tfPartialPayment), sendmax(XRP(200))); env.require(balance(bob, USD(0))); @@ -3053,7 +3053,7 @@ struct AMMExtended_test : public jtx::AMMTest { env(pay(alice, carol, USD(10'000)), paths(XRP), - delivermin(USD(200)), + deliver_min(USD(200)), txflags(tfPartialPayment), sendmax(XRPAmount(200'000'001))); env.require(balance(bob, USD(0))); diff --git a/src/test/app/AMM_test.cpp b/src/test/app/AMM_test.cpp index c89aebf813c..3756fafab47 100644 --- a/src/test/app/AMM_test.cpp +++ b/src/test/app/AMM_test.cpp @@ -3565,13 +3565,13 @@ struct AMM_test : public jtx::AMMTest { auto jtx = env.jt(tx, seq(1), fee(baseFee)); env.app().config().features.erase(featureAMM); - PreflightContext pfctx( + PreflightContext pf_ctx( env.app(), *jtx.stx, env.current()->rules(), tapNONE, env.journal); - auto pf = AMMBid::preflight(pfctx); + auto pf = AMMBid::preflight(pf_ctx); BEAST_EXPECT(pf == temDISABLED); env.app().config().features.insert(featureAMM); } @@ -3580,13 +3580,13 @@ struct AMM_test : public jtx::AMMTest auto jtx = env.jt(tx, seq(1), fee(baseFee)); jtx.jv["TxnSignature"] = "deadbeef"; jtx.stx = env.ust(jtx); - PreflightContext pfctx( + PreflightContext pf_ctx( env.app(), *jtx.stx, env.current()->rules(), tapNONE, env.journal); - auto pf = AMMBid::preflight(pfctx); + auto pf = AMMBid::preflight(pf_ctx); BEAST_EXPECT(pf != tesSUCCESS); } @@ -3595,13 +3595,13 @@ struct AMM_test : public jtx::AMMTest jtx.jv["Asset2"]["currency"] = "XRP"; jtx.jv["Asset2"].removeMember("issuer"); jtx.stx = env.ust(jtx); - PreflightContext pfctx( + PreflightContext pf_ctx( env.app(), *jtx.stx, env.current()->rules(), tapNONE, env.journal); - auto pf = AMMBid::preflight(pfctx); + auto pf = AMMBid::preflight(pf_ctx); BEAST_EXPECT(pf == temBAD_AMM_TOKENS); } } diff --git a/src/test/app/AccountDelete_test.cpp b/src/test/app/AccountDelete_test.cpp index f7c4ddc5097..d5fc98e24ac 100644 --- a/src/test/app/AccountDelete_test.cpp +++ b/src/test/app/AccountDelete_test.cpp @@ -122,7 +122,7 @@ class AccountDelete_test : public beast::unit_test::suite env(trust(becky, gw["USD"](1000))); env.close(); - // Give carol a deposit preauthorization, an offer, a ticket, + // Give carol a deposit pre-authorization, an offer, a ticket, // a signer list, and a DID. Even with all that she's still deletable. env(deposit::auth(carol, becky)); std::uint32_t const carolOfferSeq{env.seq(carol)}; @@ -195,7 +195,7 @@ class AccountDelete_test : public beast::unit_test::suite auto const carolOldBalance{env.balance(carol)}; // Verify that Carol's account, directory, deposit - // preauthorization, offer, ticket, and signer list exist. + // pre-authorization, offer, ticket, and signer list exist. BEAST_EXPECT(env.closed()->exists(keylet::account(carol.id()))); BEAST_EXPECT(env.closed()->exists(keylet::ownerDir(carol.id()))); BEAST_EXPECT(env.closed()->exists( @@ -1049,7 +1049,7 @@ class AccountDelete_test : public beast::unit_test::suite env, eaton, carol, credType)[jss::result][jss::index] .asString(); - // fred make preauthorization through authorized account + // fred make pre-authorization through authorized account env(fset(fred, asfDepositAuth)); env.close(); env(deposit::auth(fred, eaton)); diff --git a/src/test/app/CrossingLimits_test.cpp b/src/test/app/CrossingLimits_test.cpp index 18fc21078c6..4f85176d462 100644 --- a/src/test/app/CrossingLimits_test.cpp +++ b/src/test/app/CrossingLimits_test.cpp @@ -321,7 +321,7 @@ class CrossingLimits_test : public beast::unit_test::suite // offers unfunded. // b. Carol's remaining 800 offers are consumed as unfunded. // c. 199 of alice's XRP(1) to USD(3) offers are consumed. - // A book step is allowed to consume a maxium of 1000 offers + // A book step is allowed to consume a maximum of 1000 offers // at a given quality, and that limit is now reached. // d. Now the strand is dry, even though there are still funded // XRP(1) to USD(3) offers available. @@ -402,7 +402,7 @@ class CrossingLimits_test : public beast::unit_test::suite // offers unfunded. // b. Carol's remaining 800 offers are consumed as unfunded. // c. 199 of alice's XRP(1) to USD(3) offers are consumed. - // A book step is allowed to consume a maxium of 1000 offers + // A book step is allowed to consume a maximum of 1000 offers // at a given quality, and that limit is now reached. // d. Now the strand is dry, even though there are still funded // XRP(1) to USD(3) offers available. Bob has spent 400 EUR and diff --git a/src/test/app/Delegate_test.cpp b/src/test/app/Delegate_test.cpp index 44cb6a54b62..3e6e331036b 100644 --- a/src/test/app/Delegate_test.cpp +++ b/src/test/app/Delegate_test.cpp @@ -215,7 +215,7 @@ class Delegate_test : public beast::unit_test::suite ter(tecNO_TARGET)); } - // non-delegatable transaction + // non-delegable transaction { env(delegate::set(gw, alice, {"SetRegularKey"}), ter(tecNO_PERMISSION)); diff --git a/src/test/app/DeliverMin_test.cpp b/src/test/app/DeliverMin_test.cpp index a9373fb0022..a5768549165 100644 --- a/src/test/app/DeliverMin_test.cpp +++ b/src/test/app/DeliverMin_test.cpp @@ -44,29 +44,29 @@ class DeliverMin_test : public beast::unit_test::suite env.trust(USD(100), "alice", "bob", "carol"); env.close(); env(pay("alice", "bob", USD(10)), - delivermin(USD(10)), + deliver_min(USD(10)), ter(temBAD_AMOUNT)); env(pay("alice", "bob", USD(10)), - delivermin(USD(-5)), + deliver_min(USD(-5)), txflags(tfPartialPayment), ter(temBAD_AMOUNT)); env(pay("alice", "bob", USD(10)), - delivermin(XRP(5)), + deliver_min(XRP(5)), txflags(tfPartialPayment), ter(temBAD_AMOUNT)); env(pay("alice", "bob", USD(10)), - delivermin(Account("carol")["USD"](5)), + deliver_min(Account("carol")["USD"](5)), txflags(tfPartialPayment), ter(temBAD_AMOUNT)); env(pay("alice", "bob", USD(10)), - delivermin(USD(15)), + deliver_min(USD(15)), txflags(tfPartialPayment), ter(temBAD_AMOUNT)); env(pay(gw, "carol", USD(50))); env(offer("carol", XRP(5), USD(5))); env(pay("alice", "bob", USD(10)), paths(XRP), - delivermin(USD(7)), + deliver_min(USD(7)), txflags(tfPartialPayment), sendmax(XRP(5)), ter(tecPATH_PARTIAL)); @@ -85,7 +85,7 @@ class DeliverMin_test : public beast::unit_test::suite env(offer("bob", XRP(100), USD(100))); env(pay("alice", "alice", USD(10000)), paths(XRP), - delivermin(USD(100)), + deliver_min(USD(100)), txflags(tfPartialPayment), sendmax(XRP(100))); env.require(balance("alice", USD(100))); @@ -103,13 +103,13 @@ class DeliverMin_test : public beast::unit_test::suite env(offer("bob", XRP(10000), USD(100))); env(pay("alice", "carol", USD(10000)), paths(XRP), - delivermin(USD(200)), + deliver_min(USD(200)), txflags(tfPartialPayment), sendmax(XRP(1000)), ter(tecPATH_PARTIAL)); env(pay("alice", "carol", USD(10000)), paths(XRP), - delivermin(USD(200)), + deliver_min(USD(200)), txflags(tfPartialPayment), sendmax(XRP(1100))); env.require(balance("bob", USD(0))); @@ -129,7 +129,7 @@ class DeliverMin_test : public beast::unit_test::suite env(offer("dan", XRP(100), USD(100))); env(pay("alice", "carol", USD(10000)), paths(XRP), - delivermin(USD(200)), + deliver_min(USD(200)), txflags(tfPartialPayment), sendmax(XRP(200))); env.require(balance("bob", USD(0))); diff --git a/src/test/app/DepositAuth_test.cpp b/src/test/app/DepositAuth_test.cpp index ffe8c4448bc..e75d61cbb6a 100644 --- a/src/test/app/DepositAuth_test.cpp +++ b/src/test/app/DepositAuth_test.cpp @@ -584,7 +584,7 @@ struct DepositPreauth_test : public beast::unit_test::suite env.require(owners(carol, 1)); env.require(owners(becky, 0)); - // But carol can't meet the reserve for another preauthorization. + // But carol can't meet the reserve for another pre-authorization. env(deposit::auth(carol, alice), ter(tecINSUFFICIENT_RESERVE)); env.close(); env.require(owners(carol, 1)); @@ -835,7 +835,7 @@ struct DepositPreauth_test : public beast::unit_test::suite env.fund(XRP(5000), issuer, bob, alice); env.close(); - // Bob require preauthorization + // Bob require pre-authorization env(fset(bob, asfDepositAuth)); env.close(); @@ -876,7 +876,7 @@ struct DepositPreauth_test : public beast::unit_test::suite credentials::ledgerEntry(env, alice, issuer, credType); std::string const credIdx = jv[jss::result][jss::index].asString(); - // Bob require preauthorization + // Bob require pre-authorization env(fset(bob, asfDepositAuth)); env.close(); @@ -949,12 +949,12 @@ struct DepositPreauth_test : public beast::unit_test::suite std::string const credIdx = jv[jss::result][jss::index].asString(); { - // Success as destination didn't enable preauthorization so + // Success as destination didn't enable pre-authorization so // valid credentials will not fail env(pay(alice, bob, XRP(100)), credentials::ids({credIdx})); } - // Bob require preauthorization + // Bob require pre-authorization env(fset(bob, asfDepositAuth)); env.close(); @@ -1252,7 +1252,7 @@ struct DepositPreauth_test : public beast::unit_test::suite jv = credentials::ledgerEntry(env, alice, issuer, credType2); std::string const credIdx2 = jv[jss::result][jss::index].asString(); - // Bob require preauthorization + // Bob require pre-authorization env(fset(bob, asfDepositAuth)); env.close(); // Bob setup DepositPreauth object @@ -1379,7 +1379,7 @@ struct DepositPreauth_test : public beast::unit_test::suite jv = credentials::ledgerEntry(env, zelda, issuer, credType); std::string const credIdx = jv[jss::result][jss::index].asString(); - // Bob require preauthorization + // Bob require pre-authorization env(fset(bob, asfDepositAuth)); env.close(); // Bob setup DepositPreauth object diff --git a/src/test/app/Escrow_test.cpp b/src/test/app/Escrow_test.cpp index 3eaf0f13ea0..953dd224f7b 100644 --- a/src/test/app/Escrow_test.cpp +++ b/src/test/app/Escrow_test.cpp @@ -1597,7 +1597,7 @@ struct Escrow_test : public beast::unit_test::suite escrow::finish_time(env.now() + 50s)); env.close(); - // Bob require preauthorization + // Bob require pre-authorization env(fset(bob, asfDepositAuth)); env.close(); @@ -1658,12 +1658,12 @@ struct Escrow_test : public beast::unit_test::suite env.close(); env.close(); - // Succeed, Bob doesn't require preauthorization + // Succeed, Bob doesn't require pre-authorization env(escrow::finish(carol, alice, seq), credentials::ids({credIdx})); env.close(); { - char const credType2[] = "fghijk"; + char const credType2[] = "random"; env(credentials::create(bob, zelda, credType2)); env.close(); @@ -1679,7 +1679,7 @@ struct Escrow_test : public beast::unit_test::suite escrow::finish_time(env.now() + 1s)); env.close(); - // Bob require preauthorization + // Bob require pre-authorization env(fset(bob, asfDepositAuth)); env.close(); env(deposit::authCredentials(bob, {{zelda, credType}})); diff --git a/src/test/app/MPToken_test.cpp b/src/test/app/MPToken_test.cpp index 6470962f2f0..e616e676682 100644 --- a/src/test/app/MPToken_test.cpp +++ b/src/test/app/MPToken_test.cpp @@ -992,7 +992,7 @@ class MPToken_test : public beast::unit_test::suite sendmax(XRP(100)), ter(temMALFORMED)); env(pay(alice, carol, MPT(100)), - delivermin(XRP(100)), + deliver_min(XRP(100)), ter(temBAD_AMOUNT)); // sendMax MPT is invalid with IOU or XRP auto const USD = alice["USD"]; @@ -1003,10 +1003,10 @@ class MPToken_test : public beast::unit_test::suite sendmax(MPT(100)), ter(temMALFORMED)); env(pay(alice, carol, USD(100)), - delivermin(MPT(100)), + deliver_min(MPT(100)), ter(temBAD_AMOUNT)); env(pay(alice, carol, XRP(100)), - delivermin(MPT(100)), + deliver_min(MPT(100)), ter(temBAD_AMOUNT)); // sendmax and amount are different MPT issue test::jtx::MPT const MPT1( @@ -1552,13 +1552,13 @@ class MPToken_test : public beast::unit_test::suite // deliver amount < deliverMin env(pay(bob, alice, MPT(100)), sendmax(MPT(99)), - delivermin(MPT(100)), + deliver_min(MPT(100)), txflags(tfPartialPayment), ter(tecPATH_PARTIAL)); // Payment succeeds if deliver amount >= deliverMin env(pay(bob, alice, MPT(100)), sendmax(MPT(99)), - delivermin(MPT(99)), + deliver_min(MPT(99)), txflags(tfPartialPayment)); } @@ -1822,7 +1822,7 @@ class MPToken_test : public beast::unit_test::suite // alice authorizes bob to hold funds mptAlice.authorize({.account = alice, .holder = bob}); - // Bob require preauthorization + // Bob require pre-authorization env(fset(bob, asfDepositAuth)); env.close(); @@ -1901,7 +1901,7 @@ class MPToken_test : public beast::unit_test::suite // alice authorizes bob to hold funds mptAlice.authorize({.account = alice, .holder = bob}); - // Bob require preauthorization + // Bob require pre-authorization env(fset(bob, asfDepositAuth)); env.close(); diff --git a/src/test/app/PayChan_test.cpp b/src/test/app/PayChan_test.cpp index 3a5d3d6ff5e..103d11d85b3 100644 --- a/src/test/app/PayChan_test.cpp +++ b/src/test/app/PayChan_test.cpp @@ -819,7 +819,7 @@ struct PayChan_test : public beast::unit_test::suite BEAST_EXPECT(env.balance(bob) == preBob + delta - baseFee); } { - // Explore the limits of deposit preauthorization. + // Explore the limits of deposit pre-authorization. auto const delta = XRP(600).value(); auto const sig = signClaimAuth(pk, alice.sk(), chan, delta); @@ -855,7 +855,7 @@ struct PayChan_test : public beast::unit_test::suite env.balance(bob) == preBob + delta - (3 * baseFee)); } { - // bob removes preauthorization of alice. Once again she + // bob removes pre-authorization of alice. Once again she // cannot submit a claim. auto const delta = XRP(800).value(); @@ -930,7 +930,7 @@ struct PayChan_test : public beast::unit_test::suite credentials::ledgerEntry(env, alice, carol, credType); std::string const credIdx = jv[jss::result][jss::index].asString(); - // Bob require preauthorization + // Bob require pre-authorization env(fset(bob, asfDepositAuth)); env.close(); diff --git a/src/test/app/Vault_test.cpp b/src/test/app/Vault_test.cpp index 7ea38db2b12..a81aca8efaf 100644 --- a/src/test/app/Vault_test.cpp +++ b/src/test/app/Vault_test.cpp @@ -1178,7 +1178,7 @@ class Vault_test : public beast::unit_test::suite auto const [asset1, asset2] = std::pair(XRP(10000), USD(10000)); - auto tofund = [&](STAmount const& a) -> STAmount { + auto toFund = [&](STAmount const& a) -> STAmount { if (a.native()) { auto const defXRP = XRP(30000); @@ -1191,8 +1191,8 @@ class Vault_test : public beast::unit_test::suite return defIOU; return a + STAmount{a.issue(), 1000}; }; - auto const toFund1 = tofund(asset1); - auto const toFund2 = tofund(asset2); + auto const toFund1 = toFund(asset1); + auto const toFund2 = toFund(asset2); BEAST_EXPECT(asset1 <= toFund1 && asset2 <= toFund2); if (!asset1.native() && !asset2.native()) diff --git a/src/test/core/Config_test.cpp b/src/test/core/Config_test.cpp index 8b0fce1e204..73ab3429e61 100644 --- a/src/test/core/Config_test.cpp +++ b/src/test/core/Config_test.cpp @@ -223,8 +223,8 @@ nHBu9PTL9dn2GuZtdW4U2WzBwffyX9qsQCd9CNU4Z5YG3PQfViM8 nHUPDdcdb2Y5DZAJne4c2iabFuAP3F34xZUgYQT2NH7qfkdapgnz [validator_list_sites] -recommendedripplevalidators.com -moreripplevalidators.net +recommended_ripple_validators.com +more_ripple_validators.net [validator_list_keys] 03E74EE14CB525AFBB9F1B7D86CD58ECC4B91452294B42AB4E78F260BD905C091D diff --git a/src/test/csf/Digraph.h b/src/test/csf/Digraph.h index 3f079eac17c..02d2c87a79f 100644 --- a/src/test/csf/Digraph.h +++ b/src/test/csf/Digraph.h @@ -218,7 +218,7 @@ class Digraph Save a GraphViz dot description of the graph @param fileName The output file (creates) - @param vertexName A invokable T vertexName(Vertex const &) that + @param vertexName A invocable T vertexName(Vertex const &) that returns the name target use for the vertex in the file T must be ostream-able */ diff --git a/src/test/csf/Histogram.h b/src/test/csf/Histogram.h index fb0f5323966..4a942d6147c 100644 --- a/src/test/csf/Histogram.h +++ b/src/test/csf/Histogram.h @@ -44,8 +44,8 @@ namespace csf { template > class Histogram { - // TODO: Consider logarithimic bins around expected median if this becomes - // unscaleable + // TODO: Consider logarithmic bins around expected median if this becomes + // unscalable std::map counts_; std::size_t samples = 0; diff --git a/src/test/csf/Peer.h b/src/test/csf/Peer.h index 1cb2d03cc6d..3306ba718bc 100644 --- a/src/test/csf/Peer.h +++ b/src/test/csf/Peer.h @@ -423,7 +423,7 @@ struct Peer { minDuration = std::min(minDuration, link.data.delay); - // Send a messsage to neighbors to find the ledger + // Send a message to neighbors to find the ledger net.send( this, link.target, [to = link.target, from = this, ledgerID]() { if (auto it = to->ledgers.find(ledgerID); @@ -741,7 +741,7 @@ struct Peer template struct BroadcastMesg { - M mesg; + M msg; std::size_t seq; PeerID origin; }; @@ -767,7 +767,7 @@ struct Peer // used on the other end if (link.target->router.lastObservedSeq[bm.origin] < bm.seq) { - issue(Relay{link.target->id, bm.mesg}); + issue(Relay{link.target->id, bm.msg}); net.send( this, link.target, @@ -784,12 +784,12 @@ struct Peer void receive(BroadcastMesg const& bm, PeerID from) { - issue(Receive{from, bm.mesg}); + issue(Receive{from, bm.msg}); if (router.lastObservedSeq[bm.origin] < bm.seq) { router.lastObservedSeq[bm.origin] = bm.seq; - schedule(delays.onReceive(bm.mesg), [this, bm, from] { - if (handle(bm.mesg)) + schedule(delays.onReceive(bm.msg), [this, bm, from] { + if (handle(bm.msg)) send(bm, from); }); } diff --git a/src/test/csf/submitters.h b/src/test/csf/submitters.h index 2680c097121..d7e75ad639c 100644 --- a/src/test/csf/submitters.h +++ b/src/test/csf/submitters.h @@ -50,7 +50,7 @@ struct Rate /** Submits transactions to a specified peer Submits successive transactions beginning at start, then spaced according - to succesive calls of distribution(), until stop. + to successive calls of distribution(), until stop. @tparam Distribution is a `UniformRandomBitGenerator` from the STL that is used by random distributions to generate random samples diff --git a/src/test/jtx.h b/src/test/jtx.h index 6347b9dcf98..4e6a3833d16 100644 --- a/src/test/jtx.h +++ b/src/test/jtx.h @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/test/jtx/Env_test.cpp b/src/test/jtx/Env_test.cpp index 34d9f6c0e83..35263fa3960 100644 --- a/src/test/jtx/Env_test.cpp +++ b/src/test/jtx/Env_test.cpp @@ -52,7 +52,7 @@ class Env_test : public beast::unit_test::suite { using namespace jtx; { - Account a("chenna"); + Account a("chad"); Account b(a); a = b; a = std::move(b); @@ -181,8 +181,8 @@ class Env_test : public beast::unit_test::suite // flags env.fund(n, noripple("xavier")); env.require(nflags("xavier", asfDefaultRipple)); - env.fund(n, "yana"); - env.require(flags("yana", asfDefaultRipple)); + env.fund(n, "zachary"); + env.require(flags("zachary", asfDefaultRipple)); } // trust @@ -615,12 +615,9 @@ class Env_test : public beast::unit_test::suite using namespace jtx; Env env(*this); env.fund(XRP(10000), "alice"); - env(noop("alice"), memodata("data")); - env(noop("alice"), memoformat("format")); - env(noop("alice"), memotype("type")); - env(noop("alice"), memondata("format", "type")); - env(noop("alice"), memonformat("data", "type")); - env(noop("alice"), memontype("data", "format")); + env(noop("alice"), memo_data("data")); + env(noop("alice"), memo_format("format")); + env(noop("alice"), memo_type("type")); env(noop("alice"), memo("data", "format", "type")); env(noop("alice"), memo("data1", "format1", "type1"), diff --git a/src/test/jtx/Oracle.h b/src/test/jtx/Oracle.h index 9d2554c18f6..582382cae24 100644 --- a/src/test/jtx/Oracle.h +++ b/src/test/jtx/Oracle.h @@ -151,7 +151,7 @@ class Oracle std::optional const& quoteAsset, std::optional const& oracles = std::nullopt, std::optional const& trim = std::nullopt, - std::optional const& timeTreshold = std::nullopt); + std::optional const& timeThreshold = std::nullopt); std::uint32_t documentID() const @@ -169,7 +169,7 @@ class Oracle exists(Env& env, AccountID const& account, std::uint32_t documentID); [[nodiscard]] bool - expectPrice(DataSeries const& pricess) const; + expectPrice(DataSeries const& prices) const; [[nodiscard]] bool expectLastUpdateTime(std::uint32_t lastUpdateTime) const; diff --git a/src/test/jtx/delivermin.h b/src/test/jtx/delivermin.h index f8b0da2c192..8724a68c236 100644 --- a/src/test/jtx/delivermin.h +++ b/src/test/jtx/delivermin.h @@ -29,13 +29,13 @@ namespace test { namespace jtx { /** Sets the DeliverMin on a JTx. */ -class delivermin +class deliver_min { private: STAmount amount_; public: - delivermin(STAmount const& amount) : amount_(amount) + deliver_min(STAmount const& amount) : amount_(amount) { } diff --git a/src/test/jtx/deposit.h b/src/test/jtx/deposit.h index a09979b7ac7..6f018adfe39 100644 --- a/src/test/jtx/deposit.h +++ b/src/test/jtx/deposit.h @@ -34,7 +34,7 @@ namespace deposit { Json::Value auth(Account const& account, Account const& auth); -/** Remove preauthorization for deposit. Invoke as deposit::unauth. */ +/** Remove pre-authorization for deposit. Invoke as deposit::unauth. */ Json::Value unauth(Account const& account, Account const& unauth); diff --git a/src/test/jtx/envconfig.h b/src/test/jtx/envconfig.h index 432ef28ff6b..16e515ec450 100644 --- a/src/test/jtx/envconfig.h +++ b/src/test/jtx/envconfig.h @@ -25,7 +25,7 @@ namespace ripple { namespace test { -// frequently used macros defined here for convinience. +// frequently used macros defined here for convenience. #define PORT_WS "port_ws" #define PORT_RPC "port_rpc" #define PORT_PEER "port_peer" diff --git a/src/test/jtx/impl/AMMTest.cpp b/src/test/jtx/impl/AMMTest.cpp index 5bb8f14cbf7..78ee9f8eec4 100644 --- a/src/test/jtx/impl/AMMTest.cpp +++ b/src/test/jtx/impl/AMMTest.cpp @@ -131,7 +131,7 @@ AMMTestBase::testAMM( auto const [asset1, asset2] = arg.pool ? *arg.pool : std::make_pair(XRP(10000), USD(10000)); - auto tofund = [&](STAmount const& a) -> STAmount { + auto toFund = [&](STAmount const& a) -> STAmount { if (a.native()) { auto const defXRP = XRP(30000); @@ -144,8 +144,8 @@ AMMTestBase::testAMM( return defIOU; return a + STAmount{a.issue(), 1000}; }; - auto const toFund1 = tofund(asset1); - auto const toFund2 = tofund(asset2); + auto const toFund1 = toFund(asset1); + auto const toFund2 = toFund(asset2); BEAST_EXPECT(asset1 <= toFund1 && asset2 <= toFund2); if (!asset1.native() && !asset2.native()) diff --git a/src/test/jtx/impl/delivermin.cpp b/src/test/jtx/impl/delivermin.cpp index fe9f4e8fe65..82eaf6b0cc0 100644 --- a/src/test/jtx/impl/delivermin.cpp +++ b/src/test/jtx/impl/delivermin.cpp @@ -17,7 +17,7 @@ */ //============================================================================== -#include +#include #include @@ -26,7 +26,7 @@ namespace test { namespace jtx { void -delivermin::operator()(Env& env, JTx& jt) const +deliver_min::operator()(Env& env, JTx& jt) const { jt.jv[jss::DeliverMin] = amount_.getJson(JsonOptions::none); } diff --git a/src/test/jtx/impl/memo.cpp b/src/test/jtx/impl/memo.cpp index 1214ec2a2c9..1b84e13e6c4 100644 --- a/src/test/jtx/impl/memo.cpp +++ b/src/test/jtx/impl/memo.cpp @@ -36,7 +36,7 @@ memo::operator()(Env&, JTx& jt) const } void -memodata::operator()(Env&, JTx& jt) const +memo_data::operator()(Env&, JTx& jt) const { auto& jv = jt.jv; auto& ma = jv["Memos"]; @@ -46,7 +46,7 @@ memodata::operator()(Env&, JTx& jt) const } void -memoformat::operator()(Env&, JTx& jt) const +memo_format::operator()(Env&, JTx& jt) const { auto& jv = jt.jv; auto& ma = jv["Memos"]; @@ -56,7 +56,7 @@ memoformat::operator()(Env&, JTx& jt) const } void -memotype::operator()(Env&, JTx& jt) const +memo_type::operator()(Env&, JTx& jt) const { auto& jv = jt.jv; auto& ma = jv["Memos"]; @@ -65,39 +65,6 @@ memotype::operator()(Env&, JTx& jt) const m["MemoType"] = strHex(s_); } -void -memondata::operator()(Env&, JTx& jt) const -{ - auto& jv = jt.jv; - auto& ma = jv["Memos"]; - auto& mi = ma[ma.size()]; - auto& m = mi["Memo"]; - m["MemoFormat"] = strHex(format_); - m["MemoType"] = strHex(type_); -} - -void -memonformat::operator()(Env&, JTx& jt) const -{ - auto& jv = jt.jv; - auto& ma = jv["Memos"]; - auto& mi = ma[ma.size()]; - auto& m = mi["Memo"]; - m["MemoData"] = strHex(data_); - m["MemoType"] = strHex(type_); -} - -void -memontype::operator()(Env&, JTx& jt) const -{ - auto& jv = jt.jv; - auto& ma = jv["Memos"]; - auto& mi = ma[ma.size()]; - auto& m = mi["Memo"]; - m["MemoData"] = strHex(data_); - m["MemoFormat"] = strHex(format_); -} - } // namespace jtx } // namespace test } // namespace ripple diff --git a/src/test/jtx/memo.h b/src/test/jtx/memo.h index 161dc70f39d..443822aa92d 100644 --- a/src/test/jtx/memo.h +++ b/src/test/jtx/memo.h @@ -51,13 +51,13 @@ class memo operator()(Env&, JTx& jt) const; }; -class memodata +class memo_data { private: std::string s_; public: - memodata(std::string const& s) : s_(s) + memo_data(std::string const& s) : s_(s) { } @@ -65,13 +65,13 @@ class memodata operator()(Env&, JTx& jt) const; }; -class memoformat +class memo_format { private: std::string s_; public: - memoformat(std::string const& s) : s_(s) + memo_format(std::string const& s) : s_(s) { } @@ -79,61 +79,13 @@ class memoformat operator()(Env&, JTx& jt) const; }; -class memotype +class memo_type { private: std::string s_; public: - memotype(std::string const& s) : s_(s) - { - } - - void - operator()(Env&, JTx& jt) const; -}; - -class memondata -{ -private: - std::string format_; - std::string type_; - -public: - memondata(std::string const& format, std::string const& type) - : format_(format), type_(type) - { - } - - void - operator()(Env&, JTx& jt) const; -}; - -class memonformat -{ -private: - std::string data_; - std::string type_; - -public: - memonformat(std::string const& data, std::string const& type) - : data_(data), type_(type) - { - } - - void - operator()(Env&, JTx& jt) const; -}; - -class memontype -{ -private: - std::string data_; - std::string format_; - -public: - memontype(std::string const& data, std::string const& format) - : data_(data), format_(format) + memo_type(std::string const& s) : s_(s) { } diff --git a/src/test/jtx/rpc.h b/src/test/jtx/rpc.h index be9ce22bf71..596cfdef150 100644 --- a/src/test/jtx/rpc.h +++ b/src/test/jtx/rpc.h @@ -68,7 +68,7 @@ class rpc // always obtained from the lookup into the ErrorInfo lookup table. // // Take advantage of that fact to populate jt.rpcException. The - // check will be aware of whether the rpcExcpetion can be safely + // check will be aware of whether the rpcException can be safely // ignored. jt.rpcCode = { *code_, diff --git a/src/test/nodestore/import_test.cpp b/src/test/nodestore/import_test.cpp index 11009ec5bed..c60b5380eac 100644 --- a/src/test/nodestore/import_test.cpp +++ b/src/test/nodestore/import_test.cpp @@ -254,7 +254,7 @@ parse_args(std::string const& s) // '=' static boost::regex const re1( "^" // start of line - "(?:\\s*)" // whitespace (optonal) + "(?:\\s*)" // whitespace (optional) "([a-zA-Z][_a-zA-Z0-9]*)" // "(?:\\s*)" // whitespace (optional) "(?:=)" // '=' diff --git a/src/test/rpc/AccountObjects_test.cpp b/src/test/rpc/AccountObjects_test.cpp index 546bbe87156..925709e690f 100644 --- a/src/test/rpc/AccountObjects_test.cpp +++ b/src/test/rpc/AccountObjects_test.cpp @@ -686,7 +686,7 @@ class AccountObjects_test : public beast::unit_test::suite env(deposit::auth(gw, alice)); env.close(); { - // Find the preauthorization. + // Find the pre-authorization. Json::Value const resp = acctObjs(gw, jss::deposit_preauth); BEAST_EXPECT(acctObjsIsSize(resp, 1)); diff --git a/src/test/rpc/AccountTx_test.cpp b/src/test/rpc/AccountTx_test.cpp index 82809b5c5b5..bd75bb5e869 100644 --- a/src/test/rpc/AccountTx_test.cpp +++ b/src/test/rpc/AccountTx_test.cpp @@ -559,7 +559,7 @@ class AccountTx_test : public beast::unit_test::suite env.close(); } { - // Deposit preauthorization with a Ticket. + // Deposit pre-authorization with a Ticket. std::uint32_t const tktSeq{env.seq(alice) + 1}; env(ticket::create(alice, 1), sig(alie)); env.close(); diff --git a/src/test/rpc/DepositAuthorized_test.cpp b/src/test/rpc/DepositAuthorized_test.cpp index 326766221af..94b43413c61 100644 --- a/src/test/rpc/DepositAuthorized_test.cpp +++ b/src/test/rpc/DepositAuthorized_test.cpp @@ -571,7 +571,7 @@ class DepositAuthorized_test : public beast::unit_test::suite testcase("deposit_authorized with expired credentials"); // check expired credentials - char const credType2[] = "fghijk"; + char const credType2[] = "random"; std::uint32_t const x = env.current() ->info() .parentCloseTime.time_since_epoch() diff --git a/src/xrpld/app/misc/CredentialHelpers.h b/src/xrpld/app/misc/CredentialHelpers.h index 84938180ce2..6549af549e8 100644 --- a/src/xrpld/app/misc/CredentialHelpers.h +++ b/src/xrpld/app/misc/CredentialHelpers.h @@ -35,7 +35,7 @@ namespace ripple { namespace credentials { // These function will be used by the code that use DepositPreauth / Credentials -// (and any future preauthorization modes) as part of authorization (all the +// (and any future pre-authorization modes) as part of authorization (all the // transfer funds transactions) // Check if credential sfExpiration field has passed ledger's parentCloseTime @@ -61,7 +61,7 @@ checkFields(STTx const& tx, beast::Journal j); // Accessing the ledger to check if provided credentials are valid. Do not use // in doApply (only in preclaim) since it does not remove expired credentials. -// If you call it in prelaim, you also must call verifyDepositPreauth in doApply +// If you call it in preclaim, you also must call verifyDepositPreauth in doApply TER valid( STTx const& tx, diff --git a/src/xrpld/app/tx/detail/applySteps.cpp b/src/xrpld/app/tx/detail/applySteps.cpp index 34259ebef0d..8097973a8d3 100644 --- a/src/xrpld/app/tx/detail/applySteps.cpp +++ b/src/xrpld/app/tx/detail/applySteps.cpp @@ -97,8 +97,8 @@ with_txn_type(TxType txnType, F&& f) #pragma push_macro("TRANSACTION") #undef TRANSACTION -#define TRANSACTION(tag, value, name, delegatable, fields) \ - case tag: \ +#define TRANSACTION(tag, value, name, delegable, fields) \ + case tag: \ return f.template operator()(); #include @@ -329,15 +329,15 @@ preflight( ApplyFlags flags, beast::Journal j) { - PreflightContext const pfctx(app, tx, rules, flags, j); + PreflightContext const pf_ctx(app, tx, rules, flags, j); try { - return {pfctx, invoke_preflight(pfctx)}; + return {pf_ctx, invoke_preflight(pf_ctx)}; } catch (std::exception const& e) { JLOG(j.fatal()) << "apply (preflight): " << e.what(); - return {pfctx, {tefEXCEPTION, TxConsequences{tx}}}; + return {pf_ctx, {tefEXCEPTION, TxConsequences{tx}}}; } } @@ -350,15 +350,15 @@ preflight( ApplyFlags flags, beast::Journal j) { - PreflightContext const pfctx(app, tx, parentBatchId, rules, flags, j); + PreflightContext const pf_ctx(app, tx, parentBatchId, rules, flags, j); try { - return {pfctx, invoke_preflight(pfctx)}; + return {pf_ctx, invoke_preflight(pf_ctx)}; } catch (std::exception const& e) { JLOG(j.fatal()) << "apply (preflight): " << e.what(); - return {pfctx, {tefEXCEPTION, TxConsequences{tx}}}; + return {pf_ctx, {tefEXCEPTION, TxConsequences{tx}}}; } } diff --git a/src/xrpld/consensus/Validations.h b/src/xrpld/consensus/Validations.h index c333aeaefd7..33a6cb9fd57 100644 --- a/src/xrpld/consensus/Validations.h +++ b/src/xrpld/consensus/Validations.h @@ -476,7 +476,7 @@ class Validations @param lock Existing lock of mutex_ @param f Invokable with signature (LedgerTrie &) - @warning The invokable `f` is expected to be a simple transformation of + @warning The invocable `f` is expected to be a simple transformation of its arguments and will be called with mutex_ under lock. */ @@ -500,9 +500,9 @@ class Validations @param f Invokable with signature (NodeID const &, Validations const &) for each current validation. - @note The invokable `pre` is called _prior_ to checking for staleness + @note The invocable `pre` is called _prior_ to checking for staleness and reflects an upper-bound on the number of calls to `f. - @warning The invokable `f` is expected to be a simple transformation of + @warning The invocable `f` is expected to be a simple transformation of its arguments and will be called with mutex_ under lock. */ @@ -539,9 +539,9 @@ class Validations @param pre Invokable with signature(std::size_t) @param f Invokable with signature (NodeID const &, Validation const &) - @note The invokable `pre` is called prior to iterating validations. The + @note The invocable `pre` is called prior to iterating validations. The argument is the number of times `f` will be called. - @warning The invokable f is expected to be a simple transformation of + @warning The invocable f is expected to be a simple transformation of its arguments and will be called with mutex_ under lock. */ template diff --git a/src/xrpld/peerfinder/README.md b/src/xrpld/peerfinder/README.md index a3f89fd4468..7e7e8fdbe5f 100644 --- a/src/xrpld/peerfinder/README.md +++ b/src/xrpld/peerfinder/README.md @@ -257,7 +257,7 @@ Slot properties may be combined and are not mutually exclusive. - **Superpeer** (forthcoming) A superpeer slot is a connection to a peer which can accept incoming - connections, meets certain resource availaibility requirements (such as + connections, meets certain resource availability requirements (such as bandwidth, CPU, and storage capacity), and operates full duplex in the overlay. Connections which are not superpeers are by definition leaves. A leaf slot is a connection to a peer which does not route overlay messages to diff --git a/src/xrpld/peerfinder/detail/Logic.h b/src/xrpld/peerfinder/detail/Logic.h index e23bbc29e1b..8ddd0a438b9 100644 --- a/src/xrpld/peerfinder/detail/Logic.h +++ b/src/xrpld/peerfinder/detail/Logic.h @@ -917,7 +917,7 @@ class Logic // Address must exist if (iter == connectedAddresses_.end()) LogicError( - "PeerFinder::Logic::remove(): remote_endpont " + "PeerFinder::Logic::remove(): remote_endpoint " "address missing from connectedAddresses_"); connectedAddresses_.erase(iter); @@ -940,7 +940,7 @@ class Logic auto iter(fixed_.find(slot->remote_endpoint())); if (iter == fixed_.end()) LogicError( - "PeerFinder::Logic::on_closed(): remote_endpont " + "PeerFinder::Logic::on_closed(): remote_endpoint " "missing from fixed_"); iter->second.failure(m_clock.now()); diff --git a/src/xrpld/rpc/detail/RPCCall.cpp b/src/xrpld/rpc/detail/RPCCall.cpp index aa8c80fff70..ff1ffd281e3 100644 --- a/src/xrpld/rpc/detail/RPCCall.cpp +++ b/src/xrpld/rpc/detail/RPCCall.cpp @@ -437,7 +437,7 @@ class RPCParser return jvRequest; } - // Return an error for attemping to subscribe/unsubscribe via RPC. + // Return an error for attempting to subscribe/unsubscribe via RPC. Json::Value parseEvented(Json::Value const& jvParams) { diff --git a/src/xrpld/rpc/detail/RPCHelpers.cpp b/src/xrpld/rpc/detail/RPCHelpers.cpp index b98f31340ae..15550a3b6de 100644 --- a/src/xrpld/rpc/detail/RPCHelpers.cpp +++ b/src/xrpld/rpc/detail/RPCHelpers.cpp @@ -190,7 +190,7 @@ getAccountObjects( auto& jvObjects = (jvResult[jss::account_objects] = Json::arrayValue); - // this is a mutable version of limit, used to seemlessly switch + // this is a mutable version of limit, used to seamlessly switch // to iterating directory entries when nftokenpages are exhausted uint32_t mlimit = limit; @@ -586,7 +586,7 @@ getLedger(T& ledger, LedgerShortcut shortcut, Context& context) return Status::OK; } -// Explicit instantiaion of above three functions +// Explicit instantiation of above three functions template Status getLedger<>(std::shared_ptr&, uint32_t, Context&); diff --git a/src/xrpld/rpc/detail/RPCHelpers.h b/src/xrpld/rpc/detail/RPCHelpers.h index 1d33d694596..4ffbe1e1638 100644 --- a/src/xrpld/rpc/detail/RPCHelpers.h +++ b/src/xrpld/rpc/detail/RPCHelpers.h @@ -65,7 +65,7 @@ accountFromString( @param[out] result account ID decoded from string @param strIdent public key, account ID, or regular seed. @param bStrict Only allow account id or public key. - @return code representing error, or rpcSUCCES on success + @return code representing error, or rpcSUCCESS on success */ error_code_i accountFromStringWithCode( diff --git a/src/xrpld/rpc/detail/RPCSub.cpp b/src/xrpld/rpc/detail/RPCSub.cpp index 966ad6df4bc..e87277f66bc 100644 --- a/src/xrpld/rpc/detail/RPCSub.cpp +++ b/src/xrpld/rpc/detail/RPCSub.cpp @@ -190,7 +190,7 @@ class RPCSubImp : public RPCSub int mSeq; // Next id to allocate. - bool mSending; // Sending threead is active. + bool mSending; // Sending thread is active. std::deque> mDeque; diff --git a/src/xrpld/rpc/detail/ServerHandler.cpp b/src/xrpld/rpc/detail/ServerHandler.cpp index 0c84e59413d..25ab326f51c 100644 --- a/src/xrpld/rpc/detail/ServerHandler.cpp +++ b/src/xrpld/rpc/detail/ServerHandler.cpp @@ -628,7 +628,7 @@ ServerHandler::processRequest( { HTTPReply( 400, - "Unable to parse request: " + reader.getFormatedErrorMessages(), + "Unable to parse request: " + reader.getFormattedErrorMessages(), output, rpcJ); return; diff --git a/src/xrpld/rpc/detail/TransactionSign.cpp b/src/xrpld/rpc/detail/TransactionSign.cpp index 175fd84c9b0..a06dd2fbd98 100644 --- a/src/xrpld/rpc/detail/TransactionSign.cpp +++ b/src/xrpld/rpc/detail/TransactionSign.cpp @@ -281,7 +281,7 @@ checkPayment( app); if (pf.findPaths(app.config().PATH_SEARCH_OLD)) { - // 4 is the maxium paths + // 4 is the maximum paths pf.computePathRanks(4); STPath fullLiquidityPath; STPathSet paths; @@ -1013,7 +1013,7 @@ transactionSubmit( // Finally, submit the transaction. try { - // FIXME: For performance, should use asynch interface + // FIXME: For performance, should use async interface processTransaction(txn.second, isUnlimited(role), true, failType); } catch (std::exception&) @@ -1399,7 +1399,7 @@ transactionSubmitMultiSigned( // Finally, submit the transaction. try { - // FIXME: For performance, should use asynch interface + // FIXME: For performance, should use async interface processTransaction(txn.second, isUnlimited(role), true, failType); } catch (std::exception&) diff --git a/src/xrpld/rpc/handlers/AccountInfo.cpp b/src/xrpld/rpc/handlers/AccountInfo.cpp index 3432021690a..3a89a88b6b1 100644 --- a/src/xrpld/rpc/handlers/AccountInfo.cpp +++ b/src/xrpld/rpc/handlers/AccountInfo.cpp @@ -223,7 +223,7 @@ doAccountInfo(RPC::JsonContext& context) { XRPL_ASSERT( prevSeqProxy < tx.seqProxy, - "rpple::doAccountInfo : first sorted proxy"); + "doAccountInfo : first sorted proxy"); prevSeqProxy = tx.seqProxy; jvTx[jss::seq] = tx.seqProxy.value(); ++seqCount; @@ -235,7 +235,7 @@ doAccountInfo(RPC::JsonContext& context) { XRPL_ASSERT( prevSeqProxy < tx.seqProxy, - "rpple::doAccountInfo : second sorted proxy"); + "doAccountInfo : second sorted proxy"); prevSeqProxy = tx.seqProxy; jvTx[jss::ticket] = tx.seqProxy.value(); ++ticketCount; diff --git a/src/xrpld/rpc/handlers/AccountTx.cpp b/src/xrpld/rpc/handlers/AccountTx.cpp index d5df40303ba..4459a0d50c2 100644 --- a/src/xrpld/rpc/handlers/AccountTx.cpp +++ b/src/xrpld/rpc/handlers/AccountTx.cpp @@ -355,7 +355,7 @@ populateJsonResponse( else UNREACHABLE( "ripple::populateJsonResponse : missing " - "transaction medatata"); + "transaction metadata"); } } } diff --git a/src/xrpld/rpc/handlers/GatewayBalances.cpp b/src/xrpld/rpc/handlers/GatewayBalances.cpp index ca9e370c815..c1dee949ce8 100644 --- a/src/xrpld/rpc/handlers/GatewayBalances.cpp +++ b/src/xrpld/rpc/handlers/GatewayBalances.cpp @@ -48,7 +48,7 @@ namespace ripple { // 3) Object of "assets" indicating accounts that owe the gateway. // (Gateways typically do not hold positive balances. This is unusual.) -// gateway_balances [] [ [] [ [ // limit: integer // optional, number of problems // role: gateway|user // account role to assume -// transactions: true // optional, reccommend transactions +// transactions: true // optional, recommend transactions // } Json::Value doNoRippleCheck(RPC::JsonContext& context) diff --git a/src/xrpld/shamap/README.md b/src/xrpld/shamap/README.md index 3bff74e67bd..419918c0cb5 100644 --- a/src/xrpld/shamap/README.md +++ b/src/xrpld/shamap/README.md @@ -226,7 +226,7 @@ The `fetchNodeNT()` method goes through three phases: Any SHAMapLeafNode that is immutable has a sequence number of zero (sharable). When a mutable `SHAMap` is created then its SHAMapTreeNodes are - given non-zero sequence numbers (unsharable). But all nodes in the + given non-zero sequence numbers (unshareable). But all nodes in the TreeNodeCache are immutable, so if one is found here, its sequence number will be 0. diff --git a/src/xrpld/shamap/SHAMapItem.h b/src/xrpld/shamap/SHAMapItem.h index 4c9ce654692..4ce5e2c7bf4 100644 --- a/src/xrpld/shamap/SHAMapItem.h +++ b/src/xrpld/shamap/SHAMapItem.h @@ -144,13 +144,13 @@ intrusive_ptr_release(SHAMapItem const* x) { auto p = reinterpret_cast(x); - // The SHAMapItem constuctor isn't trivial (because the destructor + // The SHAMapItem constructor isn't trivial (because the destructor // for CountedObject isn't) so we can't avoid calling it here, but // plan for a future where we might not need to. if constexpr (!std::is_trivially_destructible_v) std::destroy_at(x); - // If the slabber doens't claim this pointer, it was allocated + // If the slabber doesn't claim this pointer, it was allocated // manually, so we free it manually. if (!detail::slabber.deallocate(const_cast(p))) delete[] p; diff --git a/src/xrpld/shamap/detail/SHAMap.cpp b/src/xrpld/shamap/detail/SHAMap.cpp index d2415a2ff24..9e4da7732c5 100644 --- a/src/xrpld/shamap/detail/SHAMap.cpp +++ b/src/xrpld/shamap/detail/SHAMap.cpp @@ -206,7 +206,7 @@ SHAMap::finishFetch( catch (...) { JLOG(journal_.warn()) - << "finishFetch exception: unknonw exception: " << hash; + << "finishFetch exception: unknown exception: " << hash; } return {};