| 129 | |
| 130 | template <typename Stream, typename Operation> |
| 131 | inline void SerializationOp(Stream& s, Operation ser_action) { |
| 132 | int nVersion = s.GetVersion(); |
| 133 | if (!(s.GetType() & SER_GETHASH)) |
| 134 | READWRITE(nVersion); |
| 135 | READWRITE(nTime); |
| 136 | READWRITE(vchPubKey); |
| 137 | if (ser_action.ForRead()) { |
| 138 | try { |
| 139 | READWRITE(fInternal); |
| 140 | } |
| 141 | catch (std::ios_base::failure&) { |
| 142 | /* flag as external address if we can't read the internal boolean |
| 143 | (this will be the case for any wallet before the HD chain split version) */ |
| 144 | fInternal = false; |
| 145 | } |
| 146 | try { |
| 147 | READWRITE(m_pre_split); |
| 148 | } |
| 149 | catch (std::ios_base::failure&) { |
| 150 | /* flag as postsplit address if we can't read the m_pre_split boolean |
| 151 | (this will be the case for any wallet that upgrades to HD chain split)*/ |
| 152 | m_pre_split = false; |
| 153 | } |
| 154 | } |
| 155 | else { |
| 156 | READWRITE(fInternal); |
| 157 | READWRITE(m_pre_split); |
| 158 | } |
| 159 | } |
| 160 | }; |
| 161 | |
| 162 | /** Address book data */ |
nothing calls this directly
no test coverage detected