You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
529 B
21 lines
529 B
5 years ago
|
package common
|
||
|
|
||
|
import (
|
||
|
"github.com/harmony-one/harmony/consensus/quorum"
|
||
4 years ago
|
"github.com/harmony-one/harmony/crypto/bls"
|
||
5 years ago
|
"github.com/harmony-one/harmony/numeric"
|
||
|
)
|
||
|
|
||
|
type setRawStakeHack interface {
|
||
4 years ago
|
SetRawStake(key bls.SerializedPublicKey, d numeric.Dec)
|
||
5 years ago
|
}
|
||
|
|
||
|
// SetRawStake is a hack, return value is if was successful or not at setting
|
||
4 years ago
|
func SetRawStake(q quorum.Decider, key bls.SerializedPublicKey, d numeric.Dec) bool {
|
||
5 years ago
|
if setter, ok := q.(setRawStakeHack); ok {
|
||
|
setter.SetRawStake(key, d)
|
||
|
return true
|
||
|
}
|
||
|
return false
|
||
|
}
|