consensus, core: drop all the legacy custom core error types

This commit is contained in:
Péter Szilágyi
2017-04-06 14:58:03 +03:00
parent 702bef8493
commit 158d603528
15 changed files with 115 additions and 261 deletions

View File

@ -327,9 +327,8 @@ func TestBadHeaderHashes(t *testing.T) {
var err error
headers := makeHeaderChainWithDiff(bc.genesisBlock, []int{1, 2, 4}, 10)
core.BadHashes[headers[2].Hash()] = true
_, err = bc.InsertHeaderChain(headers, 1)
if !core.IsBadHashError(err) {
t.Errorf("error mismatch: want: BadHashError, have: %v", err)
if _, err = bc.InsertHeaderChain(headers, 1); err != core.ErrBlacklistedHash {
t.Errorf("error mismatch: have: %v, want %v", err, core.ErrBlacklistedHash)
}
}