2018-06-12 23:03:20 +00:00
|
|
|
package params
|
|
|
|
|
|
|
|
import (
|
|
|
|
"math/big"
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestNotaryDeposit(t *testing.T) {
|
|
|
|
want, err := new(big.Int).SetString("1000000000000000000000", 10) // 1000 ETH
|
|
|
|
if !err {
|
|
|
|
t.Fatalf("Failed to setup test")
|
|
|
|
}
|
2018-06-13 17:37:23 +00:00
|
|
|
if DefaultConfig.NotaryDeposit.Cmp(want) != 0 {
|
|
|
|
t.Errorf("Notary deposit size incorrect. Wanted %d, got %d", want, DefaultConfig.NotaryDeposit)
|
2018-06-12 23:03:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestPeriodLength(t *testing.T) {
|
2018-06-13 17:37:23 +00:00
|
|
|
if DefaultConfig.PeriodLength != 5 {
|
|
|
|
t.Errorf("Shard count incorrect. Wanted %d, got %d", 5, DefaultConfig.PeriodLength)
|
2018-06-12 23:03:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestNotaryLockupLength(t *testing.T) {
|
2018-06-13 17:37:23 +00:00
|
|
|
if DefaultConfig.NotaryLockupLength != 16128 {
|
|
|
|
t.Errorf("Shard count incorrect. Wanted %d, got %d", 16128, DefaultConfig.NotaryLockupLength)
|
2018-06-12 23:03:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestProposerLockupLength(t *testing.T) {
|
2018-06-13 17:37:23 +00:00
|
|
|
if DefaultConfig.ProposerLockupLength != 48 {
|
|
|
|
t.Errorf("Shard count incorrect. Wanted %d, got %d", 48, DefaultConfig.ProposerLockupLength)
|
2018-06-12 23:03:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestNotaryCommitteeSize(t *testing.T) {
|
2018-06-13 17:37:23 +00:00
|
|
|
if DefaultConfig.NotaryCommitteeSize != 135 {
|
|
|
|
t.Errorf("Shard count incorrect. Wanted %d, got %d", 135, DefaultConfig.NotaryCommitteeSize)
|
2018-06-12 23:03:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestNotaryQuorumSize(t *testing.T) {
|
2018-06-13 17:37:23 +00:00
|
|
|
if DefaultConfig.NotaryQuorumSize != 90 {
|
|
|
|
t.Errorf("Shard count incorrect. Wanted %d, got %d", 90, DefaultConfig.NotaryQuorumSize)
|
2018-06-12 23:03:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestNotaryChallengePeriod(t *testing.T) {
|
2018-06-13 17:37:23 +00:00
|
|
|
if DefaultConfig.NotaryChallengePeriod != 25 {
|
|
|
|
t.Errorf("Shard count incorrect. Wanted %d, got %d", 25, DefaultConfig.NotaryChallengePeriod)
|
2018-06-12 23:03:20 +00:00
|
|
|
}
|
|
|
|
}
|