aboutsummaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2012-12-19changed CreateNewBlock to return a CBlockTemplate object, which includes ↵Forrest Voight
per-tx fee and sigop count data
2012-12-13Merge pull request #2096 from 94m3k1n9/fix-time-formatsPieter Wuille
Change timestamps to use ISO8601 formatting
2012-12-12Merge pull request #1825 from roques/bignum2Gavin Andresen
Bignum2
2012-12-12Change timestamps to use ISO8601 formattingRichard Schwab
2012-11-29Make test_bitcoin run in a temp datadirPieter Wuille
2012-11-15Introduce script verification flagsPieter Wuille
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.
2012-11-10Fix tests after cache tweaksPieter Wuille
2012-11-09Add -reindex, to perform in-place reindexing of block chain filesPieter Wuille
Flushes the blktree/ and coins/ databases, and reindexes the block chain files, as if their contents was loaded via -loadblock. Based on earlier work by Jeff Garzik.
2012-10-29Add redeemScript to listunspent output and signrawtransaction inputGavin Andresen
signrawtransaction was unable to sign pay-to-script-hash inputs when given the list of private keys to use. With this commit you can provide the p2sh redemption script in the list of inputs.
2012-10-29Tests for raw transactions argument checkingGavin Andresen
2012-10-29No need for test fixture now that multisig is enabled on main network.Gavin Andresen
2012-10-21change blockchain -> block chain (spelling)Philip Kaufmann
- Wiki says "block chain" is correct ;) - remove some unneeded spaces I found in the source, while fixing the spelling
2012-10-20Remove BDB block database supportPieter Wuille
2012-10-20Add LevelDB MemEnv supportPieter Wuille
Support LevelDB memory-backed environments, and use them in unit tests.
2012-10-20Use singleton block tree database instancePieter Wuille
2012-10-20Direct CCoins referencesPieter Wuille
To prevent excessive copying of CCoins in and out of the CCoinsView implementations, introduce a GetCoins() function in CCoinsViewCache with returns a direct reference. The block validation and connection logic is updated to require caching CCoinsViews, and exploits the GetCoins() function heavily.
2012-10-20UltraprunePieter Wuille
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.
2012-10-20Compact serialization for amountsPieter Wuille
Special serializer/deserializer for amount values. It is optimized for values which have few non-zero digits in decimal representation. Most amounts currently in the txout set take only 1 or 2 bytes to represent.
2012-10-20Compact serialization for variable-length integersPieter Wuille
Variable-length integers: bytes are a MSB base-128 encoding of the number. The high bit in each byte signifies whether another digit follows. To make the encoding is one-to-one, one is subtracted from all but the last digit. Thus, the byte sequence a[] with length len, where all but the last byte has bit 128 set, encodes the number: (a[len-1] & 0x7F) + sum(i=1..len-1, 128^i*((a[len-i-1] & 0x7F)+1)) Properties: * Very small (0-127: 1 byte, 128-16511: 2 bytes, 16512-2113663: 3 bytes) * Every integer has exactly one encoding * Encoding does not depend on size of original integer type
2012-10-20Merge pull request #1742 from sipa/canonicalJeff Garzik
Check for canonical public keys and signatures
2012-10-01data-driven base58 CBitcoinAddress/CBitcoinSecret testsWladimir J. van der Laan
Arbitrary numbers of test vectors can be generated using the script `gen_base58_test_vectors.py`.
2012-09-21Check for canonical public keys and signaturesPieter Wuille
Only enabled inside tests for now.
2012-09-18Merge branch 'testdata' of git://github.com/TheBlueMatt/bitcoinGavin Andresen
2012-09-18Merge branch 'refactor_times' of git://github.com/luke-jr/bitcoinGavin Andresen
2012-09-15tests for SetCompact and GetCompact of CBigNumChristian von Roques
2012-09-08Bugfix: Initialize CWallet::nOrderPosNext on an empty wallet, and save it in dbLuke Dashjr
2012-09-07Wrong address added to collection in testxanatos
The wrong address is added to the collection. As was written a second copy of address1 was added (and so address2 was useless).
2012-09-05Add various tests for CTransaction::CheckTransaction()Matt Corallo
2012-09-05check tx.CheckTransaction for data-driven tx tests.Matt Corallo
(and change so that only one case has to fail to make a tx_invalid test correct)
2012-08-24Merge pull request #1699 from laanwj/2012_08_secureallocPieter Wuille
Handle locked pages more robustly (Fixes issue #1462)
2012-08-23Store a fixed order of transactions (and accounting) in the walletLuke Dashjr
For backward compatibility, new accounting data is stored after a \0 in the comment string. This way, old versions and third-party software should load and store them, but all actual use (listtransactions, for example) ignores it.
2012-08-23Handle locked pages more robustly (Fixes issue #1462)Wladimir J. van der Laan
Memory locks do not stack, that is, pages which have been locked several times by calls to mlock() will be unlocked by a single call to munlock(). This can result in keying material ending up in swap when those functions are used naively. In this commit a class "LockedPageManager" is added that simulates stacking memory locks by keeping a counter per page.
2012-08-21Merge branch 'testdata' of git://github.com/TheBlueMatt/bitcoinGavin Andresen
2012-08-21Merge pull request #1687 from gavinandresen/quietunitPieter Wuille
Suppress output when running unit tests.
2012-08-20Add data-driven transaction tests.Matt Corallo
2012-08-20Add a few test cases to data-driven script tests.Matt Corallo
2012-08-20Suppress output when running unit tests.Gavin Andresen
This does two things: 1) Now does not output to debug.log if -printtodebugger flag is passed 2) Unit tests set -printtodebugger so only test results are output to stdout Note that -printtodebugger only actually prints to the debugger on Windows.
2012-08-20Set block.nVersion to fix miner unit testGavin Andresen
2012-08-17Remove useless non-cross-platform tests.Matt Corallo
2012-08-02fix further spelling errors / remove a tab in the sourcePhilip Kaufmann
2012-08-01Bugfix: Use standard BTC unit in commentsLuke Dashjr
2012-08-01Bugfix: Fix a variety of misspellingsLuke Dashjr
2012-07-12Tests for CreateNewBlockLuke Dashjr
2012-07-11Run BDB disk-less for test_bitcoinLuke Dashjr
2012-07-05Implement raw transaction RPC callsGavin Andresen
Implement listunspent / getrawtransaction / createrawtransaction / signrawtransaction, to support creation and signing-on-multiple-device multisignature transactions.
2012-06-30Fix a couple more typosfanquake
2012-06-28Merge branch 'patch-3' of https://github.com/xanatos/bitcoinGavin Andresen
2012-06-25Checkpoint at block 185333 (and remove a couple of intermediate checkpoints)Gavin Andresen
2012-06-23Node support for Tor hidden servicesPieter Wuille
This commit adds support for .onion addresses (mapped into the IPv6 by using OnionCat's range and encoding), and the ability to connect to them via a SOCKS5 proxy.
2012-06-22Unit tests for base32 encode/decodePieter Wuille