mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-18 19:40:40 +01:00
rpc: add target to getmininginfo result
This commit is contained in:
@@ -17,7 +17,9 @@ from test_framework.blocktools import (
|
||||
NORMAL_GBT_REQUEST_PARAMS,
|
||||
TIME_GENESIS_BLOCK,
|
||||
REGTEST_N_BITS,
|
||||
REGTEST_TARGET,
|
||||
nbits_str,
|
||||
target_str,
|
||||
)
|
||||
from test_framework.messages import (
|
||||
BLOCK_HEADER_SIZE,
|
||||
@@ -209,6 +211,7 @@ class MiningTest(BitcoinTestFramework):
|
||||
assert 'currentblocktx' not in mining_info
|
||||
assert 'currentblockweight' not in mining_info
|
||||
assert_equal(mining_info['bits'], nbits_str(REGTEST_N_BITS))
|
||||
assert_equal(mining_info['target'], target_str(REGTEST_TARGET))
|
||||
assert_equal(mining_info['difficulty'], Decimal('4.656542373906925E-10'))
|
||||
assert_equal(mining_info['networkhashps'], Decimal('0.003333333333333334'))
|
||||
assert_equal(mining_info['pooledtx'], 0)
|
||||
|
||||
Reference in New Issue
Block a user