예제 #1
0
 def message_hash(self, msg):
     payload = _parse_args(msg.prev_hash, msg.payload_hash)
     return bit_encode(payload)
예제 #2
0
 def message_hash(self, msg, new_payload_hash=None):
     payload_hash = new_payload_hash or msg.payload_hash
     payload = _parse_args(msg.prev_hash, payload_hash)
     return bit_encode(payload)
예제 #3
0
 def payload_hash(self, msg):
     payload = _parse_args(msg.timestamp, msg.data, msg.sender,
                           msg.receiver)
     return bit_encode(payload)
예제 #4
0
 def block_hash(self, block):
     payload = _parse_args(block.prev_hash, block.timestamp, block.messages[-1].hash)
     return bit_encode(payload)