aboutsummaryrefslogtreecommitdiff
path: root/src/netbase.h
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2014-09-01 21:36:46 +0200
committerPieter Wuille <[email protected]>2014-09-01 22:00:19 +0200
commit47eb76597efb7dadb36dd98bc20bd80b2db9cd50 (patch)
treeb021b10e49d0e5513b4b597c74ecba5eccff6165 /src/netbase.h
parentMerge pull request #4737 (diff)
downloaddiscoin-47eb76597efb7dadb36dd98bc20bd80b2db9cd50.tar.xz
discoin-47eb76597efb7dadb36dd98bc20bd80b2db9cd50.zip
Serializer simplifications after IMPLEMENT_SERIALIZE overhaul
Diffstat (limited to 'src/netbase.h')
-rw-r--r--src/netbase.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/netbase.h b/src/netbase.h
index 9b52c0a41..a061a9155 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -154,11 +154,10 @@ class CService : public CNetAddr
template <typename Stream, typename Operation>
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
- bool fRead = ser_action.ForRead();
READWRITE(FLATDATA(ip));
unsigned short portN = htons(port);
READWRITE(portN);
- if (fRead)
+ if (ser_action.ForRead())
port = ntohs(portN);
}
};