aboutsummaryrefslogtreecommitdiff
path: root/src/core.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core.h')
-rw-r--r--src/core.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/core.h b/src/core.h
index 34c00c4142..ed37f7a3f8 100644
--- a/src/core.h
+++ b/src/core.h
@@ -257,14 +257,12 @@ public:
template <typename Stream, typename Operation>
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
- bool fRead = ser_action.ForRead();
-
READWRITE(*const_cast<int32_t*>(&this->nVersion));
nVersion = this->nVersion;
READWRITE(*const_cast<std::vector<CTxIn>*>(&vin));
READWRITE(*const_cast<std::vector<CTxOut>*>(&vout));
READWRITE(*const_cast<uint32_t*>(&nLockTime));
- if (fRead)
+ if (ser_action.ForRead())
UpdateHash();
}
@@ -346,8 +344,7 @@ public:
template <typename Stream, typename Operation>
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
- bool fRead = ser_action.ForRead();
- if (!fRead) {
+ if (!ser_action.ForRead()) {
uint64_t nVal = CompressAmount(txout.nValue);
READWRITE(VARINT(nVal));
} else {