Skip to content

Commit 56d1fb2

Browse files
Varunramadiabat
authored andcommitted
[trivial] correct typos (#297)
1 parent 9e99870 commit 56d1fb2

File tree

13 files changed

+27
-28
lines changed

13 files changed

+27
-28
lines changed

bech32/bech32.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func StringToSquashedBytes(input string) ([]byte, error) {
100100
// PolyMod takes a byte slice and returns the 32-bit BCH checksum.
101101
// Note that the input bytes to PolyMod need to be squashed to 5-bits tall
102102
// before being used in this function. And this function will not error,
103-
// but instead return an unsuable checksum, if you give it full-height bytes.
103+
// but instead return an unusable checksum, if you give it full-height bytes.
104104
func PolyMod(values []byte) uint32 {
105105

106106
// magic generator uint32s

btcutil/address.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var (
2222

2323
// ErrUnknownAddressType describes an error where an address can not
2424
// decoded as a specific address type due to the string encoding
25-
// begining with an identifier byte unknown to any standard or
25+
// beginning with an identifier byte unknown to any standard or
2626
// registered (via chaincfg.Register) network.
2727
ErrUnknownAddressType = errors.New("unknown address type")
2828

btcutil/blockchain/validate.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ func checkBlockSanity(block *btcutil.Block, powLimit *big.Int, timeSource Median
563563

564564
// Once the witness commitment, witness nonce, and sig op cost have
565565
// been validated, we can finally assert that the block's weight
566-
// doesn't exceed the current consensus paramter.
566+
// doesn't exceed the current consensus parameter.
567567
blockWeight := GetBlockWeight(block)
568568
if blockWeight > MaxBlockWeight {
569569
str := fmt.Sprintf("block's weight metric is too high - got %v, max %v",

btcutil/blockchain/weight.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const (
2727

2828
// MaxBlockSigOpsCost is the maximum number of signature operations
2929
// allowed for a block. It is calculated via a weighted algorithm which
30-
// weights segragated witness sig ops lower than regular sig ops.
30+
// weights segregated witness sig ops lower than regular sig ops.
3131
MaxBlockSigOpsCost = 80000
3232

3333
// WitnessScaleFactor determines the level of "discount" witness data

btcutil/btcec/signature.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ func hashToInt(hash []byte, c elliptic.Curve) *big.Int {
274274
return ret
275275
}
276276

277-
// recoverKeyFromSignature recoves a public key from the signature "sig" on the
277+
// recoverKeyFromSignature recovers a public key from the signature "sig" on the
278278
// given message hash "msg". Based on the algorithm found in section 5.1.5 of
279279
// SEC 1 Ver 2.0, page 47-48 (53 and 54 in the pdf). This performs the details
280280
// in the inner loop in Step 1. The counter provided is actually the j parameter

cmd/lit-af/dlccmds.go

+12-12
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ func (lc *litAfClient) DlcImportOracle(textArgs []string) error {
416416
return err
417417
}
418418

419-
fmt.Fprintf(color.Output, "Oracle succesfully registered under ID %d\n",
419+
fmt.Fprintf(color.Output, "Oracle successfully registered under ID %d\n",
420420
reply.Oracle.Idx)
421421
return nil
422422
}
@@ -442,7 +442,7 @@ func (lc *litAfClient) DlcAddOracle(textArgs []string) error {
442442
return err
443443
}
444444

445-
fmt.Fprintf(color.Output, "Oracle succesfully registered under ID %d\n",
445+
fmt.Fprintf(color.Output, "Oracle successfully registered under ID %d\n",
446446
reply.Oracle.Idx)
447447
return nil
448448
}
@@ -550,7 +550,7 @@ func (lc *litAfClient) DlcNewContract(textArgs []string) error {
550550
return err
551551
}
552552

553-
fmt.Fprint(color.Output, "Contract succesfully created\n\n")
553+
fmt.Fprint(color.Output, "Contract successfully created\n\n")
554554
PrintContract(reply.Contract)
555555
return nil
556556
}
@@ -641,7 +641,7 @@ func (lc *litAfClient) DlcSetContractOracle(textArgs []string) error {
641641
return err
642642
}
643643

644-
fmt.Fprint(color.Output, "Oracle set succesfully\n")
644+
fmt.Fprint(color.Output, "Oracle set successfully\n")
645645

646646
return nil
647647
}
@@ -671,7 +671,7 @@ func (lc *litAfClient) DlcSetContractDatafeed(textArgs []string) error {
671671
return err
672672
}
673673

674-
fmt.Fprint(color.Output, "Datafeed set succesfully\n")
674+
fmt.Fprint(color.Output, "Datafeed set successfully\n")
675675

676676
return nil
677677
}
@@ -701,7 +701,7 @@ func (lc *litAfClient) DlcSetContractRPoint(textArgs []string) error {
701701
return err
702702
}
703703

704-
fmt.Fprint(color.Output, "R-point set succesfully\n")
704+
fmt.Fprint(color.Output, "R-point set successfully\n")
705705

706706
return nil
707707
}
@@ -731,7 +731,7 @@ func (lc *litAfClient) DlcSetContractSettlementTime(textArgs []string) error {
731731
return err
732732
}
733733

734-
fmt.Fprint(color.Output, "Settlement time set succesfully\n")
734+
fmt.Fprint(color.Output, "Settlement time set successfully\n")
735735

736736
return nil
737737
}
@@ -766,7 +766,7 @@ func (lc *litAfClient) DlcSetContractFunding(textArgs []string) error {
766766
return err
767767
}
768768

769-
fmt.Fprint(color.Output, "Funding set succesfully\n")
769+
fmt.Fprint(color.Output, "Funding set successfully\n")
770770

771771
return nil
772772
}
@@ -832,7 +832,7 @@ func (lc *litAfClient) DlcSetContractDivision(textArgs []string) error {
832832
return err
833833
}
834834

835-
fmt.Fprint(color.Output, "Funding set succesfully\n")
835+
fmt.Fprint(color.Output, "Funding set successfully\n")
836836

837837
return nil
838838
}
@@ -863,7 +863,7 @@ func (lc *litAfClient) DlcOfferContract(textArgs []string) error {
863863
return err
864864
}
865865

866-
fmt.Fprint(color.Output, "Offer sent set succesfully\n")
866+
fmt.Fprint(color.Output, "Offer sent set successfully\n")
867867

868868
return nil
869869
}
@@ -887,7 +887,7 @@ func (lc *litAfClient) dlcContractRespond(textArgs []string, aor bool) error {
887887
if aor {
888888
fmt.Fprintf(color.Output, "Offer acceptance initiated. Use [dlc contract view %d] to see the status.\n", cIdx)
889889
} else {
890-
fmt.Fprint(color.Output, "Offer declined succesfully\n")
890+
fmt.Fprint(color.Output, "Offer declined successfully\n")
891891
}
892892

893893
return nil
@@ -945,7 +945,7 @@ func (lc *litAfClient) DlcSettleContract(textArgs []string) error {
945945
return err
946946
}
947947

948-
fmt.Fprint(color.Output, "Contract settled succesfully\n")
948+
fmt.Fprint(color.Output, "Contract settled successfully\n")
949949

950950
return nil
951951
}

dlc/contract.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func (mgr *DlcManager) SetContractSettlementTime(cIdx, time uint64) error {
7878

7979
// SetContractDatafeed will automatically fetch the R-point from the REST API,
8080
// if an oracle is imported from a REST API. You need to set the settlement time
81-
// first, becuase the R point is a key unique for the time and feed
81+
// first, because the R point is a key unique for the time and feed
8282
func (mgr *DlcManager) SetContractDatafeed(cIdx, feed uint64) error {
8383
c, err := mgr.LoadContract(cIdx)
8484
if err != nil {

docs/execute-dlc-litaf.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ The pubkey parameter is the public key of the oracle you'd like to use. If you'r
2121
dlc oracle add 03c0d496ef6656fe102a689abc162ceeae166832d826f8750c94d797c92eedd465 Tutorial
2222
```
2323

24-
When succesful, you'll see an output something like this:
24+
When successful, you'll see an output something like this:
2525

2626
```
27-
Oracle succesfully registered under ID 1
27+
Oracle successfully registered under ID 1
2828
```
2929

3030
If the ID is different, because you've experimented with oracles before, make sure you substitute with the correct ID in the commands we use hereafter.
@@ -121,7 +121,7 @@ Oracle value | Our payout | Their payout
121121

122122
## Step 4: Sending the contract to the other peer
123123

124-
Now that the contract is ready, we can send it to the other peer. We do this by issueing the `dlc contract offer` command, followed by the contract ID and the index of the peer we want to send it to.
124+
Now that the contract is ready, we can send it to the other peer. We do this by issuing the `dlc contract offer` command, followed by the contract ID and the index of the peer we want to send it to.
125125

126126
```
127127
dlc contract offer 1 1
@@ -237,4 +237,3 @@ You can see that Peer 1 has 10.032185 BTC and peer 2 has 9.96778500 BTC. Both ha
237237
## Conclusion
238238

239239
We executed a discreet log contract using LIT's command line client. If you want to integrate this technology into your own application, or you have a use case that you think could leverage this technology - we also have an RPC client for LIT in [Go](https://github.com/mit-dci/lit-rpc-client-go), [.NET Core](https://github.com/mit-dci/lit-rpc-client-dotnet) and [NodeJS](https://github.com/mit-dci/lit-rpc-client-nodejs) that you can use to issue these commands programmatically. A tutorial on how to do that will follow.
240-

litrpc/chancmds.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,10 @@ func (r *LitRPC) DualFundRespond(args DualFundRespondArgs, reply *StatusReply) e
207207

208208
if args.AcceptOrDecline {
209209
r.Node.DualFundAccept()
210-
reply.Status = fmt.Sprintf("Succesfully accepted funding request from peer %d", peerIdx)
210+
reply.Status = fmt.Sprintf("Successfully accepted funding request from peer %d", peerIdx)
211211
} else {
212212
r.Node.DualFundDecline(0x01)
213-
reply.Status = fmt.Sprintf("Succesfully declined funding request from peer %d", peerIdx)
213+
reply.Status = fmt.Sprintf("Successfully declined funding request from peer %d", peerIdx)
214214
}
215215

216216
return nil

uspv/init.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ func (s *SPVCon) Handshake(listOfNodes []string) error {
183183

184184
// Connect dials out and connects to full nodes. Calls GetListOfNodes to get the
185185
// list of nodes if the user has specified a YupString. Else, moves on to dial
186-
// the node to see if its up and establishes a conneciton followed by Handshake()
186+
// the node to see if its up and establishes a connection followed by Handshake()
187187
// which sends out wire messages, checks for version string to prevent spam, etc.
188188
func (s *SPVCon) Connect(remoteNode string) error {
189189
var err error

wire/common.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ func WriteVarString(w io.Writer, pver uint32, str string) error {
633633
// ReadVarBytes reads a variable length byte array. A byte array is encoded
634634
// as a varInt containing the length of the array followed by the bytes
635635
// themselves. An error is returned if the length is greater than the
636-
// passed maxAllowed parameter which helps protect against memory exhuastion
636+
// passed maxAllowed parameter which helps protect against memory exhaustion
637637
// attacks and forced panics thorugh malformed messages. The fieldName
638638
// parameter is only used for the error message so it provides more context in
639639
// the error.

wire/msgtx.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ func writeOutPoint(w io.Writer, pver uint32, version int32, op *OutPoint) error
906906
// script. It is encoded as a varInt containing the length of the array
907907
// followed by the bytes themselves. An error is returned if the length is
908908
// greater than the passed maxAllowed parameter which helps protect against
909-
// memory exhuastion attacks and forced panics thorugh malformed messages. The
909+
// memory exhaustion attacks and forced panics thorugh malformed messages. The
910910
// fieldName parameter is only used for the error message so it provides more
911911
// context in the error.
912912
func readScript(r io.Reader, pver uint32, maxAllowed uint32, fieldName string) ([]byte, error) {

wire/protocol.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ const (
136136
// BC2Net represents the BC2 test network
137137
LiteTest4Net BitcoinNet = 0xf1c8d2fd
138138

139-
// LiteRegNet is the litecoin regression test network (disticnt from testnet4)
139+
// LiteRegNet is the litecoin regression test network (distinct from testnet4)
140140
LiteRegNet BitcoinNet = 0xdab5bffa
141141
)
142142

0 commit comments

Comments
 (0)