mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
up not found ack count before new soul + use more predictable offline souls + content address hash fix
This commit is contained in:
parent
87955288a0
commit
47e7c495d7
2
gun.js
2
gun.js
@ -738,7 +738,7 @@
|
||||
var ctx = msg._||'', root = ctx.root = ((msg.$||'')._||'').root;
|
||||
var put = msg.put, id = msg['#'], err, tmp;
|
||||
var DBG = ctx.DBG = msg.DBG;
|
||||
if(put['#']){ root.on('put', msg); return }
|
||||
if(put['#'] && put['.']){ root.on('put', msg); return }
|
||||
/*root.on(id, function(m){
|
||||
console.log('ack:', m);
|
||||
});*/
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "gun",
|
||||
"version": "0.2020.301",
|
||||
"version": "0.2020.401",
|
||||
"description": "A realtime, decentralized, offline-first, graph data synchronization engine.",
|
||||
"types": "index.d.ts",
|
||||
"main": "index.js",
|
||||
|
3
sea.js
3
sea.js
@ -1149,6 +1149,7 @@
|
||||
var u;
|
||||
function check(msg){ // REVISE / IMPROVE, NO NEED TO PASS MSG/EVE EACH SUB?
|
||||
var eve = this, at = eve.as, put = msg.put, soul = put['#'], key = put['.'], val = put[':'], state = put['>'], id = msg['#'], tmp;
|
||||
if(!soul || !key){ return }
|
||||
if((msg._||'').faith && (at.opt||'').faith && 'function' == typeof msg._){
|
||||
SEA.verify(SEA.opt.pack(put), false, function(data){ // this is synchronous if false
|
||||
put['='] = SEA.opt.unpack(data);
|
||||
@ -1159,7 +1160,7 @@
|
||||
var no = function(why){ at.on('in', {'@': id, err: why}) };
|
||||
//var no = function(why){ msg.ack(why) };
|
||||
(msg._||'').DBG && ((msg._||'').DBG.c = +new Date);
|
||||
if('#' === soul[0]){ // special case for content addressing immutable hashed data.
|
||||
if(0 <= soul.indexOf('#')){ // special case for content addressing immutable hashed data.
|
||||
check.hash(eve, msg, val, key, soul, at, no); return;
|
||||
}
|
||||
if('~@' === soul){ // special case for shared system data, the list of aliases.
|
||||
|
Loading…
x
Reference in New Issue
Block a user