示例#1
0
 def target(self):
     return bits_to_target(self.bits)
示例#2
0
 def target(self):
     '''Returns the proof-of-work target based on the bits'''
     return bits_to_target(self.bits)
示例#3
0
 def difficulty(self):
     '''Returns the block difficulty based on the bits'''
     # note difficulty is (target of lowest difficulty) / (self's target)
     # lowest difficulty has bits that equal 0xffff001d
     return bits_to_target(bytes.fromhex('ffff001d')) / self.target()