Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F10615014
abc_rpc_mocktime.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
923 B
Subscribers
None
abc_rpc_mocktime.py
View Options
# Copyright (c) 2020 The Bitcoin developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
Test RPCs related to mock time.
"""
from
test_framework.test_framework
import
BitcoinTestFramework
from
test_framework.util
import
assert_raises_rpc_error
class
MocktimeTest
(
BitcoinTestFramework
):
def
set_test_params
(
self
):
self
.
num_nodes
=
1
self
.
setup_clean_chain
=
True
def
run_test
(
self
):
self
.
nodes
[
0
]
.
setmocktime
(
0
)
assert_raises_rpc_error
(
-
8
,
"Mocktime can not be negative: -1."
,
self
.
nodes
[
0
]
.
setmocktime
,
-
1
)
assert_raises_rpc_error
(
-
8
,
"Mocktime can not be negative: -9223372036854775808."
,
self
.
nodes
[
0
]
.
setmocktime
,
-
9223372036854775808
,
)
if
__name__
==
"__main__"
:
MocktimeTest
()
.
main
()
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Sat, Nov 23, 09:55 (1 d, 10 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4528202
Default Alt Text
abc_rpc_mocktime.py (923 B)
Attached To
rSTAGING Bitcoin ABC staging
Event Timeline
Log In to Comment