mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-10 06:07:16 +01:00
multi: comprehensive typo fixes across all packages
This commit is contained in:
committed by
Olaoluwa Osuntokun
parent
72a5bc8648
commit
a93736d21e
@@ -30,7 +30,7 @@ func newElementFromStr(s string, index index) (*element, error) {
|
||||
}
|
||||
|
||||
// derive computes one shachain element from another by applying a series of
|
||||
// bit flips and hasing operations based on the starting and ending index.
|
||||
// bit flips and hashing operations based on the starting and ending index.
|
||||
func (e *element) derive(toIndex index) (*element, error) {
|
||||
fromIndex := e.index
|
||||
|
||||
@@ -71,7 +71,7 @@ func (e *element) isEqual(e2 *element) bool {
|
||||
const (
|
||||
// maxHeight is used to determine the maximum allowable index and the
|
||||
// length of the array required to order to derive all previous hashes
|
||||
// by index. The entries of this array as also knowns as buckets.
|
||||
// by index. The entries of this array as also known as buckets.
|
||||
maxHeight uint8 = 48
|
||||
|
||||
// rootIndex is an index which corresponds to the root hash.
|
||||
|
||||
@@ -257,7 +257,7 @@ func TestSpecificationDeriveElement(t *testing.T) {
|
||||
"but it's not", test.name)
|
||||
}
|
||||
|
||||
// Generate element which we should get after deriviation.
|
||||
// Generate element which we should get after derivation.
|
||||
output, err := newElementFromStr(test.output, test.index)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
@@ -35,7 +35,7 @@ type Store interface {
|
||||
}
|
||||
|
||||
// RevocationStore is a concrete implementation of the Store interface. The
|
||||
// revocation store is able to efficiently store N derived shahain elements in
|
||||
// revocation store is able to efficiently store N derived shachain elements in
|
||||
// a space efficient manner with a space complexity of O(log N). The original
|
||||
// description of the storage methodology can be found here:
|
||||
// https://github.com/lightningnetwork/lightning-rfc/blob/master/03-transactions.md#efficient-per-commitment-secret-storage
|
||||
@@ -142,7 +142,7 @@ func (store *RevocationStore) AddNextEntry(hash *chainhash.Hash) error {
|
||||
}
|
||||
|
||||
if !e.isEqual(&store.buckets[i]) {
|
||||
return errors.New("hash isn't deriavable from " +
|
||||
return errors.New("hash isn't derivable from " +
|
||||
"previous ones")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
// changeBit is a functio that function that flips a bit of the hash at a
|
||||
// particluar bit-index. You should be aware that the bit flipping in this
|
||||
// particular bit-index. You should be aware that the bit flipping in this
|
||||
// function a bit strange, example:
|
||||
// hash: [0b00000000, 0b00000000, ... 0b00000000]
|
||||
// 0 1 ... 31
|
||||
@@ -64,7 +64,7 @@ func countTrailingZeros(index index) uint8 {
|
||||
return zeros
|
||||
}
|
||||
|
||||
// hashFromString takes a hex-encoded string as input and creates an instane of
|
||||
// hashFromString takes a hex-encoded string as input and creates an instance of
|
||||
// chainhash.Hash. The chainhash.NewHashFromStr function not suitable because
|
||||
// it reverse the given hash.
|
||||
func hashFromString(s string) (*chainhash.Hash, error) {
|
||||
|
||||
Reference in New Issue
Block a user