diff options
author | obscuren <geffobscura@gmail.com> | 2015-01-08 23:45:51 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-01-08 23:45:51 +0800 |
commit | e27237a03a3f0ab8dce37705701ed73de252e1f4 (patch) | |
tree | 088712f259cd4149269bd6b11bd5128d11ea3b22 /core | |
parent | ee84b202473a5b629a3a2b43154edb989629ddfc (diff) | |
download | dexon-e27237a03a3f0ab8dce37705701ed73de252e1f4.tar.gz dexon-e27237a03a3f0ab8dce37705701ed73de252e1f4.tar.zst dexon-e27237a03a3f0ab8dce37705701ed73de252e1f4.zip |
Changed to use hash for comparison
DeepReflect would fail on TD since TD isn't included in the original
block and thus the test would fail.
Diffstat (limited to 'core')
-rw-r--r-- | core/chain_manager_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/chain_manager_test.go b/core/chain_manager_test.go index b384c4926..5bbc2db70 100644 --- a/core/chain_manager_test.go +++ b/core/chain_manager_test.go @@ -1,6 +1,7 @@ package core import ( + "bytes" "fmt" "os" "path" @@ -76,11 +77,11 @@ func TestChainInsertions(t *testing.T) { <-done } - if reflect.DeepEqual(chain2[len(chain2)-1], chainMan.CurrentBlock()) { + if bytes.Equal(chain2[len(chain2)-1].Hash(), chainMan.CurrentBlock().Hash()) { t.Error("chain2 is canonical and shouldn't be") } - if !reflect.DeepEqual(chain1[len(chain1)-1], chainMan.CurrentBlock()) { + if !bytes.Equal(chain1[len(chain1)-1].Hash(), chainMan.CurrentBlock().Hash()) { t.Error("chain1 isn't canonical and should be") } } |