prysm-pulse/sharding/config_test.go
Raul Jordan b6ec6d8b23 sharding: update comments across packages for punctuation
Former-commit-id: ab617ef43f369476a4ca863e9ab6f732cec9ed7e [formerly 221795c5c6f43cf0550cdf9ba37345e09e91f47d]
Former-commit-id: 6462269b88180c6f09dc3c633e4104c3cf8efb4d
2018-05-02 20:16:07 -05:00

47 lines
1.2 KiB
Go

package sharding
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 NotaryDeposit.Cmp(want) != 0 {
t.Errorf("Notary deposit size incorrect. Wanted %d, got %d", want, NotaryDeposit)
}
}
func TestProposerDeposit(t *testing.T) {
want, err := new(big.Int).SetString("1000000000000000000", 10) // 1 ETH.
if !err {
t.Fatalf("Failed to setup test")
}
if ProposerDeposit.Cmp(want) != 0 {
t.Errorf("Proposer deposit size incorrect. Wanted %d, got %d", want, ProposerDeposit)
}
}
func TestMinProposerBalance(t *testing.T) {
want, err := new(big.Int).SetString("100000000000000000", 10) // 0.1 ETH.
if !err {
t.Fatalf("Failed to setup test")
}
if MinProposerBalance.Cmp(want) != 0 {
t.Errorf("Min proposer balance incorrect. Wanted %d, got %d", want, MinProposerBalance)
}
}
func TestNotarySubsidy(t *testing.T) {
want, err := new(big.Int).SetString("1000000000000000", 10) // 0.001 ETH.
if !err {
t.Fatalf("Failed to setup test")
}
if NotarySubsidy.Cmp(want) != 0 {
t.Errorf("Notary subsidy size incorrect. Wanted %d, got %d", want, NotarySubsidy)
}
}