Skip to content

Commit

Permalink
chore: fix some typos in comments (#4823)
Browse files Browse the repository at this point in the history
Signed-off-by: toofooboo <cmaker@foxmail.com>
  • Loading branch information
toofooboo authored Apr 19, 2024
1 parent ce49b61 commit d0bad2e
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion common/ledger/blkstorage/blockfile_mgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func newBlockfileMgr(id string, conf *Conf, indexConfig *IndexConfig, indexStore
}
logger.Debugf("Info constructed by scanning the blocks dir = %s", spew.Sdump(blockfilesInfo))
} else {
logger.Debug(`Synching block information from block storage (if needed)`)
logger.Debug(`Syncing block information from block storage (if needed)`)
syncBlockfilesInfoFromFS(rootDir, blockfilesInfo)
}
err = mgr.saveBlkfilesInfo(blockfilesInfo, true)
Expand Down
2 changes: 1 addition & 1 deletion core/ledger/kvledger/benchmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ In order to run the benchmarks, run the following command from folder fabric/cor
./runbenchmarks.sh -f <test_parameter_file>.sh
```
The <test_parameter_file> is expected to contain the parameters for the benchmarks. A sample file (sample_params.sh) is provided.
For running the bechmarks, it is advised to make a copy of the file sample_params.sh and change the parameters that you want to run the tests with. For more details on the parameters and the experiment results, see comments in the file sample_params.sh
For running the benchmarks, it is advised to make a copy of the file sample_params.sh and change the parameters that you want to run the tests with. For more details on the parameters and the experiment results, see comments in the file sample_params.sh
2 changes: 1 addition & 1 deletion core/ledger/kvledger/snapshot_mgmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (l *kvLedger) PendingSnapshotRequests() ([]uint64, error) {
return l.snapshotMgr.snapshotRequestBookkeeper.list()
}

// processSnapshotMgmtEvents handles each event in the events channel and performs synchronization acorss
// processSnapshotMgmtEvents handles each event in the events channel and performs synchronization across
// block commits, snapshot generation, and snapshot request submission/cancellation.
// It should be started in a separate goroutine when the ledger is created/opened.
// There are 3 unbuffered channels and 5 events working together to process events one by one
Expand Down
2 changes: 1 addition & 1 deletion core/ledger/kvledger/txmgmt/rwsetutil/kv_rwset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestKVRWSetV1BackwardCompatible(t *testing.T) {
// PrepareBinaryFileSampleKVRWSetV1 constructs a proto message for kvrwset and marshals its bytes to file 'kvrwsetV1ProtoBytes'.
// this code should be run on fabric version 1.0 so as to produce a sample file of proto message declared in V1
// In order to invoke this function on V1 code, copy this over on to V1 code, make the first letter as 'T', and finally invoke this function
// using golang test framwork
// using golang test framework
func PrepareBinaryFileSampleKVRWSetV1(t *testing.T) {
b, err := proto.Marshal(constructSampleKVRWSet())
require.NoError(t, err)
Expand Down
2 changes: 1 addition & 1 deletion core/ledger/kvledger/txmgmt/rwsetutil/rwset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func TestRWSetV1BackwardCompatible(t *testing.T) {
// PrepareBinaryFileSampleRWSetV1 constructs a proto message for kvrwset and marshals its bytes to file 'rwsetV1ProtoBytes'.
// this code should be run on fabric version 1.0 so as to produce a sample file of proto message declared in V1
// In order to invoke this function on V1 code, copy this over on to V1 code, make the first letter as 'T', and finally invoke this function
// using golang test framwork
// using golang test framework
func PrepareBinaryFileSampleRWSetV1(t *testing.T) {
b, err := proto.Marshal(constructSampleRWSet())
require.NoError(t, err)
Expand Down
4 changes: 2 additions & 2 deletions core/ledger/kvledger/txmgmt/validation/batch_preparer.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ func processNonEndorserTx(
txid string,
txType common.HeaderType,
postOrderSimulatorProvider PostOrderSimulatorProvider,
synchingState bool,
syncingState bool,
customTxProcessors map[common.HeaderType]ledger.CustomTxProcessor,
) (*rwset.TxReadWriteSet, error) {
logger.Debugf("Performing custom processing for transaction [txid=%s], [txType=%s]", txid, txType)
Expand All @@ -307,7 +307,7 @@ func processNonEndorserTx(
return nil, err
}
defer sim.Done()
if err = processor.GenerateSimulationResults(txEnv, sim, synchingState); err != nil {
if err = processor.GenerateSimulationResults(txEnv, sim, syncingState); err != nil {
return nil, err
}
if simRes, err = sim.GetTxSimulationResults(); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion core/ledger/ledger_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ type ChaincodeLifecycleEventProvider interface {
// custom representation, an implementation of a `Processor` should be cautious that the custom representation
// is used for simulation in an deterministic fashion and should take care of compatibility cross fabric versions.
// 'initializingLedger' true indicates that either the transaction being processed is from the genesis block or the ledger is
// synching the state (which could happen during peer startup if the statedb is found to be lagging behind the blockchain).
// syncing the state (which could happen during peer startup if the statedb is found to be lagging behind the blockchain).
// In the former case, the transactions processed are expected to be valid and in the latter case, only valid transactions
// are reprocessed and hence any validation can be skipped.
type CustomTxProcessor interface {
Expand Down
2 changes: 1 addition & 1 deletion core/ledger/pvtdatastorage/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ func (s *Store) Commit(blockNum uint64, pvtData []*ledger.TxPvtData, missingPvtD
// GetLastUpdatedOldBlocksPvtData returns the pvtdata of blocks listed in `lastUpdatedOldBlocksList`
// TODO FAB-16293 -- GetLastUpdatedOldBlocksPvtData() can be removed either in v2.0 or in v2.1.
// If we decide to rebuild stateDB in v2.0, by default, the rebuild logic would take
// care of synching stateDB with pvtdataStore without calling GetLastUpdatedOldBlocksPvtData().
// care of syncing stateDB with pvtdataStore without calling GetLastUpdatedOldBlocksPvtData().
// Hence, it can be safely removed. Suppose if we decide not to rebuild stateDB in v2.0,
// we can remove this function in v2.1.
func (s *Store) GetLastUpdatedOldBlocksPvtData() (map[uint64][]*ledger.TxPvtData, error) {
Expand Down
2 changes: 1 addition & 1 deletion internal/fileutil/fileutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func CreateAndSyncFile(filePath string, content []byte, perm os.FileMode) error
return errors.Wrapf(err, "error while writing to file:%s", filePath)
}
if err = file.Sync(); err != nil {
return errors.Wrapf(err, "error while synching the file:%s", filePath)
return errors.Wrapf(err, "error while syncing the file:%s", filePath)
}
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion internal/fileutil/syncdir.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func SyncDir(dirPath string) error {
}
if err := dir.Sync(); err != nil {
dir.Close()
return errors.Wrapf(err, "error while synching dir:%s", dirPath)
return errors.Wrapf(err, "error while syncing dir:%s", dirPath)
}
if err := dir.Close(); err != nil {
return errors.Wrapf(err, "error while closing dir:%s", dirPath)
Expand Down

0 comments on commit d0bad2e

Please sign in to comment.