util: kill bh2u
no longer useful, and the name is so confusing...
This commit is contained in:
@@ -41,7 +41,7 @@ from typing import Optional, TYPE_CHECKING, Dict, List
|
||||
import os
|
||||
|
||||
from .import util, ecc
|
||||
from .util import (bfh, bh2u, format_satoshis, json_decode, json_normalize,
|
||||
from .util import (bfh, format_satoshis, json_decode, json_normalize,
|
||||
is_hash256_str, is_hex_str, to_bytes, parse_max_spend)
|
||||
from . import bitcoin
|
||||
from .bitcoin import is_address, hash_160, COIN
|
||||
@@ -1126,7 +1126,7 @@ class Commands:
|
||||
@command('wl')
|
||||
async def nodeid(self, wallet: Abstract_Wallet = None):
|
||||
listen_addr = self.config.get('lightning_listen')
|
||||
return bh2u(wallet.lnworker.node_keypair.pubkey) + (('@' + listen_addr) if listen_addr else '')
|
||||
return wallet.lnworker.node_keypair.pubkey.hex() + (('@' + listen_addr) if listen_addr else '')
|
||||
|
||||
@command('wl')
|
||||
async def list_channels(self, wallet: Abstract_Wallet = None):
|
||||
@@ -1142,7 +1142,7 @@ class Commands:
|
||||
'channel_point': chan.funding_outpoint.to_str(),
|
||||
'state': chan.get_state().name,
|
||||
'peer_state': chan.peer_state.name,
|
||||
'remote_pubkey': bh2u(chan.node_id),
|
||||
'remote_pubkey': chan.node_id.hex(),
|
||||
'local_balance': chan.balance(LOCAL)//1000,
|
||||
'remote_balance': chan.balance(REMOTE)//1000,
|
||||
'local_ctn': chan.get_latest_ctn(LOCAL),
|
||||
|
||||
Reference in New Issue
Block a user