Commit 0d163bb
simln-lib: read payment dispatch time from the clock
send_payment stamped each Payment's dispatch_time with SystemTime::now(),
bypassing the simulation clock. Under discrete-event simulation the wall clock
does not advance with virtual time, so this both broke virtual-time timestamps
and made results non-reproducible.
Stamp the dispatch time from the simulation clock once the inter-payment wait
has elapsed, and thread it into send_payment as an argument.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 0405467 commit 0d163bb
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1195 | 1195 | | |
1196 | 1196 | | |
1197 | 1197 | | |
| 1198 | + | |
| 1199 | + | |
1198 | 1200 | | |
1199 | 1201 | | |
1200 | 1202 | | |
1201 | 1203 | | |
1202 | 1204 | | |
1203 | | - | |
| 1205 | + | |
1204 | 1206 | | |
1205 | 1207 | | |
1206 | 1208 | | |
| |||
1275 | 1277 | | |
1276 | 1278 | | |
1277 | 1279 | | |
| 1280 | + | |
1278 | 1281 | | |
1279 | 1282 | | |
1280 | 1283 | | |
| |||
1285 | 1288 | | |
1286 | 1289 | | |
1287 | 1290 | | |
1288 | | - | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
1289 | 1294 | | |
1290 | 1295 | | |
1291 | 1296 | | |
| |||
0 commit comments