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
240d1851
Unverified
Commit
240d1851
authored
Jul 15, 2020
by
Guillaume Ballet
Committed by
GitHub
Jul 15, 2020
Browse files
Options
Downloads
Patches
Plain Diff
trie: quell linter in commiter.go (#21329)
parent
6c9f040e
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
trie/committer.go
+6
-8
6 additions, 8 deletions
trie/committer.go
with
6 additions
and
8 deletions
trie/committer.go
+
6
−
8
View file @
240d1851
...
...
@@ -105,20 +105,19 @@ func (c *committer) commit(n node, db *Database, force bool) (node, error) {
// Commit child
collapsed
:=
cn
.
copy
()
if
_
,
ok
:=
cn
.
Val
.
(
valueNode
);
!
ok
{
if
childV
,
err
:=
c
.
commit
(
cn
.
Val
,
db
,
false
);
err
!=
nil
{
childV
,
err
:=
c
.
commit
(
cn
.
Val
,
db
,
false
)
if
err
!=
nil
{
return
nil
,
err
}
else
{
collapsed
.
Val
=
childV
}
collapsed
.
Val
=
childV
}
// The key needs to be copied, since we're delivering it to database
collapsed
.
Key
=
hexToCompact
(
cn
.
Key
)
hashedNode
:=
c
.
store
(
collapsed
,
db
,
force
,
true
)
if
hn
,
ok
:=
hashedNode
.
(
hashNode
);
ok
{
return
hn
,
nil
}
else
{
return
collapsed
,
nil
}
return
collapsed
,
nil
case
*
fullNode
:
hashedKids
,
hasVnodes
,
err
:=
c
.
commitChildren
(
cn
,
db
,
force
)
if
err
!=
nil
{
...
...
@@ -130,9 +129,8 @@ func (c *committer) commit(n node, db *Database, force bool) (node, error) {
hashedNode
:=
c
.
store
(
collapsed
,
db
,
force
,
hasVnodes
)
if
hn
,
ok
:=
hashedNode
.
(
hashNode
);
ok
{
return
hn
,
nil
}
else
{
return
collapsed
,
nil
}
return
collapsed
,
nil
case
valueNode
:
return
c
.
store
(
cn
,
db
,
force
,
false
),
nil
// hashnodes aren't stored
...
...
@@ -265,7 +263,7 @@ func estimateSize(n node) int {
if
child
:=
n
.
Children
[
i
];
child
!=
nil
{
s
+=
estimateSize
(
child
)
}
else
{
s
+=
1
s
++
}
}
return
s
...
...
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