瀏覽代碼

fixed other tests to use hashes as well

obscuren 10 年之前
父節點
當前提交
5f958a582d
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      core/chain_manager_test.go

+ 1 - 2
core/chain_manager_test.go

@@ -5,7 +5,6 @@ import (
 	"fmt"
 	"os"
 	"path"
-	"reflect"
 	"runtime"
 	"strconv"
 	"testing"
@@ -125,7 +124,7 @@ func TestChainMultipleInsertions(t *testing.T) {
 		<-done
 	}
 
-	if !reflect.DeepEqual(chains[longest][len(chains[longest])-1], chainMan.CurrentBlock()) {
+	if !bytes.Equal(chains[longest][len(chains[longest])-1].Hash(), chainMan.CurrentBlock().Hash()) {
 		t.Error("Invalid canonical chain")
 	}
 }