Generate a new random NodeId to use as peer. The same NodeId is never returned twice * (across all Scenarios combined). */
| 245 | /** Generate a new random NodeId to use as peer. The same NodeId is never returned twice |
| 246 | * (across all Scenarios combined). */ |
| 247 | NodeId NewPeer() |
| 248 | { |
| 249 | bool ok; |
| 250 | NodeId ret; |
| 251 | do { |
| 252 | ret = m_rng.randbits(63); |
| 253 | ok = m_runner.peerset.insert(ret).second; |
| 254 | } while(!ok); |
| 255 | return ret; |
| 256 | } |
| 257 | |
| 258 | std::chrono::microseconds Now() const { return m_now; } |
| 259 | }; |
no test coverage detected