Showing 291 of 829 total issues
Method ContractFilterer.WatchPartialWithdrawnByRequest
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (_Contract *ContractFilterer) WatchPartialWithdrawnByRequest(opts *bind.WatchOpts, sink chan<- *ContractPartialWithdrawnByRequest, auth []common.Address, receiver []common.Address, stakerID []*big.Int) (event.Subscription, error) {
Method Service.updateOriginationScores
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (s *Service) updateOriginationScores(block *inter.Block, evmBlock *evmcore.EvmBlock, receipts types.Receipts, txPositions map[common.Hash]TxPosition, sealEpoch bool) {
Method ContractCaller.CalcDelegationRewards
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (_Contract *ContractCaller) CalcDelegationRewards(opts *bind.CallOpts, delegator common.Address, toStakerID *big.Int, _fromEpoch *big.Int, maxEpochs *big.Int) (*big.Int, *big.Int, *big.Int, error) {
Function exportEvents
has 5 return statements (exceeds 4 allowed). Open
Open
func exportEvents(ctx *cli.Context) error {
if len(ctx.Args()) < 1 {
utils.Fatalf("This command requires an argument.")
}
Method Index.Push
has 5 return statements (exceeds 4 allowed). Open
Open
func (tt *Index) Push(recs ...*types.Log) error {
for _, rec := range recs {
if len(rec.Topics) > MaxCount {
return ErrTooManyTopics
}
Method Checker.checkInited
has 5 return statements (exceeds 4 allowed). Open
Open
func (v *Checker) checkInited(e *inter.Event) error {
if e.Seq <= 0 || e.Epoch <= 0 || e.Frame <= 0 || e.Lamport <= 0 {
return ErrNotInited // it's unsigned, but check for negative in a case if type will change
}
Method Helper.AddSection
has 5 return statements (exceeds 4 allowed). Open
Open
func (d *Helper) AddSection(name, after string) error {
if name == "" {
return nil
}
Method Store.ApplyGenesis
has 5 return statements (exceeds 4 allowed). Open
Open
func (s *Store) ApplyGenesis(g *genesis.Genesis, genesisAtropos hash.Event, appHash common.Hash) error {
if g == nil {
return fmt.Errorf("genesis config shouldn't be nil")
}
if len(g.Alloc.Validators) == 0 {
Function parseFakeGen
has 5 return statements (exceeds 4 allowed). Open
Open
func parseFakeGen(s string) (num int, vaccs genesis.VAccounts, err error) {
var i64 uint64
parts := strings.SplitN(s, "/", 2)
if len(parts) != 2 {
Function measureDbDir
has 5 return statements (exceeds 4 allowed). Open
Open
func measureDbDir() (size int64) {
datadir, ok := dbDir.Load().(string)
if !ok || datadir == "" || datadir == "inmemory" {
return
}
Method SyncedPool.flush
has 5 return statements (exceeds 4 allowed). Open
Open
func (p *SyncedPool) flush(id []byte) error {
key := []byte("flag")
// drop old DBs
for name := range p.queuedDrops {
Method Helper.getKVData
has 5 return statements (exceeds 4 allowed). Open
Open
func (d *Helper) getKVData(name, sectionName string) (*ast.KeyValue, *ast.Table, error) {
sect, err := d.FindSection(sectionName)
if err != nil {
return nil, nil, err
}
Method SyncedPool.checkDbsSynced
has 5 return statements (exceeds 4 allowed). Open
Open
func (p *SyncedPool) checkDbsSynced() error {
p.Lock()
defer p.Unlock()
var (
Method EventHeaderData.UnmarshalBinary
has 5 return statements (exceeds 4 allowed). Open
Open
func (e *EventHeaderData) UnmarshalBinary(raw []byte) (err error) {
defer func() {
if r := recover(); r != nil {
err = ErrInvalidEncoding
}
Method PublicTransactionPoolAPI.GetTransactionByHash
has 5 return statements (exceeds 4 allowed). Open
Open
func (s *PublicTransactionPoolAPI) GetTransactionByHash(ctx context.Context, hash common.Hash) (*RPCTransaction, error) {
// Try to return an already finalized transaction
tx, blockNumber, index, err := s.b.GetTransaction(ctx, hash)
if err != nil {
return nil, err
Method PublicTransactionPoolAPI.GetTransactionReceipt
has 5 return statements (exceeds 4 allowed). Open
Open
func (s *PublicTransactionPoolAPI) GetTransactionReceipt(ctx context.Context, hash common.Hash) (map[string]interface{}, error) {
tx, blockNumber, index, err := s.b.GetTransaction(ctx, hash)
if tx == nil || err != nil {
return nil, err
}
Method StateTransition.TransitionDb
has 5 return statements (exceeds 4 allowed). Open
Open
func (st *StateTransition) TransitionDb() (*ExecutionResult, error) {
// First check this message satisfies all consensus rules before
// applying the message. The rules include these clauses
//
// 1. the nonce of the message caller is correct
Function writeTo
has 5 return statements (exceeds 4 allowed). Open
Open
func writeTo(parent string, t *ast.Table, w io.Writer) (err error) {
var fullName string
if parent != "" {
fullName = parent + "." + t.Name
} else {
Method txList.Filter
has 5 return statements (exceeds 4 allowed). Open
Open
func (l *txList) Filter(costLimit *big.Int, gasLimit uint64) (types.Transactions, types.Transactions) {
// If all transactions are below the threshold, short circuit
if l.costcap.Cmp(costLimit) <= 0 && l.gascap <= gasLimit {
return nil, nil
}
Function ApplyGenesis
has 5 return statements (exceeds 4 allowed). Open
Open
func ApplyGenesis(db ethdb.Database, net *lachesis.Config) (*EvmBlock, error) {
if net == nil {
return nil, ErrNoGenesis
}