Compare commits

...

3 Commits

Author SHA1 Message Date
Darioush Jalali 5c498e86cc
Merge 5ecd0495d3 into 5e1a39d67f 2024-11-24 21:54:41 -08:00
Daniel Liu 5e1a39d67f
internal/flags: fix "flag redefined" bug for alias on custom flags (#30796)
This change fixes a bug on the `DirectoryFlag` and the `BigFlag`, which would trigger a `panic` with the message "flag redefined" in case an alias was added to such a flag.
2024-11-24 20:09:38 +01:00
Darioush Jalali 5ecd0495d3
eth: (backend, api_backend) remove unused methods 2024-06-17 15:40:25 -07:00
3 changed files with 2 additions and 7 deletions

View File

@ -372,10 +372,6 @@ func (b *EthAPIBackend) ChainDb() ethdb.Database {
return b.eth.ChainDb()
}
func (b *EthAPIBackend) EventMux() *event.TypeMux {
return b.eth.EventMux()
}
func (b *EthAPIBackend) AccountManager() *accounts.Manager {
return b.eth.AccountManager()
}

View File

@ -331,7 +331,6 @@ func (s *Ethereum) Miner() *miner.Miner { return s.miner }
func (s *Ethereum) AccountManager() *accounts.Manager { return s.accountManager }
func (s *Ethereum) BlockChain() *core.BlockChain { return s.blockchain }
func (s *Ethereum) TxPool() *txpool.TxPool { return s.txPool }
func (s *Ethereum) EventMux() *event.TypeMux { return s.eventMux }
func (s *Ethereum) Engine() consensus.Engine { return s.engine }
func (s *Ethereum) ChainDb() ethdb.Database { return s.chainDb }
func (s *Ethereum) IsListening() bool { return true } // Always listening

View File

@ -90,7 +90,7 @@ func (f *DirectoryFlag) Apply(set *flag.FlagSet) error {
}
}
eachName(f, func(name string) {
set.Var(&f.Value, f.Name, f.Usage)
set.Var(&f.Value, name, f.Usage)
})
return nil
}
@ -172,7 +172,7 @@ func (f *BigFlag) Apply(set *flag.FlagSet) error {
}
eachName(f, func(name string) {
f.Value = new(big.Int)
set.Var((*bigValue)(f.Value), f.Name, f.Usage)
set.Var((*bigValue)(f.Value), name, f.Usage)
})
return nil
}