Fantom-foundation/go-lachesis

View on GitHub

Showing 829 of 829 total issues

Similar blocks of code found in 3 locations. Consider refactoring.
Open

func (es *EventSystem) subscribePendingLogs(crit ethereum.FilterQuery, logs chan []*types.Log) *Subscription {
    sub := &subscription{
        id:        rpc.NewID(),
        typ:       PendingLogsSubscription,
        logsCrit:  crit,
Severity: Major
Found in gossip/filters/filter_system.go and 2 other locations - About 1 hr to fix
gossip/filters/filter_system.go on lines 220..233
gossip/filters/filter_system.go on lines 237..250

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 174.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

func (es *EventSystem) subscribeMinedPendingLogs(crit ethereum.FilterQuery, logs chan []*types.Log) *Subscription {
    sub := &subscription{
        id:        rpc.NewID(),
        typ:       MinedAndPendingLogsSubscription,
        logsCrit:  crit,
Severity: Major
Found in gossip/filters/filter_system.go and 2 other locations - About 1 hr to fix
gossip/filters/filter_system.go on lines 237..250
gossip/filters/filter_system.go on lines 254..267

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 174.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Method TxPool.reset has 68 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (pool *TxPool) reset(oldHead, newHead *EvmHeader) {
    // If we're reorging an old state, reinject all dropped transactions
    var reinject types.Transactions

    if oldHead != nil && oldHead.Hash != newHead.ParentHash {
Severity: Minor
Found in evmcore/tx_pool.go - About 1 hr to fix

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

    func (_Contract *ContractSession) EpochSnapshots(arg0 *big.Int) (struct {
        EndTime                *big.Int
        Duration               *big.Int
        EpochFee               *big.Int
        TotalBaseRewardWeight  *big.Int
    Severity: Major
    Found in gossip/sfc110/contract.go and 5 other locations - About 1 hr to fix
    gossip/sfc110/contract.go on lines 777..789
    gossip/sfc202/contract.go on lines 642..654
    gossip/sfc202/contract.go on lines 659..671
    gossip/sfc204/contract.go on lines 651..663
    gossip/sfc204/contract.go on lines 668..680

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 171.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

    func (_Contract *ContractCallerSession) EpochSnapshots(arg0 *big.Int) (struct {
        EndTime                *big.Int
        Duration               *big.Int
        EpochFee               *big.Int
        TotalBaseRewardWeight  *big.Int
    Severity: Major
    Found in gossip/sfc202/contract.go and 5 other locations - About 1 hr to fix
    gossip/sfc110/contract.go on lines 760..772
    gossip/sfc110/contract.go on lines 777..789
    gossip/sfc202/contract.go on lines 642..654
    gossip/sfc204/contract.go on lines 651..663
    gossip/sfc204/contract.go on lines 668..680

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 171.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

    func (_Contract *ContractSession) EpochSnapshots(arg0 *big.Int) (struct {
        EndTime                *big.Int
        Duration               *big.Int
        EpochFee               *big.Int
        TotalBaseRewardWeight  *big.Int
    Severity: Major
    Found in gossip/sfc204/contract.go and 5 other locations - About 1 hr to fix
    gossip/sfc110/contract.go on lines 760..772
    gossip/sfc110/contract.go on lines 777..789
    gossip/sfc202/contract.go on lines 642..654
    gossip/sfc202/contract.go on lines 659..671
    gossip/sfc204/contract.go on lines 668..680

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 171.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

    func (_Contract *ContractSession) EpochSnapshots(arg0 *big.Int) (struct {
        EndTime                *big.Int
        Duration               *big.Int
        EpochFee               *big.Int
        TotalBaseRewardWeight  *big.Int
    Severity: Major
    Found in gossip/sfc202/contract.go and 5 other locations - About 1 hr to fix
    gossip/sfc110/contract.go on lines 760..772
    gossip/sfc110/contract.go on lines 777..789
    gossip/sfc202/contract.go on lines 659..671
    gossip/sfc204/contract.go on lines 651..663
    gossip/sfc204/contract.go on lines 668..680

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 171.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

    func (_Contract *ContractCallerSession) EpochSnapshots(arg0 *big.Int) (struct {
        EndTime                *big.Int
        Duration               *big.Int
        EpochFee               *big.Int
        TotalBaseRewardWeight  *big.Int
    Severity: Major
    Found in gossip/sfc110/contract.go and 5 other locations - About 1 hr to fix
    gossip/sfc110/contract.go on lines 760..772
    gossip/sfc202/contract.go on lines 642..654
    gossip/sfc202/contract.go on lines 659..671
    gossip/sfc204/contract.go on lines 651..663
    gossip/sfc204/contract.go on lines 668..680

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 171.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

    func (_Contract *ContractCallerSession) EpochSnapshots(arg0 *big.Int) (struct {
        EndTime                *big.Int
        Duration               *big.Int
        EpochFee               *big.Int
        TotalBaseRewardWeight  *big.Int
    Severity: Major
    Found in gossip/sfc204/contract.go and 5 other locations - About 1 hr to fix
    gossip/sfc110/contract.go on lines 760..772
    gossip/sfc110/contract.go on lines 777..789
    gossip/sfc202/contract.go on lines 642..654
    gossip/sfc202/contract.go on lines 659..671
    gossip/sfc204/contract.go on lines 651..663

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 171.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Function lachesisOperaMigrationMain has 67 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func lachesisOperaMigrationMain(ctx *cli.Context) error {
        if args := ctx.Args(); len(args) > 0 {
            return fmt.Errorf("invalid command: %q", args[0])
        }
    
    
    Severity: Minor
    Found in cmd/lachesis/opera_migration.go - About 1 hr to fix

      Method Metric.Write has 67 lines of code (exceeds 50 allowed). Consider refactoring.
      Open

      func (m *Metric) Write(out *dto.Metric) error {
          switch metric := m.m.(type) {
      
          case metrics.Meter:
              t := metric.Snapshot()
      Severity: Minor
      Found in metrics/prometheus/adapter.go - About 1 hr to fix

        Identical blocks of code found in 2 locations. Consider refactoring.
        Open

        func (_Contract *ContractCaller) LockedStakes(opts *bind.CallOpts, arg0 *big.Int) (struct {
            FromEpoch *big.Int
            EndTime   *big.Int
            Duration  *big.Int
        }, error) {
        Severity: Major
        Found in gossip/sfc204/contract.go and 1 other location - About 1 hr to fix
        gossip/sfc202/contract.go on lines 998..1011

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 170.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Identical blocks of code found in 2 locations. Consider refactoring.
        Open

        func (_Contract *ContractCaller) LockedStakes(opts *bind.CallOpts, arg0 *big.Int) (struct {
            FromEpoch *big.Int
            EndTime   *big.Int
            Duration  *big.Int
        }, error) {
        Severity: Major
        Found in gossip/sfc202/contract.go and 1 other location - About 1 hr to fix
        gossip/sfc204/contract.go on lines 951..964

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 170.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Method Oracle.SuggestPrice has 64 lines of code (exceeds 50 allowed). Consider refactoring.
        Open

        func (gpo *Oracle) SuggestPrice(ctx context.Context) (*big.Int, error) {
            head, _ := gpo.backend.HeaderByNumber(ctx, rpc.LatestBlockNumber)
            headHash := head.Hash
        
            // If the latest gasprice is still available, return it.
        Severity: Minor
        Found in gossip/gasprice/gasprice.go - About 1 hr to fix

          Similar blocks of code found in 22 locations. Consider refactoring.
          Open

          func (_Contract *ContractFilterer) FilterClaimedValidatorReward(opts *bind.FilterOpts, stakerID []*big.Int) (*ContractClaimedValidatorRewardIterator, error) {
          
              var stakerIDRule []interface{}
              for _, stakerIDItem := range stakerID {
                  stakerIDRule = append(stakerIDRule, stakerIDItem)
          Severity: Major
          Found in gossip/sfc110/contract.go and 21 other locations - About 1 hr to fix
          gossip/sfc110/contract.go on lines 3232..3244
          gossip/sfc110/contract.go on lines 3531..3543
          gossip/sfc110/contract.go on lines 4142..4154
          gossip/sfc110/contract.go on lines 4869..4881
          gossip/sfc110/contract.go on lines 5012..5024
          gossip/sfc110/contract.go on lines 5470..5482
          gossip/sfc202/contract.go on lines 2660..2672
          gossip/sfc202/contract.go on lines 3425..3437
          gossip/sfc202/contract.go on lines 3724..3736
          gossip/sfc202/contract.go on lines 4023..4035
          gossip/sfc202/contract.go on lines 4767..4779
          gossip/sfc202/contract.go on lines 5761..5773
          gossip/sfc202/contract.go on lines 5904..5916
          gossip/sfc202/contract.go on lines 6362..6374
          gossip/sfc204/contract.go on lines 2503..2515
          gossip/sfc204/contract.go on lines 3268..3280
          gossip/sfc204/contract.go on lines 3567..3579
          gossip/sfc204/contract.go on lines 3866..3878
          gossip/sfc204/contract.go on lines 4610..4622
          gossip/sfc204/contract.go on lines 5604..5616
          gossip/sfc204/contract.go on lines 5901..5913

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 163.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 22 locations. Consider refactoring.
          Open

          func (_Contract *ContractFilterer) FilterWithdrawnStake(opts *bind.FilterOpts, stakerID []*big.Int) (*ContractWithdrawnStakeIterator, error) {
          
              var stakerIDRule []interface{}
              for _, stakerIDItem := range stakerID {
                  stakerIDRule = append(stakerIDRule, stakerIDItem)
          Severity: Major
          Found in gossip/sfc204/contract.go and 21 other locations - About 1 hr to fix
          gossip/sfc110/contract.go on lines 2467..2479
          gossip/sfc110/contract.go on lines 3232..3244
          gossip/sfc110/contract.go on lines 3531..3543
          gossip/sfc110/contract.go on lines 4142..4154
          gossip/sfc110/contract.go on lines 4869..4881
          gossip/sfc110/contract.go on lines 5012..5024
          gossip/sfc110/contract.go on lines 5470..5482
          gossip/sfc202/contract.go on lines 2660..2672
          gossip/sfc202/contract.go on lines 3425..3437
          gossip/sfc202/contract.go on lines 3724..3736
          gossip/sfc202/contract.go on lines 4023..4035
          gossip/sfc202/contract.go on lines 4767..4779
          gossip/sfc202/contract.go on lines 5761..5773
          gossip/sfc202/contract.go on lines 5904..5916
          gossip/sfc202/contract.go on lines 6362..6374
          gossip/sfc204/contract.go on lines 2503..2515
          gossip/sfc204/contract.go on lines 3268..3280
          gossip/sfc204/contract.go on lines 3567..3579
          gossip/sfc204/contract.go on lines 3866..3878
          gossip/sfc204/contract.go on lines 4610..4622
          gossip/sfc204/contract.go on lines 5604..5616

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 163.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 22 locations. Consider refactoring.
          Open

          func (_Contract *ContractFilterer) FilterLockingStake(opts *bind.FilterOpts, stakerID []*big.Int) (*ContractLockingStakeIterator, error) {
          
              var stakerIDRule []interface{}
              for _, stakerIDItem := range stakerID {
                  stakerIDRule = append(stakerIDRule, stakerIDItem)
          Severity: Major
          Found in gossip/sfc202/contract.go and 21 other locations - About 1 hr to fix
          gossip/sfc110/contract.go on lines 2467..2479
          gossip/sfc110/contract.go on lines 3232..3244
          gossip/sfc110/contract.go on lines 3531..3543
          gossip/sfc110/contract.go on lines 4142..4154
          gossip/sfc110/contract.go on lines 4869..4881
          gossip/sfc110/contract.go on lines 5012..5024
          gossip/sfc110/contract.go on lines 5470..5482
          gossip/sfc202/contract.go on lines 2660..2672
          gossip/sfc202/contract.go on lines 3425..3437
          gossip/sfc202/contract.go on lines 3724..3736
          gossip/sfc202/contract.go on lines 4767..4779
          gossip/sfc202/contract.go on lines 5761..5773
          gossip/sfc202/contract.go on lines 5904..5916
          gossip/sfc202/contract.go on lines 6362..6374
          gossip/sfc204/contract.go on lines 2503..2515
          gossip/sfc204/contract.go on lines 3268..3280
          gossip/sfc204/contract.go on lines 3567..3579
          gossip/sfc204/contract.go on lines 3866..3878
          gossip/sfc204/contract.go on lines 4610..4622
          gossip/sfc204/contract.go on lines 5604..5616
          gossip/sfc204/contract.go on lines 5901..5913

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 163.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 22 locations. Consider refactoring.
          Open

          func (_Contract *ContractFilterer) FilterUpdatedStakerMetadata(opts *bind.FilterOpts, stakerID []*big.Int) (*ContractUpdatedStakerMetadataIterator, error) {
          
              var stakerIDRule []interface{}
              for _, stakerIDItem := range stakerID {
                  stakerIDRule = append(stakerIDRule, stakerIDItem)
          Severity: Major
          Found in gossip/sfc110/contract.go and 21 other locations - About 1 hr to fix
          gossip/sfc110/contract.go on lines 2467..2479
          gossip/sfc110/contract.go on lines 3232..3244
          gossip/sfc110/contract.go on lines 3531..3543
          gossip/sfc110/contract.go on lines 4142..4154
          gossip/sfc110/contract.go on lines 4869..4881
          gossip/sfc110/contract.go on lines 5470..5482
          gossip/sfc202/contract.go on lines 2660..2672
          gossip/sfc202/contract.go on lines 3425..3437
          gossip/sfc202/contract.go on lines 3724..3736
          gossip/sfc202/contract.go on lines 4023..4035
          gossip/sfc202/contract.go on lines 4767..4779
          gossip/sfc202/contract.go on lines 5761..5773
          gossip/sfc202/contract.go on lines 5904..5916
          gossip/sfc202/contract.go on lines 6362..6374
          gossip/sfc204/contract.go on lines 2503..2515
          gossip/sfc204/contract.go on lines 3268..3280
          gossip/sfc204/contract.go on lines 3567..3579
          gossip/sfc204/contract.go on lines 3866..3878
          gossip/sfc204/contract.go on lines 4610..4622
          gossip/sfc204/contract.go on lines 5604..5616
          gossip/sfc204/contract.go on lines 5901..5913

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 163.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 22 locations. Consider refactoring.
          Open

          func (_Contract *ContractFilterer) FilterLockingStake(opts *bind.FilterOpts, stakerID []*big.Int) (*ContractLockingStakeIterator, error) {
          
              var stakerIDRule []interface{}
              for _, stakerIDItem := range stakerID {
                  stakerIDRule = append(stakerIDRule, stakerIDItem)
          Severity: Major
          Found in gossip/sfc204/contract.go and 21 other locations - About 1 hr to fix
          gossip/sfc110/contract.go on lines 2467..2479
          gossip/sfc110/contract.go on lines 3232..3244
          gossip/sfc110/contract.go on lines 3531..3543
          gossip/sfc110/contract.go on lines 4142..4154
          gossip/sfc110/contract.go on lines 4869..4881
          gossip/sfc110/contract.go on lines 5012..5024
          gossip/sfc110/contract.go on lines 5470..5482
          gossip/sfc202/contract.go on lines 2660..2672
          gossip/sfc202/contract.go on lines 3425..3437
          gossip/sfc202/contract.go on lines 3724..3736
          gossip/sfc202/contract.go on lines 4023..4035
          gossip/sfc202/contract.go on lines 4767..4779
          gossip/sfc202/contract.go on lines 5761..5773
          gossip/sfc202/contract.go on lines 5904..5916
          gossip/sfc202/contract.go on lines 6362..6374
          gossip/sfc204/contract.go on lines 2503..2515
          gossip/sfc204/contract.go on lines 3268..3280
          gossip/sfc204/contract.go on lines 3567..3579
          gossip/sfc204/contract.go on lines 4610..4622
          gossip/sfc204/contract.go on lines 5604..5616
          gossip/sfc204/contract.go on lines 5901..5913

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 163.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 22 locations. Consider refactoring.
          Open

          func (_Contract *ContractFilterer) FilterDeactivatedStake(opts *bind.FilterOpts, stakerID []*big.Int) (*ContractDeactivatedStakeIterator, error) {
          
              var stakerIDRule []interface{}
              for _, stakerIDItem := range stakerID {
                  stakerIDRule = append(stakerIDRule, stakerIDItem)
          Severity: Major
          Found in gossip/sfc202/contract.go and 21 other locations - About 1 hr to fix
          gossip/sfc110/contract.go on lines 2467..2479
          gossip/sfc110/contract.go on lines 3232..3244
          gossip/sfc110/contract.go on lines 3531..3543
          gossip/sfc110/contract.go on lines 4142..4154
          gossip/sfc110/contract.go on lines 4869..4881
          gossip/sfc110/contract.go on lines 5012..5024
          gossip/sfc110/contract.go on lines 5470..5482
          gossip/sfc202/contract.go on lines 2660..2672
          gossip/sfc202/contract.go on lines 3724..3736
          gossip/sfc202/contract.go on lines 4023..4035
          gossip/sfc202/contract.go on lines 4767..4779
          gossip/sfc202/contract.go on lines 5761..5773
          gossip/sfc202/contract.go on lines 5904..5916
          gossip/sfc202/contract.go on lines 6362..6374
          gossip/sfc204/contract.go on lines 2503..2515
          gossip/sfc204/contract.go on lines 3268..3280
          gossip/sfc204/contract.go on lines 3567..3579
          gossip/sfc204/contract.go on lines 3866..3878
          gossip/sfc204/contract.go on lines 4610..4622
          gossip/sfc204/contract.go on lines 5604..5616
          gossip/sfc204/contract.go on lines 5901..5913

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 163.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Severity
          Category
          Status
          Source
          Language