Compare commits

...

4 commits

Author SHA1 Message Date
Lex Berezhny
ef8aae28ca 0.101.3 2022-02-04 21:29:01 -05:00
Lex Berezhny
790ad54c5a backporting simplified dust prevention fix 2022-02-04 21:24:32 -05:00
Lex Berezhny
4ddd73c33e upgrade ubuntu 2021-12-17 14:59:29 -05:00
Lex Berezhny
f5cd79391f backporting fee per name env var 2021-12-17 14:09:34 -05:00
4 changed files with 7 additions and 4 deletions

View file

@ -97,7 +97,7 @@ jobs:
strategy:
matrix:
os:
- ubuntu-16.04
- ubuntu-18.04
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}

View file

@ -1,2 +1,2 @@
__version__ = "0.101.1"
__version__ = "0.101.3"
version = tuple(map(int, __version__.split('.'))) # pylint: disable=invalid-name

View file

@ -191,6 +191,9 @@ class WalletManager:
'data_path': config.wallet_dir,
'tx_cache_size': config.transaction_cache_size
}
if 'LBRY_FEE_PER_NAME_CHAR' in os.environ:
ledger_config['fee_per_name_char'] = int(os.environ.get('LBRY_FEE_PER_NAME_CHAR'))
wallets_directory = os.path.join(config.wallet_dir, 'wallets')
if not os.path.exists(wallets_directory):

View file

@ -832,10 +832,10 @@ class Transaction:
)
if payment > cost:
change = payment - cost
if change > cost_of_change:
change_amount = change - cost_of_change
if change_amount > 1000:
change_address = await change_account.change.get_or_create_usable_address()
change_hash160 = change_account.ledger.address_to_hash160(change_address)
change_amount = change - cost_of_change
change_output = Output.pay_pubkey_hash(change_amount, change_hash160)
change_output.is_internal_transfer = True
tx.add_outputs([Output.pay_pubkey_hash(change_amount, change_hash160)])