Skip to content

Commit

Permalink
Merge pull request #293 from vuittont60/master
Browse files Browse the repository at this point in the history
Fix typos
  • Loading branch information
guggero authored Jan 15, 2024
2 parents f25dd27 + 713f9f6 commit 896ee86
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions bamboozle_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ var (
badPeers: []string{},
},
{
// One peer is serving a filter tha lacks an element,
// One peer is serving a filter that lacks an element,
// we should immediately notice this and ban it.
name: "filter missing element",
peerFilters: map[string]*gcs.Filter{
Expand Down Expand Up @@ -498,7 +498,7 @@ var (
},
{
// If we need at least 3 peers to consider a filter
// consistent, we shuold fail.
// consistent, we should fail.
name: "majority filter 3",
peerFilters: map[string]*gcs.Filter{
"a": correctFilter,
Expand Down
2 changes: 1 addition & 1 deletion headerfs/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (h *blockHeaderStore) readHeaderRange(startHeight uint32,
}

// readHeader reads a full block header from the flat-file. The header read is
// determined by the hight value.
// determined by the height value.
func (h *blockHeaderStore) readHeader(height uint32) (wire.BlockHeader, error) {
var header wire.BlockHeader

Expand Down
2 changes: 1 addition & 1 deletion headerfs/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ func (f *FilterHeader) toIndexEntry() headerEntry {

// WriteHeaders writes a batch of filter headers to persistent storage. The
// headers themselves are appended to the flat file, and then the index updated
// to reflect the new entires.
// to reflect the new entries.
func (f *FilterHeaderStore) WriteHeaders(hdrs ...FilterHeader) error {
// Lock store for write.
f.mtx.Lock()
Expand Down
4 changes: 2 additions & 2 deletions neutrino.go
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,7 @@ func (s *ChainService) handleDonePeerMsg(state *peerState, sp *ServerPeer) {
}
}

// disconnectPeer attempts to drop the connection of a tageted peer in the
// disconnectPeer attempts to drop the connection of a targeted peer in the
// passed peer list. Targets are identified via usage of the passed
// `compareFunc`, which should return `true` if the passed peer is the target
// peer. This function returns true on success and false if the peer is unable
Expand Down Expand Up @@ -1557,7 +1557,7 @@ func (s *ChainService) outboundPeerConnected(c *connmgr.ConnReq, conn net.Conn)
go s.peerDoneHandler(sp)
}

// peerDoneHandler handles peer disconnects by notifiying the server that it's
// peerDoneHandler handles peer disconnects by notifying the server that it's
// done along with other performing other desirable cleanup.
func (s *ChainService) peerDoneHandler(sp *ServerPeer) {
sp.WaitForDisconnect()
Expand Down
4 changes: 2 additions & 2 deletions query/worker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (m *mockPeer) Addr() string {
}

// makeJob returns a new query job that will be done when it is given the
// finalResp message. Similarly ot will progress on being given the
// finalResp message. Similarly it will progress on being given the
// progressResp message, while any other message will be ignored.
func makeJob() *queryJob {
q := &Request{
Expand Down Expand Up @@ -375,7 +375,7 @@ func TestWorkerProgress(t *testing.T) {
t.Fatalf("resp not received")
}

// The worker should respond with a job finised.
// The worker should respond with a job finished.
var result *jobResult
select {
case result = <-ctx.jobResults:
Expand Down
2 changes: 1 addition & 1 deletion query/workmanager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func startWorkManager(t *testing.T, numWorkers int) (WorkManager,
func TestWorkManagerWorkDispatcherSingleWorker(t *testing.T) {
const numQueries = 100

// Start work manager with a sinlge worker.
// Start work manager with a single worker.
wm, workers := startWorkManager(t, 1)

// Schedule a batch of queries.
Expand Down
2 changes: 1 addition & 1 deletion query/workqueue.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (w *workQueue) Swap(i, j int) {
w.tasks[i], w.tasks[j] = w.tasks[j], w.tasks[i]
}

// Push add x as elemement Len().
// Push add x as element Len().
//
// NOTE: This is part of the heap.Interface implementation.
func (w *workQueue) Push(x interface{}) {
Expand Down
4 changes: 2 additions & 2 deletions rescan.go
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ rescanLoop:
case <-ro.quit:
return ErrRescanExit

// An update mesage has just come across, if it points
// An update message has just come across, if it points
// to a prior point in the chain, then we may need to
// rewind a bit in order to provide the client all its
// requested client.
Expand Down Expand Up @@ -1514,7 +1514,7 @@ type SpendReport struct {
// been spent.
SpendingInputIndex uint32

// SpendingTxHeight is the hight of the block that included the
// SpendingTxHeight is the height of the block that included the
// transaction above which spent the target output.
//
// NOTE: This field will only be populated if the target output has
Expand Down

0 comments on commit 896ee86

Please sign in to comment.