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/rpc/common/hacks.go

21 lines
517 B

package common
import (
8 months ago
"github.com/woop-chain/woop/consensus/quorum"
"github.com/woop-chain/woop/crypto/bls"
"github.com/woop-chain/woop/numeric"
)
type setRawStakeHack interface {
SetRawStake(key bls.SerializedPublicKey, d numeric.Dec)
}
// SetRawStake is a hack, return value is if was successful or not at setting
func SetRawStake(q quorum.Decider, key bls.SerializedPublicKey, d numeric.Dec) bool {
if setter, ok := q.(setRawStakeHack); ok {
setter.SetRawStake(key, d)
return true
}
return false
}