Improve error message for FetchBlockBySha test.wq
This commit is contained in:
parent
396d1b056d
commit
670d83a74e
1 changed files with 5 additions and 5 deletions
|
@ -65,8 +65,8 @@ func testInterface(t *testing.T, dbType string) {
|
||||||
t.Errorf("FetchBlockBySha: %v", err)
|
t.Errorf("FetchBlockBySha: %v", err)
|
||||||
}
|
}
|
||||||
if !reflect.DeepEqual(block.MsgBlock(), blockFromDb.MsgBlock()) {
|
if !reflect.DeepEqual(block.MsgBlock(), blockFromDb.MsgBlock()) {
|
||||||
t.Errorf("Block from database does not match stored "+
|
t.Errorf("FetchBlockBySha: block from database does "+
|
||||||
"block\ngot: %v\nwant: %v",
|
"not match stored block\ngot: %v\nwant: %v",
|
||||||
spew.Sdump(blockFromDb.MsgBlock()),
|
spew.Sdump(blockFromDb.MsgBlock()),
|
||||||
spew.Sdump(block.MsgBlock()))
|
spew.Sdump(block.MsgBlock()))
|
||||||
return
|
return
|
||||||
|
@ -82,9 +82,9 @@ func testInterface(t *testing.T, dbType string) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !reflect.DeepEqual(blockBytes, blockFromDbBytes) {
|
if !reflect.DeepEqual(blockBytes, blockFromDbBytes) {
|
||||||
t.Errorf("Block bytes from database do not match "+
|
t.Errorf("FetchBlockBySha: block bytes from database "+
|
||||||
"stored block bytes\ngot: %v\nwant: %v",
|
"do not match stored block bytes\ngot: %v\n"+
|
||||||
spew.Sdump(blockFromDbBytes),
|
"want: %v", spew.Sdump(blockFromDbBytes),
|
||||||
spew.Sdump(blockBytes))
|
spew.Sdump(blockBytes))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue