Skip to content

Commit

Permalink
fix: cleanup and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
aeddi committed Feb 19, 2025
1 parent ba098cd commit f3767e5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions tm2/pkg/bft/config/toml.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func ResetTestRoot(testName string) (*Config, string) {
// behaviour, we place genesis.json in the rootDir.
genesisFilePath := filepath.Join(rootDir, "genesis.json")
privvalConfig := privval.DefaultPrivValidatorConfig()
privvalConfig.RootDir = rootDir
privvalConfig.RootDir = filepath.Join(rootDir, DefaultSecretsDir)

// Write default config file if missing.
if !osm.FileExists(configFilePath) {
Expand Down Expand Up @@ -129,12 +129,12 @@ var testPrivValidatorKey = `{
"priv_key": {
"@type": "/tm.PrivKeyEd25519",
"value": "Qq4Q9QH2flPSIJShbXPIocbrQtQ4S7Kdn31uI3sKZoJxW3rDcLUNZjDCQCKuduwvj0Kg57xPxlHYEIHwx44ZGA=="
}
},
"pub_key": {
"@type": "/tm.PubKeyEd25519",
"value": "cVt6w3C1DWYwwkAirnbsL49CoOe8T8ZR2BCB8MeOGRg="
},
"address": "g1uvwz22t0l2fv9az93wutmlusrjv5zdwx2n32d5",
"address": "g1uvwz22t0l2fv9az93wutmlusrjv5zdwx2n32d5"
}`

var testPrivValidatorState = `{
Expand Down
2 changes: 1 addition & 1 deletion tm2/pkg/bft/config/toml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ func TestEnsureTestRoot(t *testing.T) {
rootDir,
"genesis.json",
DefaultDBDir,
baseConfig.PrivValidator.SignStatePath(),
baseConfig.PrivValidator.LocalSignerPath(),
baseConfig.PrivValidator.SignStatePath(),
)
}

Expand Down
5 changes: 2 additions & 3 deletions tm2/pkg/sdk/baseapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -608,14 +608,13 @@ func (app *BaseApp) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliv

// validateBasicTxMsgs executes basic validator calls for messages.
func validateBasicTxMsgs(msgs []Msg) error {
if msgs == nil || len(msgs) == 0 {
if len(msgs) == 0 {
return std.ErrUnknownRequest("Tx.GetMsgs() must return at least one message in list")
}

for _, msg := range msgs {
// Validate the Msg.
err := msg.ValidateBasic()
if err != nil {
if err := msg.ValidateBasic(); err != nil {
return err
}
}
Expand Down

0 comments on commit f3767e5

Please sign in to comment.