| 152 | } |
| 153 | |
| 154 | uint32_t MutableHashTree::writeTo(Encoder &enc) { |
| 155 | if (_root) { |
| 156 | return _root->writeRootTo(enc); |
| 157 | } else if (_imRoot) { |
| 158 | unique_ptr<MutableInterior> tempRoot( MutableInterior::newRoot(_imRoot) ); |
| 159 | return tempRoot->writeRootTo(enc); |
| 160 | } else { |
| 161 | return 0; |
| 162 | } |
| 163 | } |
| 164 | |
| 165 | void MutableHashTree::dump(std::ostream &out) { |
| 166 | if (_imRoot && !_root) { |
nothing calls this directly
no test coverage detected