mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-01 01:35:20 +00:00
fix Flake8 tests
This commit is contained in:
parent
a3bff7476c
commit
246cda2928
3 changed files with 4 additions and 1 deletions
|
@ -38,6 +38,7 @@ from typing import Optional, TYPE_CHECKING
|
||||||
|
|
||||||
from .import util, ecc
|
from .import util, ecc
|
||||||
from .util import bfh, bh2u, format_satoshis, json_decode, json_encode, is_hash256_str, is_hex_str, to_bytes, timestamp_to_datetime
|
from .util import bfh, bh2u, format_satoshis, json_decode, json_encode, is_hash256_str, is_hex_str, to_bytes, timestamp_to_datetime
|
||||||
|
from .util import standardize_path
|
||||||
from . import bitcoin
|
from . import bitcoin
|
||||||
from .bitcoin import is_address, hash_160, COIN, TYPE_ADDRESS
|
from .bitcoin import is_address, hash_160, COIN, TYPE_ADDRESS
|
||||||
from .bip32 import BIP32Node
|
from .bip32 import BIP32Node
|
||||||
|
|
|
@ -128,7 +128,7 @@ class LNPathFinder(Logger):
|
||||||
"""Heuristic cost of going through a channel.
|
"""Heuristic cost of going through a channel.
|
||||||
Returns (heuristic_cost, fee_for_edge_msat).
|
Returns (heuristic_cost, fee_for_edge_msat).
|
||||||
"""
|
"""
|
||||||
channel_info = self.channel_db.get_channel_info(short_channel_id) # type: ChannelInfo
|
channel_info = self.channel_db.get_channel_info(short_channel_id)
|
||||||
if channel_info is None:
|
if channel_info is None:
|
||||||
return float('inf'), 0
|
return float('inf'), 0
|
||||||
channel_policy = self.channel_db.get_policy_for_node(short_channel_id, start_node)
|
channel_policy = self.channel_db.get_policy_for_node(short_channel_id, start_node)
|
||||||
|
|
|
@ -741,6 +741,8 @@ class TestChanReserve(unittest.TestCase):
|
||||||
# Resulting balances:
|
# Resulting balances:
|
||||||
# Alice: 3.0
|
# Alice: 3.0
|
||||||
# Bob: 7.0
|
# Bob: 7.0
|
||||||
|
paymentPreimage = b"\x01" * 32
|
||||||
|
paymentHash = bitcoin.sha256(paymentPreimage)
|
||||||
htlc_dict = {
|
htlc_dict = {
|
||||||
'payment_hash' : paymentHash,
|
'payment_hash' : paymentHash,
|
||||||
'amount_msat' : int(2 * one_bitcoin_in_msat),
|
'amount_msat' : int(2 * one_bitcoin_in_msat),
|
||||||
|
|
Loading…
Add table
Reference in a new issue