Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
test-tools
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
hive
test-tools
Commits
accc3b61
Commit
accc3b61
authored
4 months ago
by
Radosław Masłowski
Browse files
Options
Downloads
Patches
Plain Diff
Refactor wax and node version verification in legacy mode
parent
88d3befb
No related branches found
No related tags found
1 merge request
!237
Pack of beekeeper wallet improvements
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
package/test_tools/__private/wallet/wallet.py
+14
-6
14 additions, 6 deletions
package/test_tools/__private/wallet/wallet.py
with
14 additions
and
6 deletions
package/test_tools/__private/wallet/wallet.py
+
14
−
6
View file @
accc3b61
...
@@ -77,12 +77,20 @@ class Wallet(UserHandleImplementation, ScopedObject):
...
@@ -77,12 +77,20 @@ class Wallet(UserHandleImplementation, ScopedObject):
self
.
_transaction_expiration_offset
=
timedelta
(
seconds
=
30
)
self
.
_transaction_expiration_offset
=
timedelta
(
seconds
=
30
)
self
.
__prepare_directory
()
self
.
__prepare_directory
()
self
.
run
(
preconfigure
=
preconfigure
)
self
.
run
(
preconfigure
=
preconfigure
)
if
(
if
self
.
connected_node
is
not
None
:
self
.
connected_node
is
not
None
node_version
=
self
.
connected_node
.
api
.
database
.
get_version
().
node_type
and
self
.
_transaction_serialization
==
"
legacy
"
is_testnet_wax
=
wax_helpy
.
get_hive_protocol_config
(
"
hive.fund
"
,
self
.
__get_chain_id
())[
"
IS_TEST_NET
"
]
and
self
.
connected_node
.
api
.
database
.
get_version
().
node_type
==
"
testnet
"
if
self
.
_transaction_serialization
==
"
legacy
"
:
):
if
node_version
==
"
testnet
"
and
is_testnet_wax
==
"
false
"
:
warnings
.
warn
(
"
Wallet in legacy mode may not work correctly with the testnet hive instance.
"
,
stacklevel
=
1
)
warnings
.
warn
(
"
Wallet in legacy mode may not work correctly with the testnet hive instance and wax mainnet instance.
"
,
stacklevel
=
1
,
)
elif
node_version
==
"
mainnet
"
and
is_testnet_wax
==
"
true
"
:
warnings
.
warn
(
"
Wallet in legacy mode may not work correctly with the mainnet hive instance and wax testnet instance.
"
,
stacklevel
=
1
,
)
@property
@property
def
_force_connected_node
(
self
)
->
AnyNode
:
def
_force_connected_node
(
self
)
->
AnyNode
:
...
...
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