prysm-pulse/client/params/config_test.go
Raul Jordan 92af8bc351 Rename Entire Project to Repo, Change Import Paths and Readmes (#298)
Former-commit-id: b7b8bbd10777012ae6f7d30eb6b05c3b1c3ec5d3 [formerly 06e1112fa0e1092a7137186d3a386972daa2effe]
Former-commit-id: ff2bc760c9dafb6250f056606eb2cbf96b6afa5b
2018-07-20 16:31:26 -05:00

53 lines
1.5 KiB
Go

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")
}
if DefaultConfig.NotaryDeposit.Cmp(want) != 0 {
t.Errorf("Notary deposit size incorrect. Wanted %d, got %d", want, DefaultConfig.NotaryDeposit)
}
}
func TestPeriodLength(t *testing.T) {
if DefaultConfig.PeriodLength != 5 {
t.Errorf("Shard count incorrect. Wanted %d, got %d", 5, DefaultConfig.PeriodLength)
}
}
func TestNotaryLockupLength(t *testing.T) {
if DefaultConfig.NotaryLockupLength != 16128 {
t.Errorf("Shard count incorrect. Wanted %d, got %d", 16128, DefaultConfig.NotaryLockupLength)
}
}
func TestProposerLockupLength(t *testing.T) {
if DefaultConfig.ProposerLockupLength != 48 {
t.Errorf("Shard count incorrect. Wanted %d, got %d", 48, DefaultConfig.ProposerLockupLength)
}
}
func TestNotaryCommitteeSize(t *testing.T) {
if DefaultConfig.NotaryCommitteeSize != 135 {
t.Errorf("Shard count incorrect. Wanted %d, got %d", 135, DefaultConfig.NotaryCommitteeSize)
}
}
func TestNotaryQuorumSize(t *testing.T) {
if DefaultConfig.NotaryQuorumSize != 90 {
t.Errorf("Shard count incorrect. Wanted %d, got %d", 90, DefaultConfig.NotaryQuorumSize)
}
}
func TestNotaryChallengePeriod(t *testing.T) {
if DefaultConfig.NotaryChallengePeriod != 25 {
t.Errorf("Shard count incorrect. Wanted %d, got %d", 25, DefaultConfig.NotaryChallengePeriod)
}
}