fix: fix int to bytes
All checks were successful
Test CI / test speed (push) Successful in 14s

This commit is contained in:
sangge 2023-11-22 16:52:13 +08:00
parent 329bf9805d
commit 487743be6a

View File

@ -210,7 +210,8 @@ def check_merge(ct: int, ip: str):
temp_cfrag_cts = []
for i in cfrag_cts:
capsule = pickle.loads(i[0])
temp_cfrag_cts.append((capsule, int(i[1]).to_bytes(32)))
byte_length = (ct.bit_length() + 7) // 8
temp_cfrag_cts.append((capsule, int(i[1]).to_bytes(byte_length)))
cfrags = mergecfrag(temp_cfrag_cts)