aboutsummaryrefslogtreecommitdiff
path: root/src/undo.h
Commit message (Collapse)AuthorAgeFilesLines
* Extract CSipHasher to it's own file in crypto/ directory.Jim Posen2018-11-051-0/+1
| | | | This is a move-only commit with the exception of changes to includes.
* Drop unused GetType() from CSizeComputerBen Woosley2018-09-111-1/+1
|
* blockfilter: Construction of basic block filters.Jim Posen2018-08-251-0/+1
|
* Update copyright headers to 2018DrahtBot2018-07-271-1/+1
|
* Merge #12716: Fix typos and cleanup in various filesMarcoFalke2018-03-211-1/+1
|\ | | | | | | | | | | | | | | | | | | 4d9b4256d8 Fix typos (Dimitris Apostolou) Pull request description: Unfortunately I messed up my repo while trying to squash #12593 so I created a PR with just the correct fixes. Tree-SHA512: 295d77b51bd2a9381f1802c263de7ffb2edd670d9647391e32f9a414705b3c8b483bb0e469a9b85ab6a70919ea13397fa8dfda2aea7a398b64b187f178fe6a06
| * Fix typosDimitris Apostolou2018-03-211-1/+1
| |
* | Remove unnecessary NONNEGATIVE_SIGNEDRussell Yanofsky2018-03-201-1/+1
| | | | | | | | | | Switch to unsigned encoding, which is backwards compatible and avoids MSVC error reported https://github.com/bitcoin/bitcoin/issues/12732
* | Add static_assert to prevent VARINT(<signed value>)Russell Yanofsky2018-03-151-2/+2
|/ | | | | | | | | Using VARINT with signed types is dangerous because negative values will appear to serialize correctly, but then deserialize as positive values mod 128. This commit changes the VARINT macro to trigger an error by default if called with an signed value, and updates broken uses of VARINT to pass a special flag that lets them keep working with no change in behavior.
* Support deserializing into temporariesPieter Wuille2018-03-131-3/+3
| | | | | | | | | | | | | | | | Currently, the READWRITE macro cannot be passed any non-const temporaries, as the SerReadWrite function only accepts lvalue references. Deserializing into a temporary is very common, however. See for example things like 's >> VARINT(n)'. The VARINT macro produces a temporary wrapper that holds a reference to n. Fix this by accepting non-const rvalue references instead of lvalue references. We don't propagate the rvalue-ness down, as there are no useful optimizations that only apply to temporaries. Then use this new functionality to get rid of many (but not all) uses of the 'REF' macro (which casts away constness).
* Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa2018-01-031-1/+1
|
* Remove trailing whitespace causing travis failureMeshCollider2017-11-161-1/+1
|
* scripted-diff: Replace #include "" with #include <> (ryanofsky)MeshCollider2017-11-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- for f in \ src/*.cpp \ src/*.h \ src/bench/*.cpp \ src/bench/*.h \ src/compat/*.cpp \ src/compat/*.h \ src/consensus/*.cpp \ src/consensus/*.h \ src/crypto/*.cpp \ src/crypto/*.h \ src/crypto/ctaes/*.h \ src/policy/*.cpp \ src/policy/*.h \ src/primitives/*.cpp \ src/primitives/*.h \ src/qt/*.cpp \ src/qt/*.h \ src/qt/test/*.cpp \ src/qt/test/*.h \ src/rpc/*.cpp \ src/rpc/*.h \ src/script/*.cpp \ src/script/*.h \ src/support/*.cpp \ src/support/*.h \ src/support/allocators/*.h \ src/test/*.cpp \ src/test/*.h \ src/wallet/*.cpp \ src/wallet/*.h \ src/wallet/test/*.cpp \ src/wallet/test/*.h \ src/zmq/*.cpp \ src/zmq/*.h do base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f done -END VERIFY SCRIPT-
* Declare single-argument (non-converting) constructors "explicit"practicalswift2017-08-161-2/+2
| | | | In order to avoid unintended implicit conversions.
* Remove confusing MAX_BLOCK_BASE_SIZE.Gregory Maxwell2017-07-141-1/+2
| | | | | | | | | | | | | | | | | | Some people keep thinking that MAX_BLOCK_BASE_SIZE is a separate size limit from the weight limit when it fact it is superfluous, and used in early tests before the witness data has been validated or just to compute worst case sizes. The size checks that use it would not behave any differently consensus wise if they were eliminated completely. Its correct value is not independently settable but is a function of the weight limit and weight formula. This patch just eliminates it and uses the scale factor as required to compute the worse case constants. It also moves the weight factor out of primitives into consensus, which is a more logical place for it.
* Replace CTxInUndo with CoinPieter Wuille2017-06-011-24/+53
| | | | | | The earlier CTxInUndo class now holds the same information as the Coin class. Instead of duplicating functionality, replace CTxInUndo with a serialization adapter for Coin.
* Store/allow tx metadata in all undo recordsPieter Wuille2017-05-261-2/+1
| | | | | | | | | | | Previously, transaction metadata (height, coinbase or not, and before the previous commit also nVersion) was only stored for undo records that correspond to the last output of a transaction being spent. This only saves 2 bytes per undo record. Change this to storing this information for every undo record, and stop complaining for having it in non-last output spends. This means that undo dat written with this patch won't be readable by older versions anymore.
* Remove/ignore tx version in utxo and undoPieter Wuille2017-05-261-8/+12
| | | | | | | | | | | | | | | | | | | This makes the following changes: * In undo data and the chainstate database, the transaction nVersion field is removed from the data structures, always written as 0, and ignored when reading. * The definition of hash_serialized in gettxoutsetinfo is changed to no longer incude the nVersion field. It is renamed to hash_serialized_2 to avoid confusion. The new definition also includes transaction height and coinbase information, as this information was missing before. This depends on having a CHashVerifier-based undo data checksum verifier. Apart from changing the definition of serialized_hash, downgrading after using this patch is supported, as no release ever used the value of nVersion field in UTXO entries.
* Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
| | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* Get rid of nType and nVersionPieter Wuille2016-11-071-10/+10
| | | | | | | | | | | Remove the nType and nVersion as parameters to all serialization methods and functions. There is only one place where it's read and has an impact (in CAddress), and even there it does not impact any of the recursively invoked serializers. Instead, the few places that need nType or nVersion are changed to read it directly from the stream object, through GetType() and GetVersion() methods which are added to all stream classes.
* Make GetSerializeSize a wrapper on top of CSizeComputerPieter Wuille2016-11-071-6/+0
| | | | | | | | | | | Given that in default GetSerializeSize implementations created by ADD_SERIALIZE_METHODS we're already using CSizeComputer(), get rid of the specialized GetSerializeSize methods everywhere, and just use CSizeComputer. This removes a lot of code which isn't actually used anywhere. For CCompactSize and CVarInt this actually removes a more efficient size computing algorithm, which is brought back in a later commit.
* Bump copyright headers to 2014MarcoFalke2016-01-051-1/+1
|
* MOVEONLY: CBlockUndo from main.h to undo.hjtimon2014-12-271-0/+14
|
* Added "Core" to copyright headerssandakersmann2014-12-191-1/+1
| | | | | Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
* MOVEONLY: core/ -> primitives/Luke Dashjr2014-12-031-1/+1
|
* Fix all header definesPavel Janík2014-11-031-3/+3
|
* MOVEONLY: Move script/compressor out of script and put CTxOutCompressor (fromjtimon2014-10-271-1/+1
| | | | core) with it
* MOVEONLY: separate CTxUndo out of corejtimon2014-10-271-0/+71