Fantom-foundation/go-lachesis

View on GitHub

Showing 829 of 829 total issues

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

func (_Contract *ContractFilterer) FilterIncreasedStake(opts *bind.FilterOpts, stakerID []*big.Int) (*ContractIncreasedStakeIterator, 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 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/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 5012..5024
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) FilterPreparedToWithdrawStake(opts *bind.FilterOpts, stakerID []*big.Int) (*ContractPreparedToWithdrawStakeIterator, 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 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) FilterUpdatedStake(opts *bind.FilterOpts, stakerID []*big.Int) (*ContractUpdatedStakeIterator, 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 4023..4035
gossip/sfc202/contract.go on lines 4767..4779
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) FilterPreparedToWithdrawStake(opts *bind.FilterOpts, stakerID []*big.Int) (*ContractPreparedToWithdrawStakeIterator, 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 4023..4035
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) FilterUpdatedStake(opts *bind.FilterOpts, stakerID []*big.Int) (*ContractUpdatedStakeIterator, 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 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) 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/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 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) FilterIncreasedStake(opts *bind.FilterOpts, stakerID []*big.Int) (*ContractIncreasedStakeIterator, 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 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) 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/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 4023..4035
gossip/sfc202/contract.go on lines 4767..4779
gossip/sfc202/contract.go on lines 5761..5773
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) FilterPreparedToWithdrawStake(opts *bind.FilterOpts, stakerID []*big.Int) (*ContractPreparedToWithdrawStakeIterator, 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 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) FilterUpdatedStake(opts *bind.FilterOpts, stakerID []*big.Int) (*ContractUpdatedStakeIterator, 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 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) FilterIncreasedStake(opts *bind.FilterOpts, stakerID []*big.Int) (*ContractIncreasedStakeIterator, 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 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/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 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/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) 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/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 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) 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/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 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) 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/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 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

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

func (s *Store) get(table kvdb.KeyValueStore, key []byte, to interface{}) interface{} {
    buf, err := table.Get(key)
    if err != nil {
        s.Log.Crit("Failed to get key-value", "err", err)
    }
Severity: Major
Found in poset/store.go and 2 other locations - About 1 hr to fix
app/store.go on lines 159..173
gossip/store.go on lines 193..207

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 160.

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 3 locations. Consider refactoring.
Open

func (s *Store) get(table kvdb.KeyValueStore, key []byte, to interface{}) interface{} {
    buf, err := table.Get(key)
    if err != nil {
        s.Log.Crit("Failed to get key-value", "err", err)
    }
Severity: Major
Found in gossip/store.go and 2 other locations - About 1 hr to fix
app/store.go on lines 159..173
poset/store.go on lines 141..155

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 160.

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 3 locations. Consider refactoring.
Open

func (s *Store) get(table kvdb.KeyValueStore, key []byte, to interface{}) interface{} {
    buf, err := table.Get(key)
    if err != nil {
        s.Log.Crit("Failed to get key-value", "err", err)
    }
Severity: Major
Found in app/store.go and 2 other locations - About 1 hr to fix
gossip/store.go on lines 193..207
poset/store.go on lines 141..155

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 160.

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 4 locations. Consider refactoring.
Open

func (_Contract *ContractSession) Delegations(arg0 common.Address, arg1 *big.Int) (struct {
    CreatedEpoch     *big.Int
    CreatedTime      *big.Int
    DeactivatedEpoch *big.Int
    DeactivatedTime  *big.Int
Severity: Major
Found in gossip/sfc202/contract.go and 3 other locations - About 1 hr to fix
gossip/sfc202/contract.go on lines 545..555
gossip/sfc204/contract.go on lines 539..549
gossip/sfc204/contract.go on lines 554..564

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 159.

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