work on implementing torgossip
This commit is contained in:
parent
ee8b81ead6
commit
9d13c0c989
@ -30,10 +30,8 @@ def put_block(safe_db, block):
|
|||||||
Kasten(block_hash, data, onionrblocks.generators.AnonVDFGenerator),
|
Kasten(block_hash, data, onionrblocks.generators.AnonVDFGenerator),
|
||||||
safe_db)
|
safe_db)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
print("Block was seen before")
|
|
||||||
pass
|
pass
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("Unknown error" + repr(e))
|
|
||||||
return b"0"
|
return b"0"
|
||||||
return b"1"
|
return b"1"
|
||||||
|
|
||||||
|
@ -48,4 +48,7 @@ def torgossip_runtest(test_manager):
|
|||||||
s.sendall(b'4' + bl_new.id)
|
s.sendall(b'4' + bl_new.id)
|
||||||
assert s.recv(64) == bl_new.get_packed()
|
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"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user