Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
django-gateway
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package 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
Agustin Dorda
django-gateway
Commits
3971ef15
Commit
3971ef15
authored
6 years ago
by
adorda
Browse files
Options
Downloads
Plain Diff
Mergeo
parents
d660f392
99faf5e6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gateway/gateway.py
+8
-2
8 additions, 2 deletions
gateway/gateway.py
with
8 additions
and
2 deletions
gateway/gateway.py
+
8
−
2
View file @
3971ef15
...
@@ -156,9 +156,9 @@ class Gateway:
...
@@ -156,9 +156,9 @@ class Gateway:
def
get_tx_input
(
self
,
contract
,
tx
):
def
get_tx_input
(
self
,
contract
,
tx
):
return
contract
.
decode_function_input
(
tx
.
input
)
return
contract
.
decode_function_input
(
tx
.
input
)
def
block_is_canonical_poa
(
self
,
transaction
):
def
block_is_canonical_poa
(
self
,
block_number
):
last_block_number
=
self
.
get_last_blocknumber
()
last_block_number
=
self
.
get_last_blocknumber
()
tx_block_number
=
transaction
.
block
N
umber
tx_block_number
=
block
_n
umber
required_block_difference
=
math
.
ceil
(
self
.
get_signers_count
()
/
2
)
+
1
required_block_difference
=
math
.
ceil
(
self
.
get_signers_count
()
/
2
)
+
1
return
(
last_block_number
-
tx_block_number
)
>
required_block_difference
return
(
last_block_number
-
tx_block_number
)
>
required_block_difference
...
@@ -331,3 +331,9 @@ class HTTPFastLogSearcher:
...
@@ -331,3 +331,9 @@ class HTTPFastLogSearcher:
for
i
in
v
:
for
i
in
v
:
res
.
append
(
i
)
res
.
append
(
i
)
return
res
return
res
class
AddressValidation
:
def
is_valid
(
self
,
address
):
return
Web3
.
isAddress
(
address
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment