| 714 | } |
| 715 | |
| 716 | Key versionStampKeyForIndex(int idx) { |
| 717 | Key result = KeyRef(getKeyForIndex(idx).toString() + std::string(14, '\x00')); |
| 718 | int32_t pos = deterministicRandom()->randomInt(0, result.size() - 13); |
| 719 | pos = littleEndian32(pos); |
| 720 | uint8_t* data = mutateString(result); |
| 721 | memcpy(data + result.size() - sizeof(int32_t), &pos, sizeof(int32_t)); |
| 722 | return result; |
| 723 | } |
| 724 | |
| 725 | Key getRandomVersionStampKey() { return versionStampKeyForIndex(deterministicRandom()->randomInt(0, nodes)); } |
| 726 |
no test coverage detected