Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: encode now-timestamps to avoid overwrites
What was happening was that when a timestamp, which are monotonic-timestamps, included an e.g. ".001" suffix, it would be considered as "in the future" if the indexer was quick enough to pick it up, and then be converted to "new Date().getTime()". So if two messages were written to a channel fast enough, BOTH would get set to "new Date().getTime()" and the second would overwrite the first in leveldb. This change ensures that proper monotonic-timestamps are used throughout.
- Loading branch information