Skip to content

Commit

Permalink
add trace for each account
Browse files Browse the repository at this point in the history
  • Loading branch information
tbruyelle committed Aug 27, 2024
1 parent 80ea857 commit 4144b3d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
17 changes: 15 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package atomone

import (
"encoding/json"
"fmt"
"io"
"net/http"
"os"
"path/filepath"

"github.com/davecgh/go-spew/spew"
"github.com/gorilla/mux"
"github.com/rakyll/statik/fs"
"github.com/spf13/cast"
Expand Down Expand Up @@ -262,7 +262,20 @@ func (app *AtomOneApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) a
if err := tmjson.Unmarshal(req.AppStateBytes, &genesisState); err != nil {
panic(err)
}
spew.Dump("AUTH", genesisState["auth"])
var m map[string]any
json.Unmarshal(genesisState["auth"], &m)
bz, _ := json.MarshalIndent(m, " ", "")
fmt.Println("AUTH", string(bz))

var authGen authtypes.GenesisState
app.AppCodec().MustUnmarshalJSON(genesisState["auth"], &authGen)
accounts, err := authtypes.UnpackAccounts(authGen.Accounts)
if err != nil {
panic(err)
}
for i, acc := range accounts {
fmt.Println("VALIDATE", i, acc, acc.Validate())
}

app.UpgradeKeeper.SetModuleVersionMap(ctx, app.mm.GetVersionMap())

Expand Down
9 changes: 9 additions & 0 deletions tests/e2e/e2e_setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,15 @@ func (s *IntegrationTestSuite) runValidators(c *chain, portOffset int) {
rpcClient, err := rpchttp.New("tcp://localhost:26657", "/websocket")
s.Require().NoError(err)

err = s.dkrPool.Client.Logs(docker.LogsOptions{
Container: s.valResources[c.id][0].Container.ID,
OutputStream: os.Stdout,
ErrorStream: os.Stdout,
Stdout: true,
Stderr: true,
// Follow: true,
})
fmt.Println("ERR LOGS", err)
defer func() {
err = s.dkrPool.Client.Logs(docker.LogsOptions{
Container: s.valResources[c.id][0].Container.ID,
Expand Down

0 comments on commit 4144b3d

Please sign in to comment.