You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: ignore message false positive
This PR changes the `toString` encoding of message `seqno` to 'hex' so that a unique key is generated by `utils.msgId` for caching messages.
Converting the `seqno` to a utf8 string can sometimes result in the same string for different buffers. The following are two different seqno's that `js-ipfs` was sent from `go-ipfs` that demonstrates the problem:
```console
$ node
> const buf2 = Buffer.from('15603533e990dfe0', 'hex')
> const buf1 = Buffer.from('15603533e990dfde', 'hex')
> buf1.toString('utf8')
'\u0015`53���'
> buf2.toString('utf8')
'\u0015`53���'
> buf1.toString('utf8') === buf2.toString('utf8')
true
>
```
So sometimes we think we've seen the message when we haven't! 🤦♂️
License: MIT
Signed-off-by: Alan Shaw <[email protected]>
* fix: jsdoc for randomSeqno
License: MIT
Signed-off-by: Alan Shaw <[email protected]>
0 commit comments