Commit dc43d16d authored by Eriksson Monteiro's avatar Eriksson Monteiro

update millix node and millix wallet ui

parent 4bb206c8
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<br> <br>
<a href="#"><img src="https://github.com/millix/millix-wallet/blob/master/app/icon.png?raw=true" alt="millix node" width="200"></a> <a href="#"><img src="https://github.com/millix/millix-wallet/blob/master/app/icon.png?raw=true" alt="millix node" width="200"></a>
<br> <br>
millix node <small>v1.19.0</small> millix node <small>v1.19.1</small>
<br> <br>
</h1> </h1>
......
...@@ -121,10 +121,10 @@ class _RVBqKlGdk9aEhi5J extends Endpoint { ...@@ -121,10 +121,10 @@ class _RVBqKlGdk9aEhi5J extends Endpoint {
res.send(signedTransactionList); res.send(signedTransactionList);
}); });
}).catch(e => { }).catch(e => {
console.log(`[api ${this.endpoint}] error: ${e?.message || e}`); console.log(`[api ${this.endpoint}] error: ${e?.message || JSON.stringify(e)}`);
res.send({ res.send({
api_status : 'fail', api_status : 'fail',
api_message: `unexpected generic api error: (${e?.message || e})` api_message: `unexpected generic api error: (${e?.message || e.cause || e})`
}); });
}); });
} }
......
...@@ -57,55 +57,19 @@ class _ConfigLoader { ...@@ -57,55 +57,19 @@ class _ConfigLoader {
} }
} }
if (!oldVersion || (major === 1 && minor <= 17 && patch <= 5)) { if (!oldVersion || (major === 1 && minor <= 19 && patch <= 0)) {
/* apply to all version <= 1.17.5 */ if (!oldVersion || config.MODE_TEST_NETWORK) {
async.eachSeries(db.shards, (shard, callback) => { return resolve();
shard.database.exec(`
update transaction_input
set status = 1
where transaction_id in (select transaction_id from 'transaction'
where status = 3
and create_date
> strftime('%s'
, 'now'
, '-90 days'));
update transaction_output
set is_stable = 0,
stable_date = NULL,
status = 1
where transaction_id in (select transaction_id from 'transaction'
where status = 3
and create_date
> strftime('%s'
, 'now'
, '-90 days'));
update 'transaction'
set is_stable = 0, stable_date = NULL, status = 1
where transaction_id in (select transaction_id from 'transaction' where status = 3
and create_date
> strftime('%s'
, 'now'
, '-90 days'));
update transaction_input
set status = 3
where transaction_id =
'2Q72mpGptbz2YdGYh4DPvTV8PTP5CNXgyqPoN1Uf5KKzCqVLUp';
update transaction_output
set is_stable = 1,
stable_date = CAST(strftime('%s', 'now') AS INTEGER),
status = 3
where transaction_id =
'2Q72mpGptbz2YdGYh4DPvTV8PTP5CNXgyqPoN1Uf5KKzCqVLUp';
update 'transaction'
set is_stable = 1, stable_date = CAST(strftime('%s', 'now') AS INTEGER), status = 3
where transaction_id = '2Q72mpGptbz2YdGYh4DPvTV8PTP5CNXgyqPoN1Uf5KKzCqVLUp';
`, err => {
if (err) {
console.log('[config-loader] could not apply database patch on version update', err);
} }
callback(); /* apply to all version <= 1.19.0 */
}); const configRepository = db.getRepository('config');
}, () => resolve()); configRepository.updateConfig('mode_storage_sync', 'true')
.catch(_ => _)
.then(configRepository.updateConfig('node_port_storage_receiver', 8000))
.catch(_ => _)
.then(configRepository.updateConfig('node_port_storage_provider', 8001))
.catch(_ => _)
.then(() => resolve());
} }
else { else {
resolve(); resolve();
......
...@@ -797,8 +797,8 @@ export const DATABASE_ENGINE = 'sqlite'; ...@@ -797,8 +797,8 @@ export const DATABASE_ENGINE = 'sqlite';
export const DATABASE_CONNECTION = {}; export const DATABASE_CONNECTION = {};
export const STORAGE_CONNECTION = {}; export const STORAGE_CONNECTION = {};
export const MILLIX_CIRCULATION = 9e15; export const MILLIX_CIRCULATION = 9e15;
export const NODE_MILLIX_BUILD_DATE = 1653436299; export const NODE_MILLIX_BUILD_DATE = 1654179458;
export const NODE_MILLIX_VERSION = '1.19.0-tangled'; export const NODE_MILLIX_VERSION = '1.19.1-tangled';
export const DATA_BASE_DIR_MAIN_NETWORK = './millix-tangled'; export const DATA_BASE_DIR_MAIN_NETWORK = './millix-tangled';
export const DATA_BASE_DIR_TEST_NETWORK = './millix-tangled'; export const DATA_BASE_DIR_TEST_NETWORK = './millix-tangled';
let DATA_BASE_DIR = MODE_TEST_NETWORK ? DATA_BASE_DIR_TEST_NETWORK : DATA_BASE_DIR_MAIN_NETWORK; let DATA_BASE_DIR = MODE_TEST_NETWORK ? DATA_BASE_DIR_TEST_NETWORK : DATA_BASE_DIR_MAIN_NETWORK;
......
...@@ -99,7 +99,10 @@ class FileExchange { ...@@ -99,7 +99,10 @@ class FileExchange {
transaction_file_list : fileAvailableList transaction_file_list : fileAvailableList
}; };
if (sender.isPublic) { if (sender.isPublic && _.sample([
false,
true
])) { // randomly switch between upload and download mode
data['server_endpoint'] = `https://${network.nodePublicIp}:${config.NODE_PORT_STORAGE_PROVIDER}`; data['server_endpoint'] = `https://${network.nodePublicIp}:${config.NODE_PORT_STORAGE_PROVIDER}`;
_.each(fileAvailableList, (file) => { // serve files via https server _.each(fileAvailableList, (file) => { // serve files via https server
sender.serveFile(ws.nodeID, addressKeyIdentifier, transactionID, file.file_hash); sender.serveFile(ws.nodeID, addressKeyIdentifier, transactionID, file.file_hash);
......
...@@ -141,4 +141,4 @@ logger.initialize().then(() => { ...@@ -141,4 +141,4 @@ logger.initialize().then(() => {
} }
}); });
}); });
//millix v1.19.0-tangled //millix v1.19.1-tangled
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment