diff options
author | Sonic <sonic@dexon.org> | 2019-01-24 10:38:28 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:56 +0800 |
commit | bbb1ebede10cd691de4ef2fe4bf276d2fa357a31 (patch) | |
tree | c046b5f369c85215761d2db1e4ff890a478ceab4 /core/blockchain_test.go | |
parent | d79158954a8cea9e14311e9783de82fdbd7a8888 (diff) | |
download | dexon-bbb1ebede10cd691de4ef2fe4bf276d2fa357a31.tar dexon-bbb1ebede10cd691de4ef2fe4bf276d2fa357a31.tar.gz dexon-bbb1ebede10cd691de4ef2fe4bf276d2fa357a31.tar.bz2 dexon-bbb1ebede10cd691de4ef2fe4bf276d2fa357a31.tar.lz dexon-bbb1ebede10cd691de4ef2fe4bf276d2fa357a31.tar.xz dexon-bbb1ebede10cd691de4ef2fe4bf276d2fa357a31.tar.zst dexon-bbb1ebede10cd691de4ef2fe4bf276d2fa357a31.zip |
core, dex/downloader: polish headers verification and blocks insertion logic (#168)
Refactor GenerateDexonChain function, move governance tx logic to
the user of GenerateDexonChain (testchain_test.go) and move fake node set
code to FakeDexcon.
Diffstat (limited to 'core/blockchain_test.go')
-rw-r--r-- | core/blockchain_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/blockchain_test.go b/core/blockchain_test.go index 967d0d3c5..1f5197002 100644 --- a/core/blockchain_test.go +++ b/core/blockchain_test.go @@ -1729,7 +1729,7 @@ func TestProcessBlock(t *testing.T) { Height: processNum + 1, Data: witnessDataBytes, }) - if err == nil || !strings.Contains(err.Error(), "can not find block") { + if err != consensus.ErrWitnessMismatch { t.Fatalf("not expected fail: %v", err) } @@ -1748,7 +1748,7 @@ func TestProcessBlock(t *testing.T) { Height: processNum - 1, Data: witnessDataBytes, }) - if err == nil || !strings.Contains(err.Error(), "invalid witness block") { + if err != consensus.ErrWitnessMismatch { t.Fatalf("not expected fail: %v", err) } |