good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
0bec85f2
Commit
0bec85f2
authored
Aug 28, 2018
by
Sheldon
Committed by
Péter Szilágyi
Aug 28, 2018
Browse files
Options
Downloads
Patches
Plain Diff
core: fix typos in comment (#17531)
parent
f236ac71
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/tx_journal.go
+4
-4
4 additions, 4 deletions
core/tx_journal.go
with
4 additions
and
4 deletions
core/tx_journal.go
+
4
−
4
View file @
0bec85f2
...
...
@@ -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 read
t
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 doe
n
s't exist at all
// Skip the parsing if the journal file does
n
'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
// journal
l
ed 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 thre
n
shold is reached
// New transaction parsed, queue up for later, import if threshold is reached
total
++
if
batch
=
append
(
batch
,
tx
);
batch
.
Len
()
>
1024
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment