mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-04 00:44:27 +00:00
f5e3c1c6b9
Former-commit-id: bd55dd6746c11c47f8744ca3b2e59c04ad07bb0f [formerly c9b46314489a2e53df4926557fe80075a89ec4e3] Former-commit-id: 149bf1150a922005b33cb91b622aaef05569f160
47 lines
1.2 KiB
Go
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)
|
|
}
|
|
}
|