mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-26 05:17:22 +00:00
deb025f57c
* applies assertion funcs to blockchain tests * Merge branch 'master' into blockchain-apply-testutils-assertions * gofmt * Merge refs/heads/master into blockchain-apply-testutils-assertions * Merge refs/heads/master into blockchain-apply-testutils-assertions * Merge refs/heads/master into blockchain-apply-testutils-assertions * Merge refs/heads/master into blockchain-apply-testutils-assertions * Merge refs/heads/master into blockchain-apply-testutils-assertions
23 lines
652 B
Go
23 lines
652 B
Go
package blockchain
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
|
|
ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/core/helpers"
|
|
testDB "github.com/prysmaticlabs/prysm/beacon-chain/db/testing"
|
|
"github.com/prysmaticlabs/prysm/shared/testutil/assert"
|
|
)
|
|
|
|
func TestVerifyCheckpointEpoch_Ok(t *testing.T) {
|
|
helpers.ClearCache()
|
|
db, sc := testDB.SetupDB(t)
|
|
|
|
chainService := setupBeaconChain(t, db, sc)
|
|
chainService.genesisTime = time.Now()
|
|
|
|
assert.Equal(t, true, chainService.verifyCheckpointEpoch(ðpb.Checkpoint{}))
|
|
assert.Equal(t, false, chainService.verifyCheckpointEpoch(ðpb.Checkpoint{Epoch: 1}))
|
|
}
|