amark / gun

An open source cybersecurity protocol for syncing decentralized graph data.
https://gun.eco/docs
Other
18.14k stars 1.17k forks source link

Gun Failed Silently When Doing Put #1150

Open yokowasis opened 3 years ago

yokowasis commented 3 years ago

The Code

const Gun = require('gun');

const gun = Gun();

console.time("GO")
var arr = {}
var k=1; //Change this each time you run the code
for (let i = (1 + (k-1) * 100); i <= k * 100; i++) {
    arr[i.toString()] = {
        username : `username-${i}`,
        nis : `nis-${i}`,
        password : `password-${i}`,
        nama : `nama-${i}`,
        nik : `nik-${i}`,
        nik2 : `nik2-${i}`,
        status : `status-${i}`,
    };
}

gun.get("siswa").get("IX").get("IT").put(arr,ack=>{
    console.log (ack);
    console.timeEnd("GO")
})

How to reproduce : run the code few times. Each time you run the code, increment the k by 1