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

[enh] Better use INTEGER fields for `amount` and `dividend`

parent f650e207
No related branches found
No related tags found
No related merge requests found
...@@ -24,7 +24,7 @@ function BlockDAL(driver) { ...@@ -24,7 +24,7 @@ function BlockDAL(driver) {
this.table = 'block'; this.table = 'block';
this.fields = ['fork', 'hash', 'inner_hash', 'signature', 'currency', 'issuer', 'issuersCount', 'issuersFrame', 'issuersFrameVar', 'parameters', 'previousHash', 'previousIssuer', 'version', 'membersCount', 'monetaryMass', 'UDTime', 'medianTime', 'dividend', 'unitbase', 'time', 'powMin', 'number', 'nonce', 'transactions', 'certifications', 'identities', 'joiners', 'actives', 'leavers', 'revoked', 'excluded', 'len']; this.fields = ['fork', 'hash', 'inner_hash', 'signature', 'currency', 'issuer', 'issuersCount', 'issuersFrame', 'issuersFrameVar', 'parameters', 'previousHash', 'previousIssuer', 'version', 'membersCount', 'monetaryMass', 'UDTime', 'medianTime', 'dividend', 'unitbase', 'time', 'powMin', 'number', 'nonce', 'transactions', 'certifications', 'identities', 'joiners', 'actives', 'leavers', 'revoked', 'excluded', 'len'];
this.arrays = ['identities','certifications','actives','revoked','excluded','leavers','joiners','transactions']; this.arrays = ['identities','certifications','actives','revoked','excluded','leavers','joiners','transactions'];
this.bigintegers = ['monetaryMass','dividend']; this.bigintegers = ['monetaryMass'];
this.booleans = ['wrong']; this.booleans = ['wrong'];
this.pkFields = ['number','hash']; this.pkFields = ['number','hash'];
...@@ -45,7 +45,7 @@ function BlockDAL(driver) { ...@@ -45,7 +45,7 @@ function BlockDAL(driver) {
'monetaryMass VARCHAR(100) DEFAULT \'0\',' + 'monetaryMass VARCHAR(100) DEFAULT \'0\',' +
'UDTime DATETIME,' + 'UDTime DATETIME,' +
'medianTime DATETIME NOT NULL,' + 'medianTime DATETIME NOT NULL,' +
'dividend VARCHAR(100) DEFAULT \'0\',' + 'dividend INTEGER DEFAULT \'0\',' +
'unitbase INTEGER NULL,' + 'unitbase INTEGER NULL,' +
'time DATETIME NOT NULL,' + 'time DATETIME NOT NULL,' +
'powMin INTEGER NOT NULL,' + 'powMin INTEGER NOT NULL,' +
......
...@@ -33,7 +33,7 @@ function SIndexDAL(driver) { ...@@ -33,7 +33,7 @@ function SIndexDAL(driver) {
'conditions' 'conditions'
]; ];
this.arrays = []; this.arrays = [];
this.bigintegers = ['amount']; this.bigintegers = [];
this.booleans = ['consumed']; this.booleans = ['consumed'];
this.pkFields = ['op', 'identifier', 'pos', 'written_on']; this.pkFields = ['op', 'identifier', 'pos', 'written_on'];
this.translated = {}; this.translated = {};
...@@ -48,7 +48,7 @@ function SIndexDAL(driver) { ...@@ -48,7 +48,7 @@ function SIndexDAL(driver) {
'created_on VARCHAR(80) NULL,' + 'created_on VARCHAR(80) NULL,' +
'written_on VARCHAR(80) NOT NULL,' + 'written_on VARCHAR(80) NOT NULL,' +
'written_time INTEGER NOT NULL,' + 'written_time INTEGER NOT NULL,' +
'amount VARCHAR(50) NULL,' + 'amount INTEGER NULL,' +
'base INTEGER NULL,' + 'base INTEGER NULL,' +
'locktime INTEGER NULL,' + 'locktime INTEGER NULL,' +
'consumed BOOLEAN NOT NULL,' + 'consumed BOOLEAN NOT NULL,' +
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment