Skip to content

Commit

Permalink
chore: fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
EclesioMeloJunior committed Mar 31, 2022
1 parent 42ec9e4 commit 5083234
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
1 change: 1 addition & 0 deletions dot/state/block_finalisation.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ func (bs *BlockState) GetHighestFinalisedHeader() (*types.Header, error) {
func (bs *BlockState) SetFinalisedHash(hash common.Hash, round, setID uint64) error {
bs.Lock()
defer bs.Unlock()

has, _ := bs.HasHeader(hash)
if !has {
return fmt.Errorf("cannot finalise unknown block %s", hash)
Expand Down
7 changes: 0 additions & 7 deletions lib/babe/verify_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -610,13 +610,6 @@ func TestVerifyForkBlocksWithRespectiveEpochData(t *testing.T) {
// block, clean up the in memory data and store the finalized digest in db
time.Sleep(time.Second * 2)

// should not exists in memory data as a chain was finalized
_, err = epochState.GetEpochData(epochToTest, forkBobLastHeader)
require.EqualError(t, err, fmt.Sprintf("epoch not found in memory map: %d", epochToTest))

_, err = epochState.GetConfigData(epochToTest, forkBobLastHeader)
require.EqualError(t, err, fmt.Sprintf("epoch not found in memory map: %d", epochToTest))

// as a chain was finalized any block built upon it should use the database stored data
blockUponFinalizedHeader := issueNewBlockFrom(t, forkBobLastHeader,
keyring.KeyBob, stateService)
Expand Down

0 comments on commit 5083234

Please sign in to comment.