aboutsummaryrefslogtreecommitdiff
path: root/src/serialize.h
AgeCommit message (Collapse)Author
2012-11-16Split off CBlockHeader from CBlockPieter Wuille
Cleaner and removes the need for the application-specific flags in serialize.h.
2012-11-09Add CBufferedFilePieter Wuille
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-09-09Remove VC6 comment and pointless #ifdef'd benchmark codeWladimir J. van der Laan
We're in a wholly different world now, C++-compiler-wise. Current std::stringstream implementations don't have the stated problem anymore, and are just as fast as CDataStream. The #ifdef'd block does not even compile anymore; CDataStream constructor changed, and missing some std::. Also timing in whole seconds is also way too granular to say anything sensible in such microbenchmarks. Just remove it, it can always be found again in git history.
2012-07-02Fix signed/unsigned warnings in {script,serialize}.h (fixes #1541)Matt Corallo
2012-05-18Update License in File HeadersFordy
I originally created a pull to replace the "COPYING" in crypter.cpp and crypter.h, but it turned out that COPYING was actually the correct file.
2012-05-01remove unused typedef in serialize.hPhilip Kaufmann
2012-04-17Further reduce header dependenciesPieter Wuille
This commit removes the dependency of serialize.h on PROTOCOL_VERSION, and makes this parameter required instead of implicit. This is much saner, as it makes the places where changing a version number can have an influence obvious.
2012-04-17Merge pull request #1106 from jgarzik/sign-compareGavin Andresen
Fix many sign-comparison warnings found in bitcoin codebase
2012-04-17Merge pull request #1115 from laanwj/2012_04_cleanupmiscGavin Andresen
Delete unused, unreachable and commented code, add missing initializer
2012-04-17Remove unused and unreachable codeWladimir J. van der Laan
2012-04-15serialize.h: CAutoFile's read and write may take size_t nSizeJeff Garzik
2012-04-12version.h: separate client, net sections. Move more constants to this file.Jeff Garzik
* move PROTOCOL_VERSION to version.h * move CLIENT_VERSION* to version.h, make available past cpp stage * clearly separate client, network version portions of version.h
2012-04-04remove dependency on serialize.h and util.h for SecureStringWladimir J. van der Laan
2012-04-03VC2010 compile fixesWladimir J. van der Laan
2012-03-26Begin doxygen-compatible commentsPieter Wuille
2012-02-18Fix compilation warning.Matt Corallo
2012-02-07Update all copyrights to 2012Gavin Andresen
2012-01-12Compile with extra warnings turned on. And more makefile/code tidying up.Gavin Andresen
This turns on most gcc warnings, and removes some unused variables and other code that triggers warnings. Exceptions are: -Wno-sign-compare : triggered by lots of comparisons of signed integer to foo.size(), which is unsigned. -Wno-char-subscripts : triggered by the convert-to-hex functions (I may fix this in a future commit).
2012-01-04Fix horrific performance found by gmaxwell.Matt Corallo
2011-12-21Revert "Use standard C99 (and Qt) types for 64-bit integers"Wladimir J. van der Laan
This reverts commit 21d9f36781604e4ca9fc35dc65265593423b73e9.
2011-12-20Use standard C99 (and Qt) types for 64-bit integersLuke Dashjr
2011-12-20Include limits, not climints (using std::numeric_limits now)Gavin Andresen
2011-12-19Use std::numeric_limits<> for typesafe INT_MAX/etcGavin Andresen
2011-12-19Cleanup: removed dead code, and use C99 typedefs for int64 (supported by all ↵Gavin Andresen
modern c++ compilers)
2011-12-19Implement BIP 14 : separate protocol version from client versionGavin Andresen
2011-12-16Bump version 0.5.99 (prep for pulling for version 0.6)Gavin Andresen
2011-11-21Bump version to 0.5.1Gavin Andresen
2011-11-15Obsolete keypool and make sure database removes log files on shutdown.Gavin Andresen
2011-10-08Bump version to 0.5.0.0Gavin Andresen
2011-10-07Fix build on windows and macGavin Andresen
Replaced all occurrences of #if* __WXMSW__ with WIN32, and all occurrences of __WXMAC_OSX__ with MAC_OSX, and made sure those are defined appropriately in the makefile and bitcoin-qt.pro.
2011-09-26Bump version to 0.4.1Gavin Andresen
2011-09-03Merge branch 'master' of https://github.com/bitcoin/bitcoinWladimir J. van der Laan
2011-09-02Bumped version numbers to 0.4.0rc1v0.4.00rc1Gavin Andresen
2011-09-02Merge branch 'master' of https://github.com/bitcoin/bitcoinWladimir J. van der Laan
Conflicts: src/main.cpp
2011-08-19Move func 'REF' from util.h to serialize.hGiel van Schijndel
util.h doesn't use REF, serialize.h does, creating a dependency of serialize.h on util.h, but util.h already depends on serialize.h. To resolve this circular dependency the function 'REF' has now been moved closer to one of its two points of use. Signed-off-by: Giel van Schijndel <me@mortis.eu>
2011-08-16Merge branch 'master' of https://github.com/bitcoin/bitcoinWladimir J. van der Laan
2011-08-11Merge pull request #458 from TheBlueMatt/copyrightGavin Andresen
Unify copyright notices.
2011-08-11Merge branch 'master' of https://github.com/bitcoin/bitcoinWladimir J. van der Laan
2011-08-09Unify copyright notices.Matt Corallo
To a variation on: // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers
2011-08-08Add missing include to serialize.hMatt Corallo
2011-07-18windows build fixWladimir J. van der Laan
2011-07-13Bump version to 0.3.25Jeff Garzik
Yes, we might release as v0.4, but let's just do a simple increment for now.
2011-07-10Make mlock() and munlock() portable to systems that require the address to ↵Doug Huff
be on a page boundary.
2011-07-08mlock() all private keys in memoryDylan Noblesmith
Inline comment and idea come from the encprivkeys branch by Matt Corallo <matt@bluematt.me>.
2011-07-02Bump version to 0.3.24.Jeff Garzik
2011-06-05Bump version to 0.3.23.Jeff Garzik
2011-05-15make bitcoin include files more modularWladimir J. van der Laan
2011-05-09Manual merge of jaromil's source tree reorg commit.Jeff Garzik
Conflicts: src/sha256.cpp
2011-04-23directory re-organization (keeps the old build system)Jaromil
there is no internal modification of any file in this commit files are moved into directories according to established standards in sourcecode distribution; these directories contain: src - Files that are used in constructing the executable binaries, but are not installed. doc - Files in HTML and text format that document usage, quirks of the implementation, and contributor checklists. locale - Files that contain human language translation of strings used in the program contrib - Files contributed from distributions or other third party implementing scripts and auxiliary programs