Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Register
Sign in
Toggle navigation
Menu
Open sidebar
Tiger Ton
osmosis
Commits
8329e9e7
Commit
8329e9e7
authored
2 years ago
by
Dev Ojha
Browse files
Options
Download
Email Patches
Plain Diff
Cherry-pick code fix
parent
aa727b5b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
CHANGELOG.md
+2
-0
CHANGELOG.md
app/modules.go
+5
-0
app/modules.go
app/modules_test.go
+22
-0
app/modules_test.go
osmoutils/partialord/partialord.go
+1
-1
osmoutils/partialord/partialord.go
osmoutils/partialord/partialord_test.go
+1
-1
osmoutils/partialord/partialord_test.go
with
31 additions
and
2 deletions
+31
-2
CHANGELOG.md
+
2
-
0
View file @
8329e9e7
...
...
@@ -40,6 +40,8 @@ All notable changes to this project will be documented in this file.
The format is based on
[
Keep a Changelog
](
https://keepachangelog.com/en/1.0.0/
)
,
and this project adheres to
[
Semantic Versioning
](
https://semver.org/spec/v2.0.0.html
)
.
## v13.0.0
## v12.0.0
This release includes several cosmwasm-developer and appchain-ecosystem affecting upgrades:
...
...
This diff is collapsed.
Click to expand it.
app/modules.go
+
5
-
0
View file @
8329e9e7
...
...
@@ -167,6 +167,11 @@ func orderBeginBlockers(allModuleNames []string) []string {
// OrderEndBlockers returns EndBlockers (crisis, govtypes, staking) with no relative order.
func
OrderEndBlockers
(
allModuleNames
[]
string
)
[]
string
{
ord
:=
partialord
.
NewPartialOrdering
(
allModuleNames
)
// Staking must be after gov.
ord
.
FirstElements
(
govtypes
.
ModuleName
)
ord
.
LastElements
(
stakingtypes
.
ModuleName
)
// only Osmosis modules with endblock code are: twap, crisis, govtypes, staking
// we don't care about the relative ordering between them.
return
ord
.
TotalOrdering
()
...
...
This diff is collapsed.
Click to expand it.
app/modules_test.go
0 → 100644
+
22
-
0
View file @
8329e9e7
package
app
import
(
"reflect"
"testing"
"github.com/cosmos/cosmos-sdk/simapp"
"github.com/stretchr/testify/require"
"github.com/tendermint/tendermint/libs/log"
dbm
"github.com/tendermint/tm-db"
)
func
TestOrderEndBlockers_Determinism
(
t
*
testing
.
T
)
{
db
:=
dbm
.
NewMemDB
()
app
:=
NewOsmosisApp
(
log
.
NewNopLogger
(),
db
,
nil
,
true
,
map
[
int64
]
bool
{},
DefaultNodeHome
,
5
,
simapp
.
EmptyAppOptions
{},
GetWasmEnabledProposals
(),
EmptyWasmOpts
)
for
i
:=
0
;
i
<
1000
;
i
++
{
a
:=
OrderEndBlockers
(
app
.
mm
.
ModuleNames
())
b
:=
OrderEndBlockers
(
app
.
mm
.
ModuleNames
())
require
.
True
(
t
,
reflect
.
DeepEqual
(
a
,
b
))
}
}
This diff is collapsed.
Click to expand it.
osmoutils/partialord/partialord.go
+
1
-
1
View file @
8329e9e7
...
...
@@ -21,7 +21,7 @@ func NewPartialOrdering(elements []string) PartialOrdering {
copy
(
elementsCopy
,
elements
)
sort
.
Strings
(
elementsCopy
)
return
PartialOrdering
{
dag
:
dag
.
NewDAG
(
elements
),
dag
:
dag
.
NewDAG
(
elements
Copy
),
firstSealed
:
false
,
lastSealed
:
false
,
}
...
...
This diff is collapsed.
Click to expand it.
osmoutils/partialord/partialord_test.go
+
1
-
1
View file @
8329e9e7
...
...
@@ -26,7 +26,7 @@ func TestAPI(t *testing.T) {
totalOrd
:=
beginBlockOrd
.
TotalOrdering
()
expTotalOrd
:=
[]
string
{
"upgrades"
,
"epochs"
,
"capabilities"
,
"bank"
,
"
staking
"
,
"mint"
,
"
ibc"
,
"distribution
"
,
"ibctransfers"
,
"bank"
,
"
ibc
"
,
"mint"
,
"
staking
"
,
"ibctransfers"
,
"distribution"
,
"auth"
,
"authz"
,
"wasm"
,
}
require
.
Equal
(
t
,
expTotalOrd
,
totalOrd
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets