Chore: Minimal gramatical errors (signleton -> singleton) (#25057)

core: fix typos
pull/25064/head
Gustavo Silva 2 years ago committed by GitHub
parent 3f5b5ec3e5
commit eb94896270
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      core/blockchain_test.go
  2. 4
      core/bloombits/matcher_test.go
  3. 4
      core/state/pruner/bloom.go

@ -503,7 +503,7 @@ func TestReorgShortBlocks(t *testing.T) { testReorgShort(t, true) }
func testReorgShort(t *testing.T, full bool) { func testReorgShort(t *testing.T, full bool) {
// Create a long easy chain vs. a short heavy one. Due to difficulty adjustment // Create a long easy chain vs. a short heavy one. Due to difficulty adjustment
// we need a fairly long chain of blocks with different difficulties for a short // we need a fairly long chain of blocks with different difficulties for a short
// one to become heavyer than a long one. The 96 is an empirical value. // one to become heavier than a long one. The 96 is an empirical value.
easy := make([]int64, 96) easy := make([]int64, 96)
for i := 0; i < len(easy); i++ { for i := 0; i < len(easy); i++ {
easy[i] = 60 easy[i] = 60

@ -124,13 +124,13 @@ func makeRandomIndexes(lengths []int, max int) [][]bloomIndexes {
// testMatcherDiffBatches runs the given matches test in single-delivery and also // testMatcherDiffBatches runs the given matches test in single-delivery and also
// in batches delivery mode, verifying that all kinds of deliveries are handled // in batches delivery mode, verifying that all kinds of deliveries are handled
// correctly withn. // correctly within.
func testMatcherDiffBatches(t *testing.T, filter [][]bloomIndexes, start, blocks uint64, intermittent bool, retrievals uint32) { func testMatcherDiffBatches(t *testing.T, filter [][]bloomIndexes, start, blocks uint64, intermittent bool, retrievals uint32) {
singleton := testMatcher(t, filter, start, blocks, intermittent, retrievals, 1) singleton := testMatcher(t, filter, start, blocks, intermittent, retrievals, 1)
batched := testMatcher(t, filter, start, blocks, intermittent, retrievals, 16) batched := testMatcher(t, filter, start, blocks, intermittent, retrievals, 16)
if singleton != batched { if singleton != batched {
t.Errorf("filter = %v blocks = %v intermittent = %v: request count mismatch, %v in signleton vs. %v in batched mode", filter, blocks, intermittent, singleton, batched) t.Errorf("filter = %v blocks = %v intermittent = %v: request count mismatch, %v in singleton vs. %v in batched mode", filter, blocks, intermittent, singleton, batched)
} }
} }

@ -39,7 +39,7 @@ func (f stateBloomHasher) BlockSize() int { panic("not implem
func (f stateBloomHasher) Size() int { return 8 } func (f stateBloomHasher) Size() int { return 8 }
func (f stateBloomHasher) Sum64() uint64 { return binary.BigEndian.Uint64(f) } func (f stateBloomHasher) Sum64() uint64 { return binary.BigEndian.Uint64(f) }
// stateBloom is a bloom filter used during the state convesion(snapshot->state). // stateBloom is a bloom filter used during the state conversion(snapshot->state).
// The keys of all generated entries will be recorded here so that in the pruning // The keys of all generated entries will be recorded here so that in the pruning
// stage the entries belong to the specific version can be avoided for deletion. // stage the entries belong to the specific version can be avoided for deletion.
// //
@ -100,7 +100,7 @@ func (bloom *stateBloom) Commit(filename, tempname string) error {
} }
f.Close() f.Close()
// Move the teporary file into it's final location // Move the temporary file into it's final location
return os.Rename(tempname, filename) return os.Rename(tempname, filename)
} }

Loading…
Cancel
Save