diff --git a/app/lib/dal/sqliteDAL/AbstractSQLite.js b/app/lib/dal/sqliteDAL/AbstractSQLite.js index 2dfad01c62360fd653529f16fb0832bcaa64dc50..2cdeb954dea79b9253647d624fdf0281c0d30701 100644 --- a/app/lib/dal/sqliteDAL/AbstractSQLite.js +++ b/app/lib/dal/sqliteDAL/AbstractSQLite.js @@ -264,7 +264,10 @@ function AbstractSQLite(driver) { } 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) { row[arr] = JSON.stringify(row[arr] || []); } diff --git a/app/lib/entity/peer.js b/app/lib/entity/peer.js index 751e60a28e9edaa77317f4b6ab60cf7351889b2d..e7024b829aea2d4ccb8efc6703393350b14c2cc1 100644 --- a/app/lib/entity/peer.js +++ b/app/lib/entity/peer.js @@ -13,6 +13,10 @@ function Peer(json) { this[key] = json[key]; }); + // block == blockstamp + this.blockstamp = this.blockstamp || this.block + this.block = this.block || this.blockstamp + this.endpoints = this.endpoints || []; this.statusTS = this.statusTS || 0;