multi: comprehensive typo fixes across all packages

This commit is contained in:
practicalswift authored and Olaoluwa Osuntokun committed 2018-02-06 19:11:11 -08:00
1 parent 72a5bc8648
commit a93736d21e
103 files changed
+435 -435

No files matched your search

+1 -1
View File
@@ -42,7 +42,7 @@ type PaymentCircuit struct {
}
// circuitKey is a channel ID, HTLC ID tuple used as an identifying key for a
// payment circuit. The circuit map is keyed with the idenitifer for the
// payment circuit. The circuit map is keyed with the identifier for the
// outgoing HTLC
type circuitKey struct {
chanID lnwire.ShortChannelID
+1 -1
View File
@@ -9,7 +9,7 @@ import (
)
// NetworkHop indicates the blockchain network that is intended to be the next
// hop for a forwarded HTLC. The existnce of this field within the
// hop for a forwarded HTLC. The existence of this field within the
// ForwardingInfo struct enables the ability for HTLC to cross chain-boundaries
// at will.
type NetworkHop uint8
+9 -9
View File
@@ -150,8 +150,8 @@ type ChannelLinkConfig struct {
// in thread-safe manner.
Registry InvoiceDatabase
// PreimageCache is a global witness baacon that houses any new
// preimges discovered by other links. We'll use this to add new
// PreimageCache is a global witness beacon that houses any new
// preimages discovered by other links. We'll use this to add new
// witnesses that we discover which will notify any sub-systems
// subscribed to new events.
PreimageCache contractcourt.WitnessBeacon
@@ -532,7 +532,7 @@ func (l *channelLink) syncChanStates() error {
// a duplicate settle.
htlcsSettled := make(map[uint64]struct{})
for _, msg := range msgsToReSend {
settleMsg, ok := msg.(*lnwire.UpdateFufillHTLC)
settleMsg, ok := msg.(*lnwire.UpdateFulfillHTLC)
if !ok {
// If this isn't a settle message, then we'll skip it.
continue
@@ -588,7 +588,7 @@ func (l *channelLink) syncChanStates() error {
return err
}
l.batchCounter++
l.cfg.Peer.SendMessage(&lnwire.UpdateFufillHTLC{
l.cfg.Peer.SendMessage(&lnwire.UpdateFulfillHTLC{
ChanID: l.ChanID(),
ID: htlc.HtlcIndex,
PaymentPreimage: p,
@@ -896,7 +896,7 @@ func (l *channelLink) handleDownStreamPkt(pkt *htlcPacket, isReProcess bool) {
htlc.ID = index
l.cfg.Peer.SendMessage(htlc)
case *lnwire.UpdateFufillHTLC:
case *lnwire.UpdateFulfillHTLC:
// An HTLC we forward to the switch has just settled somewhere
// upstream. Therefore we settle the HTLC within the our local
// state machine.
@@ -971,7 +971,7 @@ func (l *channelLink) handleUpstreamMsg(msg lnwire.Message) {
log.Tracef("Receive upstream htlc with payment hash(%x), "+
"assigning index: %v", msg.PaymentHash[:], index)
case *lnwire.UpdateFufillHTLC:
case *lnwire.UpdateFulfillHTLC:
pre := msg.PaymentPreimage
idx := msg.ID
if err := l.channel.ReceiveHTLCSettle(pre, idx); err != nil {
@@ -1344,7 +1344,7 @@ func (l *channelLink) updateChannelFee(feePerKw btcutil.Amount) error {
feePerKw)
// We skip sending the UpdateFee message if the channel is not
// currently eligable to forward messages.
// currently eligible to forward messages.
if !l.EligibleToForward() {
log.Debugf("ChannelPoint(%v): skipping fee update for " +
"inactive channel")
@@ -1391,7 +1391,7 @@ func (l *channelLink) processLockedInHtlcs(
outgoingChanID: l.ShortChanID(),
outgoingHTLCID: pd.ParentIndex,
amount: pd.Amount,
htlc: &lnwire.UpdateFufillHTLC{
htlc: &lnwire.UpdateFulfillHTLC{
PaymentPreimage: pd.RPreimage,
},
}
@@ -1644,7 +1644,7 @@ func (l *channelLink) processLockedInHtlcs(
// HTLC was successfully settled locally send
// notification about it remote peer.
l.cfg.Peer.SendMessage(&lnwire.UpdateFufillHTLC{
l.cfg.Peer.SendMessage(&lnwire.UpdateFulfillHTLC{
ChanID: l.ChanID(),
ID: pd.HtlcIndex,
PaymentPreimage: preimage,
+11 -11
View File
@@ -225,7 +225,7 @@ func TestChannelLinkSingleHopPayment(t *testing.T) {
// Wait for Bob to receive the revocation.
//
// TODO(roasbef); replace with select over returned err chan
// TODO(roasbeef); replace with select over returned err chan
time.Sleep(100 * time.Millisecond)
// Check that alice invoice was settled and bandwidth of HTLC
@@ -1338,7 +1338,7 @@ func TestChannelLinkSingleHopMessageOrdering(t *testing.T) {
{"bob", "alice", &lnwire.CommitSig{}, false},
{"alice", "bob", &lnwire.RevokeAndAck{}, false},
{"bob", "alice", &lnwire.UpdateFufillHTLC{}, false},
{"bob", "alice", &lnwire.UpdateFulfillHTLC{}, false},
{"bob", "alice", &lnwire.CommitSig{}, false},
{"alice", "bob", &lnwire.RevokeAndAck{}, false},
{"alice", "bob", &lnwire.CommitSig{}, false},
@@ -1429,7 +1429,7 @@ func newSingleLinkTestHarness(chanAmt btcutil.Amount) (ChannelLink,
}
var (
invoiveRegistry = newMockRegistry()
invoiceRegistry = newMockRegistry()
decoder = &mockIteratorDecoder{}
obfuscator = newMockObfuscator()
alicePeer = &mockPeer{
@@ -1464,7 +1464,7 @@ func newSingleLinkTestHarness(chanAmt btcutil.Amount) (ChannelLink,
UpdateContractSignals: func(*contractcourt.ContractSignals) error {
return nil
},
Registry: invoiveRegistry,
Registry: invoiceRegistry,
ChainEvents: &contractcourt.ChainEventSubscription{},
BlockEpochs: globalEpoch,
BatchTicker: ticker,
@@ -1754,7 +1754,7 @@ func TestChannelLinkBandwidthConsistency(t *testing.T) {
if err != nil {
t.Fatalf("unable to settle htlc: %v", err)
}
htlcSettle := &lnwire.UpdateFufillHTLC{
htlcSettle := &lnwire.UpdateFulfillHTLC{
ID: bobIndex,
PaymentPreimage: invoice.Terms.PaymentPreimage,
}
@@ -1880,7 +1880,7 @@ func TestChannelLinkBandwidthConsistency(t *testing.T) {
// we eventually learn (simulating a multi-hop payment). The bandwidth
// of the channel should now be re-balanced to the starting point.
settlePkt := htlcPacket{
htlc: &lnwire.UpdateFufillHTLC{
htlc: &lnwire.UpdateFulfillHTLC{
ID: bobIndex,
PaymentPreimage: invoice.Terms.PaymentPreimage,
},
@@ -2143,7 +2143,7 @@ func TestChannelLinkBandwidthConsistencyOverflow(t *testing.T) {
t.Fatalf("unable to settle htlc: %v", err)
}
htlcSettle := &lnwire.UpdateFufillHTLC{
htlcSettle := &lnwire.UpdateFulfillHTLC{
ID: uint64(i),
PaymentPreimage: preImages[i],
}
@@ -2235,13 +2235,13 @@ func TestChannelRetransmission(t *testing.T) {
// Alice should resend the revoke_and_ack
// message to Bob because Bob claimed it in the
// reestbalish message.
// re-establish message.
{"alice", "bob", &lnwire.RevokeAndAck{}, false},
// Proceed the payment farther by sending the
// fulfilment message and trigger the state
// update.
{"bob", "alice", &lnwire.UpdateFufillHTLC{}, false},
{"bob", "alice", &lnwire.UpdateFulfillHTLC{}, false},
{"bob", "alice", &lnwire.CommitSig{}, false},
{"alice", "bob", &lnwire.RevokeAndAck{}, false},
{"alice", "bob", &lnwire.CommitSig{}, false},
@@ -2283,7 +2283,7 @@ func TestChannelRetransmission(t *testing.T) {
// fulfilment message and trigger the state
// update.
{"alice", "bob", &lnwire.RevokeAndAck{}, false},
{"bob", "alice", &lnwire.UpdateFufillHTLC{}, false},
{"bob", "alice", &lnwire.UpdateFulfillHTLC{}, false},
{"bob", "alice", &lnwire.CommitSig{}, false},
{"alice", "bob", &lnwire.RevokeAndAck{}, false},
{"alice", "bob", &lnwire.CommitSig{}, false},
@@ -2325,7 +2325,7 @@ func TestChannelRetransmission(t *testing.T) {
{"bob", "alice", &lnwire.CommitSig{}, false},
{"alice", "bob", &lnwire.RevokeAndAck{}, false},
{"bob", "alice", &lnwire.UpdateFufillHTLC{}, false},
{"bob", "alice", &lnwire.UpdateFulfillHTLC{}, false},
{"bob", "alice", &lnwire.CommitSig{}, false},
{"alice", "bob", &lnwire.RevokeAndAck{}, false},
{"alice", "bob", &lnwire.CommitSig{}, false},
+2 -2
View File
@@ -52,7 +52,7 @@ func (m *mockPreimageCache) AddPreimage(preimage []byte) error {
return nil
}
func (m *mockPreimageCache) SubcribeUpdates() *contractcourt.WitnessSubcription {
func (m *mockPreimageCache) SubscribeUpdates() *contractcourt.WitnessSubscription {
return nil
}
@@ -356,7 +356,7 @@ func (s *mockServer) readHandler(message lnwire.Message) error {
switch msg := message.(type) {
case *lnwire.UpdateAddHTLC:
targetChan = msg.ChanID
case *lnwire.UpdateFufillHTLC:
case *lnwire.UpdateFulfillHTLC:
targetChan = msg.ChanID
case *lnwire.UpdateFailHTLC:
targetChan = msg.ChanID
+3 -3
View File
@@ -469,7 +469,7 @@ func (s *Switch) handleLocalDispatch(packet *htlcPacket) error {
// We've just received a settle update which means we can finalize the
// user payment and return successful response.
case *lnwire.UpdateFufillHTLC:
case *lnwire.UpdateFulfillHTLC:
// Notify the user that his payment was successfully proceed.
payment.err <- nil
payment.preimage <- htlc.PaymentPreimage
@@ -652,7 +652,7 @@ func (s *Switch) handlePacketForward(packet *htlcPacket) error {
// We've just received a settle packet which means we can finalize the
// payment circuit by forwarding the settle msg to the channel from
// which htlc add packet was initially received.
case *lnwire.UpdateFufillHTLC, *lnwire.UpdateFailHTLC:
case *lnwire.UpdateFulfillHTLC, *lnwire.UpdateFailHTLC:
if !packet.isRouted {
// Use circuit map to find the link to forward settle/fail to.
circuit := s.circuits.LookupByHTLC(packet.outgoingChanID,
@@ -835,7 +835,7 @@ func (s *Switch) htlcForwarder() {
if resolutionMsg.Failure != nil {
pkt.htlc = &lnwire.UpdateFailHTLC{}
} else {
pkt.htlc = &lnwire.UpdateFufillHTLC{
pkt.htlc = &lnwire.UpdateFulfillHTLC{
PaymentPreimage: *resolutionMsg.PreImage,
}
}
+1 -1
View File
@@ -89,7 +89,7 @@ func TestSwitchForward(t *testing.T) {
outgoingChanID: bobChannelLink.ShortChanID(),
outgoingHTLCID: 0,
amount: 1,
htlc: &lnwire.UpdateFufillHTLC{
htlc: &lnwire.UpdateFulfillHTLC{
PaymentPreimage: preimage,
},
}
+1 -1
View File
@@ -361,7 +361,7 @@ func getChanID(msg lnwire.Message) (lnwire.ChannelID, error) {
switch msg := msg.(type) {
case *lnwire.UpdateAddHTLC:
chanID = msg.ChanID
case *lnwire.UpdateFufillHTLC:
case *lnwire.UpdateFulfillHTLC:
chanID = msg.ChanID
case *lnwire.UpdateFailHTLC:
chanID = msg.ChanID