@leofcoin/chain 1.1.11 → 1.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{dist/workers/block-worker.js → block-worker.js} +0 -0
- package/demo/chain.browser.js +37 -38
- package/demo/node.browser.js +2 -12
- package/demo/pako.browser.js +670 -501
- package/demo/peernet-swarm.browser.js +8 -12
- package/demo/workers/block-worker.js +1 -2
- package/demo/workers/machine-worker.js +2 -4
- package/demo/workers/pool-worker.js +1 -2
- package/demo/workers/transaction-worker.js +1 -2
- package/dist/browser/workers/block-worker.js +1 -2
- package/dist/browser/workers/machine-worker.js +2 -4
- package/dist/browser/workers/pool-worker.js +1 -2
- package/dist/browser/workers/transaction-worker.js +1 -2
- package/dist/chain.browser.js +37 -38
- package/dist/chain.js +36 -36
- package/dist/module/chain.js +36 -36
- package/dist/module/workers/machine-worker.js +2 -2
- package/dist/node.browser.js +2 -12
- package/dist/pako.browser.js +670 -501
- package/dist/peernet-swarm.browser.js +8 -12
- package/dist/workers/machine-worker.js +1 -1
- package/package.json +2 -2
- package/rollup.config.js +1 -1
- package/src/chain.js +30 -34
- package/src/machine.js +5 -1
- package/test/chain.js +17 -2
- package/demo/865.machine-worker.js +0 -10
- package/demo/chain.js +0 -1209
- package/demo/machine-worker.js +0 -17624
- package/demo/node.js +0 -1
- package/demo/workers/workers/865.js +0 -10
- package/demo/workers/workers/block-worker.js +0 -13200
- package/demo/workers/workers/machine-worker.js +0 -13904
- package/demo/workers/workers/pool-worker.js +0 -8504
- package/demo/workers/workers/transaction-worker.js +0 -8496
package/dist/node.browser.js
CHANGED
|
@@ -8341,8 +8341,7 @@ module.exports = function (value) {
|
|
|
8341
8341
|
/******/ script.parentNode && script.parentNode.removeChild(script);
|
|
8342
8342
|
/******/ doneFns && doneFns.forEach(function(fn) { return fn(event); });
|
|
8343
8343
|
/******/ if(prev) return prev(event);
|
|
8344
|
-
/******/ }
|
|
8345
|
-
/******/ ;
|
|
8344
|
+
/******/ };
|
|
8346
8345
|
/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);
|
|
8347
8346
|
/******/ script.onerror = onScriptComplete.bind(null, script.onerror);
|
|
8348
8347
|
/******/ script.onload = onScriptComplete.bind(null, script.onload);
|
|
@@ -9159,7 +9158,7 @@ class Peernet {
|
|
|
9159
9158
|
this.peerId = this.id;
|
|
9160
9159
|
|
|
9161
9160
|
pubsub.subscribe('peer:connected', async (peer) => {
|
|
9162
|
-
console.log(peer);
|
|
9161
|
+
// console.log(peer);
|
|
9163
9162
|
// console.log({connected: peer.id, as: this._getPeerId(peer.id) });
|
|
9164
9163
|
// peer.on('peernet.data', async (message) => {
|
|
9165
9164
|
// const id = message.id
|
|
@@ -9269,7 +9268,6 @@ class Peernet {
|
|
|
9269
9268
|
const walk = async peer => {
|
|
9270
9269
|
const node = await this.prepareMessage(data);
|
|
9271
9270
|
let result = await peer.request(node.encoded);
|
|
9272
|
-
console.log({result});
|
|
9273
9271
|
result = new Uint8Array(Object.values(result));
|
|
9274
9272
|
const proto = await protoFor(result);
|
|
9275
9273
|
if (proto.name !== 'peernet-dht-response') throw dhtError(proto.name)
|
|
@@ -9616,14 +9614,6 @@ class Peernet {
|
|
|
9616
9614
|
get Buffer() {
|
|
9617
9615
|
return Buffer
|
|
9618
9616
|
}
|
|
9619
|
-
// async block(index) {
|
|
9620
|
-
// const _values = []
|
|
9621
|
-
// for (const peer of this.peers) {
|
|
9622
|
-
// const value = await peer.request({type: 'block', index})
|
|
9623
|
-
// console.log(value);
|
|
9624
|
-
// }
|
|
9625
|
-
//
|
|
9626
|
-
// }
|
|
9627
9617
|
}
|
|
9628
9618
|
globalThis.Peernet = Peernet;
|
|
9629
9619
|
|