relocate module: regtest -> base_proto.bitcoin.regtest
This commit is contained in:
parent
ffd5943212
commit
152901143c
5 changed files with 10 additions and 10 deletions
|
|
@ -55,7 +55,7 @@ class bitcoin_core_daemon(CoinDaemon):
|
|||
"""
|
||||
fall back on hard-coded credentials
|
||||
"""
|
||||
from ...regtest import MMGenRegtest
|
||||
from .regtest import MMGenRegtest
|
||||
self.rpc_user = MMGenRegtest.rpc_user
|
||||
self.rpc_password = MMGenRegtest.rpc_password
|
||||
|
||||
|
|
|
|||
|
|
@ -17,14 +17,14 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
"""
|
||||
regtest: Coin daemon regression test mode setup and operations for the MMGen suite
|
||||
base_proto.bitcoin.regtest: Coin daemon regression test mode setup and operations
|
||||
"""
|
||||
|
||||
import os,time,shutil,json,re
|
||||
from subprocess import run,PIPE
|
||||
from .common import *
|
||||
from .protocol import init_proto
|
||||
from .rpc import rpc_init,json_encoder
|
||||
from ...common import *
|
||||
from ...protocol import init_proto
|
||||
from ...rpc import rpc_init,json_encoder
|
||||
|
||||
def create_data_dir(data_dir):
|
||||
try: os.stat(os.path.join(data_dir,'regtest'))
|
||||
|
|
@ -47,7 +47,7 @@ miner_addr = {
|
|||
}
|
||||
|
||||
def create_hdseed(proto):
|
||||
from .tool.api import tool_api
|
||||
from ...tool.api import tool_api
|
||||
t = tool_api()
|
||||
t.init_coin(proto.coin,proto.network)
|
||||
t.addrtype = 'compressed' if proto.coin == 'BCH' else 'bech32'
|
||||
|
|
@ -77,7 +77,7 @@ class MMGenRegtest(MMGenObject):
|
|||
self.coin = coin.lower()
|
||||
assert self.coin in self.coins, f'{coin!r}: invalid coin for regtest'
|
||||
|
||||
from .daemon import CoinDaemon
|
||||
from ...daemon import CoinDaemon
|
||||
self.proto = init_proto(self.coin,regtest=True,need_amt=True)
|
||||
self.d = CoinDaemon(self.coin+'_rt',test_suite=g.test_suite)
|
||||
|
||||
|
|
@ -57,7 +57,7 @@ opts_data = {
|
|||
|
||||
cmd_args = opts.init(opts_data)
|
||||
|
||||
from .regtest import MMGenRegtest
|
||||
from .base_proto.bitcoin.regtest import MMGenRegtest
|
||||
|
||||
def check_num_args():
|
||||
m = getattr(MMGenRegtest,cmd_args[0])
|
||||
|
|
|
|||
|
|
@ -574,7 +574,7 @@ def check_usr_opts(usr_opts): # Raises an exception if any check fails
|
|||
# die( 'UserOptError', f'--rbf requested, but {proto.coin} does not support replace-by-fee transactions' )
|
||||
|
||||
# def chk_bob(key,val,desc):
|
||||
# from .regtest import MMGenRegtest
|
||||
# from .base_proto.bitcoin.regtest import MMGenRegtest
|
||||
# try:
|
||||
# os.stat(os.path.join(MMGenRegtest(g.coin).d.datadir,'regtest','debug.log'))
|
||||
# except:
|
||||
|
|
|
|||
|
|
@ -424,7 +424,7 @@ class TestSuiteRegtest(TestSuiteBase,TestSuiteShared):
|
|||
if not self.deterministic:
|
||||
return 'skip'
|
||||
self.spawn('',msg_only=True)
|
||||
from mmgen.regtest import MMGenRegtest
|
||||
from mmgen.base_proto.bitcoin.regtest import MMGenRegtest
|
||||
rt = MMGenRegtest(self.proto.coin)
|
||||
await rt.stop()
|
||||
from shutil import rmtree
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue