Closed raphael10-collab closed 2 years ago
Try removing the parenthesis and spaces in [pc_01, pc_02]
and [9cb2ad634fd4085b246be102811c72dc46af6d8f73473eb0f3ab9f0931e9b87d]
(base) raphy@pc:~/hypercore/multi-hyperbee$ node examples/example.js -s pc_01
pc_01 diff key: 39bc566040817500b135889b7f0dede9f108e8b6dd10e065462fe92b28c0b751
(base) raphy@pc:~/hypercore/multi-hyperbee$ node examples/example.js -s pc_02
pc_02 diff key: 49b0a25c4538b9d2f6fc9092743bc9ea6da0b0248325057a855b3562935a864a
(base) raphy@pc:~/hypercore/multi-hyperbee$ node examples/example.js -s pc_01,pc_02 -k 39bc566040817500b135889b7f0dede9f108e8b6dd10e065462fe92b28c0b751,49b0a25c4538b9d2f6fc9092743bc9ea6da0b0248325057a855b3562935a864a
pc_01,pc_02 diff key: fa859781bfa0cdfb3e1a3ece30dad14a586a138994ca8472467b92d3e1bed3b1
Please enter some data
trial_data
Hello World!
It's Saturday!
(base) raphy@pc:~/hypercore/multi-hyperbee$ ls -lah
total 184K
drwxrwxr-x 15 raphy raphy 4,0K set 18 12:07 .
drwxrwxr-x 11 raphy raphy 4,0K set 16 15:15 ..
-rw-rw-r-- 1 raphy raphy 757 set 13 20:00 clock.js
drwxrwxr-x 2 raphy raphy 4,0K set 13 20:00 docs
drwxrwxr-x 4 raphy raphy 4,0K set 18 11:56 examples
drwxrwxr-x 8 raphy raphy 4,0K set 13 20:00 .git
-rw-rw-r-- 1 raphy raphy 24 set 13 20:00 .gitignore
-rw-rw-r-- 1 raphy raphy 11K set 13 20:00 index.js
-rw-rw-r-- 1 raphy raphy 13K set 13 20:00 mergeHandler.js
drwxrwxr-x 179 raphy raphy 4,0K set 13 20:04 node_modules
-rw-rw-r-- 1 raphy raphy 1,1K set 13 20:00 package.json
drwxrwxr-x 2 raphy raphy 4,0K set 18 12:05 pc_01
drwxrwxr-x 2 raphy raphy 4,0K set 18 12:26 pc_01_diff
drwxrwxr-x 2 raphy raphy 4,0K set 18 12:26 pc_01,pc_02
drwxrwxr-x 2 raphy raphy 4,0K set 18 12:07 pc_01,pc_02_diff
drwxrwxr-x 2 raphy raphy 4,0K set 18 12:07 pc_01,pc_02_peer_1
drwxrwxr-x 2 raphy raphy 4,0K set 18 12:07 pc_01,pc_02_peer_2
drwxrwxr-x 2 raphy raphy 4,0K set 18 12:05 pc_02
drwxrwxr-x 2 raphy raphy 4,0K set 18 12:05 pc_02_diff
-rw-rw-r-- 1 raphy raphy 9,7K set 13 20:00 README.md
drwxrwxr-x 2 raphy raphy 4,0K set 13 20:00 test
-rw-rw-r-- 1 raphy raphy 5,6K set 13 20:00 timestamp.js
-rw-rw-r-- 1 raphy raphy 62K set 13 20:04 yarn.lock
(base) raphy@pc:~/hypercore/multi-hyperbee$
(base) raphy@pc:~/hypercore/multi-hyperbee/pc_01,pc_02$ ls -lah
total 32K
drwxrwxr-x 2 raphy raphy 4,0K set 18 12:07 .
drwxrwxr-x 15 raphy raphy 4,0K set 18 12:07 ..
-rw-rw-r-- 1 raphy raphy 3,6K set 18 12:07 bitfield
-rw-rw-r-- 1 raphy raphy 894 set 18 12:07 data
-rw-rw-r-- 1 raphy raphy 32 set 18 12:07 key
-rw-rw-r-- 1 raphy raphy 64 set 18 12:07 secret_key
-rw-rw-r-- 1 raphy raphy 480 set 18 12:07 signatures
-rw-rw-r-- 1 raphy raphy 552 set 18 12:07 tree
(base) raphy@pc:~/hypercore/multi-hyperbee/pc_01,pc_02$ cat data
hyperbee
__peers
__peers�D["39bc566040817500b135889b7f0dede9f108e8b6dd10e065462fe92b28c0b751"]
__peers��["39bc566040817500b135889b7f0dede9f108e8b6dd10e065462fe92b28c0b751","49b0a25c4538b9d2f6fc9092743bc9ea6da0b0248325057a855b3562935a864a"]
pc_01,pc_02_123��{"firstName":"J","lastName":"S","someField":0.5815352464436727,"friends":["Claire","Martha","Jake","Sean"],"_objectId":"pc_01,pc_02_123","_timestamp":"2021-09-18T10:07:06.732Z-0000"}
pc_01,pc_02_trialdata�f{"text":"trial_data","_objectId":"pc_01,pc_02_trialdata","_timestamp":"2021-09-18T10:07:19.745Z-0000"}
pc_01,pc_02_HelloWorld�i{"text":"Hello World!","_objectId":"pc_01,pc_02_HelloWorld","_timestamp":"2021-09-18T10:07:32.769Z-0000"}
pc_01,pc_02_ItsSaturday�l{"text":"It's Saturday!","_objectId":"pc_01,pc_02_ItsSaturday","_timestamp":"2021-09-18T10:07:48.975Z-0000"}
It seems working now.
It's not clear to me the folders structure:
drwxrwxr-x 2 raphy raphy 4,0K set 18 12:05 pc_01
drwxrwxr-x 2 raphy raphy 4,0K set 18 12:26 pc_01_diff
drwxrwxr-x 2 raphy raphy 4,0K set 18 12:29 pc_01,pc_02
drwxrwxr-x 2 raphy raphy 4,0K set 18 12:07 pc_01,pc_02_diff
drwxrwxr-x 2 raphy raphy 4,0K set 18 12:07 pc_01,pc_02_peer_1
drwxrwxr-x 2 raphy raphy 4,0K set 18 12:07 pc_01,pc_02_peer_2
drwxrwxr-x 2 raphy raphy 4,0K set 18 12:05 pc_02
drwxrwxr-x 2 raphy raphy 4,0K set 18 12:05 pc_02_diff
For example. Why here there is no data
file?
(base) raphy@pc:~/hypercore/multi-hyperbee/pc_01,pc_02_peer_1$ ls -lah
total 24K
drwxrwxr-x 2 raphy raphy 4,0K set 18 12:07 .
drwxrwxr-x 15 raphy raphy 4,0K set 18 12:07 ..
-rw-rw-r-- 1 raphy raphy 32 set 18 12:07 bitfield
-rw-rw-r-- 1 raphy raphy 32 set 18 12:07 key
-rw-rw-r-- 1 raphy raphy 32 set 18 12:07 signatures
-rw-rw-r-- 1 raphy raphy 32 set 18 12:07 tree
(base) raphy@pc:~/hypercore/multi-hyperbee/pc_01,pc_02_diff$ cat data
hyperbee
multi-hyperbee-diff
-pc_01,pc_02_123/2021-09-18T10:07:06.732Z-0000��{"_timestamp":"2021-09-18T10:07:06.732Z-0000","obj":{"_objectId":"pc_01,pc_02_123"},"list":{"add":{"firstName":"J","lastName":"S","someField":0.5815352464436727,"friends":["Claire","Martha","Jake","Sean"]}}}
3pc_01,pc_02_trialdata/2021-09-18T10:07:19.745Z-0000�{"_timestamp":"2021-09-18T10:07:19.745Z-0000","obj":{"_objectId":"pc_01,pc_02_trialdata"},"list":{"add":{"text":"trial_data"}}}
4pc_01,pc_02_HelloWorld/2021-09-18T10:07:32.769Z-0000��{"_timestamp":"2021-09-18T10:07:32.769Z-0000","obj":{"_objectId":"pc_01,pc_02_HelloWorld"},"list":{"add":{"text":"Hello World!"}}}
5pc_01,pc_02_ItsSaturday/2021-09-18T10:07:48.975Z-0000��{"_timestamp":"2021-09-18T10:07:48.975Z-0000","obj":{"_objectId":"pc_01,pc_02_ItsSaturday"},"list":{"add":{"text":"It's Saturday!"}}}
:pc_01,pc_02_TomorrowisSunday/2021-09-18T10:37:22.038Z-0000��{"_timestamp":"2021-09-18T10:37:22.038Z-0000","obj":{"_objectId":"pc_01,pc_02_TomorrowisSunday"},"list":{"add":{"text":"Tomorrow is Sunday"}}}(base)
And where does this line come from?
-pc_01,pc_02_123/2021-09-18T10:07:06.732Z-0000��{"_timestamp":"2021-09-18T10:07:06.732Z-0000","obj":{"_objectId":"pc_01,pc_02_123"},"list":{"add":{"firstName":"J","lastName":"S","someField":0.5815352464436727,"friends":["Claire","Martha","Jake","Sean"]}}}
I tried to run the
example
: https://github.com/tradle/multi-hyperbee/tree/master/examples#to-run-this-exampleBut I get this error:
What am I missing or / and doing wrongly?