Changeset View
Changeset View
Standalone View
Standalone View
src/serialize.h
// Copyright (c) 2009-2010 Satoshi Nakamoto | // Copyright (c) 2009-2010 Satoshi Nakamoto | ||||
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#ifndef BITCOIN_SERIALIZE_H | #ifndef BITCOIN_SERIALIZE_H | ||||
#define BITCOIN_SERIALIZE_H | #define BITCOIN_SERIALIZE_H | ||||
#include "compat/endian.h" | #include <compat/endian.h> | ||||
#include <prevector.h> | |||||
#include <algorithm> | #include <algorithm> | ||||
#include <cassert> | #include <cassert> | ||||
#include <cstdint> | #include <cstdint> | ||||
#include <cstring> | #include <cstring> | ||||
#include <ios> | #include <ios> | ||||
#include <limits> | #include <limits> | ||||
#include <map> | #include <map> | ||||
#include <memory> | #include <memory> | ||||
#include <set> | #include <set> | ||||
#include <string> | #include <string> | ||||
#include <utility> | #include <utility> | ||||
#include <vector> | #include <vector> | ||||
#include "prevector.h" | |||||
static const uint64_t MAX_SIZE = 0x02000000; | static const uint64_t MAX_SIZE = 0x02000000; | ||||
/** | /** | ||||
* Dummy data type to identify deserializing constructors. | * Dummy data type to identify deserializing constructors. | ||||
* | * | ||||
* By convention, a constructor of a type T with signature | * By convention, a constructor of a type T with signature | ||||
* | * | ||||
* template <typename Stream> T::T(deserialize_type, Stream& s) | * template <typename Stream> T::T(deserialize_type, Stream& s) | ||||
▲ Show 20 Lines • Show All 886 Lines • Show Last 20 Lines |