return default block height of 100000

This commit is contained in:
Travis Eden 2018-08-15 14:30:08 -04:00
parent c037c934b0
commit e542e6962d

View file

@ -403,8 +403,19 @@ module.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, DECIMAL }) => {
};
Claim.getCurrentHeight = function () {
return this
.max('height');
return new Promise((resolve, reject) => {
return this
.max('height')
.then(result => {
if (result) {
return resolve(result);
}
return resolve(100000);
})
.catch(error => {
return reject(error);
});
});
};
return Claim;