From 0bec85f2e27d7b79f7700643cd9b38e74cecadfa Mon Sep 17 00:00:00 2001 From: Sheldon <11510383@mail.sustc.edu.cn> Date: Tue, 28 Aug 2018 15:04:33 +0800 Subject: [PATCH] core: fix typos in comment (#17531) --- core/tx_journal.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/tx_journal.go b/core/tx_journal.go index 1397e9fd34..41b5156d4a 100644 --- a/core/tx_journal.go +++ b/core/tx_journal.go @@ -34,7 +34,7 @@ var errNoActiveJournal = errors.New("no active journal") // devNull is a WriteCloser that just discards anything written into it. Its // goal is to allow the transaction journal to write into a fake journal when // loading transactions on startup without printing warnings due to no file -// being readt for write. +// being read for write. type devNull struct{} func (*devNull) Write(p []byte) (n int, err error) { return len(p), nil } @@ -57,7 +57,7 @@ func newTxJournal(path string) *txJournal { // load parses a transaction journal dump from disk, loading its contents into // the specified pool. func (journal *txJournal) load(add func([]*types.Transaction) []error) error { - // Skip the parsing if the journal file doens't exist at all + // Skip the parsing if the journal file doesn't exist at all if _, err := os.Stat(journal.path); os.IsNotExist(err) { return nil } @@ -78,7 +78,7 @@ func (journal *txJournal) load(add func([]*types.Transaction) []error) error { // Create a method to load a limited batch of transactions and bump the // appropriate progress counters. Then use this method to load all the - // journalled transactions in small-ish batches. + // journaled transactions in small-ish batches. loadBatch := func(txs types.Transactions) { for _, err := range add(txs) { if err != nil { @@ -103,7 +103,7 @@ func (journal *txJournal) load(add func([]*types.Transaction) []error) error { } break } - // New transaction parsed, queue up for later, import if threnshold is reached + // New transaction parsed, queue up for later, import if threshold is reached total++ if batch = append(batch, tx); batch.Len() > 1024 {