stellard icon indicating copy to clipboard operation
stellard copied to clipboard

Why does setting RequireDestTag (65536) makes flags be 131072

Open irisli opened this issue 10 years ago • 1 comments

If you set requireDestTag on an account, you use 65536

curl -X POST https://live.stellar.org:9002 -d '
{
  "method": "submit",
  "params": [
    {
      "secret": "sMasterSeedHereXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "tx_json": {
        "TransactionType": "AccountSet",
        "Account": "gTargetAccountIDHereXXXXXXXXXXXXXX",
        "Flags": "65536"
      }
    }
  ]
}'

But when you do an account_info, it shows that the flag is 131072. Here is an example from justcoin:

{
   "result" : {
      "account_data" : {
         "Account" : "gnhPFpbYXcYGMkGxfWdQGFfuKEdJoEThVo",
         "Balance" : "14100428650718",
         "Flags" : 131072,
         "LedgerEntryType" : "AccountRoot",
         "OwnerCount" : 0,
         "PreviousTxnID" : "B49CA02A605F451C64547F00C3DB3961504F0C8CE7FF85E21214CD7627811F60",
         "PreviousTxnLgrSeq" : 126812,
         "Sequence" : 386,
         "index" : "3B438257E1B6205011E2B06969C90877881660F7F93ED52A25486D093A766365"
      },
      "ledger_current_index" : 126821,
      "status" : "success"
   }
}

Why does this happen? It is also documented in the Ripple wiki ( https://ripple.com/wiki/Require_a_destination_tag_for_inbound_payments ) in the last sentence in the "Requiring a DestinationTag" section

irisli avatar Aug 04 '14 20:08 irisli

Transaction flags and Ledger flags are sometimes different. src\ripple_data\protocol\TxFlags.h:39 : static std::uint32_t const requireDestTag = 0x00010000;

src\ripple_data\protocol\LedgerFormats.h:100 : lsfRequireDestTag = 0x00020000

marco89nish avatar Aug 06 '14 18:08 marco89nish