3226 Commits

Author SHA1 Message Date
Svarog
418805aed3 [DEV-314] improved txscript coverage (#137)
* [DEV-314] Added tests for DisasmPC and DisasmScript

* [DEV-314] Re-wrote TestCheckErrorCondition to cover the whole method

* [DEV-314] Fixed error message
2018-12-30 18:16:41 +02:00
Evgeny Khirin
6d035fce29 [DEV-325] Add SubNetwork command-line and config flag (#135)
* [DEV-325] Added subnetwork cmd/config flag

* [DEV-325] Fixed subnetwork comments
2018-12-30 11:25:43 +02:00
Ori Newman
4a6fd8fad1 [DEV-320] add decoupling related fields to wire tx (#134)
* [DEV-320] Add decoupling-related fields to wire.Tx

* [DEV-320] Fix SerializeSize for MsgTx

* [DEV-320] Fix indexers test

* [DEV-320] Fix utils test

* [DEV-320] Fix ffldb tests

* [DEV-320] Fix mining tests

* [DEV-320] fix txsort tests

* [DEV-320] change default subnetwork id to 1 and remove payload for default subnetwork id

* [DEV-320] Add msgtx serialization tests

* [DEV-320] get rid of temp prints, and change error messages
2018-12-27 17:43:25 +02:00
Mike Zak
fa8002a644 Added DAGLabs to license file 2018-12-27 13:31:52 +02:00
Evgeny Khirin
a45c01f9ab [DEV-323] fix one off bug in sign rfc6979 (#133) 2018-12-26 14:25:21 +02:00
Evgeny Khirin
4f1b8c1248 [DEV-315] Added test for mempool.HandleNewBlock (#129)
* [DEV-315] Added test for mempool.HandleNewBlock

* [DEV-315] Styling improvements

* [DEV-315] Changed names of blockTx variables
2018-12-26 13:17:07 +02:00
Evgeny Khirin
bcd66a43df [DEV-321] btcec/signature: fix DoS bug with signature parsing (#132)
* [DEV-321] btcec/signature: fix DoS bug with signature parsing

* [DEV-321] Added test for short signature
2018-12-26 12:40:28 +02:00
Evgeny Khirin
ca084f595e [DEV-322] Backport btcsuite/btcd PR: connmanager: check Addr for nil (#131)
* [DEV-322] connmanager: check Addr for nil

* [DEV-322] Added crash recovering in TestConnReqString

* [DEV-322] Fixed 'go vet' errors
2018-12-26 12:38:10 +02:00
Mike Zak
c45cef0ffe Typo fixes in comments 2018-12-24 16:19:51 +02:00
Ori Newman
ef01f6410d [DEV-301] implement blockNode.chainHeight as the height of the selectedParent chain
* [DEV-301] implement blockNode.chainHeight as the height of the selected parent chain

* [DEV-301] add description to TestChainHeight

* [DEV-301] Delete comment on TestChainHeight and expalain about the dag
2018-12-23 16:54:45 +02:00
Mike Zak
b522d6934d Added coverage.txt to .gitignore 2018-12-20 18:45:52 +02:00
Ori Newman
45c212deb4 [DEV-257] Include transaction acceptance status in getBlock RPC call (#123)
* [DEV-257] Include transaction acceptance status in getBlock RPC call

* [DEV-257] change txRawResult-accepted to camel case

* [DEV-257] gofmt

* [DEV-257] change getBlock-acceptedtx help entry to getBlock-acceptedTx

* [DEV-257] delete TxRawResult.accepted and instead create TxRawResult.acceptedBy
2018-11-08 13:19:53 +02:00
Svarog
225f349e6a [DEV-81] 100% Database Coverage (#110)
* [DEV-81] Overwrite maxOpenFiles for testInterface to force tests to check the LRU-mechanism in openFile

* [DEV-81] Added database.UseLogger test

* [DEV-81] Completed coverage of reconcileDB()

* [DEV-81] Added some tests for dbcache

* [DEV-81] Moved init and UseLogger to separate file to make them more easily-testable + added tests

* [DEV-81] Added tests for deleteFile

* [DEV-81] Added tests to cursor.Delete + made sure it returns error when transaction is not writable

* [DEV-81] Moved database/error_test.go from database_test package to database package + added test for IsErrorCode

* [DEV-81] Added tests for handleRollback error-cases

* [DEV-81] Added tests for cursor.skipPendingUpdates

* [DEV-81] Added tests for various cursor edge-cases

* [DEV-81] tx.putKey no longer returns error, because there is no case when it does

* [DEV-81] Added tests to CreateBucket error cases

* [DEV-81] Added tests to bucket.Get and .Delete error cases + .Delete now returns error on empty key

* [DEV-81] Added test for ForEachBucket

* [DEV-81] Added tests to StoreBlock

* [DEV-81] Added test for deleting a double nested bucket

* [DEV-81] Removed log_test, as it is no longer necessary with the logging system re-design

* [DEV-81] Added test to some of writePendingAndCommit error-cases

* [DEV-81] Update references from btcutil to btcd/util

* [DEV-81] Add tests for dbCacheIterator{.Next(), .Prev(), .Key, .Value()} in cases when iterator is exhausted

* [DEV-81] Added tests for ldbIterator placeholder functions

* [DEV-81] Added test name to Error messsages in TestSkipPendingUpdates

* [DEV-81] Begin writing TestSkipPendingUpdatesCache

* [DEV-81] Added error-cases for DBCache.flush() and DBCache.commitTreaps()

* [DEV-81] Use monkey.patch from bou.ke and not from github

* [DEV-81] Rewrote IsErrorCode in both database and txscript packages to be more concise

* [DEV-81] Rename any database.Tx to dbTx instead of tx - to remove confusion with coin Tx

* [DEV-81] Fix typo

* [DEV-81] Use os.TempDir() instead of /tmp/ to be cross-platform

* [DEV-81] use SimNet for database tests + Error if testDB exists after deleting it

* [DEV-81] Removed useLogger - it's redundant

* [DEV-81] Added comment on how CRC32 checksums are calculated in reconcile_test.go

* [DEV-81] Added comment that explains what setWriteRow does

* [DEV-81] Use constant instead of hard-coded value

* [DEV-81] Fixed some typo's + better formatting
2018-11-06 18:18:42 +02:00
Mike Zak
60afa37acf Update dockerfile to go 1.11 2018-11-06 15:51:40 +02:00
Mike Zak
46ac9a6320 Gofmt fixes 2018-11-06 15:45:00 +02:00
Ori Newman
d68877ce7b [DEV-269] Remove NumParentBlocks from master (#124) 2018-11-06 13:08:15 +02:00
Ori Newman
05d46e7c01 [DEV-244] Remove BlockHeader.NumParentBlocks and use a method instead (#121) 2018-11-06 11:26:59 +02:00
stasatdaglabs
8a234bf4a3 [DEV-242] Parameter names should be also camelCase in JSON-RPC (#118)
* [DEV-242] Modified some help functionality to convert to lowercase camel case instead of just lowercase.

* [DEV-242] Corrected help functionality for struct field names.

* [DEV-242] Corrected help functionality for struct names.

* [DEV-242] Cleaned up toLowercaseCamelCase.

* [DEV-242] Renamed toLowercaseCamelCase to toCamelCase.

* [DEV-242] Converted the rest of the stuff in rpcserverhelp.go to camelCase. Fixed a bug in the camelCase converter.

* [DEV-242] camelCase-ified the last few RPC parameter names.

* [DEV-242] Fixed an off-by-one bug in toCamelCase.

* [DEV-242] Changed back from "jsonRpc" to "jsonrpc".

* [DEV-242] Moved toCamelCase into utils, wrote unit tests for it, and fixed an off-by-one bug.

* [DEV-242] Re-exported DefaultHomeDir because it's required in windows_service.go.

* [DEV-242] Added a comment above DefaultHomeDir to satisfy golint.

* [DEV-242] Formatted config/config.go.
2018-11-05 18:50:55 +02:00
Ori Newman
7093155c3a [DEV-234] Add to txindex method to return the block in which tx was accepted (or indication it was not accepted) (#116)
* [DEV-234] add TxAcceptedInBlock and TxBlocks

* [DEV-234] test TxAcceptedInBlock and TxBlocks

* [DEV-234] test TxAcceptedInBlock and TxFirstBlockRegion

* [DEV-234] rename selectedPathSet to selectedPathChain

* [DEV-234] set indexers db as part of index manager initialization

* [DEV-234] remove redudant dag instance in txindex

* [DEV-234] fix TestTxIndexConnectBlock and add DAGParams as part of config in DAGSetup

* [DEV-234] TestTxIndexConnectBlock make K=1 to make calculations easier

* [DEV-234] rename TxAcceptingBlock to BlockThatAcceptedTx

* [DEV-234] update block fields names in txindex_test.go

* [DEV-234] rename selectedPathChain -> selectedPathChainSet
2018-11-05 16:11:54 +02:00
Svarog
4c2ce469aa [DEV-265] Fixed dockerfile to actually run golint and gofmt + fix gofmt errors (#122) 2018-11-05 14:29:33 +02:00
Ori Newman
9519b9f2a1 [DEV-211] Change fields of serialized blocks and transactions to match spec (#104)
* [DEV-211] change block fields

* [DEV-211] change block fields

* [DEV-211] change comments to adhere to the new block field names
2018-11-05 13:11:42 +02:00
Ori Newman
d70e2be641 [DEV-236] add counter to blockdag that will increment for each valid … (#115)
* [DEV-236] add counter to blockdag that will increment for each valid block that is connected to the dag

* [DEV-236] increment dag.blockCount while building block index in initDagState

* [DEV-236] changed dag.BlockCount to return an unsigned value
2018-11-05 12:58:37 +02:00
Svarog
35546b62d0
[DEV-240] Style fixes to satisfy golint (#112)
* [DEV-240] Unexport BlockDAG/SelectedTip, since it returns unexported *blockNode

* [DEV-240] Fix blockdag package comment to satisfy golint

* [DEV-240] Add comment explaining blank import of ffldb in blockdag/test_utils.go

* [DEV-240] Add comment to FullUTXOSet.Get

* [DEV-240] Unexported config.DefaultHomeDir

* [DEV-240] Remove blank import of ffldb from config/config.go

* [DEV-240] Added comment to daghash.Strings()

* [DEV-240] Added missing comments in hdkeychain/extendedkey.go

* [DEV-240] Re-activate goline in CI Dockerfile

* [DEV-240] Fixed some typos in comments

* [DEV-240] Typo fix in comment
2018-11-05 12:58:17 +02:00
Ori Newman
78e8c6084c [DEV-238] Remove addrlocal from getPeerInfo RPC call (#117) 2018-11-04 10:09:39 +02:00
Svarog
8721f0d03f [DEV-253] Remove dependancy on github.com/pkg/errors (#113) 2018-11-01 14:45:59 +02:00
Ori Newman
4951c0bee0 [DEV-260] Don't update parents on initBlockNode (#114)
* [DEV-260] Don't update parents on initBlockNode

* [DEV-260] move addNodeAsChildToParents to blockdag/common_test.go

* [DEV-260] update newProvisionalNode comment
2018-11-01 14:43:38 +02:00
Ori Newman
3ebded9ae7 [DEV-255] create checkConnectToPastUTXO and move the required functionalities to it from checkConnectBlock1)
* [DEV-255] create checkConnectToPastUTXO and move the required functionalities to it from checkConnectBlock

* [DEV-255] get rid of checkConnectBlock

* [DEV-255] rename pNode -> node

* [DEV-255] add comment to describe ErrWithDiff
2018-10-29 17:58:09 +02:00
Ori Newman
3ff2ef19e4 [DEV-254] Defer any monkey unpatching (#109) 2018-10-29 12:16:58 +02:00
stasatdaglabs
3ace16ad23 [DEV-134] Implement Continuous Integration (#105)
* [DEV-134] Implement Continuous Integration

Squashed commit:

[5e41d830] Dev 223 fix txindex (#100)

* [DEV-201] In handleGetBlockDAGInfo calculate difficulty by the tip with the lowest bits

* [DEV-202] Move VirtualBlock.GetUTXOEntry to BlockDAG

* [DEV-203] Move VirtualBlock.SelectedTip() to BlockDAG

* [DEV-203] Move VirtualBlock.SelectedTip() to BlockDAG

* [DEV-204] Unexport VirtualBlock() and add CalcMedianTime method for DAG

* [DEV-204] add explanation about difficulty in CurrentBits() comment

* [DEV-204] unexport VirtualBlock type

* [DEV-223] make applyUTXOChanges return pastUTXOResults

* [DEV-223] add bluestxdata for current block as well

* [DEV-223] re-design tx index

* [DEV-223] edit txindex comments

* [DEV-223] rename BluesTxData -> AcceptedTxData, and return from applyUTXOChanges only transactions that got accepted

* [DEV-223] add unit test for txindex

* [DEV-223] fix comments and unite blueTransaction and AcceptedTxData to one type

* [DEV-223] use bucket cursor for dbFetchFirstTxRegion

* [DEV-223] use the same cursor instance for dbFetchFirstTxRegion

* [DEV-223] write in dbFetchFirstTxRegion's comment that it returns the first block region

* [DEV-223] rename type BlueBlockTransaction to TxWithBlockHash

* [DEV-223] add named returned value for applyUTXOChanges

[4c95e293] [DEV-134] Made golint ignore the vendor directory.

[21736dbc] [DEV-134] Renamed ExampleBlockChain_ProcessBlock to ExampleBlockDAG_ProcessBlock to satisfy go vet.

[beea6486] [DEV-134] Removed pushing the built docker to a remove repository. That's unnecessary at this stage.

[bee911ed] [DEV-134] Made all precompilation checks run on everything instead of only the root dir.

[585f92ae] [DEV-134] Added "github.com/pkg/errors" to dep.

[5f02f570] [DEV-134] -vendor-only is written with only one hyphen.

[3eee7f95] [DEV-134] go vet instead of go tool vet.

[0c2d4343] [DEV-134] Split all the pre-compile checks to separate lines to be able to tell which of them is failing.

[780519c8] [DEV-134] Ran gofmt on everything.

[8247146b] Dev 223 fix txindex (#100)

* [DEV-201] In handleGetBlockDAGInfo calculate difficulty by the tip with the lowest bits

* [DEV-202] Move VirtualBlock.GetUTXOEntry to BlockDAG

* [DEV-203] Move VirtualBlock.SelectedTip() to BlockDAG

* [DEV-203] Move VirtualBlock.SelectedTip() to BlockDAG

* [DEV-204] Unexport VirtualBlock() and add CalcMedianTime method for DAG

* [DEV-204] add explanation about difficulty in CurrentBits() comment

* [DEV-204] unexport VirtualBlock type

* [DEV-223] make applyUTXOChanges return pastUTXOResults

* [DEV-223] add bluestxdata for current block as well

* [DEV-223] re-design tx index

* [DEV-223] edit txindex comments

* [DEV-223] rename BluesTxData -> AcceptedTxData, and return from applyUTXOChanges only transactions that got accepted

* [DEV-223] add unit test for txindex

* [DEV-223] fix comments and unite blueTransaction and AcceptedTxData to one type

* [DEV-223] use bucket cursor for dbFetchFirstTxRegion

* [DEV-223] use the same cursor instance for dbFetchFirstTxRegion

* [DEV-223] write in dbFetchFirstTxRegion's comment that it returns the first block region

* [DEV-223] rename type BlueBlockTransaction to TxWithBlockHash

* [DEV-223] add named returned value for applyUTXOChanges

[bff68aa3] [DEV-134] Gave executable permission to deploy.sh

[638a99d9] [DEV-134] Added jenkinsfile and deploy script.

* [DEV-134] Added a robust testing script.

* [DEV-134] Fixed a bash-ism.

* [DEV-134] Disabled testing with coverage for now.

* [DEV-134] Disabled golint and removed removing debug symbols.

* [DEV-134] Disabled aligncheck.

* [DEV-134] Disabled structcheck and varcheck.

* [DEV-134] Added "don't inline functions" to compiler flags for testing.

* [DEV-134] Made build fail if gofmt prints out anything.

* [DEV-134] Fixed misleading comment.

* [DEV-134] Added comments to test.sh.

* [DEV-134] Renamed tm to measure_runtime and removed do_ prefixes from functions.

* [DEV-134] Fixed gofmt line in build script.

* [DEV-134] Fixed gofmt some more.

* [DEV-134]  Fixed gofmt not actually failing due to logical or.
2018-10-25 18:58:41 +03:00
Ori Newman
c4a541d093 [DEV-91] Increase mempool test coverage part 2 (#107)
* [DEV-91] add TestAddrIndex

* [DEV-91] add TestFeeEstimator

* [DEV-91] rename TestFeeEstimator -> TestFeeEstimatorCfg

* [DEV-91] added TestCount

* [DEV-91] add TestExtractRejectCode in mempool_test.go

* [DEV-91] get rid of fakeErr type and defer unpatching monkey patch

* [DEV-91] use the result of monkey.patch to unpatch
2018-10-25 18:13:02 +03:00
Evgeny Khirin
499adbf046 DEV-222: Changed type of TxOut.Value and util.Amount to uin64 (#108)
* [DEV-222] Changed type of TxOut.Value and util.Amount to uin64

* [DEV-222] Replaced math.MaxUint64 with 0

* [DEV-222] Fixed comment to reflect uint64 instead of int64

* [DEV-222] Fixed overflow comment
2018-10-24 16:29:50 +03:00
stasatdaglabs
ac01babfb1 [DEV-213] Converted all RPC commands to lowercaseCamelCase. (#106) 2018-10-23 12:24:57 +03:00
Ori Newman
5e41d83015
Dev 223 fix txindex (#100)
* [DEV-201] In handleGetBlockDAGInfo calculate difficulty by the tip with the lowest bits

* [DEV-202] Move VirtualBlock.GetUTXOEntry to BlockDAG

* [DEV-203] Move VirtualBlock.SelectedTip() to BlockDAG

* [DEV-203] Move VirtualBlock.SelectedTip() to BlockDAG

* [DEV-204] Unexport VirtualBlock() and add CalcMedianTime method for DAG

* [DEV-204] add explanation about difficulty in CurrentBits() comment

* [DEV-204] unexport VirtualBlock type

* [DEV-223] make applyUTXOChanges return pastUTXOResults

* [DEV-223] add bluestxdata for current block as well

* [DEV-223] re-design tx index

* [DEV-223] edit txindex comments

* [DEV-223] rename BluesTxData -> AcceptedTxData, and return from applyUTXOChanges only transactions that got accepted

* [DEV-223] add unit test for txindex

* [DEV-223] fix comments and unite blueTransaction and AcceptedTxData to one type

* [DEV-223] use bucket cursor for dbFetchFirstTxRegion

* [DEV-223] use the same cursor instance for dbFetchFirstTxRegion

* [DEV-223] write in dbFetchFirstTxRegion's comment that it returns the first block region

* [DEV-223] rename type BlueBlockTransaction to TxWithBlockHash

* [DEV-223] add named returned value for applyUTXOChanges
2018-10-21 16:01:22 +03:00
stasatdaglabs
d5787954ee
[DEV-167] Create full docker-based environment for client team testing (#78)
* [DEV-167] Created Dockerfile, dockerignore, and docker-compose.

* [DEV-167] Updated docker-compose to use remote image.

* [DEV-167] Added --addrindex to docker-compose.

* [DEV-167] Switched to testnet and plugged in the correct address.

* [DEV-167] Removed the third and fourth nodes from docker-compose.

* [DEV-167] Exposed RPC port, added rpcuser and rpcpass.

* [DEV-167] Wrangled RPC stuff into shape. Moved docker stuff into btcd/docker.

* [DEV-167] Moved dockerignore back to root. Corrected path for rpc.cert and rpc.key.

* [DEV-167] Added Jenkins job stuff.

* [DEV-167] Added deploy.sh.

* [DEV-167] Removed .travis.yaml and a couple of files that shouldn't be in this branch.
2018-10-18 11:49:11 +03:00
Ori Newman
201d7e0207 [DEV-226] Fix sorting of hashes in blockset.hashes() (#98)
* [DEV-226] Fix sorting of hashes in blockset.hashes()

* [DEV-226] add TestHashes
2018-10-17 15:35:56 +03:00
Ori Newman
3deaea6c15 [DEV-224] Fix getblockcount RPC command to show real data (#97)
* [DEV-224] Fix getblockcount RPC command to show real data

* [DEV-227] provisionalNode.commit() should not update the original parents if the provisionalNode was created with withRelatives=false

* [DEV-224] remove debug info from TestBlockCount and BlockDAG.BlockCount()
2018-10-17 15:34:10 +03:00
Ori Newman
85d221f322 [DEV-227] provisionalNode.commit() should not update the original parents if the provisionalNode was created with withRelatives=false (#96) 2018-10-17 11:41:36 +03:00
Ori Newman
9ea9098fbc [DEV-204] Unexport VirtualBlock (#93)
* [DEV-201] In handleGetBlockDAGInfo calculate difficulty by the tip with the lowest bits

* [DEV-202] Move VirtualBlock.GetUTXOEntry to BlockDAG

* [DEV-203] Move VirtualBlock.SelectedTip() to BlockDAG

* [DEV-203] Move VirtualBlock.SelectedTip() to BlockDAG

* [DEV-204] Unexport VirtualBlock() and add CalcMedianTime method for DAG

* [DEV-204] add explanation about difficulty in CurrentBits() comment

* [DEV-204] unexport VirtualBlock type
2018-10-16 15:21:18 +03:00
Ori Newman
c3316715ae
[DEV-225] Always maintain a block set of selected parents chain. (#99)
* [DEV-225] Always maintain a block set of selected parents chain.

* [DEV-225] Add comments

* [DEV-225] remove oldSelectedParent != nil condition

* [DEV-225] move updating selected path logic to updateSelectedPathSet

* [DEV-225] fix typo in comment
2018-10-16 12:12:24 +03:00
Ori Newman
29a7d66d81 [DEV-219] Remove testnet and mainnet checkpoints (#94)
* [DEV-219] remove testnet checkpoints

* [DEV-219] remove mainnet checkpoints
2018-10-15 17:00:40 +03:00
Ori Newman
0bb2030200 [DEV-220] Fix NTBlockAccepted bug (#95) 2018-10-15 16:52:19 +03:00
Ori Newman
65788d4dc0 [DEV-200] convert nonce to uint64 (#90) 2018-10-15 15:17:41 +03:00
Ori Newman
695c0e5a68 [DEV-206] allow block timestamp to be equal to past median time (#89)
* [DEV-206] allow block timestamp to be equal to past median time

* [DEV-206] make more specific error messages

* [DEV-206] make independent nodes in TestPastMedianTime
2018-10-14 15:33:36 +03:00
Ori Newman
b0aaa79ad0 [DEV-195] Implement addmanualnode, getallmanualnodesinfo, getmanualnodeinfo and removemanualnode RPC-API calls (#87)
* [DEV-195] Implement addmanualnode, getallmanualnodesinfo, getmanualnodeinfo and removemanualnode RPC-API calls

* [DEV-195] fix wrong types for handleRemoveManualNode and handleGetManualNodeInfo

* [DEV-195] fix addednode terminology to manualnode

* [DEV-195] add default values to details and onetry

* [DEV-195] fix comments
2018-10-11 12:38:54 +03:00
Ori Newman
bb10f8484c [DEV-199] Apply the minimum-if-policy for all transactions (#88)
* [DEV-199] apply minimum if

* [DEV-199] refactor popIfBool

* [DEV-199] use popIfBool in OP_NOTIF
2018-10-11 11:21:14 +03:00
Ori Newman
030469f035 [DEV-149] Add test case for CVE-2018-17144 (Bitcoin DoS/Double Spend bug) (#77)
* [DEV-149] Add test case for CVE-2018-17144 (Bitcoin DoS/Double Spend bug)

* [DEV-149] change t.Errorf + return to t.Fatalf

* [DEV-149] fix malformed blocks

* [DEV-149] change test blocks to use simnet genesis
2018-10-09 15:40:00 +03:00
Svarog
45e0e6707b
[DEV-192] write 0 into indexesBucket when creating indexers to make mark indexer as initialized (#86) 2018-10-08 18:13:33 +03:00
Mike Zak
faf5efa455 [DEV-189] Fixed blockSet.highest() case when highest==nil 2018-10-08 18:03:58 +03:00
Ori Newman
ab7d9f2fa7 [DEV-170] Get rid of utxo collection functions (#79) 2018-10-08 15:51:20 +03:00
stasatdaglabs
6b302dad7c
[DEV-92] Ensure 100% coverage in blockdag package (#71)
* [DEV-92] Covered lookupPreviousNodes in tests.

* [DEV-92] Covered accept.go in tests.

* [DEV-92] Fixed a typo.

* [DEV-92] Covered blockindex.go in tests.

* [DEV-92] Replaced Errorf + return with Errorf. Added the test case to the error messages.

* [DEV-92] Fixed grammar in a comment.

* [DEV-92] Split casting error checking and ErrorCode checking into separate tests.

* [DEV-92] Improved errors.

* [DEV-92] Made errors a tiny bit more descriptive.
2018-10-08 13:02:15 +03:00