github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/utils/unittest/staker.go (about)

     1  package unittest
     2  
     3  import (
     4  	"github.com/onflow/flow-go/model/flow"
     5  )
     6  
     7  type FixedStaker struct {
     8  	Staked bool
     9  }
    10  
    11  func NewFixedStaker(initial bool) *FixedStaker {
    12  	return &FixedStaker{
    13  		Staked: initial,
    14  	}
    15  }
    16  
    17  func (f *FixedStaker) AmIStakedAt(_ flow.Identifier) bool {
    18  	return f.Staked
    19  }