Add negative test for duplicate block.

This commit adds tests for the error path when processing a block that is
already in the main chain.
This commit is contained in:
Dave Collins 2013-07-22 01:06:53 -05:00
parent d6d2b15901
commit f3e542ff92

View file

@ -44,9 +44,9 @@ github.com/conformal/btcchain/validate.go checkTransactionInputs 63.64% (28/
github.com/conformal/btcchain/validate.go checkTransactionSanity 62.16% (23/37)
github.com/conformal/btcchain/txlookup.go connectTransactions 60.00% (9/15)
github.com/conformal/btcchain/validate.go isBIP0030Node 60.00% (3/5)
github.com/conformal/btcchain/process.go BlockChain.ProcessBlock 59.09% (26/44)
github.com/conformal/btcchain/validate.go BlockChain.checkBIP0030 57.14% (8/14)
github.com/conformal/btcchain/validate.go checkProofOfWork 56.25% (9/16)
github.com/conformal/btcchain/process.go BlockChain.ProcessBlock 54.55% (24/44)
github.com/conformal/btcchain/chain.go BlockChain.loadBlockNode 50.00% (11/22)
github.com/conformal/btcchain/notifications.go BlockChain.sendNotification 50.00% (2/4)
github.com/conformal/btcchain/checkpoints.go BlockChain.LatestCheckpoint 50.00% (2/4)
@ -73,5 +73,5 @@ github.com/conformal/btcchain/chain.go BlockChain.DisableVerify 0.00% (0/1)
github.com/conformal/btcchain/log.go logClosure.String 0.00% (0/1)
github.com/conformal/btcchain/process.go RuleError.Error 0.00% (0/1)
github.com/conformal/btcchain/log.go newLogClosure 0.00% (0/1)
github.com/conformal/btcchain ------------------------------------- 59.02% (569/964)
github.com/conformal/btcchain ------------------------------------- 59.23% (571/964)