mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Add "Default Ripple" account flag and associated logic:
AccountSet set/clear, asfDefaultRipple = 8 AccountRoot flag, lsfDefaultRipple = 0x00800000 In trustCreate, set no ripple flag if appropriate. If an account does not have the default ripple flag set, new ripple lines created as a result of its offers being taken or people creating trust lines to it have no ripple set by that account's side automatically Trust lines can be deleted if the no ripple flag matches its default setting based on the account's default ripple setting. Fix default no-rippling in integration tests.
This commit is contained in:
committed by
Tom Ritchford
parent
6c364f63cc
commit
3b3b897193
@@ -491,8 +491,9 @@ exports.LedgerState = class LedgerState
|
||||
|
||||
add_transaction_fees: ->
|
||||
extra_fees = {}
|
||||
account_sets = ([k] for k,ac of @accounts)
|
||||
fee = Amount.from_json(@remote.fee_cushion * 10)
|
||||
for list in [@trusts, @iou_payments, @offers]
|
||||
for list in [@trusts, @iou_payments, @offers, account_sets]
|
||||
for [src, args...] in list
|
||||
extra = extra_fees[src]
|
||||
extra = if extra? then extra.add(fee) else fee
|
||||
@@ -526,6 +527,13 @@ exports.LedgerState = class LedgerState
|
||||
LOG("Account `#{src}` creating account `#{dest}` by "+
|
||||
"making payment of #{amt.to_text_full()}") ),
|
||||
cb)
|
||||
(cb) ->
|
||||
reqs.transactor(
|
||||
Transaction::account_set,
|
||||
accounts_apply_arguments,
|
||||
((account, tx) ->
|
||||
tx.tx_json.SetFlag = 8
|
||||
), cb)
|
||||
(cb) ->
|
||||
reqs.transactor(
|
||||
Transaction::ripple_line_set,
|
||||
|
||||
Reference in New Issue
Block a user