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
a55b0d52
Commit
a55b0d52
authored
Feb 03, 2022
by
Eriksson Monteiro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update millix node
parent
01828f2c
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
275 additions
and
262 deletions
+275
-262
millix_node/api/IBHgAmydZbmTUAe8/index.js
millix_node/api/IBHgAmydZbmTUAe8/index.js
+22
-6
millix_node/core/config/config.js
millix_node/core/config/config.js
+1
-1
millix_node/database/database.js
millix_node/database/database.js
+9
-1
millix_node/database/repositories/transaction.js
millix_node/database/repositories/transaction.js
+242
-253
millix_node/index.js
millix_node/index.js
+1
-1
No files found.
millix_node/api/IBHgAmydZbmTUAe8/index.js
View file @
a55b0d52
...
...
@@ -44,6 +44,22 @@ class _IBHgAmydZbmTUAe8 extends Endpoint {
}));
}
const
parentSet
=
{};
_
.
each
(
data
,
row
=>
parentSet
[
row
.
transaction_id_parent
]
=
null
);
const
parentTransactionListID
=
Object
.
keys
(
parentSet
);
return
database
.
applyShards
((
shardID
)
=>
{
return
database
.
getRepository
(
'
transaction
'
,
shardID
)
.
listTransactions
({
'
transaction_id_in
'
:
parentTransactionListID
});
}).
then
(
parentTransactionList
=>
{
_
.
each
(
parentTransactionList
,
parentTransaction
=>
{
if
(
!
parentSet
[
parentTransaction
.
transaction_id
])
{
parentSet
[
parentTransaction
.
transaction_id
]
=
parentTransaction
.
shard_id
;
}
});
_
.
each
(
data
,
transaction
=>
transaction
.
shard_id_parent
=
parentSet
[
transaction
.
transaction_id_parent
]
||
null
);
return
data
;
});
}).
then
(
data
=>
{
const
normalization
=
database
.
getRepository
(
'
normalization
'
);
const
transaction
=
{};
_
.
extend
(
transaction
,
_
.
pick
(
data
[
0
],
'
transaction_id
'
,
'
shard_id
'
,
'
transaction_date
'
,
'
node_id_origin
'
,
'
node_id_proxy
'
,
'
version
'
,
'
payload_hash
'
,
'
stable_date
'
,
'
is_stable
'
,
'
parent_date
'
,
'
is_parent
'
,
'
timeout_date
'
,
'
is_timeout
'
,
'
status
'
,
'
create_date
'
));
...
...
@@ -51,11 +67,11 @@ class _IBHgAmydZbmTUAe8 extends Endpoint {
transaction
[
'
transaction_date
'
]
=
Math
.
floor
(
transaction
.
transaction_date
.
getTime
()
/
1000
);
}
const
signatures
=
new
Set
();
const
inputs
=
new
Set
();
const
outputs
=
new
Set
();
const
outputAttributes
=
new
Set
();
const
parents
=
new
Set
();
const
signatures
=
new
Set
();
const
inputs
=
new
Set
();
const
outputs
=
new
Set
();
const
outputAttributes
=
new
Set
();
const
parents
=
new
Set
();
transaction
[
'
transaction_signature_list
'
]
=
[];
transaction
[
'
transaction_input_list
'
]
=
[];
...
...
@@ -119,7 +135,7 @@ class _IBHgAmydZbmTUAe8 extends Endpoint {
if
(
row
.
transaction_id_parent
&&
!
parents
.
has
(
row
.
transaction_id_parent
))
{
parents
.
add
(
row
.
transaction_id_parent
);
transaction
[
'
transaction_parent_list
'
].
push
(
_
.
mapKeys
(
_
.
pick
(
row
,
'
transaction_id_parent
'
,
'
transaction
_id_child
'
,
'
transaction_parent_status
'
,
'
transaction_parent_create_date
'
),
keyMapFunction
));
transaction
[
'
transaction_parent_list
'
].
push
(
_
.
mapKeys
(
_
.
pick
(
row
,
'
transaction_id_parent
'
,
'
shard_id_parent
'
,
'
transaction_id_child
'
,
'
shard
_id_child
'
,
'
transaction_parent_status
'
,
'
transaction_parent_create_date
'
),
keyMapFunction
));
}
});
...
...
millix_node/core/config/config.js
View file @
a55b0d52
...
...
@@ -772,7 +772,7 @@ export const DATABASE_ENGINE = 'sqlite';
export
const
DATABASE_CONNECTION
=
{};
export
const
MILLIX_CIRCULATION
=
9
e15
;
export
const
NODE_MILLIX_BUILD_DATE
=
1640009160
;
export
const
NODE_MILLIX_VERSION
=
'
1.14.
3
-tangled
'
;
export
const
NODE_MILLIX_VERSION
=
'
1.14.
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
;
...
...
millix_node/database/database.js
View file @
a55b0d52
...
...
@@ -45,7 +45,8 @@ export class Database {
if
(
where
)
{
_
.
each
(
_
.
keys
(
where
),
key
=>
{
if
(
where
[
key
]
===
undefined
||
((
key
.
endsWith
(
'
_begin
'
)
||
key
.
endsWith
(
'
_min
'
)
||
key
.
endsWith
(
'
_end
'
)
||
key
.
endsWith
(
'
_max
'
))
&&
!
where
[
key
]))
{
((
key
.
endsWith
(
'
_begin
'
)
||
key
.
endsWith
(
'
_min
'
)
||
key
.
endsWith
(
'
_end
'
)
||
key
.
endsWith
(
'
_max
'
))
&&
!
where
[
key
])
||
(
key
.
endsWith
(
'
_in
'
)
&&
!
(
where
[
key
]
instanceof
Array
)))
{
return
;
}
...
...
@@ -62,6 +63,13 @@ export class Database {
else
if
(
key
.
endsWith
(
'
_end
'
)
||
key
.
endsWith
(
'
_max
'
))
{
sql
+=
`
${
key
.
substring
(
0
,
key
.
lastIndexOf
(
'
_
'
))}
<= ?`
;
}
else
if
(
key
.
endsWith
(
'
_in
'
))
{
sql
+=
`
${
key
.
substring
(
0
,
key
.
lastIndexOf
(
'
_
'
))}
IN (
${
where
[
key
].
map
(()
=>
'
?
'
).
join
(
'
,
'
)}
)`
;
for
(
let
parameter
of
where
[
key
])
{
parameters
.
push
(
parameter
);
}
return
;
}
else
{
sql
+=
`
${
key
}
= ?`
;
}
...
...
millix_node/database/repositories/transaction.js
View file @
a55b0d52
This diff is collapsed.
Click to expand it.
millix_node/index.js
View file @
a55b0d52
...
...
@@ -126,6 +126,6 @@ db.initialize()
});
}
});
//millix v1.14.
3
-tangled
//millix v1.14.
4
-tangled
\ No newline at end of file
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