Closed staltz closed 1 year ago
Tests were failing downstream in ssb-tribes2 when I created a groupFeed and then tried to use branchStream to replicate that to other peers.
After findOrCreate, branchStream had to "wait" for the ssb-db2 bendybutt message to be processed and then converted to a "details" object.
If you called branchStream immediately after findOrCreate was done, this means you would miss the newly-created leaf feed.
As soon as findOrCreate is done, updateLookup on the branchStream logic so that the data is synchronously available there.
updateLookup
1st :x: 2nd :heavy_check_mark:
Just one minor thing, the rest looks good and great way to simplify the usage of this module.
Context
Tests were failing downstream in ssb-tribes2 when I created a groupFeed and then tried to use branchStream to replicate that to other peers.
Problem
After findOrCreate, branchStream had to "wait" for the ssb-db2 bendybutt message to be processed and then converted to a "details" object.
If you called branchStream immediately after findOrCreate was done, this means you would miss the newly-created leaf feed.
Solution
As soon as findOrCreate is done,
updateLookup
on the branchStream logic so that the data is synchronously available there.1st :x: 2nd :heavy_check_mark: