-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathblock.hpp
More file actions
33 lines (26 loc) · 780 Bytes
/
block.hpp
File metadata and controls
33 lines (26 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//Isaac Mejía F.
#ifndef BLOCK_HPP
#define BLOCK_HPP
#include<string>
#include "sha256.hpp"
#include "ccontrol.hpp"
#include<ostream>
#include <vector>
#include<iostream>
#include<chrono>
class block{
private:
std::string data;
std::string prevHash;
std::string ValidHash;
std::string ID_BLOCK;
int timestamp;
public:
block(const std::string data, std::string prevHash);
friend std::ostream& operator<<(std::ostream& os, block b);
std::string getHash();
}; //Definicion de la clase bloque
std::string mineValidHash(std::string ID_BLOCK);
bool isValidHash(std::string hash);
std::string genIDBlock(const std::string data, std::string prevHash, int timestamp);
#endif