diff options
| author | Pieter Wuille <[email protected]> | 2014-09-01 21:36:46 +0200 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2014-09-01 22:00:19 +0200 |
| commit | 47eb76597efb7dadb36dd98bc20bd80b2db9cd50 (patch) | |
| tree | b021b10e49d0e5513b4b597c74ecba5eccff6165 /src/core.h | |
| parent | Merge pull request #4737 (diff) | |
| download | discoin-47eb76597efb7dadb36dd98bc20bd80b2db9cd50.tar.xz discoin-47eb76597efb7dadb36dd98bc20bd80b2db9cd50.zip | |
Serializer simplifications after IMPLEMENT_SERIALIZE overhaul
Diffstat (limited to 'src/core.h')
| -rw-r--r-- | src/core.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/core.h b/src/core.h index 34c00c414..ed37f7a3f 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 { |