mirror of
				https://github.com/0glabs/0g-chain.git
				synced 2025-11-04 07:27:27 +00:00 
			
		
		
		
	fix issue in council register
This commit is contained in:
		
							parent
							
								
									64adfbba25
								
							
						
					
					
						commit
						71cfc353cf
					
				@ -6,10 +6,12 @@ import (
 | 
				
			|||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						sdkmath "cosmossdk.io/math"
 | 
				
			||||||
	tmdb "github.com/cometbft/cometbft-db"
 | 
						tmdb "github.com/cometbft/cometbft-db"
 | 
				
			||||||
	abci "github.com/cometbft/cometbft/abci/types"
 | 
						abci "github.com/cometbft/cometbft/abci/types"
 | 
				
			||||||
	"github.com/cometbft/cometbft/libs/log"
 | 
						"github.com/cometbft/cometbft/libs/log"
 | 
				
			||||||
	"github.com/cosmos/cosmos-sdk/baseapp"
 | 
						"github.com/cosmos/cosmos-sdk/baseapp"
 | 
				
			||||||
 | 
						"github.com/cosmos/cosmos-sdk/codec"
 | 
				
			||||||
	cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
 | 
						cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
 | 
				
			||||||
	"github.com/cosmos/cosmos-sdk/testutil/sims"
 | 
						"github.com/cosmos/cosmos-sdk/testutil/sims"
 | 
				
			||||||
	sdk "github.com/cosmos/cosmos-sdk/types"
 | 
						sdk "github.com/cosmos/cosmos-sdk/types"
 | 
				
			||||||
 | 
				
			|||||||
@ -8,6 +8,7 @@ import (
 | 
				
			|||||||
	"github.com/cosmos/cosmos-sdk/client/config"
 | 
						"github.com/cosmos/cosmos-sdk/client/config"
 | 
				
			||||||
	"github.com/cosmos/cosmos-sdk/client/debug"
 | 
						"github.com/cosmos/cosmos-sdk/client/debug"
 | 
				
			||||||
	"github.com/cosmos/cosmos-sdk/client/flags"
 | 
						"github.com/cosmos/cosmos-sdk/client/flags"
 | 
				
			||||||
 | 
						"github.com/cosmos/cosmos-sdk/crypto/keyring"
 | 
				
			||||||
	"github.com/cosmos/cosmos-sdk/server"
 | 
						"github.com/cosmos/cosmos-sdk/server"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	tmcfg "github.com/cometbft/cometbft/config"
 | 
						tmcfg "github.com/cometbft/cometbft/config"
 | 
				
			||||||
@ -28,8 +29,16 @@ import (
 | 
				
			|||||||
	"github.com/0glabs/0g-chain/chaincfg"
 | 
						"github.com/0glabs/0g-chain/chaincfg"
 | 
				
			||||||
	"github.com/0glabs/0g-chain/cmd/opendb"
 | 
						"github.com/0glabs/0g-chain/cmd/opendb"
 | 
				
			||||||
	"github.com/0glabs/0g-chain/cmd/rocksdb"
 | 
						"github.com/0glabs/0g-chain/cmd/rocksdb"
 | 
				
			||||||
 | 
						"github.com/0glabs/0g-chain/crypto/vrf"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func customKeyringOptions() keyring.Option {
 | 
				
			||||||
 | 
						return func(options *keyring.Options) {
 | 
				
			||||||
 | 
							options.SupportedAlgos = append(hd.SupportedAlgorithms, vrf.VrfAlgo)
 | 
				
			||||||
 | 
							options.SupportedAlgosLedger = append(hd.SupportedAlgorithmsLedger, vrf.VrfAlgo)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// NewRootCmd creates a new root command for the 0g-chain blockchain.
 | 
					// NewRootCmd creates a new root command for the 0g-chain blockchain.
 | 
				
			||||||
func NewRootCmd() *cobra.Command {
 | 
					func NewRootCmd() *cobra.Command {
 | 
				
			||||||
	encodingConfig := app.MakeEncodingConfig()
 | 
						encodingConfig := app.MakeEncodingConfig()
 | 
				
			||||||
@ -42,7 +51,7 @@ func NewRootCmd() *cobra.Command {
 | 
				
			|||||||
		WithAccountRetriever(types.AccountRetriever{}).
 | 
							WithAccountRetriever(types.AccountRetriever{}).
 | 
				
			||||||
		WithBroadcastMode(flags.FlagBroadcastMode).
 | 
							WithBroadcastMode(flags.FlagBroadcastMode).
 | 
				
			||||||
		WithHomeDir(chaincfg.DefaultNodeHome).
 | 
							WithHomeDir(chaincfg.DefaultNodeHome).
 | 
				
			||||||
		WithKeyringOptions(hd.EthSecp256k1Option()).
 | 
							WithKeyringOptions(customKeyringOptions()).
 | 
				
			||||||
		WithViper(chaincfg.EnvPrefix)
 | 
							WithViper(chaincfg.EnvPrefix)
 | 
				
			||||||
	rootCmd := &cobra.Command{
 | 
						rootCmd := &cobra.Command{
 | 
				
			||||||
		Use:   chaincfg.AppName,
 | 
							Use:   chaincfg.AppName,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user