cmdtest.py remote: add mimir test

This commit is contained in:
The MMGen Project 2026-10-07 16:40:38 +00:00
commit d5b4e94676
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
2 changed files with 15 additions and 0 deletions

View file

@ -25,6 +25,13 @@ class ThornodeRPCServer(ThornodeServer):
ping_info = {'ping': 'pong'}
mimir_info = {
'ASGARDSIZE': 20,
'CHURNINTERVAL': 43200,
'HALTBTCCHAIN': 0,
'HALTMEMOLESS': 0,
'MEMOLESSTXNCOST': 200000}
lastblock_info = [{
'chain': 'BTC',
'last_observed_in': 969302,
@ -100,6 +107,9 @@ class ThornodeRPCServer(ThornodeServer):
def ping(m, length):
return self.ping_info
def mimir(m, length):
return self.mimir_info
def lastblock(m, length):
return self.lastblock_info
@ -108,6 +118,7 @@ class ThornodeRPCServer(ThornodeServer):
pat_info = ( # these are matched in order, so more specific patterns must go first
('ping', 'GET', r'/thorchain/ping'),
('mimir', 'GET', r'/thorchain/mimir'),
('lastblock', 'GET', r'/thorchain/lastblock(.*)'),
('inbound_addrs', 'GET', r'/thorchain/inbound_addresses'),
('balance', 'GET', r'/bank/balances/(\S+)'),

View file

@ -24,6 +24,7 @@ class CmdTestRemote(CmdTestBase, CmdTestSwapMethods, CmdTestRuneMethods):
cmd_group = (
('ping', 'pinging remote REST server'),
('health', 'checking health of THORChain network'),
('mimir', 'getting Mimir variables'),
('inbounds', 'getting inbound addresses (all coins)'),
('inbound_ltc', 'getting inbound address for LTC'),
('inbound_ltc_log', 'getting inbound addresses (all coins, logging to file)'),
@ -47,6 +48,9 @@ class CmdTestRemote(CmdTestBase, CmdTestSwapMethods, CmdTestRuneMethods):
def health(self):
return self._rune_remote('health')
def mimir(self):
return self._rune_remote('mimir')
def inbounds(self):
return self._rune_remote('inbound_addrs')