Commit graph

19 commits

Author SHA1 Message Date
Amiti Uttarwar
04da9f4834 [RPC] Update getrawtransaction interface 2019-01-26 18:36:53 -08:00
MarcoFalke
fa3e5786d0
scripted-diff: Remove unused 'split' parameter to setup_network
-BEGIN VERIFY SCRIPT-
sed -i -e 's/, split=False//g' $(git grep -l 'def setup_network')
-END VERIFY SCRIPT-
2018-12-22 17:20:52 +01:00
MarcoFalke
fa4c8679ed
rpc: Avoid creating non-standard raw transactions 2018-12-06 16:56:58 -05:00
MarcoFalke
37612099ec
Merge #13424: Consistently validate txid / blockhash length and encoding in rpc calls
5eb20f81d9 Consistently use ParseHashV to validate hash inputs in rpc (Ben Woosley)

Pull request description:

  ParseHashV validates the length and encoding of the string and throws
  an informative RPC error on failure, which is as good or better than
  these alternative calls.

  Note I switched ParseHashV to check string length first, because
  IsHex tests that the length is even, and an error like:
  "must be of length 64 (not 63, for X)" is much more informative than
  "must be hexadecimal string (not X)" in that case.

  Split from #13420

Tree-SHA512: f0786b41c0d7793ff76e4b2bb35547873070bbf7561d510029e8edb93f59176277efcd4d183b3185532ea69fc0bbbf3dbe9e19362e8017007ae9d51266cd78ae
2018-09-24 15:09:11 -04:00
MarcoFalke
fac9539836
qa: Run all tests even if wallet is not compiled 2018-09-10 17:53:21 -04:00
MarcoFalke
fae040010d
qa: Add some actual witness in rpc_rawtransaction 2018-08-24 14:02:00 -04:00
practicalswift
68400d8b96 tests: Use explicit imports 2018-08-13 14:13:39 +02:00
Ben Woosley
5eb20f81d9
Consistently use ParseHashV to validate hash inputs in rpc
ParseHashV validates the length and encoding of the string and throws
an informative RPC error on failure, which is as good or better than
these alternative calls.

Note I switched ParseHashV to check string length first, because
IsHex tests that the length is even, and an error like:
"must be of length 64 (not 63, for X)" is much more informative than
"must be hexadecimal string (not X)"
2018-08-07 12:47:39 -04:00
DrahtBot
eb7daf4d60 Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
Anthony Towns
685d1d8115 [tests] Check signrawtransaction* errors on missing prevtx info 2018-06-28 02:09:13 +10:00
Wladimir J. van der Laan
6e67754e48
Merge #12436: [rpc] Adds a functional test to validate the transaction version number in the RPC output
09b30db Asserts that the tx version number is a signed 32-bit integer. (251)

Pull request description:

  This PR attempts to resolve #11561 by addressing the feedback from @MarcoFalke; and @gmaxwell in #12430.

  Commit 30e9d24 adds a functional test to `rpc_rawtransaction.py` to assert that the transaction version number in the RPC output is a signed 32-bit integer.

  The functional test uses the raw transaction data from Mainnet transaction `c659729a7fea5071361c2c1a68551ca2bf77679b27086cc415adeeb03852e369`.

Tree-SHA512: d78f3120b9aa04537561ab5584769a838b25e162c5caa6e1543256fb27538aa4c708c939fb5ba93ccb3fa676c2d92ce8eb9cc78869f80ac96be64a7bec7bebd0
2018-04-24 11:57:36 +02:00
Karl-Johan Alm
bf08fc5b6b
test: Assert on correct variable 2018-04-09 08:51:02 +09:00
251
09b30db2b0 Asserts that the tx version number is a signed 32-bit integer. 2018-04-06 21:47:29 +02:00
MarcoFalke
fa06dfce0f
[rpc] createrawtransaction: Accept sorted outputs 2018-03-07 12:58:14 -05:00
Andrew Chow
eefff65a4b scripted-diff: change signrawtransaction to signrawtransactionwithwallet in tests
-BEGIN VERIFY SCRIPT-
sed -i 's/\<signrawtransaction\>/signrawtransactionwithwallet/g' test/functional/*.py
sed -i 's/\<signrawtransaction\>/signrawtransactionwithwallet/g' test/functional/test_framework/*.py
-END VERIFY SCRIPT-
2018-02-17 11:42:01 -05:00
Andrew Chow
b22cce0148 scripted-diff: validateaddress to getaddressinfo in tests
Change all instances of validateaddress to getaddressinfo since it seems that
no test actually uses validateaddress for actually validating addresses.

-BEGIN VERIFY SCRIPT-
find ./test/functional -path '*py' -not -path ./test/functional/wallet_disable.py -not -path ./test/functional/rpc_deprecated.py -not -path ./test/functional/wallet_address_types.py -exec sed -i'' -e 's/validateaddress/getaddressinfo/g' {} \;
-END VERIFY SCRIPT-
2018-02-16 12:09:36 -05:00
practicalswift
11376b5583 Fix a-vs-an typos 2018-02-11 10:48:15 +01:00
MeshCollider
ee11121229 Add special error for genesis coinbase to gettransaction 2018-01-30 11:36:25 +13:00
Anthony Towns
81b79f2c39 [tests] Rename rpc_* functional tests. 2018-01-25 09:44:29 +10:00
Renamed from test/functional/rawtransactions.py (Browse further)