Skip to content
Snippets Groups Projects

replayfix+listfeature

Closed Robert Martin-Legene requested to merge bugfix+feature into master
2 files
+ 11
4
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -8,9 +8,16 @@ contract ProofOfExistence {
mapping (uint256 => Dato) private hashstore;
function stamp(uint256 ots, uint256 file_hash) public {
if ( hashstore[ots] == 0 )
hashstore[ots] = Dato({blockNumber: block.number, hash: file_hash});
function stamp(uint256[] incoming) public {
uint256 len = incoming.length;
uint256 i = 0;
while ( i+1 < len )
{
uint256 ots = incoming[i++];
uint256 file_hash = incoming[i++];
if ( hashstore[ots] == 0 )
hashstore[ots] = Dato({blockNumber: block.number, hash: file_hash});
}
}
function verify(uint256 ots, uint256 file_hash) public view returns(bool){
Loading