aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-06-23 14:17:13 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2012-10-20 23:08:57 +0200
commit8adf48dc9b45816793c7b98e2f4fa625c2e09f2c (patch)
tree017ab9d78c3269430c82ca35f0e107f34ca98373 /src/main.h
parent630fd8dcb6662ed167e967625f2715f97ddd2db5 (diff)
Preliminary undo file creation
Create files (one per block) with undo information for the transactions in it.
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main.h b/src/main.h
index a1d6334746..9257b53f30 100644
--- a/src/main.h
+++ b/src/main.h
@@ -155,6 +155,10 @@ public:
return GetDirectory(base) / strprintf("%08u%s.blk", nHeight, GetAlternative().c_str());
}
+ boost::filesystem::path GetUndoFile(const boost::filesystem::path &base) const {
+ return GetDirectory(base) / strprintf("%08u%s.und", nHeight, GetAlternative().c_str());
+ }
+
// TODO: make thread-safe (lockfile, atomic file creation, ...?)
void MakeUnique(const boost::filesystem::path &base) {
while (boost::filesystem::exists(GetFileName(base)))
@@ -810,6 +814,17 @@ public:
)
};
+/** Undo information for a CBlock */
+class CBlockUndo
+{
+public:
+ std::vector<CTxUndo> vtxundo;
+
+ IMPLEMENT_SERIALIZE(
+ READWRITE(vtxundo);
+ )
+};
+
/** pruned version of CTransaction: only retains metadata and unspent transaction outputs
*
* Serialized format: