Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
tangled
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eriksson monteiro
tangled
Commits
18eaa302
Commit
18eaa302
authored
Aug 25, 2021
by
Dmitry Khaleev
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into issue/TG-7
parents
0744f8df
d1e2fa5e
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
156 additions
and
161 deletions
+156
-161
millix_node/README.md
millix_node/README.md
+1
-1
millix_node/core/config/config.js
millix_node/core/config/config.js
+5
-3
millix_node/core/console.js
millix_node/core/console.js
+2
-0
millix_node/core/task.js
millix_node/core/task.js
+7
-1
millix_node/core/wallet/wallet-transaction-consensus.js
millix_node/core/wallet/wallet-transaction-consensus.js
+6
-3
millix_node/database/repositories/transaction.js
millix_node/database/repositories/transaction.js
+51
-67
millix_node/index.js
millix_node/index.js
+1
-1
millix_node/job/job-engine.js
millix_node/job/job-engine.js
+81
-83
millix_node/net/network.js
millix_node/net/network.js
+2
-2
No files found.
millix_node/README.md
View file @
18eaa302
...
...
@@ -2,7 +2,7 @@
<br>
<a
href=
"#"
><img
src=
"https://github.com/millix/millix-wallet/blob/master/app/icon.png?raw=true"
alt=
"millix node"
width=
"200"
></a>
<br>
millix node
<small>
v1.11.
2
</small>
millix node
<small>
v1.11.
3
</small>
<br>
</h1>
...
...
millix_node/core/config/config.js
View file @
18eaa302
...
...
@@ -774,8 +774,8 @@ export const NETWORK_SHORT_TIME_WAIT_MAX = 1500;
export
const
DATABASE_ENGINE
=
'
sqlite
'
;
export
const
DATABASE_CONNECTION
=
{};
export
const
MILLIX_CIRCULATION
=
9
e15
;
export
const
NODE_MILLIX_BUILD_DATE
=
1629
213000
;
export
const
NODE_MILLIX_VERSION
=
'
1.11.
2
-tangled
'
;
export
const
NODE_MILLIX_BUILD_DATE
=
1629
813663
;
export
const
NODE_MILLIX_VERSION
=
'
1.11.
4
-tangled
'
;
export
const
DATA_BASE_DIR_MAIN_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
;
...
...
@@ -786,6 +786,7 @@ export const WALLET_KEY_PATH = DATA_BASE_DIR +
export
const
JOB_CONFIG_PATH
=
DATA_BASE_DIR
+
'
/job.json
'
;
export
const
JOB_CONFIG_VERSION
=
4
;
export
const
SHARD_ZERO_NAME
=
'
shard_zero
'
;
export
const
DEBUG_LOG_FILTER
=
[];
export
const
PEER_ROTATION_MORE_THAN_AVERAGE
=
0.5
;
export
const
PEER_ROTATION_MORE_THAN_MOST
=
0.2
;
export
const
PEER_ROTATION_MORE_THAN_ALL
=
0.01
;
...
...
@@ -893,5 +894,6 @@ export default {
PEER_ROTATION_MORE_THAN_ALL
,
PEER_ROTATION_CONFIG
,
JOB_CONFIG_PATH
,
JOB_CONFIG_VERSION
JOB_CONFIG_VERSION
,
DEBUG_LOG_FILTER
};
millix_node/core/console.js
View file @
18eaa302
...
...
@@ -19,4 +19,6 @@ console.log = function() {
enabled
&&
showLog
&&
config
.
MODE_DEBUG
&&
_consoleLog
.
apply
(
console
,
arguments
);
};
config
.
DEBUG_LOG_FILTER
.
forEach
(
filter
=>
console
.
addFilter
(
filter
));
export
default
console
;
millix_node/core/task.js
View file @
18eaa302
...
...
@@ -29,7 +29,13 @@ class Task {
});
}
else
{
task
();
try
{
task
();
}
catch
(
e
)
{
this
.
debug
&&
console
.
log
(
`[task] error running task
${
taskName
}
:
${
e
}
`
);
}
if
(
!
once
)
{
self
.
runningTask
[
taskName
]
=
setTimeout
(
run
,
waitTime
);
}
...
...
millix_node/core/wallet/wallet-transaction-consensus.js
View file @
18eaa302
...
...
@@ -225,7 +225,7 @@ export class WalletTransactionConsensus {
message
:
`not validated in a depth of
${
depth
}
`
});
}
else
if
(
transaction
.
status
===
2
||
database
.
getRepository
(
'
transaction
'
).
isExpired
(
transaction
.
transaction_date
))
{
else
if
(
transaction
&&
(
transaction
.
status
===
2
||
database
.
getRepository
(
'
transaction
'
).
isExpired
(
transaction
.
transaction_date
)
))
{
return
reject
({
cause
:
'
transaction_validation_max_depth
'
,
transaction_id_fail
:
transactionID
,
...
...
@@ -883,7 +883,9 @@ export class WalletTransactionConsensus {
}
delete
this
.
_consensusRoundState
[
lockerID
];
this
.
_consensusRoundState
[
transactionID
]
=
{};
this
.
_consensusRoundState
[
transactionID
]
=
{
timestamp
:
Date
.
now
()
};
let
unstableDateStart
=
ntp
.
now
();
unstableDateStart
.
setMinutes
(
unstableDateStart
.
getMinutes
()
-
config
.
TRANSACTION_OUTPUT_EXPIRE_OLDER_THAN
);
...
...
@@ -901,7 +903,8 @@ export class WalletTransactionConsensus {
return
(()
=>
{
if
(
unstableDateStart
.
getTime
()
<
pendingTransaction
.
transaction_date
.
getTime
())
{
// if not hibernated yet, we try to do a local validation first
return
this
.
_validateTransaction
(
transactionID
,
null
,
0
);
return
this
.
_validateTransaction
(
transactionID
,
null
,
0
)
.
catch
(()
=>
Promise
.
resolve
());
}
else
{
return
Promise
.
resolve
();
...
...
millix_node/database/repositories/transaction.js
View file @
18eaa302
This diff is collapsed.
Click to expand it.
millix_node/index.js
View file @
18eaa302
...
...
@@ -108,4 +108,4 @@ db.initialize()
});
}
});
//millix v1.11.
2
-tangled
//millix v1.11.
4
-tangled
millix_node/job/job-engine.js
View file @
18eaa302
This diff is collapsed.
Click to expand it.
millix_node/net/network.js
View file @
18eaa302
...
...
@@ -287,11 +287,11 @@ class Network {
database
.
getRepository
(
'
node
'
)
.
listNodes
()
.
then
((
nodes
)
=>
{
async
.
eachSeries
(
nodes
,
(
node
,
callback
)
=>
{
async
.
eachSeries
(
_
.
shuffle
(
nodes
)
,
(
node
,
callback
)
=>
{
this
.
addNode
(
node
.
node_prefix
,
node
.
node_address
,
node
.
node_port
,
node
.
node_port_api
,
node
.
node_id
);
callback
();
},
()
=>
{
_
.
each
(
config
.
NODE_INITIAL_LIST
,
({
host
,
port_protocol
:
port
,
port_api
:
portApi
})
=>
{
_
.
each
(
_
.
shuffle
(
config
.
NODE_INITIAL_LIST
)
,
({
host
,
port_protocol
:
port
,
port_api
:
portApi
})
=>
{
let
prefix
=
config
.
WEBSOCKET_PROTOCOL
;
let
url
=
`
${
prefix
}
://
${
host
}
:
${
port
}
`
;
if
((
!
this
.
_nodeList
[
url
]
||
!
this
.
_nodeList
[
url
].
node_id
)
&&
(
prefix
&&
host
&&
port
&&
portApi
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment