dogecoin/test/util/data
Daniel Kraft 57889e688d bitcoin-tx: Stricter check for valid integers
Just calling atoi to convert strings to integers does not check for
valid integers very thoroughly; in particular, it just ignores
everything starting from the first non-numeral character.  Even a string
like "foo" is fine and silently returns 0.

This meant that bitcoin-tx would not fail if such a string was passed in
various places where an integer is expected (like the locktime or an
input/output index); this means that it would, for instance, silently
accept a typo and interpret it in an unexpected way.

In this change, we use ParseInt64 for parsing strings to integers,
which actually verifies that the full string is valid as number.
New tests in the bitcoin-util-test cover the new error paths.
2018-07-07 14:25:09 +02:00
..
bitcoin-util-test.json bitcoin-tx: Stricter check for valid integers 2018-07-07 14:25:09 +02:00
blanktxv1.hex
blanktxv1.json Expose a transaction's weight via RPC 2018-04-13 15:18:26 -04:00
blanktxv2.hex
blanktxv2.json Expose a transaction's weight via RPC 2018-04-13 15:18:26 -04:00
tt-delin1-out.hex
tt-delin1-out.json Expose a transaction's weight via RPC 2018-04-13 15:18:26 -04:00
tt-delout1-out.hex
tt-delout1-out.json Expose a transaction's weight via RPC 2018-04-13 15:18:26 -04:00
tt-locktime317000-out.hex
tt-locktime317000-out.json Expose a transaction's weight via RPC 2018-04-13 15:18:26 -04:00
tx394b54bb.hex
txcreate1.hex
txcreate1.json Expose a transaction's weight via RPC 2018-04-13 15:18:26 -04:00
txcreate2.hex
txcreate2.json Expose a transaction's weight via RPC 2018-04-13 15:18:26 -04:00
txcreatedata1.hex
txcreatedata1.json Expose a transaction's weight via RPC 2018-04-13 15:18:26 -04:00
txcreatedata2.hex
txcreatedata2.json Expose a transaction's weight via RPC 2018-04-13 15:18:26 -04:00
txcreatedata_seq0.hex
txcreatedata_seq0.json Expose a transaction's weight via RPC 2018-04-13 15:18:26 -04:00
txcreatedata_seq1.hex
txcreatedata_seq1.json Expose a transaction's weight via RPC 2018-04-13 15:18:26 -04:00
txcreatemultisig1.hex
txcreatemultisig1.json Expose a transaction's weight via RPC 2018-04-13 15:18:26 -04:00
txcreatemultisig2.hex
txcreatemultisig2.json Expose a transaction's weight via RPC 2018-04-13 15:18:26 -04:00
txcreatemultisig3.hex
txcreatemultisig3.json Expose a transaction's weight via RPC 2018-04-13 15:18:26 -04:00
txcreatemultisig4.hex
txcreatemultisig4.json Expose a transaction's weight via RPC 2018-04-13 15:18:26 -04:00
txcreatemultisig5.json Expose a transaction's weight via RPC 2018-04-13 15:18:26 -04:00
txcreateoutpubkey1.hex
txcreateoutpubkey1.json Expose a transaction's weight via RPC 2018-04-13 15:18:26 -04:00
txcreateoutpubkey2.hex
txcreateoutpubkey2.json Expose a transaction's weight via RPC 2018-04-13 15:18:26 -04:00
txcreateoutpubkey3.hex
txcreateoutpubkey3.json Expose a transaction's weight via RPC 2018-04-13 15:18:26 -04:00
txcreatescript1.hex
txcreatescript1.json Expose a transaction's weight via RPC 2018-04-13 15:18:26 -04:00
txcreatescript2.hex
txcreatescript2.json Expose a transaction's weight via RPC 2018-04-13 15:18:26 -04:00
txcreatescript3.hex
txcreatescript3.json Expose a transaction's weight via RPC 2018-04-13 15:18:26 -04:00
txcreatescript4.hex
txcreatescript4.json Expose a transaction's weight via RPC 2018-04-13 15:18:26 -04:00
txcreatesignv1.hex
txcreatesignv1.json Expose a transaction's weight via RPC 2018-04-13 15:18:26 -04:00
txcreatesignv2.hex