Skip to content
Snippets Groups Projects
Commit cf1a8a77 authored by Robert Martin-Legene's avatar Robert Martin-Legene
Browse files

Prevenir ataque replay

parent eccf2757
No related branches found
No related tags found
1 merge request!1replayfix+listfeature
......@@ -9,7 +9,8 @@ contract ProofOfExistence {
function stamp(uint256 ots, uint256 file_hash) public {
hashstore[ots] = Dato({blockNumber: block.number, hash: file_hash});
if ( hashstore[ots] == 0 )
hashstore[ots] = Dato({blockNumber: block.number, hash: file_hash});
}
function verify(uint256 ots, uint256 file_hash) public view returns(bool){
......@@ -26,4 +27,4 @@ contract ProofOfExistence {
Dato memory dato = hashstore[ots];
return dato.blockNumber;
}
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment