Commit f71ff53b authored by Eriksson Monteiro's avatar Eriksson Monteiro

update millix node

parent 573ad5e7
...@@ -16,13 +16,10 @@ class _Xim7SaikcsHICvfQ extends Endpoint { ...@@ -16,13 +16,10 @@ class _Xim7SaikcsHICvfQ extends Endpoint {
if (!addressBase || !addressVersion || !addressKeyIdentifier) { if (!addressBase || !addressVersion || !addressKeyIdentifier) {
return false; return false;
} }
else if (addressVersion === this.addressRepository.getDefaultAddressVersion()) {
return walletUtils.isValidAddress(addressBase) && walletUtils.isValidAddress(addressKeyIdentifier);
}
else if (addressVersion.charAt(1) === 'b') { //using public key as address base else if (addressVersion.charAt(1) === 'b') { //using public key as address base
return walletUtils.isValidAddress(addressKeyIdentifier); return walletUtils.isValidAddress(addressKeyIdentifier);
} }
return false; return walletUtils.isValidAddress(addressBase) && walletUtils.isValidAddress(addressKeyIdentifier);
} }
/** /**
......
...@@ -221,7 +221,7 @@ class FileManager { ...@@ -221,7 +221,7 @@ class FileManager {
return callback(); return callback();
} }
utils.orElsePromise(addressPublicKey, addressRepository.getAddressBaseAttribute(output.address_key_identifier, 'key_public')) utils.orElsePromise(addressPublicKey, () => addressRepository.getAddressBaseAttribute(output.address_key_identifier, 'key_public'))
.then(publicKey => { .then(publicKey => {
if (!publicKey) { if (!publicKey) {
return reject('public_key_not_found'); return reject('public_key_not_found');
......
...@@ -60,7 +60,7 @@ class StorageAcl { ...@@ -60,7 +60,7 @@ class StorageAcl {
let cachedData = cache.getCacheItem('storage-acl-receiver', nodeId); let cachedData = cache.getCacheItem('storage-acl-receiver', nodeId);
if (!cachedData) { if (!cachedData) {
cachedData = {}; cachedData = {};
cache.setCacheItem('storage-acl-sender', nodeId, cachedData, 1800000); //30min cache cache.setCacheItem('storage-acl-receiver', nodeId, cachedData, 1800000); //30min cache
} }
if (!cachedData[transactionId]) { if (!cachedData[transactionId]) {
cachedData[transactionId] = {}; cachedData[transactionId] = {};
......
...@@ -962,31 +962,31 @@ class Network { ...@@ -962,31 +962,31 @@ class Network {
privatePort: config.NODE_PORT, privatePort: config.NODE_PORT,
protocol : 'TCP', protocol : 'TCP',
description: 'millix network' description: 'millix network'
}) }).catch(_=>_)
.then(() => portMapper({ .then(() => portMapper({
publicPort : config.NODE_PORT_API, publicPort : config.NODE_PORT_API,
privatePort: config.NODE_PORT_API, privatePort: config.NODE_PORT_API,
protocol : 'TCP', protocol : 'TCP',
description: 'millix api' description: 'millix api'
})) }).catch(_=>_))
.then(() => portMapper({ .then(() => portMapper({
publicPort : config.NODE_PORT_DISCOVERY, publicPort : config.NODE_PORT_DISCOVERY,
privatePort: config.NODE_PORT_DISCOVERY, privatePort: config.NODE_PORT_DISCOVERY,
protocol : 'UDP', protocol : 'UDP',
description: 'millix discovery' description: 'millix discovery'
})) }).catch(_=>_))
.then(() => portMapper({ .then(() => portMapper({
publicPort : config.NODE_PORT_STORAGE_PROVIDER, publicPort : config.NODE_PORT_STORAGE_PROVIDER,
privatePort: config.NODE_PORT_STORAGE_PROVIDER, privatePort: config.NODE_PORT_STORAGE_PROVIDER,
protocol : 'TCP', protocol : 'TCP',
description: 'millix storage provider' description: 'millix storage provider'
})) }).catch(_=>_))
.then(() => portMapper({ .then(() => portMapper({
publicPort : config.NODE_PORT_STORAGE_RECEIVER, publicPort : config.NODE_PORT_STORAGE_RECEIVER,
privatePort: config.NODE_PORT_STORAGE_RECEIVER, privatePort: config.NODE_PORT_STORAGE_RECEIVER,
protocol : 'TCP', protocol : 'TCP',
description: 'millix storage receiver' description: 'millix storage receiver'
})); }).catch(_=>_));
} }
_initializeServer(certificatePem, certificatePrivateKeyPem) { _initializeServer(certificatePem, certificatePrivateKeyPem) {
......
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