rpc: add next to getmininginfo
Obtain difficulty and target for the next block without having to call getblocktemplate.
This commit is contained in:
4 files changed
+50
-1
No files matched your search
@@ -213,6 +213,12 @@ class MiningTest(BitcoinTestFramework):
|
||||
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['next'], {
|
||||
'height': 201,
|
||||
'target': target_str(REGTEST_TARGET),
|
||||
'bits': nbits_str(REGTEST_N_BITS),
|
||||
'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