mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-09 19:37:27 -03:00
contrib/signet/miner: remove debug code
This commit is contained in:
parent
297e35159f
commit
b3c712cb28
1 changed files with 0 additions and 11 deletions
|
@ -528,7 +528,6 @@ def do_calibrate(args):
|
|||
|
||||
TRIALS = 600 # gets variance down pretty low
|
||||
TRIAL_BITS = 0x1e3ea75f # takes about 5m to do 600 trials
|
||||
#TRIAL_BITS = 0x1e7ea75f # XXX
|
||||
|
||||
header = CBlockHeader()
|
||||
header.nBits = TRIAL_BITS
|
||||
|
@ -536,23 +535,14 @@ def do_calibrate(args):
|
|||
|
||||
start = time.time()
|
||||
count = 0
|
||||
#CHECKS=[]
|
||||
for i in range(TRIALS):
|
||||
header.nTime = i
|
||||
header.nNonce = 0
|
||||
headhex = header.serialize().hex()
|
||||
cmd = args.grind_cmd.split(" ") + [headhex]
|
||||
newheadhex = subprocess.run(cmd, stdout=subprocess.PIPE, input=b"", check=True).stdout.strip()
|
||||
#newhead = FromHex(CBlockHeader(), newheadhex.decode('utf8'))
|
||||
#count += newhead.nNonce
|
||||
#if (i+1) % 100 == 0:
|
||||
# CHECKS.append((i+1, count, time.time()-start))
|
||||
|
||||
#print("checks =", [c*1.0 / (b*targ*2**-256) for _,b,c in CHECKS])
|
||||
|
||||
avg = (time.time() - start) * 1.0 / TRIALS
|
||||
#exp_count = 2**256 / targ * TRIALS
|
||||
#print("avg =", avg, "count =", count, "exp_count =", exp_count)
|
||||
|
||||
if args.nbits is not None:
|
||||
want_targ = nbits_to_target(int(args.nbits,16))
|
||||
|
@ -593,7 +583,6 @@ def main():
|
|||
generate.add_argument("--nbits", default=None, type=str, help="Target nBits (specify difficulty)")
|
||||
generate.add_argument("--min-nbits", action="store_true", help="Target minimum nBits (use min difficulty)")
|
||||
generate.add_argument("--poisson", action="store_true", help="Simulate randomised block times")
|
||||
#generate.add_argument("--signcmd", default=None, type=str, help="Alternative signing command")
|
||||
generate.add_argument("--multiminer", default=None, type=str, help="Specify which set of blocks to mine (eg: 1-40/100 for the first 40%%, 2/3 for the second 3rd)")
|
||||
generate.add_argument("--backup-delay", default=300, type=int, help="Seconds to delay before mining blocks reserved for other miners (default=300)")
|
||||
generate.add_argument("--standby-delay", default=0, type=int, help="Seconds to delay before mining blocks (default=0)")
|
||||
|
|
Loading…
Reference in a new issue