Merge pull request #3593 from lbryio/default_feer_per_name_char

set the default per character fee for claims to zero
This commit is contained in:
Lex Berezhny 2022-04-08 13:46:54 -04:00 committed by GitHub
commit 0a51898722
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 7 deletions

View file

@ -106,7 +106,7 @@ class Ledger(metaclass=LedgerRegistry):
target_timespan = 150 target_timespan = 150
default_fee_per_byte = 50 default_fee_per_byte = 50
default_fee_per_name_char = 200000 default_fee_per_name_char = 0
checkpoints = HASHES checkpoints = HASHES

View file

@ -189,6 +189,7 @@ class WalletNode:
'known_hubs': config.known_hubs if config else KnownHubsList(), 'known_hubs': config.known_hubs if config else KnownHubsList(),
'hub_timeout': 30, 'hub_timeout': 30,
'concurrent_hub_requests': 32, 'concurrent_hub_requests': 32,
'fee_per_name_char': 200000
} }
}, },
'wallets': [wallet_file_name] 'wallets': [wallet_file_name]

View file

@ -3,9 +3,10 @@ import scribe
from unittest.mock import Mock from unittest.mock import Mock
from scribe.blockchain.network import LBCRegTest from scribe.hub import HUB_PROTOCOL_VERSION
from scribe.hub.udp import StatusServer from scribe.hub.udp import StatusServer
from scribe.hub.session import LBRYElectrumX from scribe.hub.session import LBRYElectrumX
from scribe.blockchain.network import LBCRegTest
from lbry.wallet.network import Network from lbry.wallet.network import Network
from lbry.wallet.orchstr8 import Conductor from lbry.wallet.orchstr8 import Conductor
@ -35,7 +36,7 @@ class NetworkTests(IntegrationTestCase):
'payment_address': '', 'payment_address': '',
'donation_address': '', 'donation_address': '',
'daily_fee': '0', 'daily_fee': '0',
'server_version': scribe.__version__, 'server_version': HUB_PROTOCOL_VERSION,
'trending_algorithm': 'fast_ar', 'trending_algorithm': 'fast_ar',
}, await self.ledger.network.get_server_features()) }, await self.ledger.network.get_server_features())
# await self.conductor.spv_node.stop() # await self.conductor.spv_node.stop()
@ -65,7 +66,7 @@ class NetworkTests(IntegrationTestCase):
'payment_address': payment_address, 'payment_address': payment_address,
'donation_address': donation_address, 'donation_address': donation_address,
'daily_fee': '42', 'daily_fee': '42',
'server_version': scribe.__version__, 'server_version': HUB_PROTOCOL_VERSION,
'trending_algorithm': 'fast_ar', 'trending_algorithm': 'fast_ar',
}, await self.ledger.network.get_server_features()) }, await self.ledger.network.get_server_features())

View file

@ -1,6 +1,6 @@
import asyncio import asyncio
import scribe from scribe.hub import HUB_PROTOCOL_VERSION
from scribe.hub.session import LBRYElectrumX from scribe.hub.session import LBRYElectrumX
from lbry.error import ServerPaymentFeeAboveMaxAllowedError from lbry.error import ServerPaymentFeeAboveMaxAllowedError
@ -34,7 +34,7 @@ class TestSessions(IntegrationTestCase):
async def test_proper_version(self): async def test_proper_version(self):
info = await self.ledger.network.get_server_features() info = await self.ledger.network.get_server_features()
self.assertEqual(scribe.__version__, info['server_version']) self.assertEqual(HUB_PROTOCOL_VERSION, info['server_version'])
async def test_client_errors(self): async def test_client_errors(self):
# Goal is ensuring thsoe are raised and not trapped accidentally # Goal is ensuring thsoe are raised and not trapped accidentally

View file

@ -1,3 +1,4 @@
import asyncio
import unittest import unittest
from lbry.testcase import CommandTestCase from lbry.testcase import CommandTestCase
@ -28,6 +29,7 @@ class TransactionCommandsTestCase(CommandTestCase):
# someone's tx # someone's tx
change_address = await self.blockchain.get_raw_change_address() change_address = await self.blockchain.get_raw_change_address()
sendtxid = await self.blockchain.send_to_address(change_address, 10) sendtxid = await self.blockchain.send_to_address(change_address, 10)
await asyncio.sleep(0.2)
tx = await self.daemon.jsonrpc_transaction_show(sendtxid) tx = await self.daemon.jsonrpc_transaction_show(sendtxid)
self.assertEqual(tx.id, sendtxid) self.assertEqual(tx.id, sendtxid)
self.assertEqual(tx.height, -1) self.assertEqual(tx.height, -1)

View file

@ -42,7 +42,8 @@ class TestSizeAndFeeEstimation(AsyncioTestCase):
async def asyncSetUp(self): async def asyncSetUp(self):
self.ledger = Ledger({ self.ledger = Ledger({
'db': Database(':memory:'), 'db': Database(':memory:'),
'headers': Headers(':memory:') 'headers': Headers(':memory:'),
'fee_per_name_char': 200_000
}) })
await self.ledger.db.open() await self.ledger.db.open()