mirror of
https://github.com/kaspanet/kaspad.git
synced 2026-02-16 00:23:56 +00:00
[NOD-1521] use staticcheck (#1015)
* [NOD-1521] Use static check as part of jenkins to check for swallowed errors * [NOD-1521] added staticcheck installation * [NOD-1521] Fix static check errors Co-authored-by: Ori Newman <orinewman1@gmail.com>
This commit is contained in:
@@ -81,7 +81,7 @@ func TestLevelDBTransactionSanity(t *testing.T) {
|
||||
|
||||
// Get from the key previously put to. Since the tx is not
|
||||
// yet committed, this should return ErrNotFound.
|
||||
getData, err := ldb.Get(key)
|
||||
_, err = ldb.Get(key)
|
||||
if err == nil {
|
||||
t.Fatalf("TestLevelDBTransactionSanity: Get " +
|
||||
"unexpectedly succeeded")
|
||||
@@ -100,7 +100,7 @@ func TestLevelDBTransactionSanity(t *testing.T) {
|
||||
|
||||
// Get from the key previously put to. Now that the tx was
|
||||
// committed, this should succeed.
|
||||
getData, err = ldb.Get(key)
|
||||
getData, err := ldb.Get(key)
|
||||
if err != nil {
|
||||
t.Fatalf("TestLevelDBTransactionSanity: Get "+
|
||||
"returned unexpected error: %s", err)
|
||||
|
||||
Reference in New Issue
Block a user