Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dunixir
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
teaching
dunixir
Merge requests
!36
Resolve "Vérification de l’existence dans la piscine/sandbox/mempool"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Vérification de l’existence dans la piscine/sandbox/mempool"
183-verification-de-l-existence-dans-la-piscine-sandbox-mempool
into
dev
Overview
0
Commits
2
Pipelines
2
Changes
1
Merged
ABDELGHANI Nassim
requested to merge
183-verification-de-l-existence-dans-la-piscine-sandbox-mempool
into
dev
3 years ago
Overview
0
Commits
2
Pipelines
2
Changes
1
Expand
Closes
#183 (closed)
Edited
3 years ago
by
ABDELGHANI Nassim
0
0
Merge request reports
Viewing commit
1834feb3
Prev
Next
Show latest version
1 file
+
28
−
11
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
1834feb3
add mempool existence check
· 1834feb3
ABDELGHANI Nassim
authored
3 years ago
lib/ws2p/connection.ex
+
28
−
11
Options
@@ -304,21 +304,38 @@ defmodule WS2P.Connection do
# https://git.duniter.org/nodes/common/doc/-/blob/ws2p_v2/rfc/0004_ws2p_v1.md#documents-rebound-policy
case
object
[
"body"
]
do
# TODO
%{
"name"
=>
"PEER"
,
"peer"
=>
doc
}
->
nil
# TODO
%{
"name"
=>
"TRANSACTION"
,
"transaction"
=>
doc
}
->
nil
# TODO
%{
"name"
=>
"MEMBERSHIP"
,
"membership"
=>
doc
}
->
nil
# TODO
%{
"name"
=>
"CERTIFICATION"
,
"certification"
=>
doc
}
->
nil
# TODO
%{
"name"
=>
"IDENTITY"
,
"identity"
=>
doc
}
->
Doc
.
Identity
.
verif
(
doc
)
%{
"name"
=>
"PEER"
,
"peer"
=>
doc
}
->
nil
%{
"name"
=>
"TRANSACTION"
,
"transaction"
=>
doc
}
->
if
Doc
.
Mempool
.
can_add?
(
doc
)
do
end
%{
"name"
=>
"MEMBERSHIP"
,
"membership"
=>
doc
}
->
if
Doc
.
Mempool
.
can_add?
(
doc
)
do
end
%{
"name"
=>
"CERTIFICATION"
,
"certification"
=>
doc
}
->
if
Doc
.
Mempool
.
can_add?
(
doc
)
do
end
%{
"name"
=>
"IDENTITY"
,
"identity"
=>
doc
}
->
if
Doc
.
Mempool
.
can_add?
(
doc
)
do
end
%{
"name"
=>
"REVOCATION"
,
"revocation"
=>
doc
}
->
if
Doc
.
Mempool
.
can_add?
(
doc
)
do
end
# TODO
%{
"name"
=>
"BLOCK"
,
"block"
=>
doc
}
->
nil
%{
"name"
=>
"BLOCK"
,
"block"
=>
doc
}
->
nil
# TODO handling received heads
# https://git.duniter.org/nodes/common/doc/-/blob/ws2p_v2/rfc/0004_ws2p_v1.md#rebound-policy
# GenServer.call(WS2P.Cluster, {:heads_received, heads})
%{
"name"
=>
"HEAD"
,
"heads"
=>
heads
}
->
nil
%{
"name"
=>
"HEAD"
,
"heads"
=>
heads
}
->
nil
end
end
|>
IO
.
inspect
()
Loading