Closed andrewosh closed 6 years ago
Should add that this is on the latest master
Tiny thing in your code that's causing the problem: the line that authorizes the 2nd hyperdb with the 1st is
db1.authorize(db2.key, () => {
but db.key
always refers to the shared key. So what you're doing here is having db1
re-authorize itself. You want the db's local key, which is db2.local.key
, not db2.key
. If you make this change it should replicate & iterate history cleanly.
Hey all,
I'm having trouble with the following
createHistoryStream
example:Even though
db2
is an authorized writer,historyStream
only emits the changes to the/hey
and/dog
keys (both changed ondb1
). When I register the history stream ondb2
, I see all four changes. Similarly,db2
gets the value of/hey
after that delay.Anything I'm clearly doing wrong here?