This repository was archived by the owner on Sep 26, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
add v1.5.2 engine back #72
Open
codchen
wants to merge
1
commit into
main
Choose a base branch
from
tony/add-v102-vm
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Comment on lines
+438
to
+442
for k, v := range balances { | ||
dst := make([]types.Coin, len(v)) | ||
copy(dst, v) | ||
bal[k] = dst | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
Iteration over map may be a possible source of non-determinism
Comment on lines
+48
to
+95
go func() { | ||
if useMtx { | ||
defer db.mtx.RUnlock() | ||
} | ||
// Because we use [start, end) for reverse ranges, while btree uses (start, end], we need | ||
// the following variables to handle some reverse iteration conditions ourselves. | ||
var ( | ||
skipEqual []byte | ||
abortLessThan []byte | ||
) | ||
visitor := func(i btree.Item) bool { | ||
item := i.(*item) | ||
if skipEqual != nil && bytes.Equal(item.key, skipEqual) { | ||
skipEqual = nil | ||
return true | ||
} | ||
if abortLessThan != nil && bytes.Compare(item.key, abortLessThan) == -1 { | ||
return false | ||
} | ||
select { | ||
case <-ctx.Done(): | ||
return false | ||
case ch <- item: | ||
return true | ||
} | ||
} | ||
switch { | ||
case start == nil && end == nil && !reverse: | ||
db.btree.Ascend(visitor) | ||
case start == nil && end == nil && reverse: | ||
db.btree.Descend(visitor) | ||
case end == nil && !reverse: | ||
// must handle this specially, since nil is considered less than anything else | ||
db.btree.AscendGreaterOrEqual(newKey(start), visitor) | ||
case !reverse: | ||
db.btree.AscendRange(newKey(start), newKey(end), visitor) | ||
case end == nil: | ||
// abort after start, since we use [start, end) while btree uses (start, end] | ||
abortLessThan = start | ||
db.btree.Descend(visitor) | ||
default: | ||
// skip end and abort after start, since we use [start, end) while btree uses (start, end] | ||
skipEqual = end | ||
abortLessThan = start | ||
db.btree.DescendLessOrEqual(newKey(end), visitor) | ||
} | ||
close(ch) | ||
}() |
Check notice
Code scanning / CodeQL
Spawning a Go routine Note test
Spawning a Go routine may be a possible source of non-determinism
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.