await this.orbitdb.counter(piece.counter) is a new way of using this.orbitdb.counter, by passing in an existing database address. This will open the existing database instead of creating it
I found that if you do the same but load() it seems to work, (adding to the previous node terminal state):
If I run this
The first time, the output is:
But the second time, after the database is already created, the output is
So, I go into
node
and try some stuff and I find that if you "open" the database with orbitdb.counter(counter.id), then the value resets:The manual says:
I found that if you do the same but load() it seems to work, (adding to the previous node terminal state):
Notice how after
counter = NPP.orbitdb.counter(id)
and alsocounter.load()
the value did not reset to0
as it did previously, but was retained.Just a problem I noticed following the tutorial, but if I am wrong please let me know, I'm trying to learn :)