Skip to content

Commit fc70c93

Browse files
authored
chore: enforcing keyring-backend test (#113)
* Update key.go * Update CHANGELOG.md * change to start * Update start.go * Update start.go
1 parent c23c7a4 commit fc70c93

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
4747
### Improvements
4848

4949
* [#110](https://github.com/babylonlabs-io/covenant-emulator/pull/110) bump babylon to v1.0.0-rc.7
50+
* [#113](https://github.com/babylonlabs-io/covenant-emulator/pull/113) chore: enforcing keyring-backend test
5051

5152
### Bug Fixes
5253

cmd/covd/start.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"github.com/babylonlabs-io/covenant-emulator/log"
99
"github.com/babylonlabs-io/covenant-emulator/remotesigner"
1010
"github.com/babylonlabs-io/covenant-emulator/util"
11+
"github.com/cosmos/cosmos-sdk/crypto/keyring"
1112

1213
"github.com/lightningnetwork/lnd/signal"
1314
"github.com/urfave/cli"
@@ -43,6 +44,10 @@ func start(ctx *cli.Context) error {
4344
return fmt.Errorf("failed to load config at %s: %w", homePath, err)
4445
}
4546

47+
if cfg.BabylonConfig.KeyringBackend != keyring.BackendTest {
48+
return fmt.Errorf("the keyring backend in config must be `test` for automatic signing, got %s", cfg.BabylonConfig.KeyringBackend)
49+
}
50+
4651
logger, err := log.NewRootLoggerWithFile(covcfg.LogFile(homePath), cfg.LogLevel)
4752
if err != nil {
4853
return fmt.Errorf("failed to load the logger: %w", err)

0 commit comments

Comments
 (0)