aboutsummaryrefslogtreecommitdiff
path: root/src/test/script_P2SH_tests.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix signed/unsigned comparison warningsGavin Andresen2013-04-031-2/+2
|
* Introduce script verification flagsPieter Wuille2012-11-151-4/+2
| | | | | | | | These flags select features to be enabled/disabled during script evaluation/checking, instead of several booleans passed along. Currently these flags are defined: * SCRIPT_VERIFY_P2SH: enable BIP16-style subscript evaluation * SCRIPT_VERIFY_STRICTENC: enforce strict adherence to pubkey/sig encoding standards.
* UltraprunePieter Wuille2012-10-201-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This switches bitcoin's transaction/block verification logic to use a "coin database", which contains all unredeemed transaction output scripts, amounts and heights. The name ultraprune comes from the fact that instead of a full transaction index, we only (need to) keep an index with unspent outputs. For now, the blocks themselves are kept as usual, although they are only necessary for serving, rescanning and reorganizing. The basic datastructures are CCoins (representing the coins of a single transaction), and CCoinsView (representing a state of the coins database). There are several implementations for CCoinsView. A dummy, one backed by the coins database (coins.dat), one backed by the memory pool, and one that adds a cache on top of it. FetchInputs, ConnectInputs, ConnectBlock, DisconnectBlock, ... now operate on a generic CCoinsView. The block switching logic now builds a single cached CCoinsView with changes to be committed to the database before any changes are made. This means no uncommitted changes are ever read from the database, and should ease the transition to another database layer which does not support transactions (but does support atomic writes), like LevelDB. For the getrawtransaction() RPC call, access to a txid-to-disk index would be preferable. As this index is not necessary or even useful for any other part of the implementation, it is not provided. Instead, getrawtransaction() uses the coin database to find the block height, and then scans that block to find the requested transaction. This is slow, but should suffice for debug purposes.
* Check for canonical public keys and signaturesPieter Wuille2012-09-211-3/+3
| | | | Only enabled inside tests for now.
* Bugfix: Fix a variety of misspellingsLuke Dashjr2012-08-011-2/+2
|
* Refactor: split CKeyID/CScriptID/CTxDestination from CBitcoinAddressPieter Wuille2012-05-241-13/+13
| | | | | | | | | | | | | | | | | This introduces internal types: * CKeyID: reference (hash160) of a key * CScriptID: reference (hash160) of a script * CTxDestination: a boost::variant of the former two CBitcoinAddress is retrofitted to be a Base58 encoding of a CTxDestination. This allows all internal code to only use the internal types, and only have RPC and GUI depend on the base58 code. Furthermore, the header dependencies are a lot saner now. base58.h is at the top (right below rpc and gui) instead of at the bottom. For the rest: wallet -> script -> keystore -> key. Only keystore still requires a forward declaration of CScript. Solving that would require splitting script into two layers.
* Fix tests after 38067c18Pieter Wuille2012-02-201-3/+3
|
* Merge branch 'standardScriptSigs' of github.com:gavinandresen/bitcoin-gitGavin Andresen2012-02-071-0/+9
|\
| * Make transactions with extra data in their scriptSig's non-standard.Gavin Andresen2012-01-191-0/+9
| |
* | Simplify counting of P2SH sigops to match BIP 16 (thanks to Matt Corallo for ↵Gavin Andresen2012-01-201-3/+14
|/ | | | | | prompting this). This also removes an un-needed sigops-per-byte check when accepting transactions to the memory pool (un-needed assuming only standard transactions are being accepted). And it only counts P2SH sigops after the switchover date.
* Replace OP_EVAL (BIP 12) with Pay-to-script-hash (BIP 16).Gavin Andresen2012-01-131-0/+310