mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-26 05:17:22 +00:00
b5c4dc2a75
* init-sync updates * slasher/db/kv tests * beacon-chain/rpc/beacon tests * update kv_test * beacon-chain/rpc-validator tests updated * slasher/db/kv - remove teardown method * beacon-chain/sync tests updated * beacon-chain/db/kv tests updated * beacon-chain/blockchain tests updated * beacon-chain/state/stategen tests updated * beacon-chain/powchain updates * updates rest of slasher tests * validator/db tests * rest of the tests * minor comments update * gazelle * Merge refs/heads/master into teardowndb-to-cleanup
25 lines
548 B
Go
25 lines
548 B
Go
package blockchain
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
|
|
ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
|
|
testDB "github.com/prysmaticlabs/prysm/beacon-chain/db/testing"
|
|
)
|
|
|
|
func TestVerifyCheckpointEpoch_Ok(t *testing.T) {
|
|
db := testDB.SetupDB(t)
|
|
|
|
chainService := setupBeaconChain(t, db)
|
|
chainService.genesisTime = time.Now()
|
|
|
|
if !chainService.verifyCheckpointEpoch(ðpb.Checkpoint{}) {
|
|
t.Error("Wanted true, got false")
|
|
}
|
|
|
|
if chainService.verifyCheckpointEpoch(ðpb.Checkpoint{Epoch: 1}) {
|
|
t.Error("Wanted false, got true")
|
|
}
|
|
}
|