holepunchto / hyperdht

The DHT powering Hyperswarm
https://docs.holepunch.to
MIT License
323 stars 46 forks source link

Updating mutable data without updating seq #24

Closed jankaszel closed 4 years ago

jankaszel commented 4 years ago

While playing aroud with mutable.put, I was trying to force an error for not updating seq while updating a value. I did expect this to raise an error, but instead the callback has been called with err undefined.

When calling mutable.get to get the value, I've received the value that was set with the initial put call. Is this intended behaviour?

This can easily be replicated by removing the sequence update from the mutable-put-get example: https://github.com/hyperswarm/dht/blob/master/examples/mutable-put-get.js#L26

davidmarkclements commented 4 years ago

good question .. I'd say.. probably, @mafintosh thoughts?

davidmarkclements commented 4 years ago

fixed in https://github.com/hyperswarm/dht/pull/26