return default block height of 100000
This commit is contained in:
parent
c037c934b0
commit
e542e6962d
1 changed files with 13 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue