'Unpacks a block from a buffer
:param data: The buffer to unpack from
:param offset: Optionally, the offset at which to start unpacking
:return: The TrustChainBlock that was unpacked from the buffer'

@classmethod
def unpack(cls, data, offset=0):

    ret = TrustChainBlock()
    (ret.public_key, ret.sequence_number, ret.link_public_key, ret.link_sequence_number, ret.previous_hash, ret.signature) = unpack_from(block_pack_format, data, offset)
    offset += block_pack_size
    (tx_len,) = struct.unpack('!I', data[offset:(offset + 4)])
    offset += 4
    (_, ret.transaction) = decode(data[offset:(offset + tx_len)])
    return ret
