Merge pull request #2888 from XRPLF/quick-fixes

Quick fixes
This commit is contained in:
Amarantha Kulkarni
2024-12-20 16:19:13 -08:00
committed by GitHub
3 changed files with 25 additions and 13 deletions

View File

@@ -155,17 +155,17 @@ curated_anchors:
### タイプコード
各フィールドタイプには任意のタイプコードが含まれており、番号が小さいコードから最初にソートされます。これらのコードは[`SField.h`](https://github.com/XRPLF/rippled/blob/master/src/ripple/protocol/SField.h#L57-L74)で定義されています。
各フィールドタイプには任意のタイプコードが含まれており、番号が小さいコードから最初にソートされます。これらのコードは[`SField.h`](https://github.com/XRPLF/rippled/blob/master/include/xrpl/protocol/SField.h#L60-L98)で定義されています。
たとえば [UInt32のタイプコードが2である](https://github.com/XRPLF/rippled/blob/72e6005f562a8f0818bc94803d222ac9345e1e40/src/ripple/protocol/SField.h#L59)ので、すべてのUInt32フィールドは、すべての[Amountフィールドタイプコード6](https://github.com/XRPLF/rippled/blob/72e6005f562a8f0818bc94803d222ac9345e1e40/src/ripple/protocol/SField.h#L63)よりも前に位置します。
たとえば [UInt32のタイプコードが2である](https://github.com/XRPLF/rippled/blob/master/include/xrpl/protocol/SField.h#L67)ので、すべてのUInt32フィールドは、すべての[Amountフィールドタイプコード6](https://github.com/XRPLF/rippled/blob/master/include/xrpl/protocol/SField.h#L71)よりも前に位置します。
[定義ファイル](#定義ファイル)には、`TYPES`マップの各タイプのタイプコードがリストされています。
### フィールドコード
各フィールドにはフィールドコードが含まれています。フィールドコードは、同じタイプのフィールドをソートするときに使用され、番号が小さいコードが最初になるようにソートされます。これらのフィールドは[`SField.cpp`](https://github.com/XRPLF/rippled/blob/72e6005f562a8f0818bc94803d222ac9345e1e40/src/ripple/protocol/impl/SField.cpp#L72-L266)で定義されています。
各フィールドにはフィールドコードが含まれています。フィールドコードは、同じタイプのフィールドをソートするときに使用され、番号が小さいコードが最初になるようにソートされます。これらのフィールドは[`sfields/macro`](https://github.com/XRPLF/rippled/blob/master/include/xrpl/protocol/detail/sfields.macro)で定義されています。
たとえば[Paymentトランザクション][]の`Account`フィールドの[ソートコードが1である](https://github.com/XRPLF/rippled/blob/72e6005f562a8f0818bc94803d222ac9345e1e40/src/ripple/protocol/impl/SField.cpp#L219)場合、このフィールドは`Destination`フィールド([ソートコードが3である](https://github.com/XRPLF/rippled/blob/72e6005f562a8f0818bc94803d222ac9345e1e40/src/ripple/protocol/impl/SField.cpp#L221)フィールド)よりも前に位置します。
たとえば[Paymentトランザクション][]の`Account`フィールドの[ソートコードが1である](https://github.com/XRPLF/rippled/blob/master/include/xrpl/protocol/detail/sfields.macro#L269)場合、このフィールドは`Destination`フィールド([ソートコードが3である](https://github.com/XRPLF/rippled/blob/master/include/xrpl/protocol/detail/sfields.macro#L271)フィールド)よりも前に位置します。
フィールドコードは異なるフィールドタイプのフィールドで再利用されますが、同じタイプのフィールドに同じフィールドコードが含まれることはありません。タイプコードとフィールドコードを組み合わせると、フィールドの一意の[フィールドID](#フィールドid)になります。

View File

@@ -155,17 +155,17 @@ All fields in a transaction are sorted in a specific order based first on the fi
### Type Codes
Each field type has an arbitrary type code, with lower codes sorting first. These codes are defined in [`SField.h`](https://github.com/XRPLF/rippled/blob/master/src/ripple/protocol/SField.h#L57-L74).
Each field type has an arbitrary type code, with lower codes sorting first. These codes are defined in [`SField.h`](https://github.com/XRPLF/rippled/blob/master/include/xrpl/protocol/SField.h#L60-L98).
For example, [UInt32 has type code 2](https://github.com/XRPLF/rippled/blob/72e6005f562a8f0818bc94803d222ac9345e1e40/src/ripple/protocol/SField.h#L59), so all UInt32 fields come before all [Amount fields, which have type code 6](https://github.com/XRPLF/rippled/blob/72e6005f562a8f0818bc94803d222ac9345e1e40/src/ripple/protocol/SField.h#L63).
For example, [UInt32 has type code 2](https://github.com/XRPLF/rippled/blob/master/include/xrpl/protocol/SField.h#L67), so all UInt32 fields come before all [Amount fields, which have type code 6](https://github.com/XRPLF/rippled/blob/master/include/xrpl/protocol/SField.h#L71).
The [definitions file](#definitions-file) lists the type codes for each type in the `TYPES` map.
### Field Codes
Each field has a field code, which is used to sort fields that have the same type as one another, with lower codes sorting first. These fields are defined in [`SField.cpp`](https://github.com/XRPLF/rippled/blob/72e6005f562a8f0818bc94803d222ac9345e1e40/src/ripple/protocol/impl/SField.cpp#L72-L266).
Each field has a field code, which is used to sort fields that have the same type as one another, with lower codes sorting first. These fields are defined in [`sfields.macro`](https://github.com/XRPLF/rippled/blob/master/include/xrpl/protocol/detail/sfields.macro).
For example, the `Account` field of a [Payment transaction][] [has sort code 1](https://github.com/XRPLF/rippled/blob/72e6005f562a8f0818bc94803d222ac9345e1e40/src/ripple/protocol/impl/SField.cpp#L219), so it comes before the `Destination` field which [has sort code 3](https://github.com/XRPLF/rippled/blob/72e6005f562a8f0818bc94803d222ac9345e1e40/src/ripple/protocol/impl/SField.cpp#L221).
For example, the `Account` field of a [Payment transaction][] [has sort code 1](https://github.com/XRPLF/rippled/blob/master/include/xrpl/protocol/detail/sfields.macro#L269), so it comes before the `Destination` field which [has sort code 3](https://github.com/XRPLF/rippled/blob/master/include/xrpl/protocol/detail/sfields.macro#L271).
Field codes are reused for fields of different field types, but fields of the same type never have the same field code. When you combine the type code with the field code, you get the field's unique [Field ID](#field-ids).

View File

@@ -46,6 +46,9 @@ xrp-testnet-faucet.html:
xrp-test-net-faucet.html:
to: /resources/dev-tools/xrp-faucets
type: 301
/resources/xrp-faucets:
to: /resources/dev-tools/xrp-faucets
type: 301
tx-sender.html:
to: /resources/dev-tools/tx-sender
type: 301
@@ -2290,6 +2293,9 @@ blog/2023.html:
blog/2024.html:
to: /blog/
type: 301
blog/label/developer-reflections.html:
to: /blog/
type: 301
code_of_conduct/:
to: /code-of-conduct
type: 301
@@ -2340,6 +2346,9 @@ code_of_conduct.ja:
/ja/xrp-test-net-faucet.html:
to: /ja/resources/dev-tools/xrp-faucets
type: 301
/ja/resources/xrp-test-net-faucets:
to: /ja/resources/dev-tools/xrp-faucets
type: 301
/ja/tx-sender.html:
to: /ja/resources/dev-tools/tx-sender
type: 301
@@ -2370,6 +2379,9 @@ code_of_conduct.ja:
/ja/impact.html:
to: /ja/about/impact
type: 301
/ja/impact:
to: /ja/about/impact
type: 301
/ja/carbon-calculator.html:
to: /ja/about/impact
type: 301
@@ -2818,7 +2830,7 @@ code_of_conduct.ja:
to: /ja/docs/tutorials/python/get-started
type: 301
/ja/docs/tutorials/python/get-started/:
to: /jadocs/tutorials/python/build-apps/get-started/
to: /ja/docs/tutorials/python/build-apps/get-started/
type: 301
/ja/modular-tutorials-in-python.html:
to: /ja/docs/tutorials/python/
@@ -2860,10 +2872,10 @@ code_of_conduct.ja:
to: /ja/docs/tutorials/javascript/build-apps/get-started
type: 301
/ja/docs/tutorials/javascript/get-started:
to: /jadocs/tutorials/javascript/build-apps/get-started/
to: /ja/docs/tutorials/javascript/build-apps/get-started/
type: 301
/ja/docs/tutorials/javascript/get-started/:
to: /jadocs/tutorials/javascript/build-apps/get-started/
to: /ja/docs/tutorials/javascript/build-apps/get-started/
type: 301
/ja/get-started-using-node-js.html:
to: /ja/docs/tutorials/javascript/build-apps/get-started
@@ -2917,10 +2929,10 @@ code_of_conduct.ja:
to: /ja/docs/tutorials/javascript/build-apps/build-a-browser-wallet-in-javascript/
type: 301
/ja/docs/tutorials/javascript/build-a-browser-wallet-in-javascript:
to: /jadocs/tutorials/javascript/build-apps/build-a-browser-wallet-in-javascript/
to: /ja/docs/tutorials/javascript/build-apps/build-a-browser-wallet-in-javascript/
type: 301
/ja/docs/tutorials/javascript/build-a-browser-wallet-in-javascript/:
to: /jadocs/tutorials/javascript/build-apps/build-a-browser-wallet-in-javascript/
to: /ja/docs/tutorials/javascript/build-apps/build-a-browser-wallet-in-javascript/
type: 301
/ja/build-a-desktop-wallet-in-javascript.html:
to: /ja/docs/tutorials/javascript/build-apps/build-a-desktop-wallet-in-javascript