32 lines
707 B
C++
32 lines
707 B
C++
//
|
|
// Keszitette: Toldi Balázs Ádám
|
|
// Datum: 2020. 03. 15.
|
|
//
|
|
|
|
#ifndef BLOCKCHAIN_BLOCKCHAIN_H
|
|
#define BLOCKCHAIN_BLOCKCHAIN_H
|
|
|
|
#include <vector>
|
|
#include <string>
|
|
#include "Block.h"
|
|
|
|
class Blockchain {
|
|
static int difficulty;
|
|
static int blockReward;
|
|
std::vector<Block> blockList;
|
|
public:
|
|
Blockchain();
|
|
Blockchain(const Blockchain &b);
|
|
const std::vector<Block> &getBlockList() const;
|
|
static int getDifficulty();
|
|
static int getBlockReward();
|
|
bool verifyBlocks() const;
|
|
size_t getHeight() const;
|
|
bool addBlock(Block& b);
|
|
Block operator[](size_t id);
|
|
bool operator<(Blockchain& b);
|
|
bool operator>(Blockchain& b);
|
|
};
|
|
|
|
|
|
#endif //BLOCKCHAIN_BLOCKCHAIN_H
|