The core protocol of WoopChain
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.
woop/internal/hmyapi/common/hacks.go

21 lines
514 B

package common
import (
"github.com/harmony-one/harmony/consensus/quorum"
"github.com/harmony-one/harmony/numeric"
"github.com/harmony-one/harmony/shard"
)
type setRawStakeHack interface {
SetRawStake(key shard.BLSPublicKey, d numeric.Dec)
}
// SetRawStake is a hack, return value is if was successful or not at setting
func SetRawStake(q quorum.Decider, key shard.BLSPublicKey, d numeric.Dec) bool {
if setter, ok := q.(setRawStakeHack); ok {
setter.SetRawStake(key, d)
return true
}
return false
}