util: kill bh2u
no longer useful, and the name is so confusing...
This commit is contained in:
@@ -35,7 +35,7 @@ import attr
|
||||
|
||||
from . import ecc
|
||||
from . import constants, util
|
||||
from .util import bfh, bh2u, chunks, TxMinedInfo
|
||||
from .util import bfh, chunks, TxMinedInfo
|
||||
from .invoices import PR_PAID
|
||||
from .bitcoin import redeem_script_to_address
|
||||
from .crypto import sha256, sha256d
|
||||
@@ -1525,8 +1525,8 @@ class Channel(AbstractChannel):
|
||||
},
|
||||
local_amount_msat=self.balance(LOCAL),
|
||||
remote_amount_msat=self.balance(REMOTE) if not drop_remote else 0,
|
||||
local_script=bh2u(local_script),
|
||||
remote_script=bh2u(remote_script),
|
||||
local_script=local_script.hex(),
|
||||
remote_script=remote_script.hex(),
|
||||
htlcs=[],
|
||||
dust_limit_sat=self.config[LOCAL].dust_limit_sat)
|
||||
|
||||
@@ -1552,7 +1552,7 @@ class Channel(AbstractChannel):
|
||||
def force_close_tx(self) -> PartialTransaction:
|
||||
tx = self.get_latest_commitment(LOCAL)
|
||||
assert self.signature_fits(tx)
|
||||
tx.sign({bh2u(self.config[LOCAL].multisig_key.pubkey): (self.config[LOCAL].multisig_key.privkey, True)})
|
||||
tx.sign({self.config[LOCAL].multisig_key.pubkey.hex(): (self.config[LOCAL].multisig_key.privkey, True)})
|
||||
remote_sig = self.config[LOCAL].current_commitment_signature
|
||||
remote_sig = ecc.der_sig_from_sig_string(remote_sig) + Sighash.to_sigbytes(Sighash.ALL)
|
||||
tx.add_signature_to_txin(txin_idx=0,
|
||||
|
||||
Reference in New Issue
Block a user