multi: comprehensive typo fixes across all packages
This commit is contained in:
1 parent
72a5bc8648
commit
a93736d21e
103 files changed
+435
-435
No files matched your search
@@ -86,7 +86,7 @@ func New(cfg Config) (*BtcWallet, error) {
|
||||
}
|
||||
} else {
|
||||
// Wallet has been created and been initialized at this point,
|
||||
// open it along with all the required DB namepsaces, and the
|
||||
// open it along with all the required DB namespaces, and the
|
||||
// DB itself.
|
||||
wallet, err = loader.OpenExistingWallet(pubPass, false)
|
||||
if err != nil {
|
||||
|
||||
@@ -33,7 +33,7 @@ func (b *BtcWallet) FetchInputInfo(prevOut *wire.OutPoint) (*wire.TxOut, error)
|
||||
}
|
||||
b.cacheMtx.RUnlock()
|
||||
|
||||
// Otherwse, we manually look up the output within the tx store.
|
||||
// Otherwise, we manually look up the output within the tx store.
|
||||
txid := &prevOut.Hash
|
||||
txDetail, err := base.UnstableAPI(b.wallet).TxDetails(txid)
|
||||
if err != nil {
|
||||
@@ -180,7 +180,7 @@ func (b *BtcWallet) ComputeInputScript(tx *wire.MsgTx,
|
||||
pubKey := privKey.PubKey()
|
||||
pubKeyHash := btcutil.Hash160(pubKey.SerializeCompressed())
|
||||
|
||||
// Next, we'll generate a valid sigScript that'll allow us to
|
||||
// Next, we'll generate a valid sigScript that will allow us to
|
||||
// spend the p2sh output. The sigScript will contain only a
|
||||
// single push of the p2wkh witness program corresponding to
|
||||
// the matching public key of this address.
|
||||
|
||||
+14
-14
@@ -31,7 +31,7 @@ var (
|
||||
// that has already been closed or is in the process of being closed.
|
||||
ErrChanClosing = fmt.Errorf("channel is being closed, operation disallowed")
|
||||
|
||||
// ErrNoWindow is returned when revocation window is exausted.
|
||||
// ErrNoWindow is returned when revocation window is exhausted.
|
||||
ErrNoWindow = fmt.Errorf("unable to sign new commitment, the current" +
|
||||
" revocation window is exhausted")
|
||||
|
||||
@@ -941,7 +941,7 @@ type updateLog struct {
|
||||
// htlcCounter is a monotonically increasing integer that tracks the
|
||||
// total number of offered HTLC's by the owner of this update log. We
|
||||
// use a distinct index for this purpose, as update's that remove
|
||||
// entires from the log will be indexed using this counter.
|
||||
// entries from the log will be indexed using this counter.
|
||||
htlcCounter uint64
|
||||
|
||||
// List is the updatelog itself, we embed this value so updateLog has
|
||||
@@ -953,7 +953,7 @@ type updateLog struct {
|
||||
updateIndex map[uint64]*list.Element
|
||||
|
||||
// offerIndex is an index that maps the counter for offered HTLC's to
|
||||
// their list elemtn within the main list.List.
|
||||
// their list element within the main list.List.
|
||||
htlcIndex map[uint64]*list.Element
|
||||
}
|
||||
|
||||
@@ -1130,7 +1130,7 @@ type LightningChannel struct {
|
||||
// Capacity is the total capacity of this channel.
|
||||
Capacity btcutil.Amount
|
||||
|
||||
// stateHintObfuscator is a 48-bit state hint that's used to obfsucate
|
||||
// stateHintObfuscator is a 48-bit state hint that's used to obfuscate
|
||||
// the current state number on the commitment transactions.
|
||||
stateHintObfuscator [StateHintSize]byte
|
||||
|
||||
@@ -1387,7 +1387,7 @@ func (lc *LightningChannel) logUpdateToPayDesc(logUpdate *channeldb.LogUpdate,
|
||||
// For HTLC's we we're offered we'll fetch the original offered HTLc
|
||||
// from the remote party's update log so we can retrieve the same
|
||||
// PaymentDescriptor that SettleHTLC would produce.
|
||||
case *lnwire.UpdateFufillHTLC:
|
||||
case *lnwire.UpdateFulfillHTLC:
|
||||
ogHTLC := remoteUpdateLog.lookupHtlc(wireMsg.ID)
|
||||
|
||||
pd = &PaymentDescriptor{
|
||||
@@ -2620,7 +2620,7 @@ func (lc *LightningChannel) createCommitDiff(
|
||||
logUpdate.UpdateMsg = htlc
|
||||
|
||||
case Settle:
|
||||
logUpdate.UpdateMsg = &lnwire.UpdateFufillHTLC{
|
||||
logUpdate.UpdateMsg = &lnwire.UpdateFulfillHTLC{
|
||||
ChanID: chanID,
|
||||
ID: pd.ParentIndex,
|
||||
PaymentPreimage: pd.RPreimage,
|
||||
@@ -3568,9 +3568,9 @@ func (lc *LightningChannel) ReceiveRevocation(revMsg *lnwire.RevokeAndAck) ([]*P
|
||||
continue
|
||||
}
|
||||
|
||||
uncomitted := (htlc.addCommitHeightRemote == 0 ||
|
||||
uncommitted := (htlc.addCommitHeightRemote == 0 ||
|
||||
htlc.addCommitHeightLocal == 0)
|
||||
if htlc.EntryType == Add && uncomitted {
|
||||
if htlc.EntryType == Add && uncommitted {
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -4290,14 +4290,14 @@ func newOutgoingHtlcResolution(signer Signer, localChanCfg *channeldb.ChannelCon
|
||||
if !localCommit {
|
||||
// First, we'll re-generate the script used to send the HTLC to
|
||||
// the remote party within their commitment transaction.
|
||||
htlcReciverScript, err := receiverHTLCScript(htlc.RefundTimeout,
|
||||
htlcReceiverScript, err := receiverHTLCScript(htlc.RefundTimeout,
|
||||
keyRing.LocalHtlcKey, keyRing.RemoteHtlcKey,
|
||||
keyRing.RevocationKey, htlc.RHash[:],
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
htlcScriptHash, err := witnessScriptHash(htlcReciverScript)
|
||||
htlcScriptHash, err := witnessScriptHash(htlcReceiverScript)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -4310,7 +4310,7 @@ func newOutgoingHtlcResolution(signer Signer, localChanCfg *channeldb.ChannelCon
|
||||
SweepSignDesc: SignDescriptor{
|
||||
PubKey: localChanCfg.HtlcBasePoint,
|
||||
SingleTweak: keyRing.LocalHtlcKeyTweak,
|
||||
WitnessScript: htlcReciverScript,
|
||||
WitnessScript: htlcReceiverScript,
|
||||
Output: &wire.TxOut{
|
||||
PkScript: htlcScriptHash,
|
||||
Value: int64(htlc.Amt.ToSatoshis()),
|
||||
@@ -4621,8 +4621,8 @@ type ForceCloseSummary struct {
|
||||
ChanPoint wire.OutPoint
|
||||
|
||||
// CloseTx is the transaction which closed the channel on-chain. If we
|
||||
// initiate the force close, then this'll be our latest commitment
|
||||
// state. Otherwise, this'll be the state that the remote peer
|
||||
// initiate the force close, then this will be our latest commitment
|
||||
// state. Otherwise, this will be the state that the remote peer
|
||||
// broadcasted on-chain.
|
||||
CloseTx *wire.MsgTx
|
||||
|
||||
@@ -5327,7 +5327,7 @@ func (lc *LightningChannel) ActiveHtlcs() []channeldb.HTLC {
|
||||
|
||||
// We'll only return HTLC's that are locked into *both* commitment
|
||||
// transactions. So we'll iterate through their set of HTLC's to note
|
||||
// which ones are present on thir commitment.
|
||||
// which ones are present on their commitment.
|
||||
remoteHtlcs := make(map[[32]byte]struct{})
|
||||
for _, htlc := range lc.channelState.RemoteCommitment.Htlcs {
|
||||
onionHash := sha256.Sum256(htlc.OnionBlob[:])
|
||||
|
||||
@@ -2023,7 +2023,7 @@ func TestUpdateFeeFail(t *testing.T) {
|
||||
|
||||
}
|
||||
|
||||
// TestUpdateFeeSenderCommits veriefies that the state machine progresses as
|
||||
// TestUpdateFeeSenderCommits verifies that the state machine progresses as
|
||||
// expected if we send a fee update, and then the sender of the fee update
|
||||
// sends a commitment signature.
|
||||
func TestUpdateFeeSenderCommits(t *testing.T) {
|
||||
@@ -2103,7 +2103,7 @@ func TestUpdateFeeSenderCommits(t *testing.T) {
|
||||
// that Bob's received everything up to the signature she sent,
|
||||
// including the HTLC and fee update.
|
||||
if _, err := aliceChannel.ReceiveRevocation(bobRevocation); err != nil {
|
||||
t.Fatalf("alice unable to rocess bob's revocation: %v", err)
|
||||
t.Fatalf("alice unable to process bob's revocation: %v", err)
|
||||
}
|
||||
|
||||
// Alice receives new signature from Bob, and assumes this covers the
|
||||
@@ -2198,7 +2198,7 @@ func TestUpdateFeeReceiverCommits(t *testing.T) {
|
||||
|
||||
// Bob receives the revocation of the old commitment
|
||||
if _, err := bobChannel.ReceiveRevocation(aliceRevocation); err != nil {
|
||||
t.Fatalf("alice unable to rocess bob's revocation: %v", err)
|
||||
t.Fatalf("alice unable to process bob's revocation: %v", err)
|
||||
}
|
||||
|
||||
// Alice will sign next commitment. Since she sent the revocation, she
|
||||
@@ -2239,7 +2239,7 @@ func TestUpdateFeeReceiverCommits(t *testing.T) {
|
||||
t.Fatalf("alice unable to sign commitment: %v", err)
|
||||
}
|
||||
|
||||
// Alice receives revokation from Bob, and can now be sure that Bob
|
||||
// Alice receives revocation from Bob, and can now be sure that Bob
|
||||
// received the two updates, and they are considered locked in.
|
||||
if _, err := aliceChannel.ReceiveRevocation(bobRevocation); err != nil {
|
||||
t.Fatalf("bob unable to process alice's revocation: %v", err)
|
||||
@@ -2383,7 +2383,7 @@ func TestUpdateFeeMultipleUpdates(t *testing.T) {
|
||||
// Bob's received everything up to the signature she sent, including the
|
||||
// HTLC and fee update.
|
||||
if _, err := aliceChannel.ReceiveRevocation(bobRevocation); err != nil {
|
||||
t.Fatalf("alice unable to rocess bob's revocation: %v", err)
|
||||
t.Fatalf("alice unable to process bob's revocation: %v", err)
|
||||
}
|
||||
|
||||
// Alice receives new signature from Bob, and assumes this covers the
|
||||
@@ -2731,7 +2731,7 @@ func TestChanSyncOweCommitment(t *testing.T) {
|
||||
// Each of the settle messages that Alice sent should match her
|
||||
// original intent.
|
||||
for i := 0; i < 3; i++ {
|
||||
settleMsg, ok := aliceMsgsToSend[i].(*lnwire.UpdateFufillHTLC)
|
||||
settleMsg, ok := aliceMsgsToSend[i].(*lnwire.UpdateFulfillHTLC)
|
||||
if !ok {
|
||||
t.Fatalf("expected a htlc settle message, "+
|
||||
"instead have %v", spew.Sdump(settleMsg))
|
||||
@@ -3489,7 +3489,7 @@ func TestFeeUpdateRejectInsaneFee(t *testing.T) {
|
||||
// Both Alice and Bob should reject this new fee rate as it it far too
|
||||
// large.
|
||||
if err := aliceChannel.UpdateFee(newFeeRate); err == nil {
|
||||
t.Fatalf("alice should've rejected fee update")
|
||||
t.Fatalf("alice should have rejected fee update")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -205,7 +205,7 @@ var _ FeeEstimator = (*BtcdFeeEstimator)(nil)
|
||||
|
||||
// BitcoindFeeEstimator is an implementation of the FeeEstimator interface
|
||||
// backed by the RPC interface of an active bitcoind node. This implementation
|
||||
// will proxy any fee estimation requests to bitcoind's RPC interace.
|
||||
// will proxy any fee estimation requests to bitcoind's RPC interface.
|
||||
type BitcoindFeeEstimator struct {
|
||||
// fallBackFeeRate is the fall back fee rate in satoshis per byte that
|
||||
// is returned if the fee estimator does not yet have enough data to
|
||||
|
||||
@@ -503,7 +503,7 @@ func testFundingCancellationNotEnoughFunds(miner *rpctest.Harness,
|
||||
lnwire.FFAnnounceChannel,
|
||||
)
|
||||
if _, ok := err.(*lnwallet.ErrInsufficientFunds); !ok {
|
||||
t.Fatalf("coin selection succeded should have insufficient funds: %v",
|
||||
t.Fatalf("coin selection succeeded should have insufficient funds: %v",
|
||||
err)
|
||||
}
|
||||
|
||||
@@ -537,7 +537,7 @@ func testFundingCancellationNotEnoughFunds(miner *rpctest.Harness,
|
||||
}
|
||||
}
|
||||
|
||||
func testCancelNonExistantReservation(miner *rpctest.Harness,
|
||||
func testCancelNonExistentReservation(miner *rpctest.Harness,
|
||||
alice, _ *lnwallet.LightningWallet, t *testing.T) {
|
||||
|
||||
feeRate, err := alice.Cfg.FeeEstimator.EstimateFeePerWeight(1)
|
||||
@@ -574,7 +574,7 @@ func testReservationInitiatorBalanceBelowDustCancel(miner *rpctest.Harness,
|
||||
)
|
||||
switch {
|
||||
case err == nil:
|
||||
t.Fatalf("initialization should've failed due to " +
|
||||
t.Fatalf("initialization should have failed due to " +
|
||||
"insufficient local amount")
|
||||
|
||||
case !strings.Contains(err.Error(), "local output is too small"):
|
||||
@@ -984,7 +984,7 @@ func testListTransactionDetails(miner *rpctest.Harness,
|
||||
}
|
||||
|
||||
// We assert that the value is greater than the amount we
|
||||
// attempted to send, as the wallet should've paid some amount
|
||||
// attempted to send, as the wallet should have paid some amount
|
||||
// of network fees.
|
||||
if txDetail.Value >= -outputAmt {
|
||||
fmt.Println(spew.Sdump(txDetail))
|
||||
@@ -1477,7 +1477,7 @@ var walletTests = []walletTestCase{
|
||||
},
|
||||
{
|
||||
name: "test cancel non-existent reservation",
|
||||
test: testCancelNonExistantReservation,
|
||||
test: testCancelNonExistentReservation,
|
||||
},
|
||||
{
|
||||
name: "reorg wallet balance",
|
||||
@@ -1573,7 +1573,7 @@ func waitForWalletSync(r *rpctest.Harness, w *lnwallet.LightningWallet) error {
|
||||
}
|
||||
|
||||
// TestInterfaces tests all registered interfaces with a unified set of tests
|
||||
// which excersie each of the required methods found within the WalletController
|
||||
// which exercise each of the required methods found within the WalletController
|
||||
// interface.
|
||||
//
|
||||
// NOTE: In the future, when additional implementations of the WalletController
|
||||
@@ -1590,7 +1590,7 @@ func TestLightningWallet(t *testing.T) {
|
||||
|
||||
// Initialize the harness around a btcd node which will serve as our
|
||||
// dedicated miner to generate blocks, cause re-orgs, etc. We'll set
|
||||
// up this node with a chain length of 125, so we have plentyyy of BTC
|
||||
// up this node with a chain length of 125, so we have plenty of BTC
|
||||
// to play around with.
|
||||
miningNode, err := rpctest.New(netParams, nil, nil)
|
||||
if err != nil {
|
||||
|
||||
@@ -400,7 +400,7 @@ func senderHtlcSpendTimeout(receiverSig []byte, signer Signer,
|
||||
// OP_CHECKSIG
|
||||
// OP_ENDIF
|
||||
// OP_ENDIF
|
||||
func receiverHTLCScript(cltvExipiry uint32, senderHtlcKey,
|
||||
func receiverHTLCScript(cltvExpiry uint32, senderHtlcKey,
|
||||
receiverHtlcKey, revocationKey *btcec.PublicKey,
|
||||
paymentHash []byte) ([]byte, error) {
|
||||
|
||||
@@ -477,7 +477,7 @@ func receiverHTLCScript(cltvExipiry uint32, senderHtlcKey,
|
||||
// lock-time required to timeout the HTLC. If the time has passed, then
|
||||
// we'll proceed with a checksig to ensure that this is actually the
|
||||
// sender of he original HTLC.
|
||||
builder.AddInt64(int64(cltvExipiry))
|
||||
builder.AddInt64(int64(cltvExpiry))
|
||||
builder.AddOp(txscript.OP_CHECKLOCKTIMEVERIFY)
|
||||
builder.AddOp(txscript.OP_DROP)
|
||||
builder.AddOp(txscript.OP_CHECKSIG)
|
||||
@@ -574,7 +574,7 @@ func ReceiverHtlcSpendRevoke(signer Signer, signDesc *SignDescriptor,
|
||||
// an HTLC to recover the pending funds after an absolute timeout in the
|
||||
// scenario that the receiver of the HTLC broadcasts their version of the
|
||||
// commitment transaction. If the caller has already set the lock time on the
|
||||
// spending transaction, than a value of -1 can be passed for the cltvExipiry
|
||||
// spending transaction, than a value of -1 can be passed for the cltvExpiry
|
||||
// value.
|
||||
//
|
||||
// NOTE: The target input of the passed transaction MUST NOT have a final
|
||||
@@ -665,7 +665,7 @@ func createHtlcTimeoutTx(htlcOutput wire.OutPoint, htlcAmt btcutil.Amount,
|
||||
return timeoutTx, nil
|
||||
}
|
||||
|
||||
// createHtlcSuccessTx creats a transaction that spends the output on the
|
||||
// createHtlcSuccessTx creates a transaction that spends the output on the
|
||||
// commitment transaction of the peer that receives an HTLC. This transaction
|
||||
// essentially acts as an off-chain covenant as it's only permitted to spend
|
||||
// the designated HTLC output, and also that spend can _only_ be used as a
|
||||
@@ -1305,7 +1305,7 @@ func GetStateNumHint(commitTx *wire.MsgTx, obfuscator [StateHintSize]byte) uint6
|
||||
stateNumXor := uint64(commitTx.TxIn[0].Sequence&0xFFFFFF) << 24
|
||||
stateNumXor |= uint64(commitTx.LockTime & 0xFFFFFF)
|
||||
|
||||
// Finally, to obtain the final state number, we XOR by the obfuscater
|
||||
// Finally, to obtain the final state number, we XOR by the obfuscator
|
||||
// value to de-obfuscate the state number.
|
||||
return stateNumXor ^ xorInt
|
||||
}
|
||||
|
||||
@@ -181,18 +181,18 @@ func TestCommitmentSpendValidation(t *testing.T) {
|
||||
|
||||
// Finally, we test bob sweeping his output as normal in the case that
|
||||
// Alice broadcasts this commitment transaction.
|
||||
bobScriptp2wkh, err := commitScriptUnencumbered(bobPayKey)
|
||||
bobScriptP2WKH, err := commitScriptUnencumbered(bobPayKey)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to create bob p2wkh script: %v", err)
|
||||
}
|
||||
signDesc = &SignDescriptor{
|
||||
PubKey: bobKeyPub,
|
||||
SingleTweak: bobCommitTweak,
|
||||
WitnessScript: bobScriptp2wkh,
|
||||
WitnessScript: bobScriptP2WKH,
|
||||
SigHashes: txscript.NewTxSigHashes(sweepTx),
|
||||
Output: &wire.TxOut{
|
||||
Value: int64(channelBalance),
|
||||
PkScript: bobScriptp2wkh,
|
||||
PkScript: bobScriptP2WKH,
|
||||
},
|
||||
HashType: txscript.SigHashAll,
|
||||
InputIndex: 0,
|
||||
@@ -391,7 +391,7 @@ func TestHTLCSenderSpendValidation(t *testing.T) {
|
||||
aliceSigner := &mockSigner{privkeys: []*btcec.PrivateKey{aliceKeyPriv}}
|
||||
|
||||
// We'll also generate a signature on the sweep transaction above
|
||||
// that'll act as Bob's signature to Alice for the second level HTLC
|
||||
// that will act as Bob's signature to Alice for the second level HTLC
|
||||
// transaction.
|
||||
bobSignDesc := SignDescriptor{
|
||||
PubKey: bobKeyPub,
|
||||
@@ -452,7 +452,7 @@ func TestHTLCSenderSpendValidation(t *testing.T) {
|
||||
},
|
||||
{
|
||||
// HTLC with valid preimage size + sig
|
||||
// TODO(roabeef): invalid preimage
|
||||
// TODO(roasbeef): invalid preimage
|
||||
makeWitnessTestCase(t, func() (wire.TxWitness, error) {
|
||||
signDesc := &SignDescriptor{
|
||||
PubKey: bobKeyPub,
|
||||
@@ -636,7 +636,7 @@ func TestHTLCReceiverSpendValidation(t *testing.T) {
|
||||
aliceSigner := &mockSigner{privkeys: []*btcec.PrivateKey{aliceKeyPriv}}
|
||||
|
||||
// We'll also generate a signature on the sweep transaction above
|
||||
// that'll act as Alice's signature to Bob for the second level HTLC
|
||||
// that will act as Alice's signature to Bob for the second level HTLC
|
||||
// transaction.
|
||||
aliceSignDesc := SignDescriptor{
|
||||
PubKey: aliceKeyPub,
|
||||
@@ -863,7 +863,7 @@ func TestSecondLevelHtlcSpends(t *testing.T) {
|
||||
Value: int64(htlcAmt),
|
||||
}
|
||||
|
||||
// TODO(roasbeef): make actually use timeout/sucess txns?
|
||||
// TODO(roasbeef): make actually use timeout/success txns?
|
||||
|
||||
// Finally, we'll create mock signers for both of them based on their
|
||||
// private keys. This test simplifies a bit and uses the same key as
|
||||
|
||||
+1
-1
@@ -165,7 +165,7 @@ func (s *sigPool) Stop() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// poolWorker is the main worker goroutine wtihin the sigPool. Individual
|
||||
// poolWorker is the main worker goroutine within the sigPool. Individual
|
||||
// batches are distributed amongst each of the active workers. The workers then
|
||||
// execute the task based on the type of job, and return the result back to
|
||||
// caller.
|
||||
|
||||
+4
-4
@@ -184,7 +184,7 @@ type addCounterPartySigsMsg struct {
|
||||
// https://github.com/bitcoin/bips/blob/master/bip-0069.mediawiki.
|
||||
theirFundingInputScripts []*InputScript
|
||||
|
||||
// This should be 1/2 of the signatures needed to succesfully spend our
|
||||
// This should be 1/2 of the signatures needed to successfully spend our
|
||||
// version of the commitment transaction.
|
||||
theirCommitmentSig []byte
|
||||
|
||||
@@ -210,7 +210,7 @@ type addSingleFunderSigsMsg struct {
|
||||
fundingOutpoint *wire.OutPoint
|
||||
|
||||
// theirCommitmentSig are the 1/2 of the signatures needed to
|
||||
// succesfully spend our version of the commitment transaction.
|
||||
// successfully spend our version of the commitment transaction.
|
||||
theirCommitmentSig []byte
|
||||
|
||||
// This channel is used to return the completed channel after the wallet
|
||||
@@ -1366,7 +1366,7 @@ func (l *LightningWallet) deriveMasterRevocationRoot() (*btcec.PrivateKey, error
|
||||
}
|
||||
|
||||
// DeriveStateHintObfuscator derives the bytes to be used for obfuscating the
|
||||
// state hints from the root to be used for a new channel. The obsfucsator is
|
||||
// state hints from the root to be used for a new channel. The obfuscator is
|
||||
// generated via the following computation:
|
||||
//
|
||||
// * sha256(initiatorKey || responderKey)[26:]
|
||||
@@ -1386,7 +1386,7 @@ func DeriveStateHintObfuscator(key1, key2 *btcec.PublicKey) [StateHintSize]byte
|
||||
return obfuscator
|
||||
}
|
||||
|
||||
// initStateHints properly sets the obsfucated state hints on both commitment
|
||||
// initStateHints properly sets the obfuscated state hints on both commitment
|
||||
// transactions using the passed obfuscator.
|
||||
func initStateHints(commit1, commit2 *wire.MsgTx,
|
||||
obfuscator [StateHintSize]byte) error {
|
||||
|
||||
@@ -29,7 +29,7 @@ const (
|
||||
|
||||
// HtlcOfferedRevoke is a witness that allows us to sweep an HTLC which
|
||||
// we offered to the remote party in the case that they broadcast a
|
||||
// revoked commitmetn state.
|
||||
// revoked commitment state.
|
||||
HtlcOfferedRevoke WitnessType = 3
|
||||
|
||||
// HtlcAcceptedRevoke is a witness that allows us to sweep an HTLC
|
||||
@@ -46,7 +46,7 @@ const (
|
||||
|
||||
// HtlcAcceptedSuccessSecondLevel is a witness that allows us to sweep
|
||||
// an HTLC output that was offered to us, and for which we have a
|
||||
// payment preimage. This HTLC output isn't diretly on our commitment
|
||||
// payment preimage. This HTLC output isn't directly on our commitment
|
||||
// transaction, but is the result of confirmed second-level HTLC
|
||||
// transaction. As a result, we can only spend this after a CSV delay.
|
||||
HtlcAcceptedSuccessSecondLevel WitnessType = 6
|
||||
|
||||
Reference in new issue
Block a user