Skip to content

Commit

Permalink
Fix deepsource checks
Browse files Browse the repository at this point in the history
  • Loading branch information
dimartiro committed Aug 10, 2023
1 parent 3293693 commit b816195
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
10 changes: 4 additions & 6 deletions dot/state/storage_notify_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,11 @@ func Test_Example(t *testing.T) {

// Write both keys, but only one should be printed in the Output.
err := db.Put(aKey, aValue)
if err != nil {
log.Fatal(err)
}
require.NoError(t, err)

err = db.Put(bKey, bValue)
if err != nil {
log.Fatal(err)
}
require.NoError(t, err)

log.Printf("stopping subscription")
cancel()
log.Printf("waiting for subscription to close")
Expand Down
4 changes: 2 additions & 2 deletions dot/state/storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ func TestStorage_StoreAndLoadTrie(t *testing.T) {
trie, err := storage.LoadFromDB(root)
require.NoError(t, err)
ts2 := runtime.NewTrieState(trie)
new := ts2.Snapshot()
require.Equal(t, ts.Trie(), new)
newTrie := ts2.Snapshot()
require.Equal(t, ts.Trie(), newTrie)
}

func TestStorage_GetStorageByBlockHash(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion dot/state/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func AddBlocksToState(t *testing.T, blockState *BlockState, depth uint,
// branches are provided with a map of depth -> # of branches
func AddBlocksToStateWithFixedBranches(t *testing.T, blockState *BlockState, depth uint, branches map[uint]int) {
bestBlockHash := blockState.BestBlockHash()
tb := []testBranch{}
var tb []testBranch
arrivalTime := time.Now()

rt, err := blockState.GetRuntime(bestBlockHash)
Expand Down

0 comments on commit b816195

Please sign in to comment.