Skip to content
Snippets Groups Projects
Commit e3a5aa45 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[fix] #1008 Could not record and publish self peer

parent f7d4c4a8
Branches
Tags
No related merge requests found
...@@ -264,7 +264,10 @@ function AbstractSQLite(driver) { ...@@ -264,7 +264,10 @@ function AbstractSQLite(driver) {
} }
function toRow(entity) { function toRow(entity) {
let row = _.clone(entity); let row = {};
for (const f of that.fields) {
row[f] = entity[f]
}
for (const arr of that.arrays) { for (const arr of that.arrays) {
row[arr] = JSON.stringify(row[arr] || []); row[arr] = JSON.stringify(row[arr] || []);
} }
......
...@@ -13,6 +13,10 @@ function Peer(json) { ...@@ -13,6 +13,10 @@ function Peer(json) {
this[key] = json[key]; this[key] = json[key];
}); });
// block == blockstamp
this.blockstamp = this.blockstamp || this.block
this.block = this.block || this.blockstamp
this.endpoints = this.endpoints || []; this.endpoints = this.endpoints || [];
this.statusTS = this.statusTS || 0; this.statusTS = this.statusTS || 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment