work on implementing torgossip

This commit is contained in:
Kevin Froman 2021-01-31 05:17:02 +00:00
parent ee8b81ead6
commit 9d13c0c989
2 changed files with 3 additions and 2 deletions

View File

@ -30,10 +30,8 @@ def put_block(safe_db, block):
Kasten(block_hash, data, onionrblocks.generators.AnonVDFGenerator),
safe_db)
except ValueError:
print("Block was seen before")
pass
except Exception as e:
print("Unknown error" + repr(e))
return b"0"
return b"1"

View File

@ -48,4 +48,7 @@ def torgossip_runtest(test_manager):
s.sendall(b'4' + bl_new.id)
assert s.recv(64) == bl_new.get_packed()
# test block was uploaded by getting it
s.sendall(b'6')
assert s.recv(64) == b"BYE"