Commit graph

61 commits

Author SHA1 Message Date
Luke Dashjr
15ef1b905b Bugfix: bitcoin-tx: scriptPubKey may be null, so accept outscript=<n>: 2014-09-14 05:28:41 +00:00
jtimon
2b23a87599 Don't pass nHashType to VerifyScript 2014-09-12 20:04:31 +02:00
Pieter Wuille
f7cdcb80ab
Merge pull request #4822
629d75f Combine CCoinsViewCache's HaveCoins and const GetCoins into AccessCoins. (Pieter Wuille)
2014-09-10 01:44:30 +02:00
jtimon
e088d65acb Separate script/sign 2014-09-08 20:21:35 +02:00
jtimon
c4408a6c85 Separate script/standard 2014-09-08 20:21:35 +02:00
Pieter Wuille
629d75faac Combine CCoinsViewCache's HaveCoins and const GetCoins into AccessCoins.
The efficient version of CCoinsViewCache::GetCoins only works for known-to-exist
cache entries, requiring a separate HaveCoins call beforehand. This is
inefficient as both perform a hashtable lookup.

Replace the non-mutable GetCoins with AccessCoins, which returns a potentially-NULL
pointer. This also decreases the overloading of GetCoins.

Also replace some copying (inefficient) GetCoins calls with equivalent AccessCoins,
decreasing the copying.
2014-09-03 14:24:52 +02:00
Philip Kaufmann
093303a887 add missing header end comments
- ensures a consistent usage in header files
- also add a blank line after the copyright header where missing
- also remove orphan new-lines at the end of some files
2014-08-28 22:25:21 +02:00
Wladimir J. van der Laan
ad49c256c3 Split up util.cpp/h
Split up util.cpp/h into:

- string utilities (hex, base32, base64): no internal dependencies, no dependency on boost (apart from foreach)
- money utilities (parsesmoney, formatmoney)
- time utilities (gettime*, sleep, format date):
- and the rest (logging, argument parsing, config file parsing)

The latter is basically the environment and OS handling,
and is stripped of all utility functions, so we may want to
rename it to something else than util.cpp/h for clarity (Matt suggested
osinterface).

Breaks dependency of sha256.cpp on all the things pulled in by util.
2014-08-26 13:25:22 +02:00
Jeff Garzik
fb14452c6c bitcoin-tx: Accept input via stdin. Add input handling to tests. 2014-08-19 10:29:10 -04:00
Cory Fields
616c24307f bitcoin-tx: fix build warnings
Cleans up a bunch of:
warning: missing braces around initializer for ‘const<anonymous struct>’
2014-08-13 11:57:47 -04:00
Jeff Garzik
cbe39a3852 Add "bitcoin-tx" command line utility and supporting modules.
This is a simple utility that provides command line manipulation of
a hex-encoded TX. The utility takes a hex string on the command line
as input, performs zero or more mutations, and outputs a hex string
to standard output.

This utility is also an intentional exercise of the "bitcoin library"
concept. It is designed to require minimal libraries, and works
entirely without need for any RPC or P2P communication.

See "bitcoin-tx --help" for command and options summary.
2014-07-29 11:13:27 -04:00